Portfolio Live demo · Runs in your browser
Machine Learning · Computer Vision

Chest X-Ray Diagnosis

The trained model runs here, in your browser, with ONNX Runtime. Pick a sample radiograph or open your own: a ResNet18 screens it for pneumonia, and Grad-CAM shows where the model looked. Images never leave your device.

Radiograph —
Heatmap

Grad-CAM appears once a model has run.

SamplesKermany et al. test set
Processed locally. Nothing is uploaded.
Diagnosis
Pneumonia · ResNet18 Loading model…
P(pneumonia) —threshold 0.50

Downloading model…

In the browser

The PyTorch model was exported to ONNX with fp16 weights, which halves the download without changing a single prediction on the 624-image test set. ONNX Runtime Web executes it in WebAssembly.

Same preprocessing

Torchvision resizes with PIL's antialiased bilinear filter. That resampler is reimplemented here in JavaScript, so the browser's probabilities match the Python pipeline to three decimal places.

Grad-CAM in the graph

Instead of backpropagating in the browser, the gradient of each class score with respect to the last convolutional block is written into the exported graph, so one forward pass returns the heatmaps.

Research demo, not a medical device. Do not use it to make health decisions.