🫁 Chest X-ray Pneumonia Detector

VGG16 transfer learning + Grad-CAM explanation. Runs 100% in your browser: your image is never uploaded.

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.

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)
Accuracy89.9%
Sensitivity (pneumonia caught)97.9% (382 of 390)
Specificity (normal cleared)76.5% (179 of 234)
Precision · F1 · ROC-AUC87.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 curveConfusion matrix and ROC curve on the test set
Limitations
  • 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.