Pneumonia Detection on Chest X-Rays Derived from a U-Net Segmentation Model
Pneumonia killed more than 740,000 children under the age of five in 2019, and it can be difficult to recognize on chest radiographs (CXRs): opacities may be faint in early disease, may sit behind the equally bright heart shadow, and may resemble other lung conditions. Most deep learning systems treat pneumonia detection as a yes-or-no classification task. This paper asks whether a model trained on a harder task, segmenting pneumonia pixel by pixel, can be turned into an effective detector for the simpler task of deciding whether an image contains pneumonia at all. The hypothesis is that the detailed supervision of segmentation forces the network to learn where and what the disease looks like, producing a better detector than training for detection alone. A U-Net was trained to segment pneumonia on the RSNA Pneumonia Detection Challenge dataset of 26,684 radiographs, whose rectangular bounding boxes were converted into pixel masks. The data are heavily imbalanced: 22.5% of images are positive, and only 2.6% of pixels fall inside a box, so focal loss with α = 0.25 and γ = 2 and dropout were needed for the model to learn. On the harder segmentation task, the model reached a pixel-level F1 score of 0.45 on a held-out test set of 2,668 images. Applied to the simpler detection task, the same model reached a precision of 0.71, recall of 0.52, and F1 score of 0.60, with 91% specificity, and consistent scores on the development set. These results show that a segmentation-trained model transfers to detection while also showing where the suspected disease is. A direct comparison with a classifier trained only for detection on the same data is needed to confirm whether the segmentation-first approach is better, and is the main direction for future work.