# Deep Learning-Based Flap Detection System Using Thermographic Images in Plastic Surgery
## 3 Results
### Experiments and Results  
Figure 3 shows the segmentation results for two of the images from the testing dataset. The first column shows the original images, the second column shows the ground truth binary masks, and the third column shows the segmentation result of AER2U-Net in the form of the predicted binary mask. The first row of Figure 3 demonstrates that AER2U-Net can accurately segment a complex flap consisting of two different parts, effectively  
capturing the complex details and boundaries of each part. For the more uniform flap in the second row, AER2U-Net performs equally well, producing a precise segmentation that closely matches the ground truth. This consistent performance on different types of flaps demonstrates the robustness and versatility of AER2U-Net in handling different flap morphologies. It shows that AER2U-Net consistently delivers segmentation results that are very close to the ground truth images, confirming the high accuracy and reliability of the model in practical applications.  
Table 1 presents a comparison of the segmentation results between different U-Net variants and two configurations of our proposed AER2U-Net model. The comparison uses the F1, SE, SP, and AC metrics described in Section 2.5. We evaluate two variants of AER2U-Net: AER2U-Net FC, which uses a fully connected bottleneck layer, and AER2U-Net AD, which incorporates the ASPP and the DAM modules in the bottleneck, as described in Section 2.4. This comparison allows us to assess the impact of the improved bottleneck on the model's performance. Additionally, the comparison of AttU-Net and R2U-Net against the vanilla U-Net demonstrates the individual effects of the AG mechanism and the R2 CLs, respectively. By including these comparisons, we can isolate and quantify the contributions of each key component in our proposed AER2U-Net architecture. The results presented in Table 1 show our AER2U-Net models achieve significant improvements over the baseline U-Net while demonstrating notable progress over the performance of R2U-Net and AttU-Net, with AER2U-Net AD consistently outperforming AER2U-Net FC across all metrics. Furthermore, Figure 4 illustrates the ROC and PR curves, which provide an intuitive performance comparison across different binarization thresholds of the segmentation output. AER2U-Net AD demonstrates the best performance with ROC AUC and PR AUC values of around 0.89, showing a noticeable improvement over AER2U-Net FC at 0.87. Both AER2U-Net variants outperform the other models, which cluster around 0.84, with U-Net values as low as 0.78. The ROC curve for AER2U-Net AD tends more towards the upper left corner, while its PR curve maintains a higher position towards the upper right compared to all other models, including AER2U-Net FC. Both indicate better overall performance in pixel classification and a better balance between correct identification of region-of-interest pixels (precision) and detection of all relevant pixels (recall) across different binarization thresholds of the segmentation mask.  
Figure 3: Segmentation results of our AER2U-Net model compared with ground truth masks.