An AI-driven framework for diabetic foot ulcer classification, segmentation, and depth estimation Authors: Saswati Debnath, Daniel Willson, Renukadevi M N, Shreenidhi H S, Jaydeep Kishore, Rohit Singh Published: 2026 ABSTRACT AbstractDiabetic Foot Ulcers are a severe complication of diabetes that can lead to infection, amputation, and increased mortality, making timely and objective assessment essential. Conventional evaluation relies primarily on visual inspection and manual measurements, which are often subjective and inconsistent. This paper presents a comprehensive automated deep learning–based framework for DFU assessment that integrates classification, segmentation, relative depth estimation, and explainability. An EfficientNet-B0 model is employed for binary classification of ulcerated versus healthy skin. At the same time, a U-Net with an EfficientNet-B0 encoder is used for precise delineation of ulcer boundaries, enabling quantitative morphometric analysis such as area and width estimation. Model interpretability is incorporated through Gradient-weighted Class Activation Mapping and Local Interpretable Model-Agnostic Explanations, providing visual insights into the decision-making process. To characterize wound topology, relative pseudo-depth maps are generated from single RGB images using a MiDaS-based monocular depth estimation approach. Finally, an automated reporting module synthesizes outputs from all components into structured, clinician-friendly summaries. Experimental results demonstrate strong classification performance, accurate segmentation, and meaningful characterization of relative depth, highlighting the potential of the proposed framework as a research-oriented AI-assisted decision-support tool for DFU assessment. However, further clinical validation involving expert clinicians and prospective studies is required before real-world clinical deployment.Keywords: Diabetic foot ulcer, Multi-class classification, Deep learning, Hybrid model, Transformer, Computer-aided diagnosis, Explainable AI, Medical imagingSubject terms: Computational biology and bioinformatics, Diseases, Engineering, Health care, Mathematics and computing, Medical research Introduction Diabetes mellitus has escalated from a chronic metabolic disorder into a global public health crisis of unprecedented scale and velocity. The latest figures from the International Diabetes Federation (IDF) and the World Health Organization (WHO) reveal a staggering reality: approximately 589 million adults worldwide are currently living with diabetes, representing one in every nine adults1,2. This epidemic is not static; projections indicate that the number of affected individuals will surge to 853 million by 2050, at which point one in every eight adults will have the condition1,2. This projected 46% increase starkly outpaces the estimated 20% growth in the global population, underscoring systemic failures in current public health strategies. The rise is predominantly fueled by type 2 diabetes, which constitutes over 90% of all cases and is linked to rapid urbanization, aging populations, sedentary lifestyles, and obesity2,3. The burden of diabetes is mirrored by its immense economic impact. Global health expenditure attributable to diabetes and its complications has surpassed one trillion US dollars, marking a more than 300% increase in under two decades4. In the United States alone, the annual cost has reached $412.9 billion, with one in every four healthcare dollars spent on diabetes care5. Among the myriad complications that drive these costs, the Diabetic Foot Ulcer (DFU) stands out as one of the most common, severe, and financially draining, with the cost of care being 5.4 times higher than for a diabetic patient without one6. The lifetime risk of a person with diabetes developing a DFU is 19–34%7. These ulcers, often initiated by minor trauma in neuropathic feet, precede more than 85% of non-traumatic lower-extremity amputations (LEAs)8. Globally, it is estimated that a leg is amputated due to diabetes every 30 seconds9. For patients who develop DFUs, the probability of amputation ranges from 20–31%8,9, and the 5-year mortality rate can reach 50–70%, surpassing many cancers, including breast and prostate cancer10. Thus, a DFU is not only a localized wound but a lethal biomarker of advanced systemic disease involving neuropathy, peripheral artery disease, and poor glycemic control7,11. Despite this severity, the current standard for DFU assessment relies heavily on subjective methods–visual inspection, manual ruler measurements, and qualitative interpretation12. These methods are inconsistent, prone to inter-observer variability, and unable to reliably track wound progression. Quantitative techniques like digital planimetry exist but are cumbersome and rarely adopted in busy settings13. This unreliability hampers early identification of deteriorating wounds and contributes to delayed interventions, infection, amputation, and mortality8,12. To address these challenges, research has increasingly turned to artificial intelligence (AI), computer vision, and deep learning. Automated analysis of wound images promises reproducible, quantitative, and objective assessment14. Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) have shown high performance in classification, detection, and segmentation of DFUs15 Yet most AI applications remain task-specific, fragmented, and limited in clinical utility. A truly transformative solution must integrate the full workflow–identification, measurement, characterization, and reporting–into a seamless pipeline. Another critical barrier is the “black box” nature of AI. Despite high accuracy, models often lack transparency, undermining clinician trust and adoption16. Explainable AI (XAI) methods, such as Grad-CAM and LIME, are being explored to provide interpretability17,18. Trustworthy AI in medicine requires not only performance but also transparency, accountability, and clinical validation19. The complication of diabetes that will lead to infection and amputation, but also as an overwhelming burden on healthcare systems. The development of a sustainable AI-based deep learning framework was proposed in20 to initiate the transition to early detection and continuous monitoring of DFU. This proposed work presents an integrated, task-specific DFU assessment framework that unifies classification, segmentation, pseudo-depth characterization, and explainability into a single, reproducible pipeline. The proposed system integrates five synergistic components–classification, segmentation, depth estimation, and interpretability. The main contributions of this work are summarized as follows: A novel multi-level inference framework that integrates patch-level classification, pixel-level segmentation, and region-level analysis in a structured pipeline. The framework leverages EfficientNet-B0 for feature extraction and classification, enabling robust learning of fine-grained ulcer characteristics. A novel multi-level inference framework that integrates patch-level classification, pixel-level segmentation, and region-level analysis in a structured pipeline. The framework leverages EfficientNet-B0 for feature extraction and classification, enabling robust learning of fine-grained ulcer characteristics. A depth-enhanced segmentation strategy that incorporates pseudo-depth information obtained using the MiDaS model. This integration provides complementary structural cues that improve ulcer localization and boundary delineation when combined with U-Net-based segmentation. A depth-enhanced segmentation strategy that incorporates pseudo-depth information obtained using the MiDaS model. This integration provides complementary structural cues that improve ulcer localization and boundary delineation when combined with U-Net-based segmentation. A patch-to-image aggregation mechanism that combines local predictions from image patches into a global classification decision, improving robustness against local variability and noise. A patch-to-image aggregation mechanism that combines local predictions from image patches into a global classification decision, improving robustness against local variability and noise. A unified algorithmic workflow that combines EfficientNet (classification), U-Net (segmentation) and MiDaS (depth estimation) within a coherent framework, moving beyond simple model integration toward a structured methodological design. A unified algorithmic workflow that combines EfficientNet (classification), U-Net (segmentation) and MiDaS (depth estimation) within a coherent framework, moving beyond simple model integration toward a structured methodological design. A comprehensive evaluation, including ablation studies, and explainability analysis (Grad-CAM and LIME), and external validation in an inference-only setting, demonstrating the effectiveness and generalization capability of the proposed approach. A comprehensive evaluation, including ablation studies, and explainability analysis (Grad-CAM and LIME), and external validation in an inference-only setting, demonstrating the effectiveness and generalization capability of the proposed approach. Literature review Goyal et al.14 proposed DFUNet, a convolutional neural network (CNN)-based architecture for diabetic foot ulcer analysis, which achieved an AUC of 0.961 on a dataset comprising 397 DFU images, outperforming conventional machine learning approaches as well as several existing CNN models. Goyal et al.16 extended DFU research to ischemia and infection recognition, contributing a dataset and methods for multi-label classification. Zhang et al. provided a comprehensive review of deep learning applications for DFU analysis, covering classification, object detection, and semantic segmentation. The authors summarized key performance metrics across tasks, noting that adaptive Faster R-CNN models achieved a mean average precision (mAP) of 91.4% in object detection, while U-Net architectures reached an accuracy of 94.96% for segmentation21. In contrast, deep learning approaches22, notably CNN, demonstrate the capability to autonomously extract features from given input samples, streamlined the process of disease classification. Giridhar et al.23 focused on the multi-class classification of DFUs into three stages (Ischemia, None, and Infection) using various deep learning models on the DFUC 2021 dataset. Their proposed system found that the DenseNet201 architecture achieved the highest performance, attaining an overall accuracy of 98% and F1-scores as high as 98% for the Ischemia and None stages. This highlights the effectiveness of DenseNet for rapid and accurate DFU stage classification. Liu et al.23 introduced a DL-based system for DFU ischemia and infection recognition using the EfficientNet architecture on the DFUC2021 dataset, achieving 99% accuracy in ischemia classification and 98% in infection classification through data augmentation techniques like geometric and color operations. Their work outperformed baselines such as ResNet and Inception, emphasizing EfficientNet’s efficiency in handling computational constraints while maintaining high accuracy. Alzubaidi et al.24 proposed a comparison of four hybrid deep CNN models for DFU classification, incorporating multi-branch networks with parallel convolutional layers to address gradient vanishing issues. Trained on a DFU dataset with augmentation, the four-branch model achieved a 95.8% F1-score, surpassing other branch configurations and prior methods. Nagaraju et al.25 developed the SSODL-DFUDC technique, combining Inception-ResNet-v2 for feature extraction with sparrow search optimization (SSO) for hyperparameter tuning and a stacked sparse autoencoder (SSAE) for classification. Evaluated on a Kaggle dataset of 1866 thermograms, it achieved 98.71% accuracy, outperforming other DL models in binary DFU detection. Devi et al.26 presented a hybrid CNN-SVM framework for DFU classification using hyperspectral images, involving adaptive median filtering, improved fuzzy c-means with particle swarm optimization for segmentation, and GLCM-based texture features. The model classified DFUs into four categories (normal, high-risk, ulcerated, and infected) with high accuracy on a custom dataset. Biswas et al.27 introduced DFU_MultiNet, a multi-scale feature fusion approach using VGG19, DenseNet201, and NasNetMobile for feature extraction on a public DFU dataset. The fused model achieved 99.06% accuracy, 99.08% F1-score, and 99.09% AUC, demonstrating superior performance in binary classification through transfer learning and augmentation. Muthulakshmi et al.28 conducted a comparative analysis of EfficientNet variants (B0 to B6) for ischemic and non-ischemic DFU differentiation on the DFUC2021 dataset. Using transfer learning and augmentation, EfficientNet-B1 and B6 achieved over 93% validation accuracy, with B1 balancing efficiency and performance. Jain et al.29 proposed an EfficientNet-based model for DFU classification, trained on 1055 images (ulcer and healthy skin). Optimized for validation loss (0.0496), it reached 95% accuracy, highlighting EfficientNet’s scalability for medical image tasks in resource-limited settings. Almufadi et al.30 developed E-DFu-Net, evaluating seven pretrained DCNN models (including EfficientNetB0) for ischemia and infection classification. The proposed system achieved 97% ischemia and 92% infection accuracy, reducing overfitting through transfer learning. Shanmugam et al.31 introduced a neural network framework using EfficientNet-B0 on 1866 Kaggle thermograms, achieving 98.71% accuracy in binary DFU classification, emphasizing its potential for automated screening. Anusha et al.32 proposed a ConvMixer model for DFU detection and classification, preprocessing with the watershed algorithm, and achieving 97.16% accuracy, 97% precision, and 99.08% sensitivity on a diverse DFU dataset. Thotad et al.33 surveyed deep learning approaches for DFU detection, highlighting CNN-based progress. Wang et al.34 introduced a few-shot learning approach using Deep ResNet with transfer learning, improving DFU image classification where annotated data is scarce. Toofanee et al.35 introduced a novel classification approach, DFU-SIAM, which utilizes a Siamese Neural Network architecture. The model’s backbone is a unique ensemble of a Convolutional Neural Network (EfficientNetV2S) and a Vision Image Transformer (BEiT) to effectively learn image similarities. Their proposed method achieved state-of-the-art results on the DFUC2021 challenge dataset, demonstrating superior performance over previous works with a Macro F1-Score of 0.6228. Goyal et al.36 also developed robust mobile-friendly methods for real-time DFU detection and localization. Manoj et al.37 proposed an intelligent CNN-based framework using webcam imaging for non-invasive DFU detection, achieving 97.2% accuracy, 96.8% precision, and 97.5% recall. Hassib et al.38 presented an approach for Diabetic Foot Ulcer (DFU) segmentation by ensembling convolutional (DeepLabV3+) and transformer-based (SegFormer) models for the DFUC2022 challenge. Their experiments showed that the SegFormer model individually achieved the highest performance with a Dice coefficient of 69.89%, and the ensemble method did not yield further improvement in this metric. Kumar et al.39 addressed predictive modeling for early detection of diabetes using ML (RF achieved 83.6% accuracy onthe PIMA dataset), laying a foundation for DFU prevention strategies. A multitude of works have explored the detection and classification of DFU data, aiming to differentiate between abnormal skin and normal skin. Many writers have advocated for image processing and ML methods, focusing on the analysis of diverse features such as morphological textures, hues, and patterns. The efficacy of the proposed methodologies is intricately tied to the chosen algorithms and training strategies. DL has emerged as a prevalent and widely adopted approach for the development of medical image segmentation, classification, and detection tasks. Notably, DL models have demonstrated superior performance compared to traditional approaches using DFU images from diabetic-affected patients14. These studies collectively underscore a pronounced shift in the research landscape toward hybrid, transfer learning, and lightweight convolutional neural network (CNN) architectures for the classification and analysis of diabetic foot ulcers (DFUs). Among the various deep learning approaches, EfficientNet variants have frequently demonstrated superior performance when compared to conventional CNNs, owing to their balance of computational efficiency and predictive accuracy. Similarly, hybrid models and transfer learning strategies have gained traction as viable solutions for overcoming the inherent limitations of traditional feature-engineering-based methodologies, enabling models to leverage knowledge from related domains while adapting to the specific complexities of DFU image data. Nevertheless, despite these significant advancements, several critical challenges continue to impede the large-scale deployment of such systems in clinical practice. Chief among these are dataset scarcity, which often restricts the ability of models to generalize across diverse patient populations; the risk of overfitting, particularly when training data is limited or highly imbalanced; and the lack of robust frameworks for real-world deployment, where variability in imaging conditions, acquisition devices, and patient-specific factors can degrade model performance. Furthermore, the majority of current approaches remain constrained to binary or limited multi-class tasks, underscoring the need for more generalized architectures capable of addressing complex multi-class and multi-label scenarios, including the simultaneous recognition of ulcer severity, infection, and ischemia. Addressing these multifaceted challenges offers substantial opportunities for further advancements in automated DFU diagnostics, not only through the development of more sophisticated and resilient models but also via the curation of large-scale, standardized, and representative datasets, the incorporation of domain adaptation techniques, and the integration of explainable AI mechanisms to foster trust and interpretability. Collectively, these directions point toward a future in which automated DFU diagnostic tools can transition from experimental research prototypes to reliable, resource-efficient, and widely deployable solutions, thus supporting both early detection and improved patient outcomes on a global scale. Table 1 presents a comprehensive comparative study of state-of-the-art methods for diabetic foot ulcer (DFU) detection and classification, highlighting their datasets, methodologies, and performance metrics. Table 1Comparative summary of diabetic foot ulcer (DFU) detection and classification studies.TitleLead Author et al.YearModelDatasetKey Performance MetricsComparison of hybrid convolutional neuralnetworks models for DFU classificationLaith Alzubaidi et al.2021Hybrid CNNDFU datasetF1-score: 95.8%EfficientNet-based Deep Learning Modelfor Accurate DFU ClassificationEshika Jain et al.2025EfficientNet1055 imagesAccuracy: 95%A Deep Learning Model-Based NeuralNetwork Framework for DFU ClassificationP. Shanmugam et al.2024EfficientNet-B0KaggleAccuracy: 98.71%DFU Detection and Classification usingConvMixer ModelAnusha N et al.2024ConvMixerDiverse clinical DFU datasetAccuracy: 97.16%DFU Ischemia and Infection Recognitionusing EfficientNet DL ModelsZiyang Liu et al.2022EfficientNetDFUC2021 datasetIschemia Acc: 99%Automated DFU Detection andClassification Using Deep LearningSunnam Nagaraju et al.2023SSODL-DFUDCKaggle (1866 thermograms)Accuracy: 98.71%DFU Classification using HybridCNN-SVM on Hyperspectral ImagingT. A. M. Devi et al.2023Hybrid CNN-SVMCustom hyperspectral DFU datasetAccuracy: 98%Comparative Analysis of EfficientNetModels for Ischemic vs Non-Ischemic DFUM. Muthulakshmi et al.2023EfficientNetDFUC2021 (15,683 images)Validation Accuracy: 93%E-DFu-Net: Efficient DCNNfor DFU ClassificationNouf F. Almufadi et al.2025E-DFu-NetDFU imagesIschemia Acc: 97%DFU_MultiNet: Multi-scaleFusion ApproachShuvo Biswas et al.2023DFU_MultiNetPublic DFU datasetAcc: 99.06%DFU detection usingDL approachesPuneeth N. Thotad et al.2022Survey of CNN/DLMultiple datasetsReviewFew-shot DFUClassification (ResNet + TL)C. Wang et al.2024Deep ResNetDFU dataset (Sci Rep)Avg Accuracy 0.9867DFUNet: CNNs for DFUManu Goyal et al.2020DFUNet (CNN)397 DFU imagesAUC: 0.961Real-time DFU Detection onMobile DevicesManu Goyal et al.2019Lightweight CNNsDFU datasetRobust detection & localizationCNN-based DFU Careusing Webcam ImagingR. Karthick Manoj et al.2025Advanced CNNKaggle DFUAcc: 97.2Recognition of Ischemia & Infection in DFUManu Goyal et al.2019CNNCustom datasetDataset + techniques for ischemia & infectionEarly Diabetes Detection via MLRakesh Kumar et al.2023RF, SVM, LR, KNNPIMA Diabetes datasetRF: Acc: 83.6% Comparative summary of diabetic foot ulcer (DFU) detection and classification studies. Comparison of hybrid convolutional neural networks models for DFU classification EfficientNet-based Deep Learning Model for Accurate DFU Classification A Deep Learning Model-Based Neural Network Framework for DFU Classification DFU Detection and Classification using ConvMixer Model DFU Ischemia and Infection Recognition using EfficientNet DL Models Automated DFU Detection and Classification Using Deep Learning DFU Classification using Hybrid CNN-SVM on Hyperspectral Imaging Comparative Analysis of EfficientNet Models for Ischemic vs Non-Ischemic DFU E-DFu-Net: Efficient DCNN for DFU Classification DFU_MultiNet: Multi-scale Fusion Approach DFU detection using DL approaches Few-shot DFU Classification (ResNet + TL) Real-time DFU Detection on Mobile Devices CNN-based DFU Care using Webcam Imaging Background details EfficientNet EfficientNet originated from a systematic study of scaling Convolutional Neural Networks (ConvNets). Its foundational concept is that arbitrarily scaling a network’s depth, width, or input resolution is suboptimal. Instead, the model introduces a principled compound scaling method that uses a simple coefficient to uniformly balance all three dimensions. This approach was designed to achieve a better balance of accuracy and efficiency, addressing the challenge that the accuracy gains from scaling a single dimension tend to diminish quickly. The architecture’s baseline, EfficientNet-B0, was discovered through a neural architecture search that optimized for both accuracy and FLOPS (a measure of computational cost)40. U-Net U-Net is a convolutional network architecture designed specifically for fast and precise biomedical image segmentation. Its foundational concept is to effectively perform pixel-level classification on medical images even with very few annotated training samples, a common challenge in the biomedical field. The model’s architecture is famously symmetric and U-shaped, consisting of two main paths. The first is a contracting path (encoder) that follows a typical CNN structure to capture the image’s context by downsampling and increasing feature channels. The second is a symmetric expanding path (decoder) that uses transposed convolutions to upsample the feature maps, enabling precise localization of the features being segmented41. Midas MiDaS (Monocular Depth and Normal Estimation System) is a deep learning model designed to estimate the depth of a scene from a single 2D image. Its core concept is to predict relative depth, meaning it determines how far pixels are from the camera relative to each other, rather than predicting an absolute metric distance (e.g., in meters). This approach cleverly sidesteps the inherent ambiguity and ill-posed nature of monocular depth estimation, allowing the model to be trained on a diverse mixture of datasets with different camera parameters and depth scales. This training strategy makes MiDaS exceptionally robust and capable of generalizing to unseen environments (zero-shot transfer)42. Grad-CAM Grad-CAM is a widely used explainable AI (XAI) technique that produces visual explanations for the decisions made by Convolutional Neural Networks (CNNs). Its fundamental goal is to make CNNs more transparent by generating a “heatmap” that highlights the specific regions in an input image that were most influential in the network’s final prediction for a particular class. This allows users to understand why a model classified an image as, for example, “infected,” by showing exactly which parts of the image led to that conclusion43. LIME LIME is another cornerstone of the XAI technique designed to explain the predictions of any machine learning model, earning it the title of model-agnostic. The core idea is that while a complex model (like a deep neural network) may be globally intricate, its behavior for a single, specific prediction can be approximated by a much simpler, locally faithful, and interpretable model (e.g., a linear model). In essence, LIME answers the question “Why should I trust this specific prediction?” by showing which input features were most influential for that single instance44. Proposed methodology The proposed framework consists of several interconnected modules, as shown in Fig. 1. The workflow comprises six stages: Dataset pre-processing Dataset pre-processing Data augmentation and stratified splitting Data augmentation and stratified splitting Ulcer classification via EfficientNet-B0 Ulcer classification via EfficientNet-B0 Ulcer segmentation and morphometric estimation Ulcer segmentation and morphometric estimation Depth estimation for wound characterization Depth estimation for wound characterization Explainability analysis Explainability analysis Detailed architecture of the proposed EfficientNet-based classification, EfficientNet–U-Net segmentation, and MiDaS-based depth estimation. Dataset and pre-processing Experiments employed the publicly available Kaggle DFU-dataset (https://www.kaggle.com/datasets/laithjj/diabetic-foot-ulcer-dfu)45, which was collected at the diabetes hospital in Nasiriyah, Iraq, with appropriate informed consent and ethics approvals. Images were captured under varied illumination and viewpoints using a Samsung Galaxy Note 8 and an iPad. We utilized the patches subset (224 224 crops), consisting of 1,055 images (543 healthy and 512 ulcer), to ensure a standardized input size suitable for pre-trained models and to focus the analysis on the immediate ulcer region, thereby reducing computational overhead. For model consistency, all images were resized and normalized using the standard ImageNet mean and standard deviation before being fed into the classification and segmentation models. The dataset was subsequently partitioned into training, validation, and testing sets46–48. Using this wound segmentation data from the Foot Ulcer Segmentation Challenge 2021, we trained our U-Net model to better perform segmentation on the DFU wound region49. Experiments are also conducted using the segmentation subset of the Diabetic Foot Ulcer Challenge (DFUC) 2022 dataset. The DFUC initiative provides clinically annotated wound images that enable standardized evaluation of deep learning models for ulcer analysis. In particular, the DFUC2022 segmentation dataset offers high-quality, expert-annotated masks, facilitating precise assessment of model performance in clinically relevant settings. The dataset and its evaluation protocols build upon earlier DFUC releases, including DFUC2020, which introduced large-scale data for ulcer detection and classification tasks50, and subsequent efforts that emphasized clinically interpretable segmentation annotations51. Furthermore, benchmark reports from DFUC challenges provide standardized evaluation frameworks and comparative analyses across state-of-the-art segmentation methods52,53. Data augmentation and splitting To enhance robustness against variations in imaging conditions and acquisition angles, on-the-fly data augmentation was applied exclusively to the training set. The augmentation pipeline included random rotations (up to ), horizontal and vertical flips, and moderate color jittering in brightness, contrast, and saturation. These transformations were designed to improve generalization while preserving the underlying characteristics of ulcer and healthy skin regions. The Kaggle DFU patch dataset, consisting of 1,055 images, was partitioned into training, validation, and test subsets using a stratified 70/15/15 split to maintain class balance across all sets. Since the dataset comprises independent image patches without associated patient identifiers, patient-level separation was not applicable. Data augmentation was applied only during training, while validation and test sets remained augmentation-free to ensure unbiased performance evaluation. This splitting strategy provides sufficient training data for model optimization while reserving independent subsets for hyperparameter tuning and final evaluation, enabling a realistic assessment of the model’s generalization capability. Ulcer classification (EfficientNet-B0) For binary classification of ulcer versus healthy skin, an EfficientNet-B0 model pre-trained on ImageNet was fine-tuned. EfficientNet-B0 was selected due to its favorable trade-off between classification performance and computational efficiency, making it suitable for deployment in resource-constrained environments. Training was performed using a two-stage strategy to ensure stable convergence. In the first stage, the EfficientNet-B0 backbone was frozen and only the final classification layer was trained. In the second stage, all layers were unfrozen and fine-tuned using a lower learning rate to refine deep feature representations. The AdamW optimizer was employed for its effective decoupled weight decay regularization, along with a cosine annealing learning rate scheduler to facilitate smooth convergence. The cross-entropy loss function was used for optimization, as the dataset exhibited only mild class imbalance. Model performance was monitored on the validation set throughout training, and the best-performing model weights were selected based on validation accuracy. Ulcer segmentation and morphometry (UNet) For spatial delineation of the ulcer region, we adopted a UNet architecture with an EfficientNet-B0 encoder, also initialized with ImageNet weights. This approach, often referred to as EfficientUnet, combines the powerful feature extraction capabilities of EfficientNet with the proven effectiveness of UNet’s encoder-decoder structure and skip connections for precise semantic segmentation. The predicted binary masks (thresholded at 0.5) are mapped back to the original image resolution. These masks were then used to compute quantitative, wound-level descriptors, including binary area (in pixels) and bounding-box dimensions (in pixels). When a scale is available, these were converted to physical estimates (mm and mm²), providing interpretable indicators for tracking wound progression. These segmentation experiments are trained and validated on clinically annotated benchmark datasets from the DFUC challenge, ensuring standardized evaluation using expert-labelled ulcer masks51,52. Explanation At 300 dots per inch (dpi), each inch corresponds to 300 pixels. Dividing the pixel width by 300 gives the physical size in inches, and multiplying by 2.54 converts it to centimeters. Depth estimation (MiDaS) To provide a three-dimensional characterization of the wound, we estimated relative depth using the MiDaS (DPT-Large) model. This relative depth provides a quantitative proxy for wound severity, as ulcer depth is a key parameter in grading systems like the Wagner Ulcer Classification Scale. To contextualize the ulcer’s “depression,” we computed depth statistics within the segmented ulcer region relative to the median depth of a dilated perilesional “skin” band. Where a reliable depth-to-mm calibration is unavailable, depth values are reported in arbitrary units with an explicit note of this limitation. The full integration and necessary safeguards (e.g., fallback procedures if MiDaS fails) are encapsulated in our analysis module. It is important to note that the depth values obtained from the MiDaS model represent relative pseudo-depth rather than clinically calibrated measurements. Therefore, the proposed depth estimation module does not provide direct clinical quantification of wound depth but serves as an auxiliary structural cue to enhance segmentation and spatial understanding of ulcer regions. Explainability (Grad-CAM & LIME) To ensure transparency and foster trust, we integrated two complementary local explainability (XAI) techniques. Grad-CAM was applied to the final convolutional layer of the classifier to generate a heatmap highlighting the discriminative regions that most influenced the model’s prediction. Grad-CAM was applied to the final convolutional layer of the classifier to generate a heatmap highlighting the discriminative regions that most influenced the model’s prediction. LIME was used to identify which superpixels of the input image were most important to the classification outcome by analyzing the model’s response to local perturbations. LIME was used to identify which superpixels of the input image were most important to the classification outcome by analyzing the model’s response to local perturbations. Together, these methods offer both a gradient-based and a perturbation-based view of the model’s decision-making process, providing robust, intuitive evidence for the classification result. To formalize the proposed framework, the complete multi-level DFU analysis pipeline is summarized in Algorithm 1. Proposed multi-level DFU analysis with depth-enhanced segmentation The proposed algorithm integrates patch-level classification, pixel-level segmentation, and depth-based structural analysis in a unified framework, enabling comprehensive ulcer characterization. Experimental results and analysis This section details the experimental setup used to train and evaluate our models, including the data splits, evaluation metrics, and the presentation of visual results. Experimental setup All experiments were implemented using the PyTorch deep learning framework and executed in a GPU-accelerated environment. Model training and evaluation were conducted on a system equipped with an NVIDIA T4 GPU. The EfficientNet-B0 architecture was employed for diabetic foot ulcer (DFU) classification, initialized with ImageNet-pretrained weights using the timm library. Standard PyTorch and torchvision utilities were used for data handling, augmentation, and optimization. Input images were resized to pixels. Data augmentation was applied exclusively to the training set and included random horizontal and vertical flips, random rotations up to , and color jittering to improve generalization. Validation and test samples were processed using deterministic resizing and normalization only. All images were normalized using ImageNet mean and standard deviation values. Training was performed using the AdamW optimizer with cosine annealing learning rate scheduling. Cross-entropy loss was used as the objective function. No manual class re-weighting was applied, as the dataset exhibited only mild class imbalance. Table 2 summarizes the model size, memory footprint, training time, and inference latency of the proposed system. Table 2Computational efficiency evaluation of the proposed model.MetricResultModel Size21.3 MBMemory Required During Inference312 MB (RAM)Training Time (100 epochs)3.8 hAverage Training Time per Epoch2.3 minInference Speed (per image)48 ms (21 FPS)GPU UsedNVIDIA T4 GPU (for reference)CPU Inference SupportYes (optimized) Computational efficiency evaluation of the proposed model. The results of the study showed that an EfficientNet-based framework could achieve excellent accuracy and computability without compromising either. The size of the compact model (21.3 MB) can easily fit on almost any computer’s hard drive, while the relatively low memory consumption during inference (312 MB) makes this system very lightweight and easy to deploy on devices with mid-range capabilities. Additionally, the time it took to train the entire model (approximately 3.8 hours for 100 epochs) demonstrates that this framework will not place an undue burden on most computer users, since it has a reasonable computational demand. Finally, the model’s average inference time per image is 48 ms (approximately 21 frames/sec), which makes it adequate for near real-time assessment of DFUs in settings. Overall, the results of the efficiency analysis support the sustainability and deployment objectives of the proposed framework. Implementation details and training settings The framework is implemented using PyTorch and the timm library. To ensure strict reproducibility across all training folds and evaluations, a deterministic random seed (seed = 42) is fixed for all backend operations, including Python’s random, numpy, and PyTorch’s CUDA algorithms. All input images are resized to 256 × 256 pixels. To enhance model generalization and prevent overfitting, the training data is subjected to on-the-fly spatial and color augmentations. These include random horizontal and vertical flips (p = 0.5), random rotations (up to 30 degrees), and color jittering (brightness, contrast, and saturation variations of 20%, along with a hue variation of 10%). All images in the training, validation, and hold-out test sets are subsequently converted to tensors and normalized utilizing standard ImageNet mean and standard deviation values. The model is optimized using the standard Cross-Entropy Loss function. Model weights are updated using the AdamW optimizer with a weight decay of 1e-2. To ensure smooth convergence, a Cosine Annealing learning rate scheduler is applied independently during each training stage. Two-Stage Training Strategy: The model is trained using a batch size of 32 under a two-stage transfer learning protocol: Stage 1 (Classifier head training): The pre-trained EfficientNet-B0 backbone is frozen, and only the custom classification head is trained for 10 epochs with an initial learning rate of 1e-3. Stage 1 (Classifier head training): The pre-trained EfficientNet-B0 backbone is frozen, and only the custom classification head is trained for 10 epochs with an initial learning rate of 1e-3. Stage 2 (Full model fine-tuning): All network layers are unfrozen and fine-tuned for an additional 25 epochs using a significantly reduced learning rate of 1e-5 to carefully refine deep feature representations. Stage 2 (Full model fine-tuning): All network layers are unfrozen and fine-tuned for an additional 25 epochs using a significantly reduced learning rate of 1e-5 to carefully refine deep feature representations. Evaluation metrics Model performance was reported on the held-out test split. For classification, we reported accuracy, precision, recall, F1-score, and the confusion matrix. For segmentation, we used the Dice coefficient and Intersection over Union (IoU). The standard formulas for these metrics are mentioned below. We further compared pre vs. post-augmentation validation accuracy (0.993 0.9967) to quantify robustness gains. Classification: The performance of our classification model was evaluated using the following metrics: Accuracy It measures the proportion of correctly classified instances (true positives + true negatives) among all samples. Recall (Sensitivity) The proportion of true positive predictions among all actual positive instances. Recall measures the ability of the model to identify all actual positive cases, i.e., the proportion of true positives among all real positives. F1-Score The harmonic mean of precision and recall. Confusion Matrix: A table that visualizes the performance of the classification model. The F1-score is the harmonic mean of precision and recall, balancing both metrics. Segmentation The performance of our segmentation model was evaluated using: Intersection over Union (IoU) The ratio of the area of overlap to the area of union between the predicted and ground truth masks. IoU represents the ratio of the overlapping area between the predicted mask A and ground truth mask B to their total combined area. Dice Coefficient Twice the area of overlap divided by the sum of the areas of the predicted and ground truth masks. The Dice coefficient measures segmentation overlap, giving greater emphasis to the intersection region. It is closely related to IoU but more sensitive to small overlapping regions. Confusion matrix The confusion matrix summarizes classification results: - TP = True Positives, - FP = False Positives, - FN = False Negatives, - TN = True Negatives. The training strategy adopted for this study involves a two-stage transfer learning approach utilizing K-Fold Cross-Validation to ensure robust performance estimation. The complete training procedure is described in the following step-wise methodology. Data preparation:Split dataset into cross-validation set (85%) and hold-out test set (15%) using stratified sampling.Apply data augmentation (flip, rotation, color jitter) on training data.Apply normalization for validation and testing. Data preparation:Split dataset into cross-validation set (85%) and hold-out test set (15%) using stratified sampling.Apply data augmentation (flip, rotation, color jitter) on training data.Apply normalization for validation and testing. Split dataset into cross-validation set (85%) and hold-out test set (15%) using stratified sampling. Split dataset into cross-validation set (85%) and hold-out test set (15%) using stratified sampling. Apply data augmentation (flip, rotation, color jitter) on training data. Apply data augmentation (flip, rotation, color jitter) on training data. Apply normalization for validation and testing. Apply normalization for validation and testing. K-Fold cross-validation ():Partition into training and validation .Initialize EfficientNet-B0 with pretrained weights.Use cross-entropy loss . K-Fold cross-validation ():Partition into training and validation .Initialize EfficientNet-B0 with pretrained weights.Use cross-entropy loss . Partition into training and validation . Partition into training and validation . Initialize EfficientNet-B0 with pretrained weights. Initialize EfficientNet-B0 with pretrained weights. Use cross-entropy loss . Use cross-entropy loss . Stage 1-Head trainingFreeze backbone parameters .Train classification head using AdamW optimizer () for 10 epochs. Stage 1-Head trainingFreeze backbone parameters .Train classification head using AdamW optimizer () for 10 epochs. Freeze backbone parameters . Freeze backbone parameters . Train classification head using AdamW optimizer () for 10 epochs. Train classification head using AdamW optimizer () for 10 epochs. Stage 2-Fine-tuning:Unfreeze all parameters .Fine-tune entire model using AdamW () for 25 epochs.Save best model weights based on validation accuracy. Stage 2-Fine-tuning:Unfreeze all parameters .Fine-tune entire model using AdamW () for 25 epochs.Save best model weights based on validation accuracy. Unfreeze all parameters . Unfreeze all parameters . Fine-tune entire model using AdamW () for 25 epochs. Fine-tune entire model using AdamW () for 25 epochs. Save best model weights based on validation accuracy. Save best model weights based on validation accuracy. Evaluation:Compute mean and standard deviation of Accuracy, Precision, Recall, and F1-score across folds.Evaluate final model on .Generate confusion matrix and ROC curves. Evaluation:Compute mean and standard deviation of Accuracy, Precision, Recall, and F1-score across folds.Evaluate final model on .Generate confusion matrix and ROC curves. Compute mean and standard deviation of Accuracy, Precision, Recall, and F1-score across folds. Compute mean and standard deviation of Accuracy, Precision, Recall, and F1-score across folds. Evaluate final model on . Evaluate final model on . Generate confusion matrix and ROC curves. Generate confusion matrix and ROC curves. Train–validation–test split The Kaggle DFU patch dataset, consisting of 1055 images, was divided into three subsets. A stratified hold-out test set comprising 15% of the data (159 images) was first separated to provide an unbiased final evaluation. The remaining 896 images were used for model development through 5-fold stratified cross-validation, ensuring that class distributions were preserved across all folds. Within each fold, samples were split into training and validation subsets according to the cross-validation indices. Since the dataset consists of independent image patches without patient identifiers, patient-level separation was not applicable. Data augmentation was applied only during training, while validation and test sets remained augmentation-free. Training strategy A two-stage training protocol was adopted for EfficientNet-B0 to ensure stable convergence and effective fine-tuning: Stage 1-Classifier head training The pretrained EfficientNet-B0 backbone was frozen, and only the final classification layer was trained for 10 epochs using a learning rate of . This stage allowed the classifier head to adapt to the DFU domain-specific features. Stage 1-Classifier head training The pretrained EfficientNet-B0 backbone was frozen, and only the final classification layer was trained for 10 epochs using a learning rate of . This stage allowed the classifier head to adapt to the DFU domain-specific features. Stage 2-Full model fine-tuning All layers of the network were unfrozen and fine-tuned for 25 additional epochs with a reduced learning rate of . This stage significantly improved performance by refining deep feature representations. Stage 2-Full model fine-tuning All layers of the network were unfrozen and fine-tuned for 25 additional epochs with a reduced learning rate of . This stage significantly improved performance by refining deep feature representations. Across the five cross-validation folds, the proposed approach achieved a mean validation accuracy of , indicating strong consistency and robustness. Classification performance To evaluate the robustness and generalization capability of the proposed DFU classification model, performance was assessed using two complementary evaluation strategies: (i) stratified 5-fold cross-validation on the training pool and (ii) final evaluation on an independent hold-out test set. The cross-validation procedure was used during model development to estimate stability across different data splits, while the hold-out test set was reserved exclusively for the final unbiased evaluation. Cross-validation performance Stratified 5-fold cross-validation was conducted on the training pool to assess the consistency and stability of the EfficientNet-B0 classifier. Performance metrics were computed for each fold and subsequently aggregated to obtain the mean and standard deviation across folds. The model demonstrated strong and stable performance, achieving a mean accuracy of 96.21% with a standard deviation of 2.07%. Similar trends were observed across precision, recall, and F1-score metrics, indicating that the classifier maintained consistent predictive performance across different training–validation splits (Table 3). Table 3Cross-validation performance of the proposed DFU classification model (mean ± standard deviation across 5 folds).MetricValueAccuracy (%)Precision (%)Recall (%)F1-Score (%) Cross-validation performance of the proposed DFU classification model (mean ± standard deviation across 5 folds). Classification performance on hold-out test set After model development using cross-validation, the final trained model was evaluated on an independent hold-out test set consisting of 159 previously unseen images. This evaluation provides an unbiased estimate of real-world performance. The EfficientNet-B0 classifier achieved an overall accuracy of 96.86%. The model demonstrated strong diagnostic performance with a sensitivity (recall for ulcer detection) of 100.00% and a specificity of 93.90%. The high sensitivity indicates that all ulcer samples were correctly detected, while the strong specificity confirms effective discrimination between ulcer patches and healthy skin. Precision and F1-score further highlight the balanced performance of the classifier across both classes. Additionally, the Receiver Operating Characteristic (ROC) analysis yielded an area under the curve (AUC) of 98.97 %, indicating excellent discriminative capability across varying decision thresholds. The proposed model was evaluated on an external validation dataset in an inference-only setting, without any further fine-tuning, to assess its generalization capability on unseen data. This setup simulates a realistic deployment scenario where the model is directly applied to new samples. The model achieved an accuracy of 87%, with a precision of 89.4%, recall (sensitivity) of 84.3%, and specificity of 93.9%. The high precision indicates that the model effectively minimizes false positives, while the strong recall demonstrates its ability to detect the majority of ulcer cases, which is critical in medical screening applications. The high specificity further confirms reliable identification of non-ulcer regions. The F1-score of 86% reflects a balanced trade-off between precision and recall, indicating robust performance across different evaluation criteria. Overall, these results highlight the model’s strong generalization capability under domain shift conditions. However, while the external validation supports robustness, further evaluation on multi-center clinical datasets is necessary before real-world deployment (Table 4). Table 4Overall performance of the proposed DFU classification model on the hold-out test set.MetricValueAccuracy (%)96.86Sensitivity / Recall (%)100.00Specificity (%)93.90Precision (%)93.90F1-Score (%)96.86ROC–AUC (%)98.97 Overall performance of the proposed DFU classification model on the hold-out test set. The proposed model is evaluated in an inference-only setting (Kaggle, 493 samples) with same database, without any further fine-tuning, to assess its generalization capability on unseen data. This setup simulates a realistic deployment scenario where the model is directly applied to new samples. The model achieves an accuracy of 87%, with a precision of 89.4%, recall (sensitivity) of 84.3%, and specificity of 93.9% (Table 5). The high precision indicates that the model effectively minimizes false positives, while the strong recall demonstrates its ability to detect the majority of ulcer cases, which is critical in medical screening applications. The high specificity further confirms reliable identification of non-ulcer regions. The F1-score of 86% reflects a balanced trade-off between precision and recall, indicating robust performance across different evaluation criteria. In general, these results highlight the strong generalizability of the model under domain shift conditions. Table 5Performance of the proposed model evaluated in an inference-only setting demonstrating its generalization capability on unseen data.MetricValueAccuracy (%)87.00Sensitivity / Recall (%)84.30Specificity (%)93.90Precision (%)89.40F1-Score (%)86.00 Performance of the proposed model evaluated in an inference-only setting demonstrating its generalization capability on unseen data. Confusion matrix analysis Figure 2 presents the confusion matrix for the hold-out test set. The classifier correctly identified 77 ulcer images and all 77 healthy images. Only five ulcer cases were misclassified as healthy, while no false-positive ulcer predictions were observed. This behavior is desirable in screening scenarios, as minimizing false negatives is crucial for early ulcer detection. Confusion matrix for DFU classification on the hold-out test set. Training dynamics The training and validation curves, shown in Fig. 3, demonstrate stable convergence throughout both training stages. During classifier head training, the model exhibited gradual performance improvements. A notable performance boost was observed during full-network fine-tuning, where both training and validation losses decreased consistently while accuracy increased. Training and validation accuracy and loss curves across cross-validation folds. The close alignment between training and validation curves indicates good generalization and the absence of significant overfitting. These results confirm the effectiveness of the adopted two-stage fine-tuning strategy (Figs. 3, 4). Roc curves. Overall, the proposed EfficientNet-B0–based framework demonstrates strong generalization capability, high discriminative performance, and robustness across cross-validation folds. The combination of stratified cross-validation, two-stage fine-tuning, and carefully designed augmentation results in a reliable and meaningful DFU classification system. The low false-negative rate and excellent ROC–AUC score highlight the suitability of the proposed approach for automated diabetic foot ulcer screening and decision-support applications. Segmentation and morphometric analysis (UNet) In addition to classification performance, the proposed framework is evaluated for ulcer region segmentation to assess spatial localization and boundary accuracy. To provide a highly realistic assessment of viability, metrics are calculated strictly on a per-image basis. For the task of delineating ulcer boundaries, the UNet model with an EfficientNet-B0 encoder is evaluated using a rigorous, per-image metric calculation to accurately capture variance. The model achieves a mean Dice coefficient of and an Intersection over Union (IoU) of on the validation set (Table 6). Table 6Comprehensive segmentation performance of the proposed model.MetricMean ± StdDice CoefficientIntersection over Union (IoU)PrecisionRecall (Sensitivity)SpecificityHausdorff Distance (pixels) Comprehensive segmentation performance of the proposed model. A strong Recall (Sensitivity) of 0.8419, indicating that the network successfully identifies the vast majority of ulcerated pixels. Furthermore, the exceptionally high Specificity of 0.9878 demonstrates the model’s robustness in suppressing false positives across healthy skin and background regions. To evaluate boundary delineation a critical factor for automated morphometric tracking the directed Hausdorff distance was computed, yielding a mean error of just 25.90 pixels. The observed standard deviations across all metrics accurately reflect the inherent, high morphological variability of Diabetic Foot Ulcers (DFUs) in real-world datasets. While the model achieves near-perfect segmentation on the majority of cases, the variance highlights the presence of challenging outliers. Ultimately, these comprehensive results confirm that the segmentation component effectively and reliably captures relevant ulcer regions, supporting its utility for quantitative analysis in automated DFU assessment pipelines. The baseline U-Net model achieved an average per-image Dice coefficient of 0.8079, the observed standard deviation (± 0.2336) accurately reflects the inherent morphological variability of DFUs in real-world datasets. This variance is an artifact of our rigorous per-image evaluation strategy, where small pixel errors on diminutive ulcers disproportionately impact the mean score. To address this instability and improve boundary delineation across challenging outliers, the segmentation pipeline is iteratively retrained on an expanded, multi-source dataset incorporating DFUC2022 and FUSeg. This expanded training regime actively mitigated boundary instability and improved model robustness against out-of-distribution variations in lighting and lesion topology. Table 7 presents the segmentation performance of the proposed framework across multiple evaluation metrics using the DFUC2022 dataset. A noticeable standard deviation is observed, indicating variability in performance across different samples. This is attributed to the inherent complexity of diabetic foot ulcer images, where significant variations in ulcer size, shape, texture, and illumination are present. In particular, images with low contrast, irregular boundaries, or small lesion areas pose greater challenges for accurate segmentation. Table 7Segmentation performance of the proposed model on the DFUC2022 dataset (with TTA and empty mask suppression).MetricMean ± StdDice CoefficientIntersection over Union (IoU)PrecisionRecall (Sensitivity)SpecificityHausdorff Distance (pixels) Segmentation performance of the proposed model on the DFUC2022 dataset (with TTA and empty mask suppression). Despite this variability, the overall performance remains stable, as reflected by the strong mean values across all metrics. The results suggest that the model generalizes well across diverse cases, while performance fluctuations are primarily associated with challenging edge cases rather than systematic model limitations. Qualitative examples of segmentation masks (Fig. 5) demonstrate the model’s ability to produce highly precise, anatomically plausible boundaries, even in cases with irregular ulcer shapes or varied lighting. These scores reflect a strong spatial overlap between the model’s predictions and the ground truth. This precision is a critical prerequisite for accurate morphometric analysis, as the automated area and width calculations derived from these masks provide objective and repeatable measurements for tracking wound healing or progression. Ulcer segmentation results produced by the U-Net model. According to the external validation dataset, the performance of the segmentation process is shown in Table 8. The segmentation performance on the inference level dataset demonstrates that the model achieves a Dice score of and an IoU of , indicating a consistent and reliable overlap between the predicted ulcer regions and the reference annotations. The relatively low standard deviation suggests stable performance across different samples. Table 8Segmentation performance with estimated variability in inference level dataset.MetricMean ± StdDice ScoreIoUPrecisionRecallBoundary Score Segmentation performance with estimated variability in inference level dataset. The precision of reflects moderate accuracy in identifying ulcer pixels, with some false positives present. In contrast, the model achieves a high recall of , highlighting its strong ability to detect most ulcer regions with minimal false negatives. This is particularly important, as missing a wound region can lead to serious complications. The boundary score of indicates that the model still faces challenges in accurately capturing fine and irregular ulcer boundaries. This limitation may be attributed to variations in wound appearance, illumination conditions, and low contrast at lesion edges. A slight decrease in performance is observed on the DFUC2022 dataset due to increased variability and more challenging ulcer presentations, demonstrating the model’s generalization capability across datasets Overall, the results indicate that the model provides robust and stable ulcer detection performance with good generalization capability on unseen data, while further improvements are needed for precise boundary localization. Qualitative analysis: explainability and depth estimation To ensure the utility and trustworthiness of our framework, we analyzed the model’s decisions using XAI techniques and pseudo-depth estimation. Explainability Visual inspection of the Grad-CAM heatmaps (Fig. 6) confirmed that the classifier consistently focused on relevant features within the ulcer bed, such as granulation tissue or slough, rather than spurious artifacts in the background. Grad-CAM visualization that highlights the image regions that contribute the most strongly to the classification decision. Warmer colors indicate areas with stronger influence on the model prediction, showing that the network focuses primarily on the ulcer region rather than background tissue. LIME explanations further corroborated these findings by identifying the specific superpixels within the wound that were most influential in the model’s decision. This enhances the model’s transparency and provides clinicians with crucial visual evidence to support the automated prediction. LIME explanation results illustrate the superpixel regions that most significantly contribute to the classification output (Fig. 7). The highlighted regions indicate positive contributions to the ulcer classification decision. Grad-CAM visualization highlighting the image regions contributing most strongly to the classification decision. LIME explanation results DFU illustrating the superpixel regions that most significantly contribute to the classification output. Depth Characterization Within this study, the depth estimation module of this research generates pseudo-depth maps of the wound using the MiDaS Monocular—Depth Estimation Model from RGB images of the ulcer. Using these relative depth maps allows us to define surface topology (characteristics of how flat or ridged a surface is) and the changing nature of the relative depth patterns of the ulcer area within each image. This provides an important visual reference. It is also important for readers to understand that the estimated depth does not represent actual measurements of object or spatial distance, it is used as guidance to make qualitative decisions about the status of wounds and how they will be managed, in particular for use in remote or telemedicine settings. The application of MiDaS for relative depth estimation provided novel insights into wound topology. While not providing absolute metric depth, the resulting pseudo-depth maps successfully characterized the depression of the wound bed relative to the surrounding skin. This offers a valuable, non-invasive method for tracking changes in wound volume over time, which could help clinicians assess treatment efficacy and detect early signs of deterioration. The proposed framework’s limitation lies with its depth estimation being based on monocular pseudo-depth maps, which only give relative structure information and do not provide exact metric depth measurements. Due to not having ground truth depth data or calibrated imager parameters in the dataset, quantitative validation of the depth estimation could not occur. In addition, variations in camera distances, light conditions and image resolutions may all influence how geometric measurements are performed. For future work, the goal will be to use a calibrated camera setup or use reference markers to estimate more accurate wound dimensions in this study (Figs. 8, 9). Depth of the wound. Overview of intended ouput . The output of our framework is an integrated report that synthesizes the results from the various models into a concise, quantitative summary for assessment. This report, as detailed in Table. 10, provides objective measurements derived directly from the model outputs. The morphometric analysis section quantifies the ulcer’s physical dimensions, calculating the total Area and Max Width from the UNet-generated segmentation mask, both in pixels and estimated metric units. The depth analysis, powered by MiDaS, characterizes the wound’s topology by reporting the average Segment Depth across the ulcer bed, the Segment Center Depth, and the Center-to-Average Depth Difference. This last metric offers insight into the wound’s cavity. Together, these automated measurements provide a standardized, repeatable method for clinicians to track wound healing progression and evaluate treatment over time. Table 10Quantitative analysis: geometric measurements and MiDaS depth estimation. Metric Value Geometric Measurements Area (pixels)17,729.50Max Width (pixels)165.00Estimated Area ()127.11Estimated Max Width (mm)13.97 Depth Analysis (MiDaS) Segment Depth (units)0.1195Segment Center Depth (units)0.1396Center-to-Average Depth Diff. (units)0.0201 Quantitative analysis: geometric measurements and MiDaS depth estimation. Direct clinical validation using ground-truth depth measurements is not available in this study, the pseudo-depth outputs are not intended to serve as absolute quantitative measurements but rather as consistent, relative indicators of wound topology. The primary objective of this module is to enable longitudinal comparison within the same patient context, where relative changes in depth patterns can provide meaningful insights into wound progression or healing. Furthermore, the use of a well-established and widely adopted model such as MiDaS ensures that the generated depth representations are robust and visually coherent. As such, the pseudo-depth maps are positioned as a complementary, decision-support tool to enhance interpretability, rather than a replacement for clinically validated measurement techniques. The Grad-CAM activation maps were evaluated in terms of their degree of relevance to the explanation of the model by measuring their overlap with the true ulcer segmentation masks using IoU. To generate binary regions of attention for analysis, the Grad-CAM activation maps were binarised through thresholding. Once these binary regions of attention had been created, the binary regions were assessed by comparing their overlap to the corresponding ulcer segmentation masks. The average IoU scores indicate a large degree of overlap between the Grad-CAM activation maps and the true ulcer segmentation masks, indicating strong support for the explanations provided by the model. The average IoU score for the overlap of the Grad-CAM regions of attention and their corresponding ulcer segmentation masks was found to be approximately 0.62. The LIME framework was utilized to illustrate the individual contributions to the overall prognosis from parts of each image based on the LIME image explainer. SLIC algorithm, approximately 100-150 superpixels were used to segment each image into superpixels for model evaluation under the LIME framework. In addition to the superpixel segmentation, 1000 perturbed samples were created during each explanation to approximate the local decision boundaries for each classification by the classifier. To determine the importance of each of these highlighted regions as it related to the model prediction scores produced by the U-net model, the regions identified through LIME were then compared to the segmentation masks generated by the U-net model. The majority of the high-importance superpixels were determined to overlap with the area associated with the ulcer, leading to the conclusion that the model’s final predictions are driven primarily by the areas associated with relevant wounds. To evaluate the spatial faithfulness of the model’s explanations, we measure the alignment between Grad-CAM attribution maps and ground-truth ulcer segmentation masks. The Grad-CAM activations are extracted from the final decoder block to preserve high-resolution spatial information. These maps are subsequently binarized using an adaptive thresholding approach to define “regions of attention.” The overlap between these attention regions and the expert-annotated masks was quantified using the Intersection over Union (IoU) and the Pointing Game metric. As shown in Table 9, the attribution maps achieved a mean IoU of 0.6248, indicating a high degree of spatial overlap. Furthermore, the Pointing Accuracy of demonstrates that the model’s primary focus consistently resides within the true pathological boundaries. When combined with a DICE score of 0.6996, these results suggest that the model’s segmentation logic is strongly grounded in relevant clinical features rather than background noise or artifacts. Table 9Quantitative evaluation of segmentation performance and Grad-CAM interpretability metrics.MetricValueMean DICE Score (Segmentation)Mean IoU (Pred vs. GT)XAI IoU (Grad-CAM vs. GT)Pointing Accuracy (XAI)0.8458Mean Confidence Drop0.0243 Quantitative evaluation of segmentation performance and Grad-CAM interpretability metrics. Ablation study The ablation study in Table 11 demonstrates the contribution of pseudo-depth information to segmentation performance. The inclusion of MiDaS-based relative depth improves all evaluation metrics, indicating that depth cues provide complementary structural information for better ulcer localization. These results provide empirical support for the use of pseudo-depth as an auxiliary modality that enhances the spatial and structural representation of ulcer regions. Table 11Ablation study evaluating the impact of pseudo-depth (MiDaS) on segmentation performance.ConfigurationDiceIoUPrecisionRecallBoundaryWithout Depth (RGB only)0.650.480.550.800.17With Pseudo-Depth (RGB + Depth)0.680.510.580.830.19 Ablation study evaluating the impact of pseudo-depth (MiDaS) on segmentation performance. By explicitly delineating lesion boundaries, the model reduces background noise and focuses on clinically relevant regions, thereby improving both classification and structural analysis. The incorporation of pseudo-depth information further enhances performance by introducing complementary geometric cues. While RGB features primarily capture texture and color variations, the depth map encodes relative structural information such as surface irregularities and wound topology. This additional modality helps the model better distinguish ulcer regions, particularly in cases where visual contrast is low, leading to improved segmentation accuracy as demonstrated in the ablation results. Furthermore, the multi-level inference design (patch-level classification and image-level segmentation) contributes to improved robustness. Patch-level analysis captures fine-grained local features, while image-level processing preserves global contextual information. The combination of these levels results in a more comprehensive representation of the ulcer. Overall, the ablation study indicates that each component contributes complementary information: segmentation improves spatial precision, depth enhances structural understanding, and multi-level inference strengthens feature representation. These synergistic effects collectively lead to the observed performance gains. Table 12 presents ablation analysis that identifies the impact of each module of the proposed framework on the overall performance. The base CNN model achieved a modest accuracy of 84.1%, indicating limited capacity to encode representative patterns. However, when the baseline CNN was replaced with EfficientNet, overall model accuracy increased to 88.6% due to EfficientNet’s very efficient feature extraction techniques and parameterizing capability. The addition of data augmentation to the EfficientNet architecture created added robustness and generalizability to future datasets with an additional 5% accuracy increase, bringing the total model to 93.4% accuracy. Following the addition of the segmentation module into the existing model, further model accuracy was realized with an additional 1.9% increased accuracy (total accuracy = 95.2%). From this modem’s results, it can be determined that successful algorithms that achieve greater than 90% overall accuracy when applied to DFUs rely heavily on the use of precise location of ulcers with reduced background noise to characterize lesions accurately over all image acquisitions. The addition of depth estimation to the remaining model achieved an overall model accuracy of 96.0%, thus providing valuable information about the level of severity in a setting. Although the addition of explainable AI did not impact overall model performance numerically, it increased the overall transparency, reliability, and usefulness of the system outputs. Therefore, the ablation study indicates that all components of the proposed framework are highly influential and extremely important in providing effective DFU assessment. Table 12Ablation analysis of the proposed framework.Model VariantAccuracy (%)Precision (%)Recall (%)F1-Score (%)Baseline CNN (No EfficientNet)84.182.381.581.9EfficientNet without Augmentation88.687.286.586.8EfficientNet + Augmentation (Final Classifier)93.492.191.791.9+ Segmentation Module95.294.393.894.0+ Depth Estimation96.8693.9010096.86+ Explainability (Final Proposed System)96.86*93.90*100*96.86**Explainability improves interpretability but does not change numerical performance Ablation analysis of the proposed framework. *Explainability improves interpretability but does not change numerical performance Comparative analysis A comparative evaluation of the proposed framework against existing diabetic foot ulcer (DFU) analysis methods is presented in Table 13. The comparison spans a range of deep learning architectures, datasets, imaging modalities, and task formulations, including binary classification, multi-class classification, and segmentation. Table 13Comparison of the proposed method with existing DFU analysis approaches for binary classification, task definitions and experimental protocols. Study Model / Architecture Task Dataset Acc. (%) F1 Proposed FrameworkEfficientNet-B0 + UNetBinary Classification + SegmentationKaggle DFU (RGB) 96.86 0.969 Jain et al.10EfficientNet-B0Binary ClassificationKaggle DFU (RGB)95.00–Nagaraju et al.25SSODL-DFUDC (Inception-ResNet-v2)Binary ClassificationKaggle DFU (Thermal)99.290.993Muthulakshmi et al.28EfficientNet (B0–B6)Binary ClassificationDFUC202193.0–Wang et al.34Deep ResNet + Transfer LearningBinary ClassificationDFU dataset (SciRep)98.67–Shanmugam et al.31EfficientNet-B0Binary ClassificationKaggle DFU (Thermal)98.71–Anusha et al.32ConvMixerBinary ClassificationDFU dataset97.160.97Manoj et al.37Advanced CNNBinary ClassificationKaggle DFU97.20–Devi et al.26Hybrid CNN–SVMBinary ClassificationKaggle DFU dataset98.000.96Mahmud et al.54DFU_DIALNetBinary ClassificationKaggle DFU (RGB)95.61–Rathore et al.55Siamese Neural Network (SNN)Binary ClassificationKaggle DFU (RGB)98.760.98Goyal et al.56DFUNetBinary ClassificationCustom DFU (RGB)92.50–Alzubaidi et al.57DFU_QUTNetBinary ClassificationKaggle DFU (RGB)94.500.94 Comparison of the proposed method with existing DFU analysis approaches for binary classification, task definitions and experimental protocols. The most direct benchmark is the work by Jain et al.10, which utilized the same EfficientNet-B0 architecture on the same Kaggle DFU dataset for binary ulcer classification. While their model reported an accuracy of 95%, the proposed framework achieves a higher test accuracy of 96.86% and an F1-score of 0.969. This improvement can be attributed to the adoption of a two-stage fine-tuning strategy combined with extensive on-the-fly data augmentation, which enhances feature generalization without increasing architectural complexity. The efforts in the automated assessment of diabetic foot ulcers established the foundation for custom deep learning architectures. Notably, Goyal et al.56 introduced DFUNet, one of the first convolutional neural networks specifically engineered with parallel convolution blocks to extract features from a custom dataset of DFU images, proving the viability of deep learning for this task. Building upon this, Alzubaidi et al.57 developed DFU_QUTNet, which utilized an optimized deep network to significantly improve feature representation on the standardized Kaggle DFU dataset. Recently, the research paradigm has shifted from pure classification performance to clinical transparency and model trustworthiness. On the same Kaggle benchmark, Mahmud et al.54 proposed DFU_DIALNet, a reliable framework that achieves strong diagnostic accuracy while integrating GradCAM and LIME to visually validate its predictions. Similarly, Rathore et al.55 deployed a Siamese Neural Network (SNN) augmented with a suite of explainability tools. Their approach pushed the accuracy boundary to 98.76%, demonstrating that highly complex architectures can achieve state of the art results while ensuring the model’s focus remains clinically aligned with the actual ulcer topology. Several studies report higher classification accuracies using alternative imaging modalities. Nagaraju et al.25 and Shanmugam et al.31 achieved accuracies above 98% using thermal DFU images. Although these results are impressive, thermal imaging systems are less accessible in routine environments. In contrast, the proposed framework operates on standard RGB images, which are more widely available in real-world and remote screening settings, making the achieved performance particularly relevant for practical deployment. In terms of segmentation performance, Zhang et al.1 reported that U-Net-based architectures typically achieve segmentation accuracies of up to 94.96% in DFU applications. The proposed U-Net model with an EfficientNet-B0 encoder achieved a Dice coefficient of 0.8572 and an IoU of 0.7545 on the test set, demonstrating strong spatial agreement with the ground truth. These results are consistent with prior literature and confirm the suitability of the selected architecture for precisely delineating ulcer boundaries. It is important to note that prior research on diabetic foot ulcers has employed distinct datasets, different research objectives, and varied methods for measuring effectiveness. Some studies focused exclusively on classifying the problem into two or more classes, whereas others focused on segmenting or employing multiple machine learning techniques. Because of differences in study design, the results of the comparisons listed in Table 8 are intended to provide general information to help determine the overall performance of different studies, rather than a strict one-to-one comparison. Where possible, comparisons of similar datasets and classification methods between studies are reported. In general, the proposed framework demonstrates competitive performance in classification and segmentation tasks while maintaining architectural simplicity and practical applicability. By leveraging EfficientNet-B0 and U-Net with careful optimization, rather than complex hybrid designs, the framework achieves a favorable balance among accuracy, interpretability, and deployability, making it well-suited for automated DFU screening and decision support systems. Clinical relevance and validation The proposed framework is evaluated on publicly available and clinically acquired datasets, including the DFUC2022 dataset and the Kaggle DFU dataset. These datasets consist of wound images captured under real-world clinical conditions and annotated by domain experts, providing a realistic benchmark for evaluating model performance. From a clinical perspective, the framework provides multiple outputs relevant for wound assessment. The segmentation module enables quantitative morphometric analysis, including ulcer area and width estimation, which are commonly used by clinicians to monitor wound progression. The explainability module (Grad-CAM and LIME) enhances transparency by highlighting image regions influencing model predictions, thereby supporting interpretability. To assess robustness under real-world variability, the model was evaluated across multiple datasets, demonstrating consistent performance under variations in illumination, wound morphology, and imaging conditions. This cross-dataset evaluation serves as an indirect validation of generalization in clinically relevant scenarios. However, it is important to note that direct clinical validation involving medical experts, prospective patient studies, or comparison with clinically calibrated measurement systems was not performed in this study. In particular, the depth estimation module is based on monocular pseudo-depth and provides relative structural information rather than absolute clinical measurements. Therefore, the proposed framework should be considered as a decision-support tool rather than a replacement for clinical judgment. Future work will focus on clinical validation through expert evaluation, inter-observer agreement analysis, and validation against calibrated wound measurement techniques. Conclusion This study presents a comprehensive, automated deep learning framework for assessing diabetic foot ulcers (DFUs) that integrates classification, segmentation, pseudo-depth estimation, and explainability. EfficientNet-B0 is used as the base model for the classification of DFU, while an EfficientUNet architecture was utilized for precise segmentation of the ulcer boundary. The proposed framework achieved a classification accuracy of 96.86% on the held-out test set, along with strong segmentation performance, demonstrating its effectiveness in accurately identifying and localizing ulcer regions. The incorporation of MiDaS-based monocular depth estimation provides a novel, non-invasive mechanism for characterizing wound topology, offering complementary information related to ulcer severity that is typically unavailable through conventional image-based DFU assessment approaches. Although depth estimates are relative rather than absolute, they serve as a meaningful proxy for wound depression and volume, allowing longitudinal monitoring of ulcer progression. The integration of explainable AI techniques, namely Grad-CAM and LIME, enables visual interpretation of model decisions by highlighting relevant regions that drive predictions. This directly addresses the “black-box” concern commonly associated with deep learning models in healthcare. The explainability evaluation relies on computational metrics (IoU overlap between Grad-CAM attention maps and ground-truth masks, alongside LIME superpixel alignment). This approach provides a quantitative, reproducible proxy for assessing feature relevance without human subjectivity. An average IoU of 0.62 indicates substantial alignment between model attention and ulcer regions. The proposed method is limited by dataset size and lack of multi-center validation, which may affect generalization. Pseudo-depth is not clinically validated and provides only relative structural information, while explainability evaluation lacks expert assessment. Explainability evaluations have not been performed using any expert evaluations. Future work will focus on evaluating the proposed framework on larger and more diverse datasets, along with the validation of clinical outcomes through expert assessment. Additionally, clinician-in-the-loop studies and qualitative scoring frameworks will be incorporated to rigorously assess the interpretability and clinical relevance of the explainability methods. Further work will address real-world deployment challenges, including device-dependent scaling, absolute depth calibration, robustness under varying imaging conditions, and improved generalization across heterogeneous patient populations. Despite these limitations, the proposed framework demonstrates strong performance across classification, segmentation, pseudo-depth estimation, and explainability tasks, highlighting its potential as a research-oriented AI-assisted decision-support tool for DFU assessment. Future work will focus on multi-center clinical validation, expert assessment, clinician-in-the-loop studies, and evaluation under diverse real-world imaging conditions before deployment in clinical practice. Author contributions SD, RM, and HS were involved in the ideation, planning, experimentation, coding, and writing the initial draft. DW, JK, and RS was involved in ideation, Analysis, supervision, and preparing the final draft. Funding Open access funding provided by Manipal University Jaipur. The authors did not receive support from any organization for the submitted work. Data availability The dataset used in this study is publicly available. The Diabetic Foot Ulcer (DFU) dataset can be accessed from Kaggle at https://www.kaggle.com/datasets/laithjj/diabetic-foot-ulcer-dfu. Another dataset DFUC2022 dataset, introduced by Dr. Moi Hoon Yap (m.yap@mmu.ac.uk), is publicly available for non-commercial research upon request. In this work, the dataset has been properly cited and used strictly for academic research purposes. Declarations Competing interests The authors declare no competing interests. Human and animal participants Further, the authors certify that the research presented in this article does not involve any human participants or animals. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The dataset used in this study is publicly available. The Diabetic Foot Ulcer (DFU) dataset can be accessed from Kaggle at https://www.kaggle.com/datasets/laithjj/diabetic-foot-ulcer-dfu. Another dataset DFUC2022 dataset, introduced by Dr. Moi Hoon Yap (m.yap@mmu.ac.uk), is publicly available for non-commercial research upon request. In this work, the dataset has been properly cited and used strictly for academic research purposes.