Instructions to use ziaddBou/pneumodoc-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use ziaddBou/pneumodoc-model with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://ziaddBou/pneumodoc-model") - Notebooks
- Google Colab
- Kaggle
Model Description
This model employs a MobileNetV3 architecture fine-tuned for the detection of pneumonia from chest X-ray images. It is designed to assist radiologists by providing a preliminary automated diagnosis. tetststtststststtstst
Training Data
The model was trained on the Kaggle Pneumonia dataset, which contains thousands of labeled chest X-ray images from children.
Model Architecture
The model uses MobileNetV3 as the base for feature extraction, with additional custom layers to tailor it for pneumonia detection.
Training Procedure
The model was trained with an Adam optimizer and early stopping based on validation loss to prevent overfitting. Data augmentation techniques such as rotations and flips were used to enhance generalization.
Performance
The model achieved a high accuracy on the validation set, with the following metrics:
- Accuracy: XX%
- Precision: XX%
- Recall: XX%
- F1 Score: XX%
Usage
Here is an example of how to use this model:
import gradio as gr
import tensorflow as tf
model = tf.keras.models.load_model('model.h5')
def predict(image):
processed_image = preprocess_image(image)
return model.predict(processed_image)
iface = gr.Interface(fn=predict, inputs="image", outputs="label")
iface.launch()
- Downloads last month
- 15