Document Type : Original Research
Authors
1 Department of Biomedical Engineering, Meybod University, Meybod, Iran
2 Department of Biomedical Engineering, Hakim Sabzevari University, Sabzevar, Iran
Abstract
Background: Diabetic retinopathy (DR), a diabetes complication, causes blindness by damaging retinal blood vessels. While deep learning has advanced DR diagnosis, many models face issues like inconsistent performance, limited datasets, and poor interpretability, reducing their clinical utility.
Objective: This research aimed to develop and evaluate a deep learning structure combining Convolutional Neural Networks (CNNs) and transformer architecture to improve the accuracy, reliability, and generalizability of DR detection and severity classification.
Material and Methods: This computational experimental study leverages CNNs to extract local features and transformers to capture long-range dependencies in retinal images. The model classifies five types of retinal images and assesses four levels of DR severity. The training was conducted on the augmented APTOS 2019 dataset, addressing class imbalance through data augmentation techniques. Performance metrics, including accuracy, Area Under the Curve (AUC), specificity, and sensitivity, were used for metric evaluation. The model’s robustness was further validated using the IDRiD dataset under diverse scenarios.
Results: The model achieved a high accuracy of 94.28% on the APTOS 2019 dataset, demonstrating strong performance in both image classification and severity assessment. Validation on the IDRiD dataset confirmed its generalizability, achieving a consistent accuracy of 95.23%. These results indicate the model’s effectiveness in accurately diagnosing and assessing DR severity across varied datasets.
Conclusion: The proposed Artificial intelligence (AI)-powered diagnostic tool improves diabetic patient care by enabling early DR detection, preventing progression and reducing vision loss. The proposed AI-powered diagnostic tool offers high performance, reliability, and generalizability, providing significant value for clinical DR management.
Highlights
Khosro Rezaee (Google Scholar)
Keywords
- Solomon SD, Chew E, Duh EJ, Sobrin L, Sun JK, VanderBeek BL, et al. Diabetic Retinopathy: A Position Statement by the American Diabetes Association. Diabetes Care. 2017;40(3):412-8. doi: 10.2337/dc16-2641. PubMed PMID: 28223445. PubMed PMCID: PMC5402875.
- Hemanth SV, Alagarsamy S, Rajkumar TD. A novel deep learning model for diabetic retinopathy detection in retinal fundus images using pre-trained CNN and HWBLSTM. J Biomol Struct Dyn. 2024:1-19. doi: 10.1080/07391102.2024.2314269. PubMed PMID: 38373067.
- Irodi A, Zhu Z, Grzybowski A, Wu Y, Cheung CY, Li H, Tan G, Wong TY. The evolution of diabetic retinopathy screening. Eye (Lond). 2025:1-7. doi: 10.1038/s41433-025-03633-4. PubMed PMID: 39910282.
- Malik T, Nandal V. Automated Detection of Diabetic Retinopathy: A Comprehensive Study. Fifth International Conference on Computational Intelligence and Communication Technologies (CCICT); Sonepat, India: IEEE; 2022. p. 31-6.
- El-Hag NA, Sedik A, El-Shafai W, El-Hoseny HM, Khalaf AAM, El-Fishawy AS, et al. Classification of retinal images based on convolutional neural network. Microsc Res Tech. 2021;84(3):394-414. doi: 10.1002/jemt.23596. PubMed PMID: 33350559.
- Bala R, Sharma A, Goel N. CTNet: convolutional transformer network for diabetic retinopathy classification. Neural Comput & Applic. 2024;36(9):4787-809. doi: 10.1007/s00521-023-09304-3.
- Liu Y, Yao D, Ma Y, Wang H, Wang J, Bai X, et al. STMF-DRNet: A multi-branch fine-grained classification model for diabetic retinopathy using Swin-TransformerV2. Biomedical Signal Processing and Control. 2025;103:107352. doi: 10.1016/j.bspc.2024.107352.
- Liu C, Wang W, Lian J, Jiao W. Lesion classification and diabetic retinopathy grading by integrating softmax and pooling operators into vision transformer. Front Public Health. 2025;12:1442114. doi: 10.3389/fpubh.2024.1442114. PubMed PMID: 39835306. PubMed PMCID: PMC11743363.
- Parsa S, Khatibi T. Grading the severity of diabetic retinopathy using an ensemble of self-supervised pre-trained convolutional neural networks: ESSP-CNNs. Multimed Tools Appl. 2024;83:89837-70. doi: 10.1007/s11042-024-18968-5.
- Teng Q, Liu Z, Song Y, Han K, Lu Y. A survey on the interpretability of deep learning in medical diagnosis. Multimed Syst. 2022;28(6):2335-55. doi: 10.1007/s00530-022-00960-4 PubMed PMID: 35789785. PubMed PMCID: PMC9243744.
- Haq NU, Waheed T, Ishaq K, Hassan MA, Safie N, Elias NF, Shoaib M. Computationally efficient deep learning models for diabetic retinopathy detection: a systematic literature review. Artif Intell Rev. 2024;57(11):309. doi: 10.1007/s10462-024-10942-9.
- Mukherjee N, Sengupta S. Application of deep learning approaches for classification of diabetic retinopathy stages from fundus retinal images: a survey. Multimed Tools Appl. 2024;83(14):43115-75. doi: 10.1007/s11042-023-17254-0.
- Ergun ON, Ilhan HO. Advancing Diabetic Retinopathy Severity Classification Through Stacked Generalization in Ensemble Deep Learning Models. Traitement du Signal. 2023;40(6):2495. doi: 10.18280/ts.400614.
- Wang C, Chen Y, Liu F, Elliott M, Kwok CF, Pena-Solorzano Cet al. An Interpretable and Accurate Deep-Learning Diagnosis Framework Modeled With Fully and Semi-Supervised Reciprocal Learning. IEEE Trans Med Imaging. 2024;43(1):392-404. doi: 10.1109/TMI.2023.3306781. PubMed PMID: 37603481.
- Islam N, Jony MM, Hasan E, Sutradhar S, Rahman A, Islam MM. Toward lightweight diabetic retinopathy classification: A knowledge distillation approach for resource-constrained settings. Appl Sci. 2023;13(22):12397. doi: 10.3390/app132212397.
- Wang J, Bai Y, Xia B. Simultaneous Diagnosis of Severity and Features of Diabetic Retinopathy in Fundus Photography Using Deep Learning. IEEE J Biomed Health Inform. 2020;24(12):3397-407. doi: 10.1109/JBHI.2020.3012547. PubMed PMID: 32750975.
- Zhang X, Li F, Li D, Wei Q, Han X, Zhang B, et al. Automated detection of severe diabetic retinopathy using deep learning method. Graefes Arch Clin Exp Ophthalmol. 2022;260(3):849-56. doi: 10.1007/s00417-021-05402-x. PubMed PMID: 34591173.
- Kale Y, Sharma S. Detection of five severity levels of diabetic retinopathy using ensemble deep learning model. Multimed Tools Appl. 2023;82(12):19005-20. doi: 10.1007/s11042-022-14277-x.
- Mustafa H, Ali SF, Bilal M, Hanif MS. Multi-stream deep neural network for diabetic retinopathy severity classification under a boosting framework. IEEE Access. 2022;10:113172-83. doi: 10.1109/ACCESS.2022.3217216.
- Sikder N, Masud M, Bairagi AK, Arif AS, Nahid AA, Alhumyani HA. Severity classification of diabetic retinopathy using an ensemble learning algorithm through analyzing retinal images. 2021;13(4):670. doi: 10.3390/sym13040670.
- Goel S, Gupta S, Panwar A, Kumar S, Verma M, Bourouis S, Ullah MA. Deep learning approach for stages of severity classification in diabetic retinopathy using color fundus retinal images. Mathematical Problems in Engineering. 2021;2021(1):7627566. doi: 10.1155/2021/7627566.
- Bhardwaj C, Jain S, Sood M. Deep Learning-Based Diabetic Retinopathy Severity Grading System Employing Quadrant Ensemble Model. J Digit Imaging. 2021;34(2):440-57. doi: 10.1007/s10278-021-00418-5. PubMed PMID: 33686525. PubMed PMCID: PMC8289963.
- Fayyaz AM, Sharif MI, Azam S, Karim A, El-Den J. Analysis of diabetic retinopathy (DR) based on the deep learning. 2023;14(1):30. doi: 10.3390/info14010030.
- Sugeno A, Ishikawa Y, Ohshima T, Muramatsu R. Simple methods for the lesion detection and severity grading of diabetic retinopathy by image processing and transfer learning. Comput Biol Med. 2021;137:104795. doi: 10.1016/j.compbiomed.2021.104795. PubMed PMID: 34488028.
- Bodapati JD, Shaik NS, Naralasetti V. Composite deep neural network with gated-attention mechanism for diabetic retinopathy severity classification. J Ambient Intell Human Comput. 2021;12(10):9825-39. doi: 10.1007/s12652-020-02727-z.
- Zhang QM, Luo J, Cengiz K. An optimized deep learning based technique for grading and extraction of diabetic retinopathy severities. Informatica. 2021;45(5):659-65. doi: 10.31449/inf.v45i5.3561.
- İncir R, Bozkurt F. A study on effective data preprocessing and augmentation method in diabetic retinopathy classification using pre-trained deep learning approaches. Multimed Tools Appl. 2024;83(4):12185-208. doi: 10.1007/s11042-023-15754-7.
- Menaouer B, Dermane Z, El Houda Kebir N, Matta N. Diabetic retinopathy classification using hybrid deep learning approach. Sn Comput Sci. 2022;3(5):357. doi: 10.1007/s42979-022-01240-8.
- Rezaee K, Haddadnia J, Tashk A. Optimized clinical segmentation of retinal blood vessels by using combination of adaptive filtering, fuzzy entropy and skeletonization. Applied Soft Computing. 2017;52:937-51. doi: 10.1016/j.asoc.2016.09.033.
- Shakibania H, Raoufi S, Pourafkham B, Khotanlou H, Mansoorizadeh M. Dual branch deep learning network for detection and stage grading of diabetic retinopathy. Biomedical Signal Processing and Control. 2024;93:106168. doi: 10.1016/j.bspc.2024.106168.
- Ikram A, Imran A. ResViT FusionNet Model: An explainable AI-driven approach for automated grading of diabetic retinopathy in retinal images. Comput Biol Med. 2025;186:109656. doi: 10.1016/j.compbiomed.2025.109656. PubMed PMID: 39823821.
- Wang Y, Deng Y, Zheng Y, Chattopadhyay P, Wang L. Vision Transformers for Image Classification: A Comparative Survey. 2025;13(1):32. doi: 10.3390/technologies13010032.
- Shen Y, Guo P, Wu J, Huang Q, Le N, Zhou J, et al. MoViT: Memorizing Vision Transformers for Medical Image Analysis. In: International Workshop on Machine Learning in Medical Imaging; Cham: Springer Nature Switzerland; 2023. p. 205-13.
- Qin H, Zhou D, Xu T, Bian Z, Li J. Factorization vision transformer: Modeling long-range dependency with local window cost. IEEE Transactions on Neural Networks and Learning Systems. 2025;36(2): 3151-64. doi: 10.1109/TNNLS.2023.3342172.
- Dong Z, Wang X, Pan S, Weng T, Chen X, Jiang S, et al. A multimodal transformer system for noninvasive diabetic nephropathy diagnosis via retinal imaging. npj Digit Med. 2025;8(1):50. doi: 10.1038/s41746-024-01393-1.
- Ma L, Xu Q, Hong H, Shi Y, Zhu Y, Wang L. Joint ordinal regression and multiclass classification for diabetic retinopathy grading with transformers and CNNs fusion network. Appl Intell. 2023;53(22):27505-18. doi: 10.1007/s10489-023-04949-y.
- Mungloo-Dilmohamud Z, Heenaye-Mamode Khan M, Jhumka K, Beedassy BN, Mungloo NZ, Peña-Reyes C. Balancing data through data augmentation improves the generality of transfer learning for diabetic retinopathy classification. Appl Sci. 2022;12(11):5363. doi: 10.3390/app12115363.
- Lim WX, Chen Z, Ahmed A. The adoption of deep learning interpretability techniques on diabetic retinopathy analysis: a review. Med Biol Eng Compu. 2022;60(3):633-42. doi: 10.1007/s11517-021-02487-8.
- APTOS 2019 Blindness Detection. 2019. Available from: https://kaggle.com/competitions/aptos2019-blindness-detection