Pediatric Chest X-Ray Triage
A ResNet-18 classifier that flags pneumonia in pediatric chest X-rays at 98.7% recall, tuned so the model misses as few sick children as possible.
Everything from the Kaggle chest X-ray set through to the Streamlit app: a class-weighted loss for the imbalance, the official test set left untouched until the end, & a recall-first operating point read off the PR curve.
Screening chest X-rays is a volume problem: most images are normal, & the cost of missing a pneumonia case is far higher than the cost of a false alarm. A triage model is only useful if it is deliberately tuned toward recall rather than headline accuracy.
- 98.7%
- 0.96
- 0.97
- 84.6%
- 0.82
Transfer learning from ImageNet weights onto a ResNet-18 backbone, trained with stratified splits, weighted cross-entropy to counter the class imbalance, mixed-precision (AMP) training, & early stopping on validation macro-F1.
The gap between ~0.985 validation macro-F1 & ~0.82 on the held-out test set is the interesting part of this project, not a footnote - it is what the distribution shift between the validation set & the true held-out test set actually costs you. Confusion-matrix & ROC/PR analysis were used to pick an operating point that trades precision away for recall, on the grounds that a false positive costs a second read & a false negative costs a missed diagnosis.
Wrapped in a Streamlit interface so the model can be run against a single image without touching the training code.