Healthcare AI · April 2026

Chest X-Ray Classifier

A portfolio-grade web app for chest X-ray pneumonia detection: a Vision Transformer makes the call, and a Grad-CAM heatmap shows exactly which pixels drove it, instead of asking anyone to trust a bare label.

Explainability as a first-class feature

The backend runs lxyuan/vit-base-patch16-224-finetuned-chest-xray through a FastAPI /classify endpoint, which returns a prediction label, a confidence score, and a Grad-CAM overlay in under ten seconds. The overlay isn't an afterthought bolted on for demo purposes — it's the diagnostic report, alongside the raw prediction and the underlying model metadata.

A prediction and a heatmap, not just a label.Grad-CAM overlay generated on every classification.
Selecting a chest X-ray from the gallery and viewing the pneumonia classification with Grad-CAM heatmap overlay
Gallery to diagnosis: selecting an X-ray, classifying it, and reading the Grad-CAM overlay.

A real front end, not a notebook demo

A React 18 + Vite + TypeScript front end wraps the API: an image gallery of curated chest X-rays for one-click testing, a dataset info panel with the train/test/validation split and class distribution, and the diagnostic report itself. It's built to be picked up and used, not just read about.

PyTorchTransformerspytorch-grad-camFastAPIReactTypeScript