Automatic Lung Segmentation in Chest X-ray Images Using Improved U-Net

Wufeng Liu, Jiaxin Luo, Yan Yang, Wenlian Wang, Junkui Deng, Yu Liang

Abstract

Automatic and highly accurate lung segmentation in chest X-ray (CXR) images is the basis of computer-aided diagnosis systems, because the lung is the region of interest of many diseases, and it can show useful information through its contours. However, automatic lung segmentation is immensely challenging due to extreme variations in the shape, obscure lung area, or opacity caused by lung diseases reaches high-intensity values. In the face of these severe situations, the model may segment the lung boundary incorrectly. We designed an improved U-Net network: using the pre-training Efficientnet-b4 as the encoder, and the residual block and LeakyRelu activation function are used in the decoder. The network can not only extract features with high efficiency but also avoid the gradient explosion caused by the multiplication effect in gradient backpropagation. We constructed a CXR lung field segmentation dataset (Haut) based on the NIH CXR dataset. In particular, this lung segmentation dataset contains some serious abnormal cases, such as lung deformation, pleural effusion, covered by foreign matters, or CXR blur caused by severe lung disease. The improved U-Net is evaluated on Haut, JSRT, and Montgomery County (MC) datasets. Experimental results show that our network can achieve high-precision lung segmentation.

Introduction

Lung segmentation—the digital delineation of lung boundaries in chest X-rays—is a critical prerequisite for computer-aided diagnosis (CAD) systems. Accurate segmentation allows for the reliable screening of conditions like pneumonia, tumors, and tuberculosis. However, clinical environments present significant challenges: pathological changes can cause lung opacity, foreign bodies like pacemakers can obscure boundaries, and anatomical variations across patients require highly flexible models. While standard algorithms perform well on curated benchmark data, they often fail on the "messy" data encountered in real-world clinical practice.

Methodology

The researchers developed an improved U-Net architecture designed for robustness. Key innovations include:

  • EfficientNet-b4 Encoder: Utilizing a pre-trained backbone for superior feature extraction via transfer learning.
  • Residual Decoder: Implementing residual blocks and LeakyReLU activation to ensure stable training and prevent "neuron death."
  • Haut Dataset: A new, large-scale dataset of 2,785 images specifically curated to include "hard" cases, such as those with pleural effusion or foreign body obstructions.
Segmentation results on challenging cases featuring foreign bodies such as pacemakers and spinal fixation hardware.

Results and Discussion

The Improved U-Net was evaluated against standard benchmarks (JSRT and MC) and the new Haut dataset. On the Haut dataset, the model achieved a Jaccard Index of 97.7% and an Accuracy of 99.4%.

The model's strength lies in its ability to maintain high performance even in the presence of severe pathology. For instance, in cases of Pneumothorax and Pleural Thickening, the model achieved Jaccard Indices of 97.6% and 97.8%, respectively. This robustness is attributed to the combination of the EfficientNet backbone and the diverse training data provided by the Haut dataset.

Segmentation performance on cases with severe pathological changes, demonstrating the model's ability to handle lung opacity and deformation.

Conclusion

This study demonstrates that an improved U-Net architecture, paired with a high-difficulty dataset, can significantly advance the state of automatic lung segmentation. By successfully navigating the complexities of pathological opacity and foreign body interference, this model provides a robust foundation for future CAD systems in clinical settings.

Summary updated

Abstract

Abstract Automatic and highly accurate lung segmentation in chest X-ray (CXR) images is the basis of computer-aided diagnosis systems, because the lung is the region of interest of many diseases, and it can show useful information through its contours. However, automatic lung segmentation is immensely challenging due to extreme variations in the shape, obscure lung area, or opacity caused by lung diseases reaches high-intensity values. In the face of these severe situations, the model may segment the lung boundary incorrectly. We designed an improved U-Net network: using the pre-training Efficientnet-b4 as the encoder, and the residual block and LeakyRelu activation function are used in the decoder. The network can not only extract features with high efficiency but also avoid the gradient explosion caused by the multiplication effect in gradient backpropagation. We constructed a CXR lung field segmentation dataset (Haut) based on the NIH CXR dataset. In particular, this lung segmentation dataset contains some serious abnormal cases, such as lung deformation, pleural effusion, covered by foreign matters, or CXR blur caused by severe lung disease. The improved U-Net is evaluated on Haut, JSRT, and Montgomery County (MC) datasets. Experimental results show that our network can achieve high-precision lung segmentation.
BibTeX
@inproceedings{liu2022automatic,
  author = {Wufeng Liu and Jiaxin Luo and Yan Yang and Wenlian Wang and Junkui Deng and Yu Liang},
  title = {{Automatic Lung Segmentation in Chest X-ray Images Using Improved U-Net}},
  booktitle = {Scientific},
  year = {2022},
  doi = {10.1038/s41598-022-12743-y},
}
Figure