Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model:
|
| 4 |
+
- google/efficientnet-b0
|
| 5 |
+
pipeline_tag: image-classification
|
| 6 |
+
tags:
|
| 7 |
+
- biology
|
| 8 |
+
- medical
|
| 9 |
+
---
|
| 10 |
+
# Eye Disease Model
|
| 11 |
+
|
| 12 |
+
**Model Information:**
|
| 13 |
+
- **Architecture:** EfficientNet-B0
|
| 14 |
+
- **Task:** Multi-class classification (4 diseases)
|
| 15 |
+
- **Dataset:** [Eye Disease Dataset](https://www.kaggle.com/datasets/gunavenkatdoddi/eye-diseases-classification)
|
| 16 |
+
- **Input Size:** 224×224 RGB images
|
| 17 |
+
|
| 18 |
+
**Classes:**
|
| 19 |
+
1. Cataract
|
| 20 |
+
2. Diabetic Retinopathy
|
| 21 |
+
3. Glaucoma
|
| 22 |
+
4. Normal
|
| 23 |
+
|
| 24 |
+
**Performance Metrics:**
|
| 25 |
+
- **Accuracy:** 95%
|
| 26 |
+
- **Precision:** 0.95
|
| 27 |
+
- **Recall:** 0.9555
|
| 28 |
+
- **F1-Score:** 0.95
|
| 29 |
+
|
| 30 |
+
**Usage:**
|
| 31 |
+
```python
|
| 32 |
+
from shifaa.vision import VisionModelFactory
|
| 33 |
+
|
| 34 |
+
model = VisionModelFactory.create_model(
|
| 35 |
+
model_type="classification",
|
| 36 |
+
model_name="Eye_Disease"
|
| 37 |
+
)
|
| 38 |
+
|
| 39 |
+
result = model.run("eye_image.jpg", show_image=True)
|
| 40 |
+
print(f"Disease: {result['predicted_class']}")
|
| 41 |
+
print(f"Confidence: {result['confidence']:.2f}%")
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
**Confusion Matrix:**
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
**Preprocessing:**
|
| 50 |
+
- Resize to 224×224
|
| 51 |
+
- Convert to tensor
|
| 52 |
+
- ImageNet normalization
|
| 53 |
+
|
| 54 |
+
**Training Details:**
|
| 55 |
+
- **Loss Function:** CrossEntropyLoss
|
| 56 |
+
- **Optimizer:** Adam (lr=0.0001)
|
| 57 |
+
- **Scheduler:** ReduceLROnPlateau (factor=0.5, patience=3)
|
| 58 |
+
|
| 59 |
+
---
|