# Deep Learning-Based Flap Detection System Using Thermographic Images in Plastic Surgery
## 1 Introduction  
Flaps play a fundamental role in reconstructive surgery, providing versatile solutions for the repair of defects caused by trauma, cancer resection, or congenital anomalies. They primarily involve the transfer of living tissue, along with its blood supply, from one part of the body to another to cover a defect that cannot be closed [1]. This serves a variety of purposes, including restoring contour and function, improving aesthetic appearance, and enhancing wound healing [2]. Understanding flap vascularity helps the surgeon select the most appropriate flap for a given defect, optimizing the outcome for the patient. Therefore, flaps can be divided into three categories based on their vascular supply: random flaps,which rely on the subdermal plexus for blood perfusion; axial flaps, which are supplied by a specific artery; and free flaps that involve the transplantation of tissue from one part of the body to another, disconnected from its original blood supply, and reattached to vessels at the recipient site [3; 4]. Recent advances have emphasized the interaction of flap vascularity and skin temperature as a non-invasive indicator of flap health [5]. The infrared radiation emitted by the skin provides a quantitative representation of the blood flow at this level [6]. Thus, monitoring skin temperature using thermographic imaging technologies has emerged as a reliable method of detecting early signs of vascular compromise (caused by arterial or venous thrombosis), allowing prompt intervention to potentially salvage compromised flaps and improve patient outcomes [7; 8]. In this context, thermographic cameras have proven to be valuable non-invasive monitoring tools that are affordable, easy to use, and provide instant results, allowing the assessment of flap perfusion [7; 9]. Also, the utility of thermographic imaging extends to late complications and the suspicion of possible infection, necrosis, or other flap injuries [5]. Since the postoperative follow-up process requires human resources in the form of trained and experienced personnel capable of interpreting and constantly (even hourly) monitoring the results obtained, artificial intelligence (AI)-based techniques have emerged as powerful tools that improve the reliability and precision of diagnostic results while reducing the overall analysis time [10]. In recent years, the integration of machine learning (ML) models into various aspects of plastic surgery has revolutionized patient care and surgical outcomes [11]. These advancements encompass a wide range of applications, including the assessment of flap congestion using smartphone cameras, burn depth prediction algorithms, and the prediction of diabetic ulcer progression [12; 13; 14; 15; 16]. Applications of AI in the field of medical imaging have shown considerable efficacy in processing data that were previously subjective and variable. These tasks include a range of operations such as image recognition, object identification, segmentation, and artificial image generation [17; 18; 19]. Neural network-based algorithms have gained tremendous popularity in recent years, due to advances in deep learning (DL) [20]. One of the most popular neural network architectures used is the U-Net model proposed by [PERSON] et al. [21]. The U-Net model, originally developed for the segmentation of biomedical images, has found numerous applications across various domains. In medical imaging, U-Net is widely used for tasks such as tumor segmentation in magnetic resonance imaging (MRI) [22], cell segmentation in microscopy images [23], retinal vascular segmentation [24], and organ segmentation in computed tomography (CT) scans [25]. Beyond healthcare, U-Net has been applied effectively in remote sensing to segment satellite images to identify geographical features such as roads, buildings, and vegetation [26]. It has also been used in autonomous driving for the detection of lane markings on roads [27] and in autonomous flying of small uncrewed drones [28].