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