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
The model was trained on the
Kaggle Pneumonia dataset, which contains thousands of labeled chest X-ray images from children.
The model uses MobileNetV3 as the base for feature extraction, with additional custom layers to tailor it for pneumonia detection.
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.
The model achieved a high accuracy on the validation set, with the following metrics:
1import gradio as gr
2import tensorflow as tf
3
4model = tf.keras.models.load_model('model.h5')
5
6def predict(image):
7 processed_image = preprocess_image(image)
8 return model.predict(processed_image)
9
10iface = gr.Interface(fn=predict, inputs="image", outputs="label")
11iface.launch()