Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Pneumonia Detection from X-ray Images
|
3 |
+
emoji: 🏥
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: indigo
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: "3.0"
|
8 |
+
python_version: "3.10"
|
9 |
+
suggested_hardware: "cpu-upgrade"
|
10 |
+
app_file: "./app.py"
|
11 |
+
fullWidth: true
|
12 |
+
header: mini
|
13 |
+
short_description: " model to detect pneumonia from chest X-ray images."
|
14 |
+
tags:
|
15 |
+
- deep-learning
|
16 |
+
- medical-imaging
|
17 |
+
- computer-vision
|
18 |
+
- pneumonia-detection
|
19 |
+
thumbnail: "URL_to_thumbnail_image"
|
20 |
+
---
|
21 |
+
|
22 |
+
## Model Description
|
23 |
+
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.
|
24 |
+
tetststtststststtstst
|
25 |
+
|
26 |
+
## Training Data
|
27 |
+
The model was trained on the [Kaggle Pneumonia dataset](https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia), which contains thousands of labeled chest X-ray images from children.
|
28 |
+
|
29 |
+
## Model Architecture
|
30 |
+
The model uses MobileNetV3 as the base for feature extraction, with additional custom layers to tailor it for pneumonia detection.
|
31 |
+
|
32 |
+
## Training Procedure
|
33 |
+
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.
|
34 |
+
|
35 |
+
## Performance
|
36 |
+
The model achieved a high accuracy on the validation set, with the following metrics:
|
37 |
+
- Accuracy: XX%
|
38 |
+
- Precision: XX%
|
39 |
+
- Recall: XX%
|
40 |
+
- F1 Score: XX%
|
41 |
+
|
42 |
+
## Usage
|
43 |
+
Here is an example of how to use this model:
|
44 |
+
|
45 |
+
```python
|
46 |
+
import gradio as gr
|
47 |
+
import tensorflow as tf
|
48 |
+
|
49 |
+
model = tf.keras.models.load_model('model.h5')
|
50 |
+
|
51 |
+
def predict(image):
|
52 |
+
processed_image = preprocess_image(image)
|
53 |
+
return model.predict(processed_image)
|
54 |
+
|
55 |
+
iface = gr.Interface(fn=predict, inputs="image", outputs="label")
|
56 |
+
iface.launch()
|