# Deep Learning-Based Flap Detection System Using Thermographic Images in Plastic Surgery
## 4 Discussion  
This study intends to promote the incorporation of AI in the field of medicine, fostering a cooperative relationship between surgeons and ML scientists. The outcome of this collaborative effort is an algorithm that can efficiently and accurately identify the area on a thermographic image that corresponds to a flap. Our initiative proposes the development of a neural network inspired and adapted from current models used in image segmentation processes, capable of achieving this objective with promising results. This represents a pivotal initial step toward developing a more sophisticated software system capable of autonomously monitoring the evolution of a surgical procedure. Advanced detection algorithms, empowered by progress in AI and ML, have become an important component of medical imaging [42]. They greatly enhance clinicians' ability to diagnose and monitor diseases by automatically recognizing abnormalities, thus reducing diagnostic errors and improving patient outcomes [43]. In medical imaging, these algorithms can be classified according to their specific tasks: segmentation, classification, or detection of abnormalities. Segmentation algorithms delineate organs or lesions, while classification algorithms assign a category to the detected region (e.g., benign or malignant). Abnormality detection algorithms highlight suspicious areas that require further clinical examination [44]. Among the most notable segmentation algorithms, CNNs have shown outstanding performance in image-based applications [45]. In particular, the U-Net architecture has been widely adopted due to its ability to perform accurate and efficient segmentation with relatively small datasets [46]. Its unique structure, which includes contracting and expansive paths with skip connections, enables it to capture both local and global features, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Models** & **F1** & **SE** & **SP** & **AC** \\ \hline U-Net [21] & 0.79 & 0.77 & 0.83 & 0.80 \\ R2U-Net [36] & 0.80 & 0.78 & 0.84 & 0.83 \\ AttU-Net [33] & 0.81 & 0.79 & 0.85 & 0.82 \\ AER2U-Net FC (ours) & 0.84 & 0.83 & 0.87 & 0.84 \\ AER2U-Net AD (ours) & 0.87 & 0.85 & 0.89 & 0.87 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the four tested models based on various metrics. Figure 4: ROC (**left**) and PR (**right**) curves for the four tested models. The AUC values for each model are provided in the legend. making it highly effective for various medical imaging tasks. Numerous modifications and variants have been developed to improve its performance, including attention mechanisms, 3D U-Net architectures, and hybrid approaches that combine U-Net with other DL techniques [47]. Attention mechanisms allow the network to focus on important features in images while suppressing irrelevant background noise [48]. Given our restricted number of patients and the numerous benefits provided by this approach, we recognized that this particular neural network architecture may be appropriate for our objectives. In the field of plastic surgery, the process of image segmentation has many variations, such as wound healing and assessment, facial reconstruction for better visualization of anatomical structures, tumor segmentation, surgical simulation, and preoperative planning [12]. Systems have also been proposed and developed to monitor postoperative flaps by analyzing images taken by mobile phone [29]. [PERSON] et al. [49] introduced a custom CNN that allows for the segmentation of free flaps on images captured with a smartphone camera. The network was trained on a database of 2068 images obtained from 305 patients, exhibiting an average (standard deviation) Dice similarity coefficient of 0.970. Flap surgery is a critical intervention in reconstructive surgery, where increasing procedural complexity heightens the risk of complications such as vascular thrombosis, particularly within the first 24 h [8].