mgbam commited on
Commit
54c4100
Β·
verified Β·
1 Parent(s): 9102a67

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -46
README.md CHANGED
@@ -1,71 +1,95 @@
1
  ---
2
- title: TB Detection with AST
3
  emoji: 🫁
4
- colorFrom: blue
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.49.1
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
- # 🫁 Tuberculosis Detection with Adaptive Sparse Training
23
 
24
- **Advanced AI for TB screening from chest X-rays - 99.3% accuracy with 89% energy savings!**
25
 
26
  ## 🌟 Features
27
 
28
- - ⚑ **Real-time TB Detection** from chest X-rays
29
- - πŸ”¬ **Grad-CAM Visualization** - See what the AI focuses on
30
- - πŸ“Š **Confidence Scores** with clinical interpretation
31
- - 🎨 **Modern UI/UX** - Mobile-responsive design
32
- - πŸ’š **Energy Efficient** - Uses only 10% of traditional computational resources
33
- - 🌍 **Built for Global Health** - Runs on low-power devices
34
 
35
- ## 🎯 Model Performance
36
 
37
- | Metric | Value |
38
- |--------|-------|
39
- | **Accuracy** | 99.29% |
40
- | **Energy Savings** | 89.52% |
41
- | **Activation Rate** | 9.38% |
42
- | **Inference Time** | <2 seconds |
43
 
44
- ## πŸš€ How to Use
45
 
46
- 1. **Upload** a chest X-ray image (PNG, JPG, JPEG)
47
- 2. **Enable Grad-CAM** to see AI explanations (recommended)
48
- 3. **Click "Analyze X-Ray"** to get results
49
- 4. **Review** prediction, confidence, and clinical interpretation
50
- 5. **Examine** Grad-CAM heatmaps to understand the AI's decision
 
51
 
52
- ## ⚠️ Medical Disclaimer
53
 
54
- This is an AI screening tool designed to **assist** healthcare providers. It is NOT a substitute for professional medical diagnosis, laboratory confirmation, or clinical evaluation by qualified healthcare providers.
 
 
 
 
55
 
56
- Always consult with healthcare professionals for proper diagnosis and treatment.
57
 
58
- ## πŸ”¬ Technology
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
- - **Architecture**: EfficientNet-B0
61
- - **Training Method**: Adaptive Sparse Training (AST) with Sundew algorithm
62
- - **Dataset**: TB Chest X-Ray Database (~3,500 images)
63
- - **Framework**: PyTorch + Gradio
 
 
 
 
 
 
 
 
 
 
64
 
65
- ## πŸ“š Learn More
66
 
67
- - [GitHub Repository](https://github.com/oluwafemidiakhoa/Tuberculosis)
68
- - [Malaria Detection (Sister Project)](https://huggingface.co/spaces/mgbam/Malaria)
 
 
 
 
 
 
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
- **Built with ❀️ for sustainable AI in global health** πŸŒπŸ’š
 
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** 🌍