###### Abstract  
Cardiothoracic surgery patients have the risk of developing surgical site infections which cause hospital readmissions, increase healthcare costs, and may lead to mortality. This work aims to tackle the problem of surgical site infections by predicting the existence of worrying alterations in wound images with a wound image analysis system based on artificial intelligence. The developed system comprises a deep learning segmentation model (MobileNet-Unet), which detects the wound region area and categorizes the wound type (chest, drain, and leg), and a machine learning classification model, which predicts the occurrence of wound alterations (random forest, support vector machine and k-nearest neighbors for chest, drain, and leg, respectively). The deep learning model segments the image and assigns the wound type. Then, the machine learning models classify the images from a group of color and textural features extracted from the output region of interest to feed one of the three wound-type classifiers that reach the final binary decision of wound alteration. The segmentation model achieved a mean Intersection over Union of 89.9% and a mean average precision of 90.1%. Separating the final classification into different classifiers was more effective than a single classifier for all the wound types. The leg wound classifier exhibited the best results with an 87.6% recall and 52.6% precision. deep learning; machine learning; image analysis; wound infection; cardiothoracic surgery 2023  
1  
Cardiothoracic surgery patients have a substantial risk of developing surgical site infections (SSIs). These infections cause an increase in morbidity, mortality, costs, prolonged hospital stays, and the need for other surgical procedures [2; 3; 4]. SSIs are often detected after patients are discharged from the hospital. Hence, they require an early diagnosis and treatment to prevent further complications. Since hospitalization is getting shorter, post-discharge surveillance with feedback information has proved to be an important way of reducing and treating SSIs [5]. Therefore, this work focuses on creating an automatic system that predicts the risk of post-surgical infections. This work is part of a research project funded by Fundacao para a Ciencia e Tecnologia, which aims to design and implement a post-surgical digital telemonitoring service for cardiothoracic surgery patients. The main goals of the research project are: to study the impact of daily telemonitoring on early diagnosis, to reduce hospital readmissions, and to improve patient safety, during the 30-day period after hospital discharge. This remote follow-up involves a digital remote patient monitoring kit which includes a sphygmomanometer, a scale, a smartwatch, and a smartphone, allowing daily patient data collection. One of the daily outcomes was the daily photographs taken by patients regarding surgical wounds. Every day, the clinical team had to analyze the image of each patient, which could take a long time. The automatic analysis of these images would allow implementing an alert related to the detection of wound modifications that could represent a risk of infection. Such an alert would spare time for the clinical team in follow-up care. SSIs are a complication of cardiac surgery varying in different reports between 3.5 to 26.8% of patients. The incidence of deep sternal wound infections is between 1 and 5% and is associated with increased length of stay, readmissions, increased costs, and mortality that can reach 20%. The clinical manifestations of mediastinitis are redness, exudate, subcutaneous fluid collections, and sternum instability. Surgical infections of surgical wounds can occur 90 days after surgery. Most of the infections manifest after discharge, which usually occurs during the first week after the procedure. The objective of this study is to detect the risk of infection earlier. The earlier diagnoses permit a more precocious treatment with better results. The length of stay and costs will be diminished by wound vigilance [6].