VGG16 transfer learning + Grad-CAM explanation. Runs 100% in your browser: your image is never uploaded.
Educational demo only. This is not a medical device and not medical advice.
It was trained on pediatric chest X-rays from one hospital and can be wrong. If you are worried about your health, see a doctor.
1 · Chest X-ray
⬆️
Drop an X-ray here or click to choose
JPG or PNG · stays on your device
Or try an example from the Kaggle test set:
Loading model…
2 · Result
Upload an X-ray or pick an example to see the prediction.
Grad-CAM: regions that pushed the model toward “pneumonia”
low influencehigh influence
About the model
VGG16 (ImageNet weights) fine-tuned on the Kaggle Chest X-Ray Images (Pneumonia) dataset, rebuilt from the
Knowledge Doctor tutorial with a proper validation split, class weighting, fine-tuning and honest evaluation.
Inference runs here via ONNX Runtime Web (WebAssembly).
Official test set (624 images, threshold 0.5)
Accuracy
89.9%
Sensitivity (pneumonia caught)
97.9% (382 of 390)
Specificity (normal cleared)
76.5% (179 of 234)
Precision · F1 · ROC-AUC
87.4% · 0.924 · 0.965
It is tuned to miss few pneumonia cases, so it raises false alarms on roughly 1 in 4 normal X-rays.
Confusion matrix and ROC curveLimitations
Pediatric patients only (ages 1–5, one hospital in Guangzhou).
Not validated on adults, other scanners, or other diseases; it will give an answer for any image, even a non-X-ray.
It cannot tell bacterial from viral pneumonia.
Grad-CAM is a visual aid, not proof of clinical reasoning.