Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,71 +1,95 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π«
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
license: mit
|
| 11 |
-
tags:
|
| 12 |
-
- tuberculosis
|
| 13 |
-
- medical-ai
|
| 14 |
-
- chest-xray
|
| 15 |
-
- adaptive-sparse-training
|
| 16 |
-
- explainable-ai
|
| 17 |
-
- gradcam
|
| 18 |
-
- healthcare
|
| 19 |
-
- energy-efficient
|
| 20 |
---
|
| 21 |
|
| 22 |
-
# π«
|
| 23 |
|
| 24 |
-
**
|
| 25 |
|
| 26 |
## π Features
|
| 27 |
|
| 28 |
-
-
|
| 29 |
-
-
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
| 33 |
-
-
|
| 34 |
|
| 35 |
-
## π―
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|--------|-------|
|
| 39 |
-
| **Accuracy** | 99.29% |
|
| 40 |
-
| **Energy Savings** | 89.52% |
|
| 41 |
-
| **Activation Rate** | 9.38% |
|
| 42 |
-
| **Inference Time** | <2 seconds |
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
| 51 |
|
| 52 |
-
##
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
-
##
|
| 66 |
|
| 67 |
-
-
|
| 68 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
## π¨βπ» Developer
|
| 71 |
|
|
@@ -73,6 +97,10 @@ Always consult with healthcare professionals for proper diagnosis and treatment.
|
|
| 73 |
- GitHub: [@oluwafemidiakhoa](https://github.com/oluwafemidiakhoa)
|
| 74 |
- Hugging Face: [@mgbam](https://huggingface.co/mgbam)
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
---
|
| 77 |
|
| 78 |
-
**
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Multi-Class Chest X-Ray Detection
|
| 3 |
emoji: π«
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# π« Multi-Class Chest X-Ray Detection with AST
|
| 14 |
|
| 15 |
+
**AI-powered detection of 4 respiratory diseases from chest X-rays**
|
| 16 |
|
| 17 |
## π Features
|
| 18 |
|
| 19 |
+
- β
**4 Disease Classes**: Normal, Tuberculosis, Pneumonia, COVID-19
|
| 20 |
+
- β
**87.29% Validation Accuracy**
|
| 21 |
+
- β
**100% Pneumonia Specificity** (no TB confusion!)
|
| 22 |
+
- β
**90% Energy Savings** with Adaptive Sparse Training
|
| 23 |
+
- β
**Fast Inference**: <2 seconds per X-ray
|
| 24 |
+
- β
**Explainable AI**: Clear probability distributions
|
| 25 |
|
| 26 |
+
## π― Key Achievement
|
| 27 |
|
| 28 |
+
**Problem Solved:** Previous binary models misclassified pneumonia as TB (30% false positive rate).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
**Our Solution:** Multi-class training distinguishes between all 4 diseases with <5% false positive rate.
|
| 31 |
|
| 32 |
+
| Disease | Test Accuracy | Notes |
|
| 33 |
+
|---------|--------------|-------|
|
| 34 |
+
| Normal | 60% | Some COVID confusion |
|
| 35 |
+
| TB | 80% | Strong performance |
|
| 36 |
+
| **Pneumonia** | **100%** | **Perfect - no TB confusion!** |
|
| 37 |
+
| COVID-19 | 80% | Good detection |
|
| 38 |
|
| 39 |
+
## π¬ Technology
|
| 40 |
|
| 41 |
+
- **Model**: EfficientNet-B0
|
| 42 |
+
- **Training**: Adaptive Sparse Training (AST)
|
| 43 |
+
- **Dataset**: COVID-QU-Ex (~33,920 chest X-rays)
|
| 44 |
+
- **Sparsity**: 90% (only 10% neurons active)
|
| 45 |
+
- **Energy Savings**: 90% vs traditional training
|
| 46 |
|
| 47 |
+
## β οΈ Important Medical Disclaimer
|
| 48 |
|
| 49 |
+
**This is a screening tool for research purposes only, NOT a diagnostic device.**
|
| 50 |
+
|
| 51 |
+
### Limitations:
|
| 52 |
+
- β NOT FDA-approved for clinical diagnosis
|
| 53 |
+
- β Cannot replace professional radiologist review
|
| 54 |
+
- β All positive results require laboratory confirmation:
|
| 55 |
+
- **TB**: Sputum AFB smear, GeneXpert MTB/RIF
|
| 56 |
+
- **Pneumonia**: Sputum culture, blood tests
|
| 57 |
+
- **COVID-19**: RT-PCR, rapid antigen test
|
| 58 |
+
|
| 59 |
+
### Proper Use:
|
| 60 |
+
- β
Preliminary screening only
|
| 61 |
+
- β
Always consult healthcare professionals
|
| 62 |
+
- β
Confirm with clinical correlation and lab tests
|
| 63 |
+
|
| 64 |
+
**Do not make medical decisions based solely on this tool.**
|
| 65 |
+
|
| 66 |
+
## π Performance Metrics
|
| 67 |
|
| 68 |
+
| Metric | Value |
|
| 69 |
+
|--------|-------|
|
| 70 |
+
| **Overall Accuracy** | 87.29% |
|
| 71 |
+
| **Energy Savings** | 90% |
|
| 72 |
+
| **Activation Rate** | 10% |
|
| 73 |
+
| **Training Epochs** | 50 |
|
| 74 |
+
| **Inference Time** | <2 seconds |
|
| 75 |
+
|
| 76 |
+
## π How It Works
|
| 77 |
+
|
| 78 |
+
1. **Upload** a chest X-ray image (PNG, JPG)
|
| 79 |
+
2. **Analyze** - AI processes in <2 seconds
|
| 80 |
+
3. **Review** probability distribution for all 4 diseases
|
| 81 |
+
4. **Confirm** with professional medical evaluation
|
| 82 |
|
| 83 |
+
## π Model Evolution
|
| 84 |
|
| 85 |
+
- **v1.0 (Beta)**: Current model - 87.29% accuracy, 100% pneumonia specificity
|
| 86 |
+
- **v2.0 (Upcoming)**: Improved model targeting 92-95% accuracy with EfficientNet-B2
|
| 87 |
+
|
| 88 |
+
## π Links
|
| 89 |
+
|
| 90 |
+
- **GitHub**: [oluwafemidiakhoa/Tuberculosis](https://github.com/oluwafemidiakhoa/Tuberculosis)
|
| 91 |
+
- **Training Notebook**: [TB_MultiClass_Complete_Fixed.ipynb](https://github.com/oluwafemidiakhoa/Tuberculosis/blob/main/TB_MultiClass_Complete_Fixed.ipynb)
|
| 92 |
+
- **Documentation**: [Full README](https://github.com/oluwafemidiakhoa/Tuberculosis/blob/main/README.md)
|
| 93 |
|
| 94 |
## π¨βπ» Developer
|
| 95 |
|
|
|
|
| 97 |
- GitHub: [@oluwafemidiakhoa](https://github.com/oluwafemidiakhoa)
|
| 98 |
- Hugging Face: [@mgbam](https://huggingface.co/mgbam)
|
| 99 |
|
| 100 |
+
## π License
|
| 101 |
+
|
| 102 |
+
MIT License - Free for research and educational use
|
| 103 |
+
|
| 104 |
---
|
| 105 |
|
| 106 |
+
**Powered by Adaptive Sparse Training - Energy-efficient AI for accessible healthcare** π
|