Abstract
Aims:
Thermography is a noninvasive method to identify patients at risk of diabetic foot ulcers. In this study, we employed thermography and deep learning to stratify patients with diabetes at risk of developing foot ulcers.
Methods:
We prospectively recorded clinical data and plantar thermograms for adult patients with diabetes who underwent diabetic foot screening. A total of 153 thermal images were analyzed using a deep learning algorithm to determine the risk of diabetic foot ulcers. The neural network was trained using a balanced dataset consisting of 98 thermal images (49 normal and 49 abnormal), with 80% allocated for training and 20% for validation. The trained model was then validated on a separate testing dataset consisting of 55 thermal images (42 normal and 13 abnormal). The neural network was trained to prioritize higher sensitivity in identifying at-risk feet for screening purposes.
Results:
Participants had a mean age of 63.1 ± 12.6 years (52.3% female), and 62.1% had been diagnosed with diabetes for more than 10 years. The average body mass index was 27.5 ± 5.6 kg/m2. Of the thermal images, 91 were classified as category 0 and 62 as categories 1 to 3, according to the diabetic foot risk classification system of the International Working Group on the Diabetic Foot. Using five-fold cross-validation, the neural network model achieved an overall accuracy of 71.8 ± 4.9%, a sensitivity of 81.2 ± 10.0%, and a specificity of 64.0 ± 7.4%. Additionally, the Matthews correlation coefficient was 0.46 ± 0.08%
Conclusions:
These results suggest that thermography combined with deep learning could be developed for screening purposes to stratify patients at risk of developing diabetic foot ulcers.
Introduction
Diabetes mellitus is a major global health concern, and in 2019, it was estimated that 4.8 million adults in Thailand (out of 45.8 million people aged 25 years and over) were living with type 2 diabetes. This number is projected to rise to 5.3 million by 2039. 1 One common complication of diabetes is diabetic neuropathy, which affects up to 75% of patients with diabetes 2 and remains asymptomatic in 50% of cases.3,4 Diabetic peripheral neuropathy puts patients at risk of long-term pain, foot ulcers, and, ultimately, amputation, leading to a decreased quality of life.5,6 Consequently, early diabetic foot screening and intervention are essential for preventing these potential outcomes.
Screening for diabetic peripheral neuropathy should commence at the time of diagnosis for type 2 diabetes and 5 years after the diagnosis of type 1 diabetes, with annual follow-up screenings. The evaluation process for distal symmetric polyneuropathy includes a comprehensive review of medical history, assessments of small fiber function via temperature or pinprick sensation, and large-fiber function through vibration sensation using a 128 Hz tuning fork. Annual 10 g Semmes–Weinstein monofilament testing is crucial to identify patients at risk of developing foot ulcers or at risk of foot amputation. 4 The 10 g monofilament, applied to three to four points on the patient’s plantar foot surface for 2 seconds each, is a commonly used screening tool for diabetic foot ulcers. If the patient cannot feel the pressure, it suggests a loss of sensation in that area, indicating a higher risk of ulcer development. 7 The sensitivity of four-point monofilament testing ranges from 38.5% to 86.0%, while its specificity varies from 58.0% to 78.4% when administered by a trained health care provider.8,9
Several studies have established a link between plantar temperature and diabetic foot complications. Infrared thermography, a rapid, noncontact, and noninvasive technique, enables the visualization of temperature distribution in an object. This method is based on the principle that any entity with a temperature above absolute zero emits thermal radiation.9–11 Thermal changes in the plantar foot can result from various factors, including vascular insufficiency, diabetic neuropathy, skeletal changes, infection, or a combination thereof. Diabetic feet exhibit increased blood flow and metabolic rate, leading to heat dissipation. A decrease in temperature may signal arterial occlusive disease, and temperature changes in the lower limb can indicate diabetic complications such as ulceration.12–15
Machine learning methods have been widely used for automatic image classification, which involves extracting features, ranking, and applying various machine learning models. 12 Although numerous studies have analyzed plantar thermograms using machine learning to predict diabetic foot complications, no data currently exist on plantar thermograms with diabetic foot risk classification. The purpose of this study was therefore to investigate the potential of plantar thermograms to identify patients at high risk of amputation because of diabetic foot complications. By employing machine learning techniques, we aimed to develop a predictive model to effectively classify diabetic foot risk based on plantar temperature data. Ultimately, our goal was to provide health care professionals with a noninvasive, efficient, and accurate tool for early intervention and improved patient outcomes.
Methods
Study Sample
We conducted a prospective cross-sectional study on adult patients with diabetes who underwent diabetic foot screening at the outpatient clinic of Ramathibodi Hospital between September and December 2022. All participants were categorized into four risk groups based on the presence of risk factors, in accordance with the consensus of the International Working Group on the Diabetic Foot (IWGDF). 16 Group 0 included participants without neuropathy, group 1 included participants with neuropathy, but without deformity or peripheral vascular disease (PVD), group 2 consisted of participants with neuropathy and either deformity or PVD, and group 3 consisted of participants with a history of foot ulceration or a lower-extremity amputation.
The study included individuals aged 18 years or older with any type of diabetes. Key exclusion criteria were patients with a body temperature exceeding 37.5°C, pregnant patients, patients with severe foot deformities preventing them from lying down on the examination bed, and patients with visuospatial neglect or cognitive impairment, rendering them unable to adequately cooperate with the monofilament test. The study protocol was approved by the Human Research Ethics Committee of the Faculty of Medicine Ramathibodi Hospital, Mahidol University (Ethical approval COA. MURA2022/454).
Plantar Thermogram Image Collection
Diabetic foot risk assessments and classification according to the IWGDF guidelines were, conducted by advanced practice registered nurses or physicians at the outpatient clinic, plantar thermography was subsequently performed in a room with a temperature of 27 ± 2°C. Participants were instructed to remove their shoes and socks and then lie down in a supine position for 10 minutes while their medical history was taken. Plantar thermogram images were captured using the tCam-mini thermal camera (danjuliodesigns LLC, USA), positioned approximately 12 inches away from the feet to ensure both were within the camera’s maximum field of view. A custom-made infrared board, consisting of a corrugated plastic sheet covered with white cloth, was placed at the participants’ ankles to distinguish the plantar images from the background. This protocol was adapted from the Institute of Electrical and Electronics Engineers (IEEE) 2019. 17 The tCam-mini, a smartphone-based thermal and color camera, features an export resolution setting of 320 × 240 pixels and an operating temperature range of 25°C to 40°C. It was connected to an iPad Mini 6th generation device using a Type C USB connector and operated with the “tCamView” application developed by danjuliodesigns LLC. The thermal images were taken with a “white-hot” palette, which displayed brighter areas as indicative of higher temperatures, as demonstrated through black and white images.
Image Preprocessing
Before feeding the images into the neural network, we preprocessed the images to isolate the regions of interest and remove any background noise using the OpenCV Python library. A binary thresholding operation on the grayscale images was to separate the plantar region from the background. The threshold function was set at pixel intensity threshold values corresponding to 35°C and 40°C, which converted all pixels with intensities above the threshold to white (foreground) and those below the threshold to black (background).
Neural Network Architecture, Training, and Cross-Validation
The thermal images were analyzed using a deep learning algorithm to determine the risk of diabetic foot ulcers by transfer learning using the pretrained ResNet50V2 model, 18 which is a convolutional neural network (CNN) for image recognition. ResNet50 V2 comprises 50 layers, including convolutional, batch normalization, activation, and pooling layers. The ResNet50 V2 used in this study had been pretrained on the ImageNet dataset. We applied transfer learning to fine-tune the pretrained ResNet50 V2 mode by replacing the final fully connected layers of the ResNet50 V2 model with new layers consisting of dropout, batch normalization, and dense layers. The new layers were trained on our dataset, while the weights of the pretrained layers were frozen to preserve the learned features. The neural network was trained using a balanced dataset consisting of 124 thermal images (62 normal and 62 abnormal) with five-fold cross-validation. The model was trained using a batch size of 32, with a cross-entropy loss function and a learning rate of 0.00144.
Statistical Analyses
Data are presented as mean ± standard deviation (SD) unless otherwise stated. The chi-square test was used to compare categorical variables between different diabetes durations. The independent t-test was used to compare categorical variables. All statistical analyses were conducted using SPSS software (version 18.0), and a P value less than .05 was considered statistically significant.
Results
Table 1 shows the clinical characteristics of the participants. Diabetic foot risk was categorized according to the IWGDF consensus and divided into two risk categories: 0 (n = 62) and 1 to 3 (n = 62). Most of the participants in the risk category 0 were female (62.9%), and this category had a mean age of 60.6 ± 11.6 years and a mean body mass index (BMI) of 27.4 ± 5.6 kg/m2. Among these participants, 25.8% had been diagnosed with diabetes for less than 5 years, 19.4% for 5 to 10 years, and 54.8% for more than 10 years. In the risk category 1 to 3, 38.7% of the participants were female, and this category had a mean age of 66.7 ± 11.8 years and a mean BMI of 27.2 ± 5.6 kg/m2. Among these participants, 8.1% had been diagnosed with diabetes for less than 5 years, 11.3% for 5 to 10 years, and 80.6% for more than 10 years. The majority of the participants had type 2 diabetes, while six participants had type 1 diabetes and two participants had pancreatic diabetes.
Clinical Characteristics and Diabetic Foot Risk Classification of the Participants.
Abbreviation: BMI, body mass index.
The neural network was trained and evaluated for the classification of plantar thermograms for diabetic foot risk using five-fold cross-validation on the entire dataset. Table 2 shows the results of the five-fold cross-validation. The neural network demonstrated promising results, achieving an overall accuracy of 71.8 ± 4.9%. The model exhibited a sensitivity of 81.2 ± 10.0% and the specificity reached 64.0 ± 7.4. Altogether, the Matthews correlation coefficient was 0.46 ± 0.08.
Performance of the Predictive Model of Diabetic Foot Risk Classification Derived From Five-fold Cross-Validation.
Discussion
The findings of our study are in line with previous research that has demonstrated the potential of using thermography as a diagnostic tool for identifying diabetic feet at risk of complications. A growing body of evidence has emphasized the importance of monitoring temperature changes in the plantar region as an indicator of foot complications in patients with diabetes. Lavery et al 19 found that patients with temperature differences greater than 2.2°C between the two feet were at a higher risk of developing foot ulcers. Similarly, Armstrong et al 20 reported that a temperature difference of 4°F or more was associated with an increased risk of ulceration. Our study builds on these findings by employing a deep learning neural network to analyze plantar thermograms and classify diabetic foot risk, which has the potential to improve the accuracy and efficiency of this diagnostic approach. There exists a potential for using plantar thermography combined with deep learning algorithms as a noninvasive, efficient, and accurate method for early identification of diabetic feet at risk of complications. Implementing this approach in clinical settings could enhance early detection and intervention and also reduce the incidence of ulcerations and amputations in patients with diabetes. Furthermore, the incorporation of additional predictive factors and the use of more advanced machine learning techniques could further improve the performance of such models, leading to more accurate and reliable risk assessment. By integrating these advanced diagnostic tools into standard care practices, health care professionals could better manage diabetic foot complications and improve overall patient outcomes.
The application of neural networks as machine learning methods for thermogram analysis has gained significant interest in recent years, particularly in the medical field. Neural networks, specifically deep learning algorithms, such as CNNs, have demonstrated remarkable performance in various image classification tasks, including the analysis of thermograms for early detection of diseases and conditions. 21 Several studies have also reported the successful application of CNNs in thermography-based classification tasks. For instance, CNN has been used to classify thermal images of patients with breast cancer, and achieved high accuracy and sensitivity.22,23 These studies, along with the present investigation, emphasize the potential of neural networks to improve the early detection of various diseases through thermogram analysis. However, the use of neural networks for thermogram analysis is not without its challenges. The performance of the models varies depending on the quality of the training dataset and the architecture of the network. In addition, model interpretability and explainability can be limited, posing a challenge for clinical adoption. Furthermore, recent findings by Aan de Stegge et al 24 regarding diabetic foot ulcers have challenged some established assumptions about temperature monitoring and its correlation with ulcer formation, emphasizing the need for a more nuanced understanding of diabetic foot ulcer development. To address these issues, future studies should focus on optimizing deep learning models and incorporating additional predictive factors to improve performance, reliability, and clinical acceptance.
There were several limitations to our study. Our sample size was small, which may limit the generalizability of our findings. Additionally, the training and testing datasets used in our study may not be representative of all patients with diabetes, as we excluded individuals with certain conditions that could interfere with the monofilament test and our study did not consider other factors that may contribute to diabetic foot complications, such as nutritional status, footwear, and patient adherence to self-care practices. We also recognize the importance of linking deep learning predictions to clinical outcomes. Although our current study aimed to replicate the IWGDF risk classification, future research should focus on evaluating long-term outcomes, such as the development of foot ulcers. Establishing this connection is crucial to demonstrating further the clinical utility of deep learning models and ensuring their relevance in real-world settings. Furthermore, while the thermal scan demonstrated more or less acceptable sensitivity, this may not be sufficient to fully replicate the results of physical examination as a screening tool. However, the thermal scan has the potential to provide complementary information that augments clinical examination. Lastly, in our study, we focused on using foot thermal images to predict IWGDF risk classes, but we recognize the limitation of not incorporating the American Diabetes Association (ADA) classification. The ADA framework considers a broader range of clinical factors, such as sensory neuropathy and patient history, which are crucial for a comprehensive risk assessment. By excluding these elements, our findings may overlook important risk factors influencing ulcer development.
Footnotes
Acknowledgements
The authors have no acknowledgments to declare.
Abbreviations
CNN, convolutional neural network; BMI, body mass index; SD, standard deviation.
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This study was supported by Faculty of Medicine, Ramathibodi Hospital.
