## 5 Discussion  
The main aim of this work was to develop a fully automatic methodology for the segmentation of the chest cavity to use for the development of automatic lesion detection systems. All 18 models showed excellent agreement with the manual segmentation, with DSCs of over 0.92 and JSCs of over 0.86. After the introduction of a refinement algorithm to compensate for artefacts due to the aggressive data augmentation strategy, the DSCs and JSCs improved to over 0.95 and 0.96, respectively. The best performing model was found to be the ResNet34 model with the self-attention layer, blurring mechanism and bottleneck connection, resulting in very high agreement with manual segmentation, with a DSC of 0.9612 and a JSC of 0.9789. Overall, the techniques proposed show a significant improvement over the current state of the art [8], which features a DSC of 0.9660 on full breast segmentation. While the tasks are not directly comparable, body-air segmentation has been shown to achieve more than optimal results in the past [20], hence highlighting the need for novelty solely in chest cavity segmentation. Moreover, the DSC is expected to be lower with smaller regions to segment. Hence, it is reasonable to assume that the cost to the DSC and JSC of generating incorrect chest wall segmentation is lower, as shown in [PERSON] et al. [8]. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model Configuration** & **DSC \(\pm\) SD (n = 406)** & **JSC \(\pm\) SD (n = 406)** \\ \hline ResNet34 + BC & 0.9766 \(\pm\) 0.0422 & 0.9577 \(\pm\) 0.0677 \\ ResNet34 + SA + BL & 0.9775 \(\pm\) 0.0425 & 0.9584 \(\pm\) 0.0633 \\
**ResNet34 + SA + BL + BC** & **0.9789 \(\pm\) 0.0411** & **0.9612 \(\pm\) 0.0621** \\ ResNet50 & 0.9718 \(\pm\) 0.0493 & 0.9541 \(\pm\) 0.0627 \\ ResNet50 + SA & 0.9665 \(\pm\) 0.0502 & 0.9538 \(\pm\) 0.0721 \\ ResNet50 + BL & 0.9708 \(\pm\) 0.0488 & 0.9465 \(\pm\) 0.0704 \\ ResNet50 + BC & 0.9732 \(\pm\) 0.0499 & 0.9526 \(\pm\) 0.0706 \\ ResNet50 + SA + BL & 0.9712 \(\pm\) 0.0501 & 0.9532 \(\pm\) 0.0710 \\ ResNet50 + SA + BL + BC & 0.9766 \(\pm\) 0.0497 & 0.9577 \(\pm\) 0.0708 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: \(Cont.\) \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model Configuration** & **Inference Time (ms/Image)** &
\begin{tabular}{c} **Batch Inference Time** \\ **(1260 Images) (s)** \\ \end{tabular} \\ \hline
**Resnet18** & **92.28** & **116.3** \\ ResNet18 + SA & 93.96 & 118.4 \\ ResNet18 + BL & 92.28 & 116.3 \\ ResNet18 + BC & 92.28 & 116.3 \\ ResNet18 + SA + BL & 95.64 & 120.5 \\ ResNet18 + SA + BL + BC & 95.64 & 120.5 \\ Resnet34 & 90.6 & 114.2 \\ ResNet34 + SA & 95.64 & 120.5 \\ ResNet34 + BL & 95.64 & 120.5 \\ ResNet34 + BC & 92.28 & 116.3 \\ ResNet34 + SA + BL & 97.32 & 122.6 \\ ResNet34 + SA + BL + BC & 98.99 & 124.7 \\ Resnet50 & 258.4 & 325.6 \\ ResNet50 + SA & 263.4 & 331.9 \\ ResNet50 + BL & 261.7 & 329.7 \\ ResNet50 + BC & 260.1 & 327.7 \\ ResNet50 + SA + BL & 261.7 & 329.7 \\ ResNet50 + SA + BL + BC & 266.8 & 336.2 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Inference times for all models with subsequent refinement algorithm. Times are represented in ms/image for single image processing, and in seconds for batch processing. The best performing model was the ResNet18 with no additions, which is highlighted in bold. Abbreviations: BC—bottleneck connection, BL—blurring mechanism, DSC—DSC Similarity Coefficient, JSC—Jaccard Similarity Coefficient, SA—self-attention layer. The best configuration also improves inference timings, matching the previous state of the art after post-processing on comparable hardware, but dramatically improving on it without. As previously mentioned, the post-processing algorithm is solely used to highlight the validity of the proposed solution and is not meant to be included in any CAD workflow. The agreement between the model segmentation and the manual segmentation was very good to excellent for all model configurations. The addition of each proposed improvement to the models provided marginal improvements for all architectures.