Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.0.1
metadata
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
- Upload a chest X-ray image (PNG, JPG)
- Analyze - AI processes in <2 seconds
- Review probability distribution for all 4 diseases
- 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
- Training Notebook: TB_MultiClass_Complete_Fixed.ipynb
- Documentation: Full README
π¨βπ» Developer
Oluwafemi Idiakhoa
- GitHub: @oluwafemidiakhoa
- Hugging Face: @mgbam
π License
MIT License - Free for research and educational use
Powered by Adaptive Sparse Training - Energy-efficient AI for accessible healthcare π