# Lung Segmentation in CT Images: A Residual U-Net Approach on a Cross-Cohort Dataset
## 3 Results and Discussion
### Performance Results  
The set of hyper-parameters that lead to the best performance is as follows: Adam optimizer, the learning rate of 0.0001, and batch size of 8. The results obtained for each test dataset are presented in Table 4.  
The results from the three metrics in the analysis are consistent, showing better segmentations for the VESSEL12 dataset and worst results for HUG-ILD. However, the difference between the worst and the best results are very small, showing a good confidence that the segmentation model is robust to the great variability of the pathological cases used in the test sets. Overall, the model is able to generate good results and because the four test datasets present differences between them regarding acquisition protocols, pathologies included, and segmentation guidelines, the results for each one of them will be discussed individually. With respect to the 24-LCTSC dataset, the model is generally able to correctly segment the pulmonary images (see the first row in Figure 2), but fails to identify their initial slices, which correspond to the base of the lung, leading to a decrease in the _DSC_ (see the second row in Figure 2). Furthermore, for one of the patients, the masks produced by the model seem to be more accurate than the ground truth images, as the latter excludes part of the lung parenchyma. An example is shown in the third row in Figure 2. Therefore, even though this contributes to a lower _DSC_ due to the discrepancy between them, the predicted mask is more precise. On the other hand, there are cases in which nodules are not included in the ground truth, and there are elements that the model does not include as well, giving rise to a higher _DSC_, although incorrectly classified. An example is depicted in Figure 2, fourth row. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Test Set**} & \multicolumn{1}{c}{_DSC_} & **HD (mm)** & **ASSD (mm)** \\ \cline{2-4}  & **Mean ± std** & **Mean ± std** & **Mean ± std** \\ \hline LCTSC & 0.9472 ± 0.1752 & 3.7202 ± 5.7966 & 0.3359 ± 1.1534 \\ \hline HUG-ILD & 0.9334 ± 0.1372 & 5.1783 ± 5.3090 & 0.4381 ± 1.4245 \\ \hline VESSEL12 & 0.9778 ± 0.2142 & 1.9395 ± 3.8952 & 0.1167 ± 0.5317 \\ \hline CHUSJ & 0.9339 ± 0.1298 & 4.0943 ± 6.9651 & 0.4639 ± 1.5110 \\ \hline Range & [0–1] & [0–181.0193] & [0–181.0193] \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Mean and standard deviation (std) results of the three metrics: dice similarity coefficient (_DSC_), Hausdorff distance (HD), and average symmetric surface distance (ASSD) for each dataset. The maximum value of the range for HD and ASSD metrics was obtained by considering that the maximum distance between 2 distinct objects in an image of 128 × 128 corresponded to the diagonal of that image. Regarding the HUG-ILD dataset, the model successfully segments the majority of scans and in some cases, it does not exclude pulmonary regions presenting a higher density. The model was also assessed on this dataset on a pattern level, i.e., each pattern was evaluated individually, to gain a better understanding of its behavior, and the results are presented in Table 5.  
Figure 2: Examples of LCTSC images, the ground truth and the predicted mask. From top to bottom the examples are, respectively: good segmentation example; an example in which the model fails to segment the base of the lung; an example of a ground truth image that excludes part of the parenchyma of the lung; an example that excludes a nodule in its ground truth, and which is also misclassified by the model. The results presented in Table 5 can be visually verified in Figure 3. For the specific cases of micronodules, bronchiocentasis, emphysema, and some cases of fibrosis, the model is able to segment the entire lung area, as these are patterns which do not contain a higher contrast in tissues density (see respective examples on the first four rows of Figure 3). In general, those pathological cases showed a slightly better performance (Table 5).