UPDF AI

Diabetic Retinopathy Grading using CNN, Vision Transformer and a Hybrid Architecture

Samia Akhtar,Shabib Aftab,M. A. Saeed,Usama Ahmed

2025 · DOI: 10.1109/ICIC68258.2025.11412976
International Conference on Intelligent Computing · 0 Citations

Abstract

Diabetic retinopathy (DR) remains a primary factor in impaired vision. Early detection can halt the disease progression. Deep learning has significantly improved DR diagnosis in recent years. Despite these advances, finding a model that performs well and generalizes across datasets is still a pressing challenge. CNNs fail to capture the global structure of fundus images in some cases. Conversely, ViTs can miss fine local features needed for more accurate grading. To explore this problem, our study compares three deep learning approaches to identify which performs best for DR classification. These include a CNN, a ViT and a hybrid of both. We used ResNet50 as the CNN and ViT-Tiny as the transformer model. Both were fine-tuned before training. Then we fused the two models to produce a hybrid architecture named ResViT. It is composed of transformer based attention mechanisms with convolutional networks for effective feature extraction. We utilized APTOS 2019 to evaluate and train models. Images in this dataset were enhanced using Histogram Equalization. Then the dataset was augmented to balance the uneven class distribution. Experimental findings of the study demonstrate that our hybrid approach reached an accuracy of 94.6%. It outperformed the standalone ResNet50 and ViT-Tiny models. ResViT delivered stronger performance on comparison with recent state-of-the-art techniques. This shows that using both CNN and transformer features can boost DR detection accuracy and produce more reliable outcomes.