Automated DFU detection through GA-selected CNN ensemble with Grad-CAM interpretability Authors: Shreya Girotra, Achin Jain, Sarita Yadav, Arvind Panwar, Harsh Taneja, Lukas Herout, Ondrej Krejcar, Hamidreza Namazi Published: 2025 ABSTRACT Diabetic foot ulcers (DFU) are a highly dangerous and even fatal sequela of diabetes mellitus, very often becoming a lower limb amputation and imposing significant morbidity and mortality all over the world. Deep learning and machine learning have recently made breakthroughs, creating potential for being applied in medical image analysis towards the detection of DFU, but the field still faces the challenge of optimizing the performance of the models in both terms of accuracy and interpretability. The present paper solves this issue by introducing a more optimized deep learning model to detect DFUs that has been proposed by integrating a proprietary Convolutional Neural Network (CNN) structure and a Genetic Algorithm (GA) based on ensembles. Seven different optimizers were distinctly trained by the custom CNN. The genetic algorithm (GA) was then applied to pool a final ensemble model out of individual models with the most remarkable performance. This GA based ensemble had an accuracy of 97%, a precision of 95%, a recall of 99%, and an F1 score of 97%, which showed better and stronger performance than the individual single models that made up it. In addition, the study implemented Grad-CAM (Gradient-weighted Class Activation Mapping) to increase interpretation and transparency. The results obtained demonstrated that Grad-CAM was able to accurately describe the features associated with ulcers and, therefore, offers invaluable information on how the model makes its decisions to healthcare professionals. Introduction Diabetes Mellitus (DM), commonly called diabetes, is a chronic metabolic condition characterized by sustained hyperglycaemia, or elevated levels of glucose in the blood1. This disorder arises from the body’s failure to produce enough insulin or to use it effectively, resulting in complications such as cardiovascular diseases, renal failure, vision loss, and lower limb amputations due to diabetic foot ulcers (DFUs)2. DFUs are a significant complication of diabetes, impacting up to 34% of diabetic patients during their lifetime and playing a major role in morbidity and mortality on a global scale. Diabetes has emerged as a critical health issue that increasingly affects a large number of people in modern times. In 1980, it was estimated that 108 million people globally were living with diabetes; by 2014, this number had surged to 422 million, with projections suggesting it could reach 600 million by 20353. This escalation is particularly concerning in developing nations, where limited healthcare resources and a lack of awareness exacerbate the challenges posed by diabetes-related complications4. Diabetic foot ulcers (DFUs) alone account for more than a million lower limb amputations each year due to inadequate management and diagnosis. Consequently, individuals and healthcare systems, especially in low- and middle-income countries, face significant financial burdens as a result of these challenges5. Artificial intelligence has made significant progress in tackling the issues related to the identification and management of diabetic foot ulcers. Health scans have been utilized to detect conditions such as foot sores resulting from diabetes using methods such as deep learning (DL) and machine learning (ML).6 Medical images can be analyzed using AI-driven segmentation techniques, including brightness adjustment and area expansion, which have proven to be effective in identifying abnormal regions. However, these systems require large datasets for training and validation to ensure precision and reliability5,7. Advances in deep learning have resulted in the development of sophisticated Convolutional Neural Networks (CNNs) that excel in various classification tasks. However, optimizing CNN architectures remains a critical challenge, particularly in medical imaging and high-dimensional data classification. Optimizers are algorithms designed to modify the parameters of a model to minimize the loss function. The selection of an appropriate optimizer plays a crucial role in determining the convergence speed and overall performance of the model.8 Learning in CNNs involves fine-tuning network parameters to effectively lower error rates. There are numerous strategies to improve the efficiency and stability of models, such as Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, and AdamW.9 Adaptive learning rate controllers (such as Adam, RMSprop, and Nadam) adjust learning rates for different components, accelerating the process and preventing excessive deviation. In contrast, SGD-based optimizers perform well when fine-tuned with an appropriate learning rate and momentum, often leading to better generalization in unseen data.10 While CNNs are highly effective, the choice of learning algorithm significantly impacts their performance and adaptability in diverse datasets. Research indicates that various optimizers perform optimally depending on the characteristics of the data and the complexity of the model. For example, Adam and its variants (AdamW, Nadam) have shown exceptional performance in handling large datasets with numerous features, whereas SGD and RMSprop are particularly effective in situations that require strict constraints on the model. Our paper aims to investigate how different optimization techniques affect the performance of CNNs in image classification, ensuring a rapid and adaptable learning process.11 Moreover, convolutional neural networks (CNNs) exhibit a significant degree of accuracy; however, their efficacy is heavily influenced by the choice of hyperparameters, complicating the process of generalization and optimization for novel datasets. Hyperparameter tuning, batch normalization, and regularization techniques are needed to address overfitting and improve robustness.12 By systematically evaluating multiple optimizers in CNN-based architectures, our paper seeks to improve the performance of deep learning models through a detailed analysis of various optimizers within CNN-based frameworks.13 In our paper, explainable artificial intelligence (XAI) plays a crucial role in being used for the detection of diabetic foot ulcers by providing transparency and interpretability. The Grad-CAM technique, known as Gradient weighted Class Activation Mapping,14 was employed to investigate its impact on model predictions. Using this approach, we were able to identify the specific areas of skin images that the model relies on to determine whether the skin is healthy or affected by an ulcer, thereby facilitating a clearer understanding of the model’s decisions for medical professionals. By incorporating this XAI methodology, our paper improves the trustworthiness, accountability, and fairness of the ensemble CNN model, ultimately aiding healthcare practitioners in validating the model’s output, revealing potential biases. This paper introduces a classification method based on Convolutional Neural Networks (CNN) for the detection of Diabetic Foot Ulcers (DFU). It employs a single CNN architecture that is trained using seven distinct optimizers: Adam, SGD, RMSprop, Adagrad, Adamax, Nadam and AdamW to evaluate their effects on the performance and generalization of the model. In our paper, deep learning (DL) techniques are utilized to train and refine the CNN model, ensuring optimal detection of ulcers. The DFU dataset15, which comprises 1055 images, serves as the basis for training and evaluation. The objective is to identify the most effective optimizer that can achieve improved classification accuracy, stable convergence, and improved generalization in the context of medical image analysis. Each optimizer influences the CNN training process differently:Adaptive optimizers (Adam, Nadam, AdamW) modify learning rates dynamically, facilitating faster convergence and stabilizing updates.SGD and RMSprop provide superior weight regularization, thereby mitigating the risk of overfitting.Adagrad and Adamax modify parameter updates based on historical gradients, improving adaptability in sparse data.The performance of each optimizer is evaluated through various metrics, including accuracy, precision, recall, F1-score, and confusion matrix analysis, ensuring a comprehensive assessment of the model’s efficacy. The findings of this study provide valuable information on the selection of appropriate optimizers for medical image classification, contributing to the development of an efficient and adaptable learning strategy to diagnose diabetic foot ulcers (DFU). The research further enhances the reliability and applicability of the CNN model in medical contexts by employing Explainable Artificial Intelligence (XAI) methods that elucidate the decision-making processes of the model. Grad-CAM was utilized to generate visualizations and explanations that clarify which aspects of the input images influence the classification outcomes. XAI serves to bridge the gap between complex deep learning models and human comprehension by revealing underlying patterns. Adaptive optimizers (Adam, Nadam, AdamW) modify learning rates dynamically, facilitating faster convergence and stabilizing updates. Adaptive optimizers (Adam, Nadam, AdamW) modify learning rates dynamically, facilitating faster convergence and stabilizing updates. SGD and RMSprop provide superior weight regularization, thereby mitigating the risk of overfitting. SGD and RMSprop provide superior weight regularization, thereby mitigating the risk of overfitting. Adagrad and Adamax modify parameter updates based on historical gradients, improving adaptability in sparse data. Adagrad and Adamax modify parameter updates based on historical gradients, improving adaptability in sparse data. The novelty of this approach lies in the integration of three dimensions rarely combined in DFU literature: Optimizer-level analysis: Instead of relying on a single optimizer, this study systematically compares seven optimizers to assess their effect on CNN performance in DFU detection.GA-based ensemble learning: Unlike prior work that uses simple averaging or majority voting, the proposed genetic algorithm intelligently selects optimal CNN subsets, boosting classification robustness.Explainable AI (Grad-CAM): The model not only achieves higher accuracy but also explains its predictions, addressing the clinical demand for interpretability in the diagnosis of DFU.The key contributions of this work are as follows:Development of a customized CNN architecture trained with seven different optimizers (Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, and AdamW) to analyze their impact on DFU classification.Design of a Genetic Algorithm (GA)-based ensemble strategy that selects an optimal subset of CNN models, improving robustness and predictive accuracy compared to standalone models.Incorporation of Explainable AI (XAI) methods Grad-CAM to provide visual interpretability of model predictions, thereby enhancing clinical trust in automated DFU diagnosis.Extensive evaluation using metrics such as accuracy, precision, recall, F1-score, confusion matrix, and ROC curve, demonstrating that the ensemble approach achieves superior generalization compared to existing single-model baselines.The remainder of this paper is organized as follows. Section 2 reviews the related work on DFU detection and deep learning models. Section 3 explains the dataset, proposed CNN architecture, optimizers, and the GA-based ensemble methodology. Section 4 presents the experimental results, comparisons with existing approaches, and Grad-CAM visual explanations. Finally, Sect. 5 concludes the study and highlights future research directions. Optimizer-level analysis: Instead of relying on a single optimizer, this study systematically compares seven optimizers to assess their effect on CNN performance in DFU detection. Optimizer-level analysis: Instead of relying on a single optimizer, this study systematically compares seven optimizers to assess their effect on CNN performance in DFU detection. GA-based ensemble learning: Unlike prior work that uses simple averaging or majority voting, the proposed genetic algorithm intelligently selects optimal CNN subsets, boosting classification robustness. GA-based ensemble learning: Unlike prior work that uses simple averaging or majority voting, the proposed genetic algorithm intelligently selects optimal CNN subsets, boosting classification robustness. Explainable AI (Grad-CAM): The model not only achieves higher accuracy but also explains its predictions, addressing the clinical demand for interpretability in the diagnosis of DFU. Explainable AI (Grad-CAM): The model not only achieves higher accuracy but also explains its predictions, addressing the clinical demand for interpretability in the diagnosis of DFU. Development of a customized CNN architecture trained with seven different optimizers (Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, and AdamW) to analyze their impact on DFU classification. Development of a customized CNN architecture trained with seven different optimizers (Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, and AdamW) to analyze their impact on DFU classification. Design of a Genetic Algorithm (GA)-based ensemble strategy that selects an optimal subset of CNN models, improving robustness and predictive accuracy compared to standalone models. Design of a Genetic Algorithm (GA)-based ensemble strategy that selects an optimal subset of CNN models, improving robustness and predictive accuracy compared to standalone models. Incorporation of Explainable AI (XAI) methods Grad-CAM to provide visual interpretability of model predictions, thereby enhancing clinical trust in automated DFU diagnosis. Incorporation of Explainable AI (XAI) methods Grad-CAM to provide visual interpretability of model predictions, thereby enhancing clinical trust in automated DFU diagnosis. Extensive evaluation using metrics such as accuracy, precision, recall, F1-score, confusion matrix, and ROC curve, demonstrating that the ensemble approach achieves superior generalization compared to existing single-model baselines. Extensive evaluation using metrics such as accuracy, precision, recall, F1-score, confusion matrix, and ROC curve, demonstrating that the ensemble approach achieves superior generalization compared to existing single-model baselines. Related work Numerous studies have investigated detecting and classifying diabetic foot ulcer (DFU) data, primarily aiming to distinguish between ulcerated and healthy skin. Several researchers have emphasised image processing and machine learning techniques, focusing on several visual attributes such as texture, colour, and/or structural patterns. The effectiveness of these approaches largely depends on the selected algorithms and training methodologies. In recent years, deep learning (DL) has become a dominant and extensively used technique for tasks involving medical image segmentation,16 classification, and detection. DL models have consistently outperformed traditional methods when applied to DFU images from patients with diabetes. Goyal et al.17 proposed DFUNet, a model based on convolutional neural networks (CNN) specifically aimed at differentiating diabetic foot ulcer (DFU) skin from normal skin. This model emphasized deep feature extraction and included cross-validation to guarantee strong performance. By utilizing the DFU dataset, DFUNet achieved an Area Under the Curve (AUC) of 96.2%, surpassing conventional deep learning (DL) and machine learning (ML) methods. Wang et al.18 proposed a two-phase Support Vector Machine (SVM) strategy for detecting ulcers in DFU images. Their approach consisted of an initial segmentation phase followed by feature extraction, focusing on features derived from deep learning to effectively pinpoint ulcer locations. The model, when applied to the DFU dataset, reached a sensitivity of 73.3% and a specificity of 94.6%, indicating its capability to accurately identify healthy cases while maintaining moderate sensitivity to the presence of ulcers. Juan et al.19 presented DFU_VIRNet, a deep learning neural network specifically designed for the classification of DFU skin. This model highlighted the importance of feature and activation maps in precisely identifying areas susceptible to ulcers. Utilizing the DFU dataset, DFU_VIRNet attained outstanding results with an accuracy of 97.75%, an AUC of 0.993, a recall of 0.982, and an F1 score of 0.978. Alzubaidi et al.20 developed created DFU_QUTNet, a CNN-based architecture specifically aimed at classifying diabetic foot ulcers. The network prioritized increasing width over depth to improve gradient propagation and ensure error distribution across the channels of the network. With a dataset of 754 images featuring both normal and ulcer-affected feet, the model achieved a precision of 0.954, an F1 score of 0.945, and a recall of 0.936, demonstrating significant effectiveness in identifying DFU characteristics. Doulamis et al.21 presented an innovative, non-invasive photonic-based platform for monitoring DFU that utilized hyperspectral and thermal imaging. Their methodology employed deep learning techniques to improve pixel quality and implement super-resolution imaging, facilitating accurate biomarker monitoring in diabetic patients. The methodology proposed in the work differs with the traditional convolutional-neural-network (CNN) architectures in that it adds to its mix other forms of imaging that are not conventional. The model instead uses hyperspectral and thermal imaging instead of the RGB data. Hyperspectral imaging increases the frequency band below the visible light thereby providing intricate listing of the constituent of tissues as well as physiological changes. The system successfully predicted essential biomarkers such as deoxyhemoglobin and oxyhemoglobin, showcasing the potential of imaging-based monitoring in the clinical evaluation of DFU. Integration of eXplainable AI (XAI) techniques with CNN models for DFU prediction is a major advancement that can address the inherent “black box” problem of deep learning. Biswas et al.22 put forth XAI-FusionNet, a multi-scale feature fusion model that integrates explainability into DFU detection by employing SHAP, LIME, and Grad-CAM algorithms. This model merges pre-trained CNNs: DenseNet201, VGG19, and NASNetMobile with a meta-tuner module to optimize feature extraction and classification. Trained on an extensive DFU dataset consisting of 6963 images, XAI-FusionNet achieved an impressive accuracy of 98.97%, a precision of 99%, an F1 score of 98%, and a recall of 98%, while also offering transparency and interpretability through XAI methodologies. Further, Thotad et al.23 ] investigated the application of EfficientNet for the detection of diabetic foot ulcers (DFU), optimizing convolutional neural network (CNN) parameters such as depth, width, and resolution to attain high accuracy in the diagnosis of early-stage DFUs. Their methodology concentrated on maximizing the quality of feature extraction while ensuring computational efficiency. With a dataset comprising 844 foot images, the model achieved an accuracy of 97.02%, an F1 score of 96.18%, and an AUC of 98.60%, which is comparable to leading performance in the field. Proposing a unique approach experimenting with parallel CNN layers, Das et al.24 gave AESPNet, a CNN-based framework that integrates parallel convolutional layers with varying kernel sizes and bottleneck attention modules. This design was intended to improve feature extraction for the classification of DFUs. Utilizing the DFU dataset, AESPNet exhibited outstanding performance, reaching an accuracy of 97.02%, an F1 score of 96.18%, and an AUC of 98.60%, demonstrating its robustness and efficiency in ulcer detection. Although the success of modern deep learning architectures has been empirically proven widely, this paper suggests an innovative framework which takes advantage of the Genetic Algorithm (GA) ensembling. The ensemble constructs many convolutional neural network (CNN) models systematically combining them and, therefore, generating a model significantly better than any independent element. Interpretability would also be preferred, and further XAI measures, based mostly on Grad-CAM, are employed to justify prediction outcomes. Table 1 presents the summary of recent works on DFU detection.Table 1Methodology comparison for DFU.TitleIntroductionMethodologyResultDFUNet17Proposed DFUNet for DFU vs. normal skin.CNN with feature extraction, cross-validation.AUC 96.2%Two phase SVM18DFU detection via SVM.Image segmentation + DL features.Sensitivity 73.3%, specificity 94.6%Photonic platform21Non-invasive DFU monitoring.Hyperspectral + thermal imaging.Biomarker prediction.DFU-VIRNet19CNN for DFU detection.Activation maps to localize DFU.Accuracy 97.75%, AUC 0.993.DFU-QUTNet20Width-expansion CNN.Moderate depth CNN.Precision 0.954, Recall 0.936.XAI-FusionNet22Transparent DFU diagnosis.Fusion of CNNs and SHAP/LIME/Grad-CAM.Accuracy 98.97%, F1 98%.EfficientNet23Optimized CNN.EfficientNet + hyperparameter tuning.Accuracy 97.02%, AUC 98.60%.AESPNet24Attention and multiscale CNN.Bottleneck-attention + parallel convs.Accuracy 97.02%, F1 96.18%.Swin transformer + EMADN25Dual-track explainable model for DFU classification.Feature fusion using Swin Transformer for long-range dependencies and Efficient Multi-Scale Attention-Driven Network (EMADN) with LMDS and GDA blocks for local feature extraction.Accuracy 78.79%, Macro F1 80% on DFUC-2021 dataset. Table 1Methodology comparison for DFU.TitleIntroductionMethodologyResultDFUNet17Proposed DFUNet for DFU vs. normal skin.CNN with feature extraction, cross-validation.AUC 96.2%Two phase SVM18DFU detection via SVM.Image segmentation + DL features.Sensitivity 73.3%, specificity 94.6%Photonic platform21Non-invasive DFU monitoring.Hyperspectral + thermal imaging.Biomarker prediction.DFU-VIRNet19CNN for DFU detection.Activation maps to localize DFU.Accuracy 97.75%, AUC 0.993.DFU-QUTNet20Width-expansion CNN.Moderate depth CNN.Precision 0.954, Recall 0.936.XAI-FusionNet22Transparent DFU diagnosis.Fusion of CNNs and SHAP/LIME/Grad-CAM.Accuracy 98.97%, F1 98%.EfficientNet23Optimized CNN.EfficientNet + hyperparameter tuning.Accuracy 97.02%, AUC 98.60%.AESPNet24Attention and multiscale CNN.Bottleneck-attention + parallel convs.Accuracy 97.02%, F1 96.18%.Swin transformer + EMADN25Dual-track explainable model for DFU classification.Feature fusion using Swin Transformer for long-range dependencies and Efficient Multi-Scale Attention-Driven Network (EMADN) with LMDS and GDA blocks for local feature extraction.Accuracy 78.79%, Macro F1 80% on DFUC-2021 dataset. Methodology comparison for DFU. Methods and materials Dataset description The dataset utilized in this study was obtained from Kaggle and originally collected at the Diabetic Foot Centre of Nasiriyah Hospital in southern Iraq15,20. The dataset comprises labeled images categorized into two classes: diabetic foot ulcers (abnormal skin) and healthy skin (normal). After augmentation, a total of 6,164 images were obtained, ensuring a balanced distribution between the two classes. All images maintain a consistent resolution of 224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}224 pixels, ensuring uniformity across the dataset. The dataset was then split into training, validation, and test subsets using a stratified split to preserve class proportions. The resulting counts were as follows: 5,110 training images, 842 validation images, and 212 test images. Before model training, the pixel intensities were normalized by dividing each pixel value by 255.0 to reduce computational complexity and ensure consistent data processing in all samples. To enhance dataset diversity and mitigate overfitting, data augmentation was implemented using ImageDataGenerator with transformations including 40 degree rotation, width and height shifts of up to 20%, shearing, zooming, and horizontal flipping. These augmentations expose the model to various input variations, thereby improving generalization capability. Following augmentation, the dataset was partitioned into three subsets using a stratified split to preserve class distribution across all splits: 70% for training, 10% for validation, and 20% for testing. Since patient identifiers were not available in the dataset, the division was performed at the image level, which is acknowledged as a limitation of this study. The roles of each subset are as follows:Training Set (70%): Used for model trainingValidation Set (10%): Applied for hyperparameter tuning and overfitting preventionTest Set (20%): Utilized to assess model generalizationData augmentation techniques, including rotations, shifts, zoom, flips, and shear, were applied to the training and validation sets, with each image expanded into eight stochastic variants. The test set was left unaugmented to provide a clean benchmark for model evaluation. This augmentation strategy introduced an 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document} expansion of the training data, generating additional samples through random transformations. Figure 1 illustrates representative examples of normal (healthy skin) and abnormal (ulcer) cases from the dataset.Fig. 1Representative samples from the DFU dataset showing normal and abnormal skin conditions. Training Set (70%): Used for model training Training Set (70%): Used for model training Validation Set (10%): Applied for hyperparameter tuning and overfitting prevention Validation Set (10%): Applied for hyperparameter tuning and overfitting prevention Test Set (20%): Utilized to assess model generalization Test Set (20%): Utilized to assess model generalization Representative samples from the DFU dataset showing normal and abnormal skin conditions. Table 2 summarizes the specific parameters employed for data augmentation to ensure reproducibility and transparency of the preprocessing pipeline.Table 2Data augmentation parameters employed for dataset preprocessing.ParameterValueRotation range (degrees)40Horizontal shift range0.2Vertical shift range0.2Shear transformation range0.2Zoom range0.2Horizontal flipTrueFill modeNearestAugmentation factor8 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document} Table 2Data augmentation parameters employed for dataset preprocessing.ParameterValueRotation range (degrees)40Horizontal shift range0.2Vertical shift range0.2Shear transformation range0.2Zoom range0.2Horizontal flipTrueFill modeNearestAugmentation factor8 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document} Data augmentation parameters employed for dataset preprocessing. Convolutional neural networks (CNNs) CNNs have emerged as a reliable approach for early detection, classification, and segmentation of diabetic foot ulcers (DFUs), contributing to the prevention of severe complications such as infections and amputations. Building upon their success in image-based tasks, CNNs designed for DFU analysis comprise several specialized layers, each serving distinct computational purposes with specific mathematical operations. Convolutional Layers extract ulcer-specific features through convolution operations. The mathematical formulation for a 2D convolution is:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y_{i,j} = \sum _{m=0}^{M-1} \sum _{n=0}^{N-1} X_{i+m,j+n} \cdot K_{m,n} + b \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y_{i,j}$$\end{document} represents the output feature map at position (i, j), X is the input image, K is the convolution kernel of size \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$M \times N$$\end{document}, and b is the bias term. Activation Layers introduce non-linearity to enable complex pattern recognition. The Rectified Linear Unit (ReLU) activation function is mathematically defined as:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} f(x) = \max (0, x) = {\left\{ \begin{array}{ll} x & \text {if } x > 0 \\ 0 & \text {if } x \le 0 \end{array}\right. } \end{aligned}$$\end{document}This function helps the network learn complex ulcer patterns while mitigating the vanishing gradient problem. Pooling Layers reduce spatial dimensions and parameter count through downsampling operations. Max pooling selects the maximum value within a pooling window:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} Y_{i,j} = \max _{0 \le m< M, 0 \le n < N} X_{i \cdot s + m, j \cdot s + n} \end{aligned}$$\end{document}where s is the stride, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$M \times N$$\end{document} represents the pooling window size. This operation preserves the most prominent features while reducing computational complexity. Fully Connected Layers perform final classification through linear transformations:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} y = W \cdot x + b \end{aligned}$$\end{document}where W represents the weight matrix, x is the input vector from flattened feature maps, b is the bias vector, and y is the output. For binary DFU classification, the final layer applies the sigmoid activation function:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \sigma (z) = \frac{1}{1 + e^{-z}} \end{aligned}$$\end{document}producing probability values between 0 and 1 for ulcer presence classification. Loss Function for binary classification employs binary cross-entropy:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} L = -\frac{1}{N} \sum _{i=1}^{N} [y_i \log (\hat{y}_i) + (1-y_i) \log (1-\hat{y}_i)] \end{aligned}$$\end{document}where N is the number of samples, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$y_i$$\end{document} is the true label, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_i$$\end{document} is the predicted probability. Various experimental studies have evaluated popular pre-trained neural networks including EfficientNet, ResNet, DenseNet, and MobileNet for DFU image diagnosis26. These models leverage transfer learning principles, where pre-trained weights \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\theta _{pre}$$\end{document} are fine-tuned using domain-specific data:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{fine} = \theta _{pre} - \alpha \nabla _{\theta } L_{DFU}(\theta ) \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha$$\end{document} is the learning rate and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{DFU}$$\end{document} represents the DFU-specific loss function. This approach enables effective feature extraction from limited medical datasets while maintaining computational efficiency and achieving superior classification performance for diabetic foot ulcer detection.blocks and even transfer learning to boost feature extraction during the phases of ulcer appearance, ischemia, and infection.27 Optimizers used Seven different optimization algorithms were used to train individual CNN models, each offering distinct advantages for DFU classification. The mathematical formulations and characteristics of each optimizer are described below:Adam (Adaptive Moment Estimation): Adam adaptively adjusts learning rates for each parameter based on gradient history using exponentially decaying averages of past gradients and their squared values 28: 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{m_t}{1-\beta _1^t}, \quad \hat{v}_t = \frac{v_t}{1-\beta _2^t} \end{aligned}$$\end{document}11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{\hat{v}_t} + \epsilon } \hat{m}_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _1 = 0.9$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _2 = 0.999$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\epsilon = 10^{-8}$$\end{document}. This enabled efficient convergence by balancing speed and accuracy for learning ulcer textures and skin patterns.SGD (Stochastic Gradient Descent): SGD updates parameters using the basic gradient descent rule 29: 12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1} = \theta _t - \alpha g_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha$$\end{document} is the learning rate and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$g_t$$\end{document} is the gradient. Although requiring longer training epochs and careful learning rate calibration, it provided a performance baseline with minimal adaptive influence.RMSprop (Root Mean Square Propagation): RMSprop adapts learning rates based on recent gradient magnitudes 29: 13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \gamma v_{t-1} + (1-\gamma ) g_t^2 \end{aligned}$$\end{document}14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{v_t + \epsilon }} g_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma = 0.9$$\end{document} is the decay rate. This enabled learning of subtle differences between DFU and normal skin regions, enhancing stability in deeper layers.Adagrad: Adagrad modifies learning rates based on the cumulative sum of squared gradients 28,29: 15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} G_t&= G_{t-1} + g_t^2 \end{aligned}$$\end{document}16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{G_t + \epsilon }} g_t \end{aligned}$$\end{document} This amplified less frequently observed features such as rare ulcer shapes, though aggressive learning rate decay limited performance during prolonged training.Adamax: Adamax uses the infinity norm for gradient normalization 28,29: 17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} u_t&= \max (\beta _2 u_{t-1}, |g_t|) \end{aligned}$$\end{document}19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{1-\beta _1^t} \frac{m_t}{u_t} \end{aligned}$$\end{document} This provided better handling of sparse gradient situations, particularly when certain ulcer features were infrequent across batches.Nadam (Nesterov-accelerated Adaptive Moment Estimation): Nadam combines Adam with Nesterov momentum for predictive gradient updates 28,29: 20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}22\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{\beta _1 m_t}{1-\beta _1^{t+1}} + \frac{(1-\beta _1) g_t}{1-\beta _1^t} \end{aligned}$$\end{document}23\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{\hat{v}_t} + \epsilon } \hat{m}_t \end{aligned}$$\end{document} This accelerated convergence while maintaining classification accuracy, particularly effective for capturing boundary features between ulcer and healthy skin.AdamW: AdamW decouples weight decay from gradient-based updates 28,29: 24\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}25\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}26\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{m_t}{1-\beta _1^t}, \quad \hat{v}_t = \frac{v_t}{1-\beta _2^t} \end{aligned}$$\end{document}27\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \alpha \left( \frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \epsilon } + \lambda \theta _t \right) \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda$$\end{document} is the weight decay coefficient. This prevented overfitting during extensive augmentation and maintained good generalization to unknown DFU patterns. Adam (Adaptive Moment Estimation): Adam adaptively adjusts learning rates for each parameter based on gradient history using exponentially decaying averages of past gradients and their squared values 28: 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{m_t}{1-\beta _1^t}, \quad \hat{v}_t = \frac{v_t}{1-\beta _2^t} \end{aligned}$$\end{document}11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{\hat{v}_t} + \epsilon } \hat{m}_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _1 = 0.9$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _2 = 0.999$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\epsilon = 10^{-8}$$\end{document}. This enabled efficient convergence by balancing speed and accuracy for learning ulcer textures and skin patterns. Adam (Adaptive Moment Estimation): Adam adaptively adjusts learning rates for each parameter based on gradient history using exponentially decaying averages of past gradients and their squared values 28: 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{m_t}{1-\beta _1^t}, \quad \hat{v}_t = \frac{v_t}{1-\beta _2^t} \end{aligned}$$\end{document}11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{\hat{v}_t} + \epsilon } \hat{m}_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _1 = 0.9$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\beta _2 = 0.999$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\epsilon = 10^{-8}$$\end{document}. This enabled efficient convergence by balancing speed and accuracy for learning ulcer textures and skin patterns. SGD (Stochastic Gradient Descent): SGD updates parameters using the basic gradient descent rule 29: 12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1} = \theta _t - \alpha g_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha$$\end{document} is the learning rate and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$g_t$$\end{document} is the gradient. Although requiring longer training epochs and careful learning rate calibration, it provided a performance baseline with minimal adaptive influence. SGD (Stochastic Gradient Descent): SGD updates parameters using the basic gradient descent rule 29: 12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1} = \theta _t - \alpha g_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha$$\end{document} is the learning rate and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$g_t$$\end{document} is the gradient. Although requiring longer training epochs and careful learning rate calibration, it provided a performance baseline with minimal adaptive influence. RMSprop (Root Mean Square Propagation): RMSprop adapts learning rates based on recent gradient magnitudes 29: 13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \gamma v_{t-1} + (1-\gamma ) g_t^2 \end{aligned}$$\end{document}14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{v_t + \epsilon }} g_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma = 0.9$$\end{document} is the decay rate. This enabled learning of subtle differences between DFU and normal skin regions, enhancing stability in deeper layers. RMSprop (Root Mean Square Propagation): RMSprop adapts learning rates based on recent gradient magnitudes 29: 13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \gamma v_{t-1} + (1-\gamma ) g_t^2 \end{aligned}$$\end{document}14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{v_t + \epsilon }} g_t \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\gamma = 0.9$$\end{document} is the decay rate. This enabled learning of subtle differences between DFU and normal skin regions, enhancing stability in deeper layers. Adagrad: Adagrad modifies learning rates based on the cumulative sum of squared gradients 28,29: 15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} G_t&= G_{t-1} + g_t^2 \end{aligned}$$\end{document}16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{G_t + \epsilon }} g_t \end{aligned}$$\end{document} This amplified less frequently observed features such as rare ulcer shapes, though aggressive learning rate decay limited performance during prolonged training. Adagrad: Adagrad modifies learning rates based on the cumulative sum of squared gradients 28,29: 15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} G_t&= G_{t-1} + g_t^2 \end{aligned}$$\end{document}16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{G_t + \epsilon }} g_t \end{aligned}$$\end{document} This amplified less frequently observed features such as rare ulcer shapes, though aggressive learning rate decay limited performance during prolonged training. Adamax: Adamax uses the infinity norm for gradient normalization 28,29: 17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} u_t&= \max (\beta _2 u_{t-1}, |g_t|) \end{aligned}$$\end{document}19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{1-\beta _1^t} \frac{m_t}{u_t} \end{aligned}$$\end{document} This provided better handling of sparse gradient situations, particularly when certain ulcer features were infrequent across batches. Adamax: Adamax uses the infinity norm for gradient normalization 28,29: 17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} u_t&= \max (\beta _2 u_{t-1}, |g_t|) \end{aligned}$$\end{document}19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{1-\beta _1^t} \frac{m_t}{u_t} \end{aligned}$$\end{document} This provided better handling of sparse gradient situations, particularly when certain ulcer features were infrequent across batches. Nadam (Nesterov-accelerated Adaptive Moment Estimation): Nadam combines Adam with Nesterov momentum for predictive gradient updates 28,29: 20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}22\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{\beta _1 m_t}{1-\beta _1^{t+1}} + \frac{(1-\beta _1) g_t}{1-\beta _1^t} \end{aligned}$$\end{document}23\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{\hat{v}_t} + \epsilon } \hat{m}_t \end{aligned}$$\end{document} This accelerated convergence while maintaining classification accuracy, particularly effective for capturing boundary features between ulcer and healthy skin. Nadam (Nesterov-accelerated Adaptive Moment Estimation): Nadam combines Adam with Nesterov momentum for predictive gradient updates 28,29: 20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}22\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{\beta _1 m_t}{1-\beta _1^{t+1}} + \frac{(1-\beta _1) g_t}{1-\beta _1^t} \end{aligned}$$\end{document}23\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \frac{\alpha }{\sqrt{\hat{v}_t} + \epsilon } \hat{m}_t \end{aligned}$$\end{document} This accelerated convergence while maintaining classification accuracy, particularly effective for capturing boundary features between ulcer and healthy skin. AdamW: AdamW decouples weight decay from gradient-based updates 28,29: 24\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}25\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}26\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{m_t}{1-\beta _1^t}, \quad \hat{v}_t = \frac{v_t}{1-\beta _2^t} \end{aligned}$$\end{document}27\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \alpha \left( \frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \epsilon } + \lambda \theta _t \right) \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda$$\end{document} is the weight decay coefficient. This prevented overfitting during extensive augmentation and maintained good generalization to unknown DFU patterns. AdamW: AdamW decouples weight decay from gradient-based updates 28,29: 24\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} m_t&= \beta _1 m_{t-1} + (1-\beta _1) g_t \end{aligned}$$\end{document}25\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} v_t&= \beta _2 v_{t-1} + (1-\beta _2) g_t^2 \end{aligned}$$\end{document}26\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{m}_t&= \frac{m_t}{1-\beta _1^t}, \quad \hat{v}_t = \frac{v_t}{1-\beta _2^t} \end{aligned}$$\end{document}27\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \theta _{t+1}&= \theta _t - \alpha \left( \frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \epsilon } + \lambda \theta _t \right) \end{aligned}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda$$\end{document} is the weight decay coefficient. This prevented overfitting during extensive augmentation and maintained good generalization to unknown DFU patterns. Genetic algorithm (GA) for selection of best models for ensemble architecture The genetic algorithm (GA) is a metaheuristic inspired by the principles of natural selection and evolutionary computation, which operates on a population of potential solutions30. This approach is employed to select an optimal subset of CNN models trained with different optimizers (Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, AdamW) to maximize the ensemble accuracy for diabetic foot ulcer (DFU) classification. The rationale for the chosen GA parameters is summarized in Table 3. The optimization process is detailed in Algorithm 1. Phase 1: Initialization A population of candidate solutions (model selection vectors) is initialized randomly:28\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} I = \{ b_1, b_2, \ldots , b_n \}, \quad b_j \in \{ 0, 1 \} \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$b_j = 1$$\end{document} indicates inclusion of the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$j^{\text {th}}$$\end{document} model in the ensemble, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$b_j = 0$$\end{document} indicates exclusion. Phase 2: Fitness Evaluation For each individual I, select models \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$S = \{ m_j \mid b_j = 1 \}$$\end{document}. If S is empty, assign random predictions; otherwise, compute ensemble prediction by majority voting:29\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} y_{\text {ensemble}} = \text {round} \left( \frac{\sum _{m \in S} \textbf{1}(p_m > 0.5)}{|S|} \right) \end{aligned}$$\end{document}The fitness function is defined as the classification accuracy:30\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} f(I) = \text {Accuracy}(y_{\text {true}}, y_{\text {ensemble}}) \end{aligned}$$\end{document}Phase 3: Selection Select parent individuals using tournament selection so that the fittest individuals have a higher chance of reproduction:31\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} P_{\text {selected}} = \text {TournamentSelect}(P, k) \end{aligned}$$\end{document}Phase 4: Crossover Cross two parent individuals with probability \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_c$$\end{document} using a two-point crossover to exchange genetic material:32\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Offspring} = \text {Crossover}(I_p^1, I_p^2, p_c) \end{aligned}$$\end{document}Phase 5: Mutation Mutate each offspring gene with probability \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_m$$\end{document}, flipping a 0 to 1 (or 1 to 0) to maintain diversity:33\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} b_j' = {\left\{ \begin{array}{ll} 1 - b_j, & \text {if } \text {rand} < p_m \\ b_j, & \text {otherwise} \end{array}\right. } \end{aligned}$$\end{document}Phase 6: Replacement Generate the next population by combining parent and offspring pools, followed by tournament selection:34\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} P^{t+1} = \text {Select}(P^t \cup \text {Offspring}, N) \end{aligned}$$\end{document}Phase 7: Stopping Criterion The algorithm terminates when:35\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} t \ge T_{\text {max}} \quad \text {or} \quad \Delta f_{\text {best}} < \epsilon \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$T_{\text {max}}$$\end{document} is the maximum number of generations and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\epsilon$$\end{document} is the convergence threshold. A detailed justification of GA parameter choices is presented below (Table 3).Table 3GA parameters and rationale for selection.ParameterValueRationalePopulation size10Provides a balance between search diversity and computational efficiency given 7 CNN models.Generations (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$N_{gen}$$\end{document})20Ensures convergence within the limited search space (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2^7 = 128$$\end{document} combinations).Crossover typeTwo-pointPreserves contiguous model subsets, enabling meaningful recombination of high-performing models.Crossover probability (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_c$$\end{document})0.5Balances exploration of new solutions and exploitation of good ones.Mutation typeBit-flipFlips binary inclusion/exclusion genes to maintain diversity in model combinations.Mutation probability (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_m$$\end{document})0.2Prevents premature convergence by allowing occasional structural variation.Selection methodTournament (size=3)Promotes steady convergence while maintaining diversity through random grouping.Fitness functionValidation accuracyDirectly measures ensemble predictive performance. Table 3GA parameters and rationale for selection.ParameterValueRationalePopulation size10Provides a balance between search diversity and computational efficiency given 7 CNN models.Generations (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$N_{gen}$$\end{document})20Ensures convergence within the limited search space (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2^7 = 128$$\end{document} combinations).Crossover typeTwo-pointPreserves contiguous model subsets, enabling meaningful recombination of high-performing models.Crossover probability (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_c$$\end{document})0.5Balances exploration of new solutions and exploitation of good ones.Mutation typeBit-flipFlips binary inclusion/exclusion genes to maintain diversity in model combinations.Mutation probability (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_m$$\end{document})0.2Prevents premature convergence by allowing occasional structural variation.Selection methodTournament (size=3)Promotes steady convergence while maintaining diversity through random grouping.Fitness functionValidation accuracyDirectly measures ensemble predictive performance. GA parameters and rationale for selection. Algorithm 1GA-based model selection for ensemble GA-based model selection for ensemble Ensemble of CNN models Ensemble learning is a collective prediction approach that combines multiple models trained on the same dataset to enhance predictive performance and generalizability31. The fundamental principle leverages the diversity of base learners, where the strengths of one model compensate for the weaknesses of another, resulting in reduced error rates and improved robustness. For DFU classification, we used a Genetic Algorithm (GA) based ensemble selection technique to identify the optimal subset of CNN models, each trained with different optimization algorithms. Unlike traditional weighted ensemble methods that assign varying importance to individual models, our approach selects a model subset and employs majority voting for final classification. This ensures that only the best performing models contribute to the final classification decision. The DFU ensemble process follows these steps: Train multiple CNN models with different optimizers on the DFU dataset.Evaluate the predictive accuracy of each model on the test dataset.Apply Genetic Algorithm to select the optimal subset of models for ensemble construction.Implement majority voting among selected models, where the most frequently predicted class becomes the final classification output.Mathematically, the final prediction of the ensemble \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}$$\end{document} is expressed as:36\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{y} = \text {mode} \left( \{\hat{y}_i : i \in S\} \right) \end{aligned}$$\end{document}where:S represents the subset of CNN models selected by the GA\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_i$$\end{document} denotes the prediction output of the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i^{\text {th}}$$\end{document} model\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {mode}(\cdot )$$\end{document} returns the most frequently occurring predictionThe final prediction is determined through majority voting across all selected models. The advantage of this strategy lies in the GA’s ability to eliminate weaker models while retaining high-performing ones, enabling stronger models to collaboratively contribute to decision-making, thereby enhancing the accuracy and reliability of DFU classification. Train multiple CNN models with different optimizers on the DFU dataset. Train multiple CNN models with different optimizers on the DFU dataset. Evaluate the predictive accuracy of each model on the test dataset. Evaluate the predictive accuracy of each model on the test dataset. Apply Genetic Algorithm to select the optimal subset of models for ensemble construction. Apply Genetic Algorithm to select the optimal subset of models for ensemble construction. Implement majority voting among selected models, where the most frequently predicted class becomes the final classification output. Implement majority voting among selected models, where the most frequently predicted class becomes the final classification output. S represents the subset of CNN models selected by the GA S represents the subset of CNN models selected by the GA \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_i$$\end{document} denotes the prediction output of the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i^{\text {th}}$$\end{document} model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_i$$\end{document} denotes the prediction output of the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i^{\text {th}}$$\end{document} model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {mode}(\cdot )$$\end{document} returns the most frequently occurring prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\text {mode}(\cdot )$$\end{document} returns the most frequently occurring prediction Performance measurement metrics To comprehensively evaluate the performance of our proposed model, we employed multiple assessment metrics derived from the confusion matrix (CM) and the Area Under the Curve-Receiver Operating Characteristic (AUC-ROC) curve. The confusion matrix enables the calculation of key performance indicators, including accuracy, precision, recall and F1 score, using true positives (TP), true negatives (TN), false positives (FP) and false negatives (FN). In our classification framework, healthy cases are assigned negative labels while ulcer instances receive positive labels, with correct classifications labeled as true and incorrect classifications as false. The mathematical formulations for the various assessment metrics are presented in Eqs. (37–40). Accuracy quantifies the proportion of correctly classified instances among all predictions:37\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Accuracy}&= \frac{TP + TN}{TP + TN + FP + FN} \end{aligned}$$\end{document}Recall (also known as sensitivity) measures the model’s ability to correctly identify positive instances by calculating the ratio of true positives to all actual positive cases:38\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Recall}&= \frac{TP}{TP + FN} \end{aligned}$$\end{document}Precision evaluates the model’s accuracy in positive predictions by determining the proportion of true positives among all predicted positive instances:39\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {Precision}&= \frac{TP}{TP + FP} \end{aligned}$$\end{document}F1-Score represents the harmonic mean of precision and recall, providing a balanced measure that considers both metrics equally:40\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \text {F1\text {-Score}}&= \frac{2 \times \text {Precision} \times \text {Recall}}{\text {Precision} + \text {Recall}} \end{aligned}$$\end{document}These metrics collectively provide a comprehensive assessment of the model’s classification performance, with particular emphasis on the model’s ability to accurately detect DFU cases while minimizing false classifications. eXplainable AI (XAI) with Grad-CAM To enhance the interpretability of the model and provide clinical insights into the decision making process, eXplainable AI (XAI) techniques were implemented using Gradient-weighted Class Activation Mapping (Grad-CAM). Grad-CAM generates visual explanations by computing importance weights for each feature map through global average pooling of gradients with respect to the target class score: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha _k^c = \frac{1}{Z} \sum _i \sum _j \frac{\partial y^c}{\partial A_{i,j}^k}$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$y^c$$\end{document} represents the class score and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A_{i,j}^k$$\end{document} denotes the activation at spatial location (i, j) of the k-th feature map. The class activation map is then generated by a weighted combination of feature maps followed by ReLU activation: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L_{Grad-CAM}^c = \text {ReLU}\left( \sum _k \alpha _k^c A^k\right)$$\end{document}. The resulting heatmaps are normalized, upsampled to match the input dimensions, and overlaid on the original images using alpha blending: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$I_{final} = \alpha \cdot H + (1-\alpha ) \cdot I$$\end{document}, where H represents the heatmap and I is the original image. This approach enables the identification of the most discriminative regions in DFU images, providing clinicians with interpretable evidence supporting the model’s classification decisions and enhancing trust in the AI-based diagnostic system. Proposed methodology The proposed methodology employs a custom-designed Convolutional Neural Network (CNN) architecture specifically developed for binary classification of Diabetic Foot Ulcer (DFU) images. The framework begins with input preprocessing, where all images are resized to a standardized dimension of 224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 pixels and normalized by scaling the pixel values to the range [0,1] by division by 255 to ensure numerical stability and accelerate convergence during training. The CNN architecture consists of multiple Conv2D layers with progressively increasing filter sizes (32, 64, and 128 filters), each utilizing 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 kernels and ReLU activation functions to capture hierarchical features from input data, followed by MaxPooling2D layers with 2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}2 pooling windows that reduce spatial dimensions while preserving essential information. After convolutional and pooling operations, the resulting feature maps are flattened into a one-dimensional vector and passed through fully connected dense layers containing 128 neurons with ReLU activation to learn abstract representations of high level. To avoid overfitting, a dropout layer with a dropout rate of 0.5 is incorporated during training, followed by a final output layer containing a single neuron with sigmoid activation that produces probability values for binary classification, effectively distinguishing between healthy skin and ulcerated tissue. Multi-optimizer CNN training To enhance model performance and explore diverse convergence behaviors, seven independent CNN models were trained using different optimization algorithms: Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, and AdamW. Each optimizer employs distinct gradient update rules and adaptive learning mechanisms, contributing to varied convergence patterns and classification accuracies. The performance of the model was evaluated using accuracy, precision, loss curves, confusion matrices, ROC curves, and F1 scores to identify the most effective optimization strategies for detection of DFU. Genetic algorithm-based ensemble selection A genetic algorithm (GA)-based optimization strategy was employed to identify the optimal subset of CNN models for the ensemble classification of images of diabetic foot ulcers (DFU). The objective of the GA is to select a subset of pretrained CNN models whose majority-voted ensemble maximizes validation accuracy (fitness). The GA operates on binary selection vectors encoding inclusion/exclusion for each candidate model. Model selection during GA optimization was performed using a dedicated validation split (held-out from training) to avoid training-test leakage: all base CNNs were trained on the training partition, GA fitness evaluation used the validation partition, and final reported performance was measured on an independent test partition. To ensure robust assessment and avoid optimistic model selection, we used a nested evaluation scheme: the outer loop provides the final test folds, while the inner loop (or a fixed validation split within each outer fold) is used for GA-based model selection and hyperparameter tuning. Thus, the GA never directly optimizes on the held-out test data. Each model in the candidate pool was encoded as a binary decision variable, where a value of one indicated inclusion in the ensemble and zero indicated exclusion. The GA searched for the subset of models that maximized validation accuracy, formally expressed as:41\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} M^{*}_{GA} = \arg \max _{M_{GA} \subseteq M} \; \mathcal {A}\left( \{\hat{y}_i \; | \; i \in M_{GA}\}, Y_{\text {val}}\right) \end{aligned}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {A}$$\end{document} denotes the validation accuracy, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_i$$\end{document} represents the prediction of the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i^{th}$$\end{document} CNN model, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Y_{\text {val}}$$\end{document} is the corresponding ground truth. The GA was implemented using the DEAP framework, initialized with a population of randomly generated candidate subsets. The ensemble predictions were obtained by aggregating the results of the selected models via majority voting, where the individual model outputs were binarized (threshold = 0.5), and the ensemble decision was determined as the rounded mean. Evolutionary operators included two-point crossover for recombination, bit-flip mutation for diversity, and tournament selection to propagate the fittest individuals. The fitness function was defined as a weighted combination of F1-score and ROC-AUC to balance precision-recall trade-offs. The algorithm was executed for 100 generations with a population size of 20, a crossover probability of 0.8, and a mutation probability of 0.1, which provided convergence without overfitting. Upon convergence, the optimal model subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$M^{*}_{GA}$$\end{document}) was used to form the final ensemble. The GA-based ensemble demonstrated improved performance compared to individual CNNs and naive top-k combinations, effectively balancing precision, recall, and robustness while minimizing redundancy among the selected models. algorithm was executed with a population size of 10 over 20 generations, after which the best performing ensemble was retained. Hard voting ensemble The final ensemble uses hard voting among the top three CNN models selected by the GA optimization process. Each model generates binary predictions for the test set, and the final classification is determined by majority voting.42\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \hat{y} = \text {mode}(\{\hat{y}_1, \hat{y}_2, \hat{y}_3\}) \end{aligned}$$\end{document}Performance evaluation includes accuracy, precision, recall, F1-score, classification reports, and confusion matrices to comprehensively assess ensemble effectiveness. Figure 2 illustrates the complete DFU detection architecture incorporating data augmentation, while Fig. 3 demonstrates the proposed GA-based model selection process for ensemble construction. Algorithm 2 provides detailed implementation steps for the proposed ensemble methodology.Fig. 2Proposed DFU detection architecture with data augmentation and ensemble learning.Fig. 3Proposed GA-based model selection for optimized ensemble construction. Proposed DFU detection architecture with data augmentation and ensemble learning. Proposed GA-based model selection for optimized ensemble construction. Algorithm 2Proposed optimized ensemble CNN model for DFU detection Proposed optimized ensemble CNN model for DFU detection Results Experimental setup The CNN model proposed for the binary classification of diabetic foot ulcers (DFU) was implemented using TensorFlow 2.6.4 32 on the Kaggle platform, which provides free GPU acceleration suitable for training deep learning models. The experimental framework utilized a dataset consisting of 1,055 labeled RGB images divided into two classes: ulcerated (abnormal) and healthy (normal) skin, with 512 abnormal and 543 normal samples, respectively. All experiments were conducted using consistent hyperparameter configurations to ensure fair comparison between different optimization algorithms. Table 4 presents the comprehensive set of hyperparameters employed throughout the experimental evaluation.Table 4Hyperparameters and experimental configuration for DFU classification.HyperparameterValueLearning rate0.0001Batch size32Kernel/filter size3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3Dropout rate0.5Activation functionReLU (hidden layers), Sigmoid (output)Number of epochs50 (with early stopping)Dense layer configuration1 layer with 128 neuronsInput image dimensions224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 (RGB)Early stopping criteriaMin delta: 0.0001, patience: 5Loss functionBinary cross-entropyValidation split10% Table 4Hyperparameters and experimental configuration for DFU classification.HyperparameterValueLearning rate0.0001Batch size32Kernel/filter size3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3Dropout rate0.5Activation functionReLU (hidden layers), Sigmoid (output)Number of epochs50 (with early stopping)Dense layer configuration1 layer with 128 neuronsInput image dimensions224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}224\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\times$$\end{document}3 (RGB)Early stopping criteriaMin delta: 0.0001, patience: 5Loss functionBinary cross-entropyValidation split10% Hyperparameters and experimental configuration for DFU classification. Performance comparison This section presents a comprehensive analysis of the results obtained from our proposed CNN models and their ensemble on the diabetic foot ulcer dataset. Table 5 summarizes the performance metrics for all individual CNN models trained with different optimizers, as well as the ensemble based on genetic algorithms. Figures 5, 6, 7, 8, 9, 10, 11, and 12 illustrate detailed performance trends for each CNN model over the training epochs, highlighting accuracy, loss, precision-recall, and ROC curves that demonstrate how each model’s learning progressed during training. Among individual CNN models, models M3 (RMSprop), M5 (Adagrad), and M6 (Nadam) achieved the highest accuracy of 96%, with precision scores up to 95%. Through the genetic algorithm optimization process, models M1 (Adam), M2 (SGD), and M3 (RMSprop) were selected as the optimal combination for ensemble construction based on their complementary performance characteristics and collective predictive capability. The GA-based ensemble of these three selected models significantly outperformed all individual models, achieving superior performance with 97% accuracy, 95% precision, 99% recall, and 97% F1-score. This shows that the ensemble approach effectively improves the classification performance over single models by leveraging the complementary strengths of different optimizers through intelligent model selection. The training curves across all models demonstrate consistent convergence patterns with increasing accuracy and decreasing loss over epochs, indicating effective learning without overfitting. The precision-recall curves show the expected trade-off between precision and recall, while the ROC curves demonstrate high True Positive Rates (TPRs) across all models, confirming their effectiveness in identifying DFU cases. Figure 4 presents the confusion matrices for all models, providing a detailed visualization of the classification performance.Table 5Performance evaluation metrics for individual CNN models and GA-based ensemble.ModelDescriptionAccuracyPrecisionRecallF1 scoreAUCPRCM1CNN+Adam0.950.930.980.960.9890.990M2CNN+SGD0.950.921.000.960.9960.997M3CNN+RMSprop0.960.950.970.960.9940.994M4CNN+Adamax0.950.920.980.950.9370.956M5CNN+Adagrad0.960.950.980.960.9980.998M6CNN+Nadam0.960.930.990.960.9940.994M7CNN+AdamW0.950.930.980.960.9700.972ProposedGA-based ensemble0.970.950.990.970.9850.989 Table 5Performance evaluation metrics for individual CNN models and GA-based ensemble.ModelDescriptionAccuracyPrecisionRecallF1 scoreAUCPRCM1CNN+Adam0.950.930.980.960.9890.990M2CNN+SGD0.950.921.000.960.9960.997M3CNN+RMSprop0.960.950.970.960.9940.994M4CNN+Adamax0.950.920.980.950.9370.956M5CNN+Adagrad0.960.950.980.960.9980.998M6CNN+Nadam0.960.930.990.960.9940.994M7CNN+AdamW0.950.930.980.960.9700.972ProposedGA-based ensemble0.970.950.990.970.9850.989 Performance evaluation metrics for individual CNN models and GA-based ensemble. To assess the computational efficiency and feasibility of the proposed approach, the training time, model size, and inference latency per image were analyzed for each CNN model (Table 6). The results show that individual CNNs exhibit comparable sizes (approximately 42 MB) and inference times below 16 ms per image, demonstrating suitability for real-time screening. The GA-based ensemble introduces a small computational overhead due to the combining of predictions, but it remains practical for clinical use.Table 6Computational complexity Comparison of CNN models.ModelTraining time (s)Model size (MB)Inference time per image (ms)M144.5942.6115.54M245.4742.6111.62M359.7542.617.78M476.6342.617.77M552.8242.619.90M666.6942.619.69M773.6742.619.62GA-Ensemble–\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx$$\end{document}88.0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx$$\end{document}24.6 Table 6Computational complexity Comparison of CNN models.ModelTraining time (s)Model size (MB)Inference time per image (ms)M144.5942.6115.54M245.4742.6111.62M359.7542.617.78M476.6342.617.77M552.8242.619.90M666.6942.619.69M773.6742.619.62GA-Ensemble–\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx$$\end{document}88.0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx$$\end{document}24.6 Computational complexity Comparison of CNN models. To substantiate the performance improvements of the proposed GA-based ensemble over individual CNN models, paired t-tests were conducted between each baseline model (M1–M7) and the proposed method. The results showed highly significant improvements (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${p} < 0.001$$\end{document}) across all comparisons: M1 (t = 31.847), M2 (t = 31.847), M3 (t = 19.333), M4 (t = 44.721), M5 (t = 13.377), M6 (t = 46.000), and M7 (t = 42.485). These findings confirm that the ensemble’s superiority over individual CNNs is statistically significant.Fig. 4Confusion matrices for all CNN models and GA-based ensemble.Fig. 5Performance curves for M1 (Adam optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 6Performance curves for M2 (SGD optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 7Performance curves for M3 (RMSprop optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 8Performance curves for M4 (Adamax optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 9Performance curves for M5 (Adagrad optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 10Performance curves for M6 (Nadam optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 11Performance curves for M7 (AdamW optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot.Fig. 12Performance curves for the GA-based ensemble model: (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Confusion matrices for all CNN models and GA-based ensemble. Performance curves for M1 (Adam optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for M2 (SGD optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for M3 (RMSprop optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for M4 (Adamax optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for M5 (Adagrad optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for M6 (Nadam optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for M7 (AdamW optimizer): (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Performance curves for the GA-based ensemble model: (a) Accuracy per epoch, (b) Loss per epoch, (c) Precision–Recall (PR) plot, and (d) Receiver Operating Characteristic (ROC) plot. Ablation study on genetic algorithm optimization To further validate the effectiveness of the Genetic Algorithm (GA) based ensemble selection, an ablation study was conducted to compare multiple configurations of the ensemble fusion mechanism. The primary objective was to examine how GA driven optimization influences model subset selection and fusion performance. The following configurations were evaluated: Best Single Model: Baseline performance of the top-performing CNN (M5: CNN+Adagrad).Naive Topk Voting: Ensemble using the top-k CNN models ranked by validation accuracy without GA optimization.GA-Selected Subset: Ensembles generated using model subsets selected by GA for different k values (2, 3, and 4).Logistic Stacking with Calibration: Meta-learner-based fusion using logistic regression with Platt scaling and temperature calibration for improved probability calibration.The GA optimization aimed to maximize a weighted fitness function combining F1-score and ROC-AUC. Population size, crossover rate, mutation probability, and generations were determined empirically via sensitivity analysis to ensure convergence stability. The comparative ablation results are presented in Table 7.Table 7Ablation study results for genetic algorithm-based ensemble optimization.Method / configurationAccuracyF1-scorePrecisionRecallROC-AUCBest single model (M5: CNN+Adagrad)0.9600.9600.9500.9800.998Naive Top-3 voting0.9670.9670.9810.9540.967GA-selected subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=2$$\end{document})0.7450.6711.0000.5050.752GA-Selected Subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=3$$\end{document})0.9720.9720.9510.9900.990GA-Selected Subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=4$$\end{document})0.8160.7821.0000.6420.821Logistic stacking (Top-3, Calibrated)0.9690.9700.9760.9640.969 Best Single Model: Baseline performance of the top-performing CNN (M5: CNN+Adagrad). Best Single Model: Baseline performance of the top-performing CNN (M5: CNN+Adagrad). Naive Topk Voting: Ensemble using the top-k CNN models ranked by validation accuracy without GA optimization. Naive Topk Voting: Ensemble using the top-k CNN models ranked by validation accuracy without GA optimization. GA-Selected Subset: Ensembles generated using model subsets selected by GA for different k values (2, 3, and 4). GA-Selected Subset: Ensembles generated using model subsets selected by GA for different k values (2, 3, and 4). Logistic Stacking with Calibration: Meta-learner-based fusion using logistic regression with Platt scaling and temperature calibration for improved probability calibration. Logistic Stacking with Calibration: Meta-learner-based fusion using logistic regression with Platt scaling and temperature calibration for improved probability calibration. Table 7Ablation study results for genetic algorithm-based ensemble optimization.Method / configurationAccuracyF1-scorePrecisionRecallROC-AUCBest single model (M5: CNN+Adagrad)0.9600.9600.9500.9800.998Naive Top-3 voting0.9670.9670.9810.9540.967GA-selected subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=2$$\end{document})0.7450.6711.0000.5050.752GA-Selected Subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=3$$\end{document})0.9720.9720.9510.9900.990GA-Selected Subset (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=4$$\end{document})0.8160.7821.0000.6420.821Logistic stacking (Top-3, Calibrated)0.9690.9700.9760.9640.969 Ablation study results for genetic algorithm-based ensemble optimization. As shown in Table 7, the GA-selected ensemble with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=3$$\end{document} achieved the highest overall performance across all evaluation metrics, surpassing both the naive top-k ensemble and the best single CNN model (M5). Although logistic stacking with calibration yielded competitive results, the GA-based ensemble exhibited a superior trade-off between precision and recall, indicating more robust generalization. These findings confirm that the GA effectively identifies optimal complementary subsets, enhancing ensemble diversity and stability in decision boundaries. Comparison with previous works To validate the effectiveness of our proposed approach, we performed a comprehensive comparative analysis against state-of-the-art deep learning and machine learning methods reported in recent literature for the detection and classification of diabetic foot ulcers. The comparison was performed using standardized evaluation metrics on similar DFU image datasets to ensure fair and consistent assessment. Table 8 presents the comparative performance analysis, demonstrating that our proposed Genetic Algorithm (GA) ensemble model achieves competitive performance while offering enhanced interpretability through XAI integration. Our GA ensemble model achieved an accuracy of 97%, which is comparable to the best-performing methods in the literature, including Juan et al.’s DFU_VIRNet (97.7%) and Thotad et al.’s EfficientNet CNN ( 97%). In particular, our approach provides several advantages over existing methods: (1) systematic model selection through genetic algorithm optimization, (2) ensemble learning that takes advantage of multiple optimizer strengths, and (3) integrated explainable AI capabilities through Grad-CAM visualization. Although some methods report slightly higher accuracy, our comprehensive approach balances performance with interpretability, making it more suitable for clinical deployment where understanding model decisions is crucial for healthcare professionals.Table 8Comparative analysis of DFU detection models with state-of-the-art approaches.Author(s)Model nameAccuracyYearGoyal et al. 17DFUNet\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}0.96 (AUC)2018Wang et al. 18Two-Phase SVM0.942016Alzubaidi et al. 20DFU_QUTNet\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}0.922021Reyes-Luevano et al. 19DFU_VIRNet0.9772023Thotad et al. 23EfficientNet CNN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}0.972023Biswas et al. 22XAI-FusionNet0.952023Proposed modelGA based ensemble0.972024 Table 8Comparative analysis of DFU detection models with state-of-the-art approaches.Author(s)Model nameAccuracyYearGoyal et al. 17DFUNet\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}0.96 (AUC)2018Wang et al. 18Two-Phase SVM0.942016Alzubaidi et al. 20DFU_QUTNet\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}0.922021Reyes-Luevano et al. 19DFU_VIRNet0.9772023Thotad et al. 23EfficientNet CNN\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sim$$\end{document}0.972023Biswas et al. 22XAI-FusionNet0.952023Proposed modelGA based ensemble0.972024 Comparative analysis of DFU detection models with state-of-the-art approaches. Comparison with state-of-the-art models To strengthen the fairness and modernity of the experimental baseline, we extended our comparison to include both classical and contemporary architectures spanning convolutional and transformer-based models. In addition to VGG19, ResNet101, DenseNet169, Xception, InceptionV3, and EfficientNet-B3, we incorporated recent high-performing backbones such as ConvNeXt-T, EfficientNet-V2-S, ViT-B/16, DeiT-S, and Swin-T. These models represent the state-of-the-art in convolutional and transformer-based vision architectures, offering enhanced feature extraction and scalability for small medical datasets. All models were fine-tuned using transfer learning with identical hyperparameter configurations to ensure a fair and reproducible comparison. As presented in Table 9, the proposed GA-based CNN ensemble achieves the highest overall performance across all metrics. While Swin-T and EfficientNet-V2-S deliver competitive transformer and CNN baselines, respectively, the GA-based ensemble surpasses them, achieving 97% accuracy and an F1-score of 97%. This highlights the advantage of adaptive optimizer diversity and genetic selection in leveraging complementary model strengths for robust and generalized DFU classification.Table 9Performance comparison of state-of-the-art and modern deep learning models with the proposed GA-based ensemble for DFU classification.ModelAccuracy (%)Precision (%)Recall (%)F1-Score (%)VGG-1982.4184.1283.3383.72ResNet-10186.2785.9485.0885.50DenseNet-16992.7593.7391.8192.76Inception-V394.8294.5194.6194.55Xception93.4895.2294.7294.96EfficientNet-B395.4996.3795.8796.11ConvNeXt-T94.2893.9094.1094.00EfficientNet-V2-S95.1294.7595.3095.00ViT-B/1693.2092.8093.0092.90DeiT-S94.0593.5094.0093.70Swin-T95.6095.4095.6095.50Proposed CNN + GA Ensemble97.0095.0099.0097.00 Table 9Performance comparison of state-of-the-art and modern deep learning models with the proposed GA-based ensemble for DFU classification.ModelAccuracy (%)Precision (%)Recall (%)F1-Score (%)VGG-1982.4184.1283.3383.72ResNet-10186.2785.9485.0885.50DenseNet-16992.7593.7391.8192.76Inception-V394.8294.5194.6194.55Xception93.4895.2294.7294.96EfficientNet-B395.4996.3795.8796.11ConvNeXt-T94.2893.9094.1094.00EfficientNet-V2-S95.1294.7595.3095.00ViT-B/1693.2092.8093.0092.90DeiT-S94.0593.5094.0093.70Swin-T95.6095.4095.6095.50Proposed CNN + GA Ensemble97.0095.0099.0097.00 Performance comparison of state-of-the-art and modern deep learning models with the proposed GA-based ensemble for DFU classification. The comparative analysis clearly demonstrates that the proposed GA ensemble effectively integrates complementary CNN optimizers (Adam, SGD, RMSprop, Adagrad, etc.) through evolutionary search, achieving superior generalization and balance between sensitivity and precision. The improvement over both modern CNNs and Vision Transformers underscores the potential of GA-guided ensemble optimization as a lightweight yet highly performing alternative for clinical detection of DFU. XAI results Gradient-weighted Class Activation Mapping (Grad-CAM) provides crucial interpretability for our DFU detection model by visualizing which regions of input images most significantly influence CNN’s classification decisions, computing gradients flowing into the final convolutional layer to generate heatmaps that highlight discriminative areas and offer clinicians insight into the model’s decision-making process. Our Grad-CAM implementation reveals distinct activation patterns in which abnormal (ulcer) cases demonstrate strong activation over pathological features, including ulcer boundaries, tissue discoloration, erythema, necrotic tissue regions, and inflammatory markers, while normal (healthy) cases show uniform, low intensity activation in intact skin regions without the lack of concentrated attention to pathological features. Figure 13 presents representative Grad-CAM heatmaps generated by our GA ensemble model, with red-to-yellow color mapping indicating regions of high importance and blue regions representing areas with minimal influence on classification decisions, validating that our model focuses on clinically significant anatomical structures and pathological indicators rather than background artifacts. The integration of Grad-CAM with our GA ensemble model provides improved diagnostic confidence through visual validation, educational value for healthcare professionals, identification of potential model biases, and support for clinical decision making by highlighting areas requiring closer examination, effectively bridging the gap between complex AI models and practical clinical application to make our DFU detection system more trustworthy and actionable for healthcare professionals.Fig. 13Grad-CAM heatmaps showing model attention for DFU classification with normal and ulcer cases. Grad-CAM heatmaps showing model attention for DFU classification with normal and ulcer cases. Limitations and future work Despite its promising results, this work has several limitations. Although augmentation expanded the dataset, the number of original samples remains relatively small and may not fully capture the variability observed in real-world clinical cases. The study was conducted at the image level without incorporating patient metadata (e.g., age, comorbidities, or ulcer history), which could improve diagnostic reliability. Additionally, no external validation was performed using independent datasets or evaluation in real clinical settings, which limits the assessment of generalizability. Future work will focus on expanding validation using cross-hospital and multi-center DFU datasets to enhance generalizability and ensure data diversity. Incorporating patient-level identifiers will enable subject-held-out or cross-site splitting to strengthen split hygiene and reduce the risk of information overlap. Further, model interpretability will be enhanced by performing Grad-CAM sanity checks with regional masking to verify that attention maps correspond to clinically relevant ulcer areas25. The evaluation framework will also include worst-group performance metrics to ensure model fairness and robustness across subpopulations. In addition, future research will explore the integration of patient specific clinical parameters such as age, gender, diabetes duration, and comorbidities with imaging features to provide a multimodal diagnostic perspective. Extending the approach to object detection architectures (e.g., YOLO, Faster R-CNN) with annotated lesion regions will allow simultaneous localization and classification. Comprehensive sensitivity analyses of the GA parameters (e.g., population size, crossover rate, mutation probability, and number of generations) will be conducted to evaluate ensemble robustness. Finally, embedding advanced explainable AI (XAI) methods beyond Grad-CAM and integrating the model into clinical decision support systems remain key directions for facilitating real-world clinical deployment. Conclusion This study presented a Convolutional Neural Network (CNN) architecture trained with seven different optimizers: Adam, SGD, RMSprop, Adagrad, Adamax, Nadam, and AdamW for the accurate classification of diabetic foot ulcers (DFU). The systematic evaluation of these optimizers demonstrated that the optimizer choice plays a crucial role in improving accuracy, convergence, and generalization in medical image analysis. Data augmentation strategies further improved the robustness of the model by mitigating the challenges of limited data set size. To improve predictive performance, a genetic algorithm-based ensemble strategy was employed, integrating the best performing models into a strong ensemble that achieved 97% accuracy, 99% recall, and 97% F1 score. Furthermore, Explainable Artificial Intelligence (XAI) methods, such as Grad-CAM, were applied to highlight discriminative regions in input images, thus improving transparency and clinical trust. Beyond technical performance, ethical and clinical deployment considerations are essential for the responsible use of AI in healthcare. The deployment of DFU detection models must ensure patient privacy, data security, and clinical accountability. Interpretability through Grad-CAM can assist clinicians in understanding and verifying the model’s decisions, supporting its integration into clinical workflows. Future deployment should involve rigorous validation across diverse patient populations, integration with electronic health record (EHR) systems, and adherence to medical device regulatory standards. By combining optimizer analysis, ensemble learning, and interpretability techniques, this research provides a reliable and high-performing solution for early DFU detection. With appropriate clinical validation and ethical safeguards, the proposed framework has strong potential for real-world integration as a decision-support tool to assist healthcare professionals in reducing the risk of severe complications such as infection and amputation.