Skip to main content
. 2022 Jul 29;9(8):351. doi: 10.3390/bioengineering9080351
Algorithm 1. Lung Field Segmentation
Input: Given a set of CXR images X and a set of ground truth masks Y. IX and MY.
Output: O, the segmentation results.
1  Decompose I into homogeneous matrix H of homogeneous regions and a boundary matrix B of the boundaries of superpixels using superpixel extraction.
2  Downsample I to obtain the downsampled image ID using Equation (14).
3  Downsample M to obtain the downsampled image MD.
4  Store the superpixel label information for each pixel of I.
5  In training phase:
    5.1   Input a set of ID and a set of MD to the encoder–decoder segmentation network to train the model.
6  In prediction phase:
    6.1   Input ID to the encoder–decoder segmentation network to predict the low-resolution segmentation results OD.
    6.2   Upsample OD to obtain the high-resolution segmentation results O using Equation (16).
    6.3   Run the post-processing procedure on O to correct the segmentation results.
      6.3.1    Keep the two largest regions and discard other small regions.
      6.3.2    Fill all the holes in the two largest regions.
7  Output the final result O.