Create README.md
Browse filesβ οΈ Bias, Risks, and Limitations
π§ Potential Biases
Trained primarily on US-based patient data
May not generalize well to different demographics & imaging techniques
Model confidence does not equal correctness
π Limitations
Not a diagnostic tool: AI cannot replace radiologists
Best suited for frontal X-rays (not lateral)
Cannot detect rare conditions not in the dataset
β
Recommendations
Always consult a radiologist for diagnosis.
Fine-tune the model on regional hospital data if needed.
Use ensemble learning for higher accuracy.
π Training Details
Dataset 1: NIH Chest X-ray Dataset (~100,000 images)
Dataset 2: NLMCXR Dataset (Radiology Reports + X-ray images)
Loss Function: Cross-Entropy Loss
Optimizer: Adam with Learning Rate Scheduling
Batch Size: 32
Epochs: 20
Hardware Used: NVIDIA V100 GPU (AWS Cloud)
π Evaluation Metrics
AUROC (Area Under Receiver Operating Curve)
Precision / Recall
F1 Score
Accuracy across conditions
π± Environmental Impact
This model was trained on cloud GPUs with optimizations to reduce energy consumption.
Hardware Type: NVIDIA V100 GPU
Total Training Time: ~20 GPU Hours
Cloud Provider: AWS (US-East)
Estimated Carbon Emissions: ~15 kg COβ
π€ Acknowledgments
NIH & NLMCXR datasets
Hugging Face & PyTorch for model training
Community support & AI healthcare initiatives
---
### **What This Model Card Covers:**
β
**Full project backstory** (False TB result β AI model solution)
β
**EfficientNet_B0 vs. Other models** (Why it was chosen)
β
**How to use it** (Code + Dependencies)
β
**Evaluation metrics & Dataset details**
β
**Bias, Risks, & Future Work**
Let me know if you need **further refinements** before uploading.
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
license: mit
|
4 |
+
tags:
|
5 |
+
- chest-xray
|
6 |
+
- efficientnet-b0
|
7 |
+
- medical-ai
|
8 |
+
- radiology
|
9 |
+
- deep-learning
|
10 |
+
datasets:
|
11 |
+
- nih-chest-xray
|
12 |
+
- nlmcxr
|
13 |
+
model-index:
|
14 |
+
- name: AI-Powered Chest X-ray Analysis (EfficientNet_B0)
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
type: image-classification
|
18 |
+
dataset:
|
19 |
+
name: nih-chest-xray
|
20 |
+
type: medical-image
|
21 |
+
metrics:
|
22 |
+
- name: AUROC Score
|
23 |
+
type: accuracy
|
24 |
+
value: 0.72 - 0.93
|
25 |
+
---
|
26 |
+
|
27 |
+
# AI-Powered Chest X-ray Analysis (EfficientNet_B0)
|
28 |
+
|
29 |
+
## π©Ί Overview
|
30 |
+
|
31 |
+
This model analyzes **chest X-rays** to detect **14 potential lung conditions** using **EfficientNet_B0**, a lightweight yet high-performing CNN. It was trained on **NIH Chest X-ray Dataset & NLMCXR Dataset**, providing reliable multi-class classification for various lung diseases.
|
32 |
+
|
33 |
+
### π Motivation
|
34 |
+
This project began when I received a **false-positive tuberculosis (TB) report** and had to wait for **delayed X-ray results** due to a holiday. Not knowing how to interpret X-rays, I **built this AI tool** to **help others in similar situations**.
|
35 |
+
|
36 |
+
## π Model Details
|
37 |
+
|
38 |
+
- **Model type**: Image Classification (Chest X-ray Analysis)
|
39 |
+
- **Architecture**: EfficientNet_B0
|
40 |
+
- **Trained on**: NIH Chest X-ray & NLMCXR Datasets
|
41 |
+
- **Input format**: Chest X-ray images (`.png`, `.jpg`)
|
42 |
+
- **Output**: Probabilities for 14 lung conditions
|
43 |
+
- **License**: MIT
|
44 |
+
- **Compute Requirement**: Can run on CPU, optimized for **GPU (CUDA)**
|
45 |
+
|
46 |
+
## π‘ Why EfficientNet_B0?
|
47 |
+
I tested multiple models, including **DenseNet121, ViT, and CNNs**, but **EfficientNet_B0_best_93.44** outperformed the others in terms of:
|
48 |
+
- **High Accuracy (AUROC: 0.72 - 0.93)**
|
49 |
+
- **Lower Computational Cost**
|
50 |
+
- **Faster Inference Speed**
|
51 |
+
- **Better Generalization across datasets**
|
52 |
+
|
53 |
+
## π Model Performance
|
54 |
+
|
55 |
+
| Model | AUROC Score (Avg) |
|
56 |
+
|--------------------|------------------|
|
57 |
+
| **EfficientNet_B0** | **0.72 - 0.93** |
|
58 |
+
| DenseNet121 | 0.55 - 0.95 |
|
59 |
+
| ViT_Base | 0.32 - 0.65 |
|
60 |
+
|
61 |
+
---
|
62 |
+
|
63 |
+
## π§ How to Use the Model
|
64 |
+
|
65 |
+
### **1οΈβ£ Install Dependencies**
|
66 |
+
```bash
|
67 |
+
pip install torch torchvision transformers pillow numpy matplotlib seaborn
|