Project 05 / Computer vision
Pneumonia detection
Making model predictions inspectable.
Explore source on GitHubOverview
A closer look
at the system.
A chest X-ray classification project with two-stage transfer learning. Grad-CAM overlays help inspect the model’s image features alongside its predictions.
- Engineering focus
- Computer vision
- What this demonstrates
- Transfer learning, model evaluation, Grad-CAM visualization, and model serving.
- Project context
- Computer vision & model serving
- Technology
- PyTorch / EfficientNet-B0 / FastAPI / Streamlit / ONNX
- 01Chest X-rayPyTorch
- 02Classify imageEfficientNet-B0
- 03Inspect attentionGrad-CAM
- 04Serve predictionFastAPI · ONNX
Model results
Predictions, made visible.
01 / The problem
An image classification project needs both evaluation and a way to inspect which image regions influence predictions.
02 / Implementation & design
An ImageNet-pretrained EfficientNet-B0 is trained in two stages: a frozen backbone with a new classifier, followed by fine-tuning at a lower learning rate. Grad-CAM overlays support visual inspection, while FastAPI inference and ONNX export explore model serving.
03 / Engineering challenge
Class imbalance and a small original validation set motivated weighted loss and a stratified training/validation split. The repository reports 98.2% recall with 88.0% precision at a 0.5 threshold on 624 test images. These are project evaluation results, not clinical validation.
Results & capabilities
98.2%
Reported recall on project evaluation
90.5% accuracy · 88.0% precision · 624 test images
Metrics from the existing project evaluation; not an independent benchmark.