In reconstructive surgery, flaps are the cornerstone for repairing tissue defects, but postoperative monitoring of their viability remains a challenge. Among the imagistic techniques for monitoring flaps, the thermal camera has demonstrated its value as an efficient indirect method that is easy to use and easy to integrate into clinical practice. This provides a narrow color spectrum image that is amenable to the development of an artificial neural network in the context of current technological progress. In the present study, we introduce a novel attention-enhanced recurrent residual U-Net (AER2U-Net) model that is able to accurately segment flaps on thermographic images. This model was trained on a uniquely generated database of thermographic images obtained by monitoring 40 patients who required flap surgery. We compared the proposed AER2U-Net with several state-of-the-art neural networks used for multi-modal segmentation of medical images, all of which are based on the U-Net architecture (U-Net, R2U-Net, AttU-Net). Experimental results demonstrate that our model (AER2U-Net) achieves significantly better performance on our unique dataset compared to these existing U-Net variants, showing an accuracy of 0.87. This deep learning-based algorithm offers a non-invasive and precise method to monitor flap vitality and detect postoperative complications early, with further refinement needed to enhance its clinical applicability and effectiveness.