chest-xray-classifier

Production-grade 3-class chest X-ray classifier distinguishing normal, bacterial pneumonia, and viral pneumonia on pediatric frontal radiographs.
Overview
| Task | Multiclass image classification (3 classes) |
| Dataset | Kaggle Chest X-Ray Images (Pneumonia) - 5,856 radiographs |
| Main model | ConvNeXt-V2-Tiny (facebook/convnextv2-tiny-22k-224) fine-tuned |
| Baseline | DINOv2 ViT-S linear probe (facebook/dinov2-small) |
| Stack | PyTorch Lightning · Hydra · MLflow · DVC · FastAPI · Docker · GitHub Actions · MkDocs |
| License | MIT |
Results
| Model | Accuracy | Macro F1 | Macro AUROC (OvR) |
|---|---|---|---|
| ConvNeXt-V2-Tiny (main) | 91.3% | 90.3% | 97.5% |
| DINOv2 ViT-S linear probe (baseline) | 85.6% | 84.2% | 94.2% |
Visualizations

Confusion matrix on the held-out test split (n=624) - ConvNeXt-V2-Tiny at 91.3% accuracy.

One-vs-rest ROC curves per class - macro AUROC 97.5%.

Sample predictions on test radiographs with predicted class and confidence.
Sections
- Architecture - data flow, model choices, metrics rationale
- Training - running experiments, logging, overrides
- Serving - FastAPI endpoints, Docker deployment
- Benchmarks - vs literature, trade-offs
- Reproducibility - pinned environment, one-command re-run
- Limitations - failure modes, dataset bias
- Model card - HF Hub card template
Links
- Code: GitHub
- Model: Hugging Face
Disclaimer
Research/educational artifact only - not intended for clinical use.