Improving Classification Model Performance on Chest X-Rays through Lung Segmentation

Hilda Azimi, Jianxing Zhang, Pengcheng Xi, Hala As'ad, Ashkan Ebadi, Stéphane Tremblay, Alexander WongarXiv 2022

Abstract

Deep learning models for medical imaging often suffer from "shortcut learning," where they rely on non-clinical artifacts for classification. This paper presents a cascaded pipeline that utilizes automated lung segmentation to isolate regions of interest, thereby improving the accuracy and explainability of chest X-ray (CXR) classification for Pneumonia and COVID-19. By employing the XLSor segmentation network and a MoCo-based classifier pre-trained on medical data, the proposed method achieves a 94.6% accuracy rate.

Introduction: The Challenge of Noisy Data

A significant challenge in applying deep learning to chest X-rays is the presence of "noise" in the datasets. Images frequently contain irrelevant anatomical structures (e.g., heads, hands), medical devices (e.g., pacemakers, wires), and varying exposure levels. Models pre-trained on natural images often fail to distinguish these artifacts from actual pathology, leading to poor generalization and unreliable clinical predictions.

Example of noisy and distorted CXR images from the COVIDx dataset, including pediatric images with extra body parts and images with foreign objects.

Methodology

The researchers developed a two-stage cascaded pipeline consisting of two main modules:

  1. Segmentation Module: The authors compared a standard U-Net against XLSor, a network utilizing criss-cross attention modules designed to capture long-range contextual information. Rather than using a tight pixel-mask, they calculated a bounding box around the segmented lungs to crop the image. This approach provides a buffer that prevents the loss of critical peripheral lung features if the segmentation boundary is slightly off.
  2. Classification Module: Instead of standard transfer learning from natural image datasets, they adopted a Momentum Contrast (MoCo) model. This self-supervised approach was pre-trained on massive CXR datasets (MIMIC-CXR and CheXpert), ensuring the model's feature extraction is tuned specifically to medical imaging.

Key Insights and Results

The optimized pipeline achieved an accuracy of 0.946 in distinguishing abnormal (Pneumonia/COVID-19) from normal CXRs. On the segmentation task, XLSor outperformed the U-Net baseline, achieving a Mean IoU of 0.938.

A chest X-ray with markers indicating lung regions. Segmentation helps the model focus on these clinically relevant areas rather than central skeletal structures.

Explainability analysis via Grad-CAM confirmed that the Segmented Model (SM) consistently focused its attention on the lung regions. In contrast, the Non-Segmented Model (NSM) frequently relied on irrelevant anatomical structures like the spine or sternum. This "whiteness bias" occurs because models incorrectly learn that any bright structure in the center of the chest is a sign of disease, whereas pneumonia appears as similar opacities within the lungs.

Conclusion

Automated lung segmentation is a critical pre-processing step for reliable CXR classification. It effectively bridges the feature gap between natural and medical images and enhances model interpretability. Future work will expand the pipeline to multiclass classification to distinguish between specific types of lung diseases and involve direct validation with radiologists to assess clinical utility.

Summary updated

BibTeX
@misc{azimi2022improving,
  author = {Hilda Azimi and Jianxing Zhang and Pengcheng Xi and Hala As'ad and Ashkan Ebadi and Stéphane Tremblay and Alexander Wong},
  title = {{Improving Classification Model Performance on Chest X-Rays through Lung Segmentation}},
  year = {2022},
  eprint = {2202.10971},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.10971},
}
Figure