Artificial intelligence for early detection of diabetic retinopathy: A vision transformer-based approach

A Asma ElAdel I Imen Filali M Mourad Zaied

Abstract

Background Early identification of diabetic retinopathy (DR), which is a primary cause of vision impairment globally, is a crucial phasis for effective intervention and treatment. Traditional screening workflows rely on manual diagnosis by ophthalmologists, which remains the gold standard but can be time-consuming and subject to variability due to human factors. To support and enhance the screening process, artificial intelligence (AI)-based tools have shown promise in automating DR detection, particularly with recent advances in deep learning. However, medical images with long-range dependencies and spatial linkages can be challenging for CNN-based algorithms to handle. Methods This paper proposes a Vision Transformer (ViT)-based model, specifically using a Compact Convolutional Transformer (CCT), for early automated detection of DR. The model uses self-attention techniques to improve feature extraction and classification performance; combining three main stages: the CCT tokenizer, transformer encoder, and sequence pooling. The proposed approach was trained on public datasets (EyePACS and APTOS 2019) and evaluated against state-of-the-art deep learning architectures. Results Our experimental findings demonstrate that ViT performs among the best in the current state of the art with an overall accuracy of 97% and F1-scores above 0.95 across all DR severity levels. Our system is primarily designed for the pre-screening stage of diabetic retinopathy workflows, enabling rapid and reliable identification of potential DR cases for further clinical evaluation. Conclusion These results highlight the potential of transformer-based designs in medical picture analysis, as well as the implications for telemedicine and e-health solutions in real-time, especially in cases of low-resource settings.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 21, Issue 7
Published July 27, 2026
Pages e0350854
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (3)

A

Asma ElAdel

I

Imen Filali

M

Mourad Zaied