Machine learning
PulmoSight.
TB screening from chest X-rays: three CNNs and an ensemble at 86.7% test accuracy
View projectOverview
PulmoSight classifies a frontal chest X-ray as TB or Normal and returns a calibrated probability. It compares three convolutional neural networks, combines them into an ensemble that beats each of them on held-out data, and lets anyone test their own X-ray in a Streamlit app.
What I built
- Three networks trained on the same 13,445 X-rays: a 5-block Simple CNN, PulmoNet (a custom residual squeeze-excite CNN) and an ImageNet EfficientNet-B0.
- A weighted ensemble (EfficientNet-B0 50%, Simple CNN 30%, PulmoNet 20%) over temperature-calibrated probabilities.
- A leak-free protocol: early stopping, calibration, thresholds and ensemble weights chosen on 1,659 validation images, then the 1,681-image test set scored once, with bootstrap CIs, DeLong and McNemar tests.
- Diagnostics for overfitting, robustness to image corruptions and shortcut learning, including a lung-segmentation retraining experiment.
- A Streamlit app with a model comparison page, image-quality warnings and per-network votes, serving CPU-only models from versioned artifacts.
Outcome
The ensemble reached 86.7% test accuracy and 0.937 AUROC, cutting false alarms from 105 to 64 compared with EfficientNet-B0 alone. PulmoSight is a research prototype, not a medical device or a diagnosis.
Stack
Python, PyTorch, EfficientNet-B0, Streamlit, Jupyter