Skip to content

Explainable AI for early Diabetic Foot Ulcer detection using Vision Transformers (ViT/DeiT) on thermal images with Grad-CAM visualization.

Notifications You must be signed in to change notification settings

picha-aaa/Explainable-DFU-ViT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Explainable Early Detection of Diabetic Foot Ulcers Using Thermal Imaging with Vision Transformers and Grad-CAM

This project utilizes Vision Transformer (ViT) and Data-efficient Image Transformer (DeiT) models to classify plantar thermogram images for the early detection of Diabetic Foot Ulcers (DFU).

To validate model performance, I employed Stratified 5-Fold Cross-Validation for robust evaluation across balanced data splits and utilized a Class-Weighted Loss function to address class imbalance. Furthermore, Grad-CAM visualizations are integrated to provide explainable AI insights into the model's diagnostic regions.

Huggingface space | Dataset

GradCam Visulization

I use Gradient-weighted Class Activation Mapping (Grad-CAM) to visualize the regions of the thermogram that the models focus on when making a prediction.

ViT Attention Map DeiT Attention Map
ViT GradCAM DeiT GradCAM

Model Performance

The following table shows the performance metrics (Mean ± Std) across folds for the Vision Transformer (ViT) and Data-efficient Image Transformer (DeiT) models.

Model Accuracy Precision Recall F1 Score
ViT 0.9193 ± 0.0489 0.9416 ± 0.0493 0.9508 ± 0.0471 0.9452 ± 0.0330
DeiT 0.9221 ± 0.0387 0.9541 ± 0.0180 0.9385 ± 0.0456 0.9459 ± 0.0277

Visualizations

Confusion Matrix

Comparison of classification performance between ViT and DeiT.

Vision Transformer (ViT) Data-efficient Image Transformer (DeiT)
ViT Confusion Matrix DeiT Confusion Matrix

Training History

Average Accuracy and F1 Score across folds over training epochs.

Vision Transformer (ViT) Data-efficient Image Transformer (DeiT)
ViT Training History DeiT Training History

About

Explainable AI for early Diabetic Foot Ulcer detection using Vision Transformers (ViT/DeiT) on thermal images with Grad-CAM visualization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published