Research model. Not a medical device. Not for diagnosis.
A resnet18.tv_in1k image classifier with one output: the chance that a frontal chest X-ray shows pneumonia. Part of a student project that asks whether a model trained on children still works on adults.
Children: Kermany et al. 2018 (ages 1 to 5, one hospital in Guangzhou, China, CC BY 4.0). Adults, if listed above: RSNA Pneumonia Detection Challenge 2018 (USA).
Flag chest X-rays for priority review by a clinician, in a research or teaching setting. The model must not be used to diagnose or treat anyone.
from pneumoshift.inference import Predictor
r = Predictor("RL8596/pneumoshift-kids-plus-adults").predict(pil_image) # probability, flagged, heatmap, ood_level, ...
ood.npz, if present, holds the statistics for the "unlike my training data" warning.| Test X-rays (never used for training) | Number | Sensitivity | Specificity | AUROC |
|---|---|---|---|---|
| children_test (Kermany, pneumonia vs normal) | 624 | 1.000 | 0.457 | 0.962 |
| adults_test (RSNA, lung opacity vs normal) | 4242 | 0.911 | 0.948 | 0.979 |
| adults_test (RSNA, lung opacity vs everything else) | 7694 | 0.911 | 0.650 | 0.874 |
analysis/preds_rsna.npz 55 MBmodel.safetensors 45 MBonnx/model.onnx 45 MBanalysis/preds_kermany.npz 12 MBonnx/ood.bin 1 MBood.npz 1 MB