Reliability report

Two numbers,
one model

The same weights look perfect or badly miscalibrated, depending on which images you test them on.

01

The leakage trap

The easiest way to make a medical model look good is to test it on data it has already seen.

The model card says the final weights were “retrained on all cleaned images from the original train, test, and validation folders” and that “it has no independent test evaluation.” So the 624-image Kermany test folder, the benchmark most tutorials report, is training data for this model. We scored it anyway, to show how misleading that number would be.

Kermany images are all from children aged one to five at a single hospital. We could not find a second pediatric pneumonia set with a compatible licence in time, so our external tests use adult radiographs. That measures generalisation and population shift together, and we report it that way.

Near-0 or near-1 outputs on unfamiliar adult images show overconfidence, not certainty. The model card itself warns that softmax outputs are not calibrated probabilities.

02

Move the threshold

The shipped threshold is 0.5. Because outputs pile up near 1, useful thresholds sit extremely close to 1. Every number below is recomputed live from per-image scores.

Decision threshold on the PNEUMONIA score ·
03

Is a score of 0.9 really 90%?

A calibrated model’s scores of 0.9 come true about 90% of the time. Bins below show how often RSNA images in each score band actually had lung opacity.

Most images land in the top bin, where the model claims near certainty and is right far less often. Treat the score as a ranking, not a probability.

04

Can the heatmaps be trusted?

Two checks. First, Montgomery radiographs come with radiologist-drawn lung masks, so we measure Grad-CAM mass inside the lungs against the lungs’ share of the image. Second, a randomisation test checks that the maps depend on the learned weights at all.

05

Robustness to edits that shouldn’t matter

06

Does your browser run the same model?

This site runs the network on your device with ONNX Runtime Web, reading the original weights from Hugging Face. We checked it against the PyTorch pipeline used for every number on this page.

07

What this evaluation cannot tell you

Table view · all headline metrics