This repository contains the implementation of a Diabetic Retinopathy Classification project using three state-of-the-art deep learning models: Swin Transformer, Vision Transformer (ViT), and YOLOv11m. The goal of this research is to detect and classify diabetic retinopathy from fundus images into five distinct classes (Class 0 to Class 4), indicating the severity of the disease.
Diabetic retinopathy is a leading cause of blindness worldwide. Early detection and accurate classification are critical for effective treatment and management. This project applies deep learning models to analyze fundus images and predict the severity of diabetic retinopathy.
- Swin Transformer: Achieved the highest accuracy and robust classification, especially for severe cases.
- Vision Transformer (ViT): Demonstrated balanced performance with good specificity across different classes.
- YOLOv11m: Faster detection but exhibited challenges in classifying early-stage diabetic retinopathy.
Here is an example of a Swin Transformer model prediction:
The model successfully predicted the image as Class 2, demonstrating its capability in diabetic retinopathy classification.
- Provides an in-depth class-wise performance analysis of Swin Transformer.
- ViT demonstrated better classification for early-stage DR.
- Sensitivity measures the model's ability to correctly identify positive cases. Higher sensitivity is essential for detecting severe cases.
- Specificity measures how well the models identify negative cases, ensuring a low false positive rate.
Ensure that you update the file paths in the training and inference scripts before running the code. The dataset paths and model checkpoint directories may differ based on your system configuration.
- The dataset used for this study is publicly available on Kaggle.
- Please cite the dataset as:
For further insights and updates, follow my blogs on Triumph AI. Connect with me to stay informed on AI advancements and projects.
For any questions or issues regarding the project, please reach out via GitHub issues.