Application of Deep Learning Framework for Early Prediction of Diabetic Retinopathy
Abstract
:1. Introduction
- a.
- Our study aims to significantly enhance retinal image analysis by contrasting four state-of-the-art deep-learning models (DenseNet201, Res-Net50, VGG19, and MobileNetV2) in detecting DR. These models are evaluated to create an early detection method that is both effective and accurate, potentially revolutionizing early diagnostics practices. The comparative analysis provides insights into the strengths and limitations of each model, guiding the selection of the most appropriate model for clinical implementation.
- b.
- The study systematically compares the performances and training speeds of several models using the APTOS 2019 Blindness Detection dataset. The findings reveal that MobileNetV2 is the most suitable for practical implementation, owing to its high validation accuracy coupled with its relatively low computational resource demands. This model’s efficiency makes it accessible for use in resource-constrained environments, potentially extending the benefits of early detection to a wider population.
- c.
- To further enhance the accuracy, robustness, and generalizability of the models, an ensemble method is employed. The study utilizes 5-fold cross-validation with 100 repeats, reinforcing the reliability of the results and ensuring that the models can perform well across diverse datasets. This ensemble approach combines the strengths of multiple models, resulting in an improved performance and reduced variance, which are critical for reliable clinical applications.
- d.
- In its novel application of IRIs, the study employs clustering methods to statistically classify retinal lesions with a maximum accuracy and identify damaged regions of the retina. These research findings underscore the potential of selecting computationally efficient and accurate CNN architectures for large-scale DR screening, thereby bolstering confidence in clinical decisions and contributing to the prevention of vision loss in diabetic patients. Additionally, the use of clustering methods offers a robust way to segment and analyze retinal images, paving the way for more precise and targeted interventions.
- e.
- This research contributes to the development of a scalable and efficient screening tool that can be easily integrated into existing healthcare systems. By prioritizing models that balance accuracy and computational efficiency, the study supports the creation of tools that are both effective and practical for widespread use. This approach not only enhances early detection capabilities but also helps to optimize resource allocation in healthcare settings.
2. Related Works
3. Data Preparation
3.1. Data Overview
3.2. Data Pre-Processing
3.3. Training and Validation
4. Proposed Models
4.1. DenseNet201
- denotes the concatenation operation,
- is a composite function typically consisting of batch normalization, ReLU activation, and a convolution operation with a kernel size of ,
- represents the concatenation of feature maps from all preceding layers up to the current layer.
- typically involves batch normalization, convolution, and average pooling. The DenseNet architecture consists of multiple dense blocks interleaved with transition layers, as shown in Equation (3). The overall output of the network, , is then fed into a global average pooling layer and a fully connected layer for final classification. In summary, for a given input retinal scan , DenseNet transforms it through a series of dense blocks and transition layers, capturing intricate features at different scales.
4.2. ResNet50
- and are weight matrices.
- and are bias terms.
- is the activation function, and here we use ReLU. This formulation in Equation (7) enables the training of very deep neural networks by addressing the vanishing gradient problem in DR classification.
4.3. VGG19
4.4. MobileNetV2
4.5. Ensembling MobileNetV2 and GCN
- 1.
- Initialization:
- is the input feature matrix.
- is the weight matrix.
- is the activation function such as ReLU.
- 2.
- GCN Layer Operation:
- is the output feature matrix after applying the GCN layer.
- is an activation function applied elementwise.
- is a normalized graph Laplacian.
- 3.
- Explanation:
- is the symmetrically normalized adjacency matrix, which ensures stable training by controlling the scale of the feature vectors during propagation.
- Multiplying by effectively aggregates features from neighboring nodes based on the graph structure.
- ensures that the features of nodes with higher degrees are down-weighted, and vice versa, promoting more stable training.
- is a weight matrix that is learned during training.
- applies an element-wise non-linear activation function to introduce non-linearity into the model.
- Training
- Train MobileNetV2 on the image data for diabetic retinopathy classification.
- Train GCN on graph data (if available) or features extracted from data.
- Prediction of Individual Models
- Let be the prediction of MobileNetV2 for input .
- Let be the prediction of GCN for input .
- Ensemble Method
- Combine predictions using a weighted average, stacking, or other methods.
- Let be the ensemble prediction for input .
- Weighted Average Ensemble
- Stacking Ensemble
4.6. Cross Validation
4.7. Hyper Parameter Tuning
4.8. Model Diagnosis by Evaluation Matrices
4.9. AUC Analysis
4.10. Identification of Isolate Regions of Interest (IRIs) in a Retinal Scan
5. Results
6. Discussion
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
Appendix B
Algorithm A1. Pseudocode for the DR detection algorithm |
# Initialize parameters |
cnn_models = [‘DenseNet201’, ‘ResNet50’, ‘VGG19’, ‘MobileNetV2’] |
ensemble_model = ‘MobileNetV2 + GCN’ |
results = {} |
# Loop through CNN models |
for model in cnn_models: |
# Data Preparation |
dataset = load_dataset () |
I_norm = preprocess_images(dataset) |
# Feature Extraction |
For i = 1:N |
capture I_i |
I_norm = I_resized/255 |
F = extract_features(model, I_norm) |
# Model Evaluation |
accuracy, training_time = evaluate_model(model, F) |
results[model] = {‘accuracy’: accuracy, ‘training_time’: training_time} |
# Cross-Validation |
validation_accuracy = cross_validate(model, F) |
results[model][‘validation_accuracy’] = validation_accuracy |
# Ensemble Method (if MobileNetV2) |
if model == ‘MobileNetV2’: |
ensemble_accuracy = cross_validate(ensemble_model, F) |
results[‘Ensemble’] = {‘validation_accuracy’: x%} |
# Performance Metrics |
if model == ‘MobileNetV2’: |
auc, f1, precision = calculate_metrics(ensemble_model, F) |
results[‘Ensemble’].update({‘AUC’: auc, ‘F1’: f1, ‘Precision’: precision}) |
# Clustering Analysis |
for k in k_values in 3, 4, 5, 6, 8: #modify based on problem |
silhouette_score = apply_kmeans(F, k) |
results[‘Clustering’] = {‘k’: k, ‘silhouette_score’: silhouette_score} |
# MGVF Active Contour Model |
MGVF_results = apply_MGVF(F) |
results[‘MGVF’ = MGVF_results |
# Output results |
display_results(results) |
References
- Tan, G.S.; Cheung, N.; Simó, R.; Cheung, G.C.; Wong, T.Y. Diabetic macular oedema. Lancet Diabetes Endocrinol. 2017, 5, 143–155. [Google Scholar] [CrossRef] [PubMed]
- Ting, D.S.W.; Tan, K.-A.; Phua, V.; Tan, G.S.W.; Wong, C.W.; Wong, T.Y. Biomarkers of diabetic retinopathy. Curr. Diabetes Rep. 2016, 16, 159. [Google Scholar] [CrossRef] [PubMed]
- Wong, T.Y.; Gemmy, C.C.M.; Larsen, M.; Sharma, S.; Rafael, S. Erratum: Diabetic retinopathy. Nat. Rev. Dis. Primers 2016, 2, 16012. [Google Scholar] [CrossRef]
- Alberti, K.G.M.M.; Zimmet, P.Z. Definition, diagnosis and classification of diabetes mellitus and its complications. Part 1: Diagnosis and classification of diabetes mellitus. provisional report of a who consultation. Diabet. Med. 1998, 15, 539–553. [Google Scholar] [CrossRef]
- Geerlings, S.E.; Hoepelman, A.I. Immune dysfunction in patients with diabetes mellitus (dm). FEMS Immunol. Med. Microbiol. 1999, 26, 259–265. [Google Scholar] [CrossRef] [PubMed]
- Bansal, P.; Gupta, R.P.; Kotecha, M. Frequency of diabetic retinopathy in patients with diabetes mellitus and its correlation with duration of diabetes mellitus. Med. J. Dr. DY Patil Univ. 2013, 6, 366–369. [Google Scholar]
- NIH. People with Diabetes Can Prevent Vision Loss. Available online: https://www.nei.nih.gov/sites/default/files/2019-06/diabetes-prevent-vision-loss.pdf (accessed on 7 January 2024).
- Albawi, S.; Bayat, O.; Al-Azawi, S.; Ucan, O.N. Social touch gesture recognition using convolutional neural network. Comput. Intell. Neurosci. 2018, 2018, 6973103. [Google Scholar] [CrossRef]
- Prevention, C.f.D.C.a. VEHSS Modeled Prevalence Estimates. Available online: https://www.cdc.gov/vision-health-data/prevalence-estimates/index.html (accessed on 1 November 2024).
- Lumbroso, B.; Rispoli, M.; Savastano, M.C. Diabetic Retinopathy; JP Medical Ltd.: Altrincham, UK, 2015. [Google Scholar]
- Kumar, S.; Kumar, G.; Velu, S.; Pardhan, S.; Sivaprasad, S.; Ruamviboonsuk, P.; Raman, R. Patient and provider perspectives on barriers to screening for diabetic retinopathy: An exploratory study from southern India. BMJ Open 2020, 10, e037277. [Google Scholar] [CrossRef]
- Amoaku, W.M.; Ghanchi, F.; Bailey, C.; Banerjee, S.; Banerjee, S.; Downey, L.; Gale, R.; Hamilton, R.; Khunti, K.; Posner, E.; et al. Diabetic retinopathy and diabetic macular oedema pathways and management: UK consensus working group. Eye 2020, 34 (Suppl. S1), 1–51. [Google Scholar] [CrossRef] [PubMed]
- Wong, T.Y.; Sun, J.; Kawasaki, R.; Ruamviboonsuk, P.; Gupta, N.; Lansingh, V.C.; Maia, M.; Mathenge, W.; Moreker, S.; Muqit, M.M.; et al. Guidelines on diabetic eye care: The international council of ophthalmology recommendations for screening, follow-up, referral, and treatment based on resource settings. Ophthalmology 2018, 125, 1608–1622. [Google Scholar] [CrossRef]
- Mayya, V.; Kamath, S.; Kulkarni, U. Automated microaneurysms detection for early diagnosis of diabetic retinopathy: A comprehensive review. Comput. Methods Programs Biomed. Update 2021, 1, 100013. [Google Scholar] [CrossRef]
- Flaxman, A.D.; Wittenborn, J.S.; Robalik, T.; Gulia, R.; Gerzoff, R.B.; Lundeen, E.A.; Saaddine, J.; Rein, D.B.; Baldonado, K.N.; Davidson, C.; et al. Prevalence of visual acuity loss or blindness in the us: A bayesian meta-analysis. JAMA Ophthalmol. 2021, 139, 717–723. [Google Scholar] [CrossRef]
- Lundeen, E.A.; Burke-Conte, Z.; Rein, D.B.; Wittenborn, J.S.; Saaddine, J.; Lee, A.Y.; Flaxman, A.D. Prevalence of diabetic retinopathy in the US in 2021. JAMA Ophthalmol. 2023, 141, 747–754. [Google Scholar] [CrossRef]
- Grauslund, J. Diabetic retinopathy screening in the emerging era of artificial intelligence. Diabetologia 2022, 65, 1415–1423. [Google Scholar] [CrossRef] [PubMed]
- Qummar, S.; Khan, F.G.; Shah, S.; Khan, A.; Shamshirband, S.; Rehman, Z.U.; Khan, I.A.; Jadoon, W. A deep learning ensemble approach for diabetic retinopathy detection. IEEE Access 2019, 7, 150530–150539. [Google Scholar] [CrossRef]
- Nielsen, K.B.; Lautrup, M.L.; Andersen, J.K.; Savarimuthu, T.R.; Grauslund, J. Deep learning-based algorithms in screening of diabetic retinopathy: A systematic review of diagnostic performance. Ophthalmol. Retin. 2019, 3, 294–304. [Google Scholar] [CrossRef]
- Lin, C.L.; Wu, K.C. Development of revised ResNet-50 for diabetic retinopathy detection. BMC Bioinform. 2023, 24, 157. [Google Scholar] [CrossRef] [PubMed]
- Pratt, H.; Coenen, F.; Broadbent, D.M.; Harding, S.P.; Zheng, Y. Convolutional neural networks for diabetic retinopathy. Procedia Comput. Sci. 2016, 90, 200–205. [Google Scholar] [CrossRef]
- Sharma, H.S.; Singh, A.; Chandel, A.S.; Singh, P.; Sapkal, P. Detection of diabetic retinopathy using convolutional neural network. In Proceedings of the International Conference on Communication and Information Processing (ICCIP), Chongqing, China, 15–17 November 2019. [Google Scholar]
- Sil, D.; Dutta, A.; Chandra, A. Convolutional neural networks for noise classification and denoising of images. In Proceedings of the TENCON 2019–2019 IEEE Region 10 Conference (TENCON), Kerala, India, 17–20 October 2019; pp. 447–451. [Google Scholar]
- Dekhil, O.; Naglah, A.; Shaban, M.; Ghazal, M.; Taher, F.; Elbaz, A. Deep learning-based method for computer aided diagnosis of diabetic retinopathy. In Proceedings of the 2019 IEEE International Conference on Imaging Systems and Techniques (IST), Abu Dhabi, United Arab Emirates, 9–10 December 2019; pp. 1–4. [Google Scholar]
- Gangwar, A.K.; Ravi, V. Diabetic retinopathy detection using transfer learning and deep learning. In Evolution in Computational Intelligence: Frontiers in Intelligent Computing: Theory and Applications (FICTA 2020); Springer: Singapore, 2021; Volume 1, pp. 679–689. [Google Scholar]
- Tian, C.; Fei, L.; Zheng, W.; Xu, Y.; Zuo, W.; Lin, C.-W. Deep learning on image denoising: An overview. Neural Netw. 2020, 131, 251–275. [Google Scholar] [CrossRef] [PubMed]
- Lam, C.; Yi, D.; Guo, M.; Lindsey, T. Automated detection of diabetic retinopathy using deep learning. AMIA Summits Transl. Sci. Proc. 2018, 2018, 147. [Google Scholar]
- Von Luxburg, U. A tutorial on spectral clustering. Stat. Comput. 2007, 17, 395–416. [Google Scholar] [CrossRef]
- Muthusamy, D.; Palani, P. Deep learning model using classification for diabetic retinopathy detection: An overview. Artif. Intell. Rev. 2024, 57, 185. [Google Scholar] [CrossRef]
- Muthusamy, D.; Palani, P. Deep neural network model for diagnosing diabetic retinopathy detection: An efficient mechanism for diabetic management. Biomed. Signal Process. Control. 2025, 100, 107035. [Google Scholar] [CrossRef]
- Hamza, M. Optimizing early detection of diabetes through retinal imaging: A comparative analysis of deep learning and machine learning algorithms. J. Comput. Inform. Bus. 2024, 1, 1. [Google Scholar]
- Navaneethan, R.; Devarajan, H. Enhancing diabetic retinopathy detection through preprocessing and feature extraction with MGA-CSG algorithm. Expert Syst. Appl. 2024, 249, 123418. [Google Scholar] [CrossRef]
- Zhao, H.; Li, H.; Maurer-Stroh, S.; Guo, Y.; Deng, Q.; Cheng, L. Supervised segmentation of un-annotated retinal fundus images by synthesis. IEEE Trans. Med. Imaging 2018, 38, 46–56. [Google Scholar] [CrossRef] [PubMed]
- APTOS 2019 Blindness Detection Dataset. Available online: https://www.kaggle.com/competitions/aptos2019-blindness-detection (accessed on 1 November 2024).
- Moreno-Torres, J.G.; Sáez, J.A.; Herrera, F. Study on the impact of partition-induced dataset shift on k-fold cross-validation. IEEE Trans. Neural Netw. Learn. Syst. 2012, 23, 1304–1312. [Google Scholar] [CrossRef] [PubMed]
- Zhang, K.; Guo, Y.; Wang, X.; Yuan, J.; Ding, Q. Multiple feature reweight dense net for image classification. IEEE Access 2019, 7, 9872–9880. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Dey, N.; Zhang, Y.-D.; Rajinikanth, V.; Pugalenthi, R.; Raja, N.S.M. Customized vgg 19 architectures for pneumonia detection in chest X-rays. Pattern Recognit. Lett. 2021, 143, 67–74. [Google Scholar] [CrossRef]
- Xiang, Q.; Wang, X.; Li, R.; Zhang, G.; Lai, J.; Hu, Q. Fruit image classification based on mobilenetv2 with transfer learning technique. In Proceedings of the 3rd International Conference On Computer Science and Application Engineering, Sanya, China, 22–24 October 2019; pp. 1–7. [Google Scholar]
- Yun, W.L.; Mookiah, M.R.K. Detection of diabetic retinopathy using k-means clustering and self-organizing map. J. Med. Imaging Health Inform. 2013, 3, 575–581. [Google Scholar] [CrossRef]
- Javidi, M.; Harati, A.; Pourreza, H. Retinal image assessment using bilevel adaptive morphological component analysis. Artif. Intell. Med. 2019, 99, 101702. [Google Scholar] [CrossRef] [PubMed]
- Chan, T.F.; Vese, L.A. Active contours without edges. IEEE Trans. Image Process. 2001, 10, 266–277. [Google Scholar] [CrossRef] [PubMed]
- Li, Q.; Deng, T.; Xie, W. Active contours driven by divergence of gradient vector flow. Signal Process. 2016, 120, 185–199. [Google Scholar] [CrossRef]
- Andrychowicz, M.; Denil, M.; Gomez, S.; Hoffman, M.W.; Pfau, D.; Schaul, T.; Shillingford, B.; De Freitas, N. Learning to learn by gradient descent by gradient descent. In Proceedings of the Advances in Neural Information Processing Systems 29 (NIPS 2016), Barcelona, Spain, 5–10 December 2016; pp. 3981–3989. [Google Scholar]
- Arora, L.; Singh, S.K.; Kumar, S.; Gupta, H.; Alhalabi, W.; Arya, V.; Gupta, B.B. Ensemble deep learning and EfficientNet for accurate diagnosis of diabetic retinopathy. Sci. Rep. 2024, 14, 30554. [Google Scholar] [CrossRef] [PubMed]
- Dai, L.; Wu, L.; Li, H.; Cai, C.; Wu, Q.; Kong, H.; Liu, R.; Wang, X.; Hou, X.; Liu, Y.; et al. A deep learning system for detecting diabetic retinopathy across the disease spectrum. Nat. Commun. 2021, 12, 3242. [Google Scholar] [CrossRef] [PubMed]
DenseNet201 | ResNet50 | ||||||
---|---|---|---|---|---|---|---|
Condition of DR | Precision | Recall | F1-Score | Precision | Recall | F1-Score | |
Mild | 0.610 | 0.511 | 0.541 | Mild | 0.512 | 0.169 | 0.248 |
Moderate | 0.602 | 0.772 | 0.671 | Moderate | 0.457 | 0.849 | 0.601 |
No DR | 0.959 | 0.969 | 0.956 | No DR | 0.869 | 0.909 | 0.888 |
Proliferate DR | 0.458 | 0.391 | 0.425 | Proliferate DR | 0.001 | 0.001 | 0.001 |
Severe | 0.680 | 0.221 | 0.339 | Severe | 0.001 | 0.001 | 0.001 |
Weighted Avg | 0.767 | 0.769 | 0.758 | Weighted Avg | 0.600 | 0.378 | 0.660 |
VGG19 | MobileNetV2 | ||||||
Precision | Recall | F1-Score | Precision | Recall | F1-Score | ||
Mild | 0.527 | 0.101 | 0.159 | Mild | 0.422 | 0.278 | 0.333 |
Moderate | 0.465 | 0.919 | 0.617 | Moderate | 0.528 | 0.728 | 0.618 |
No DR | 0.919 | 0.929 | 0.927 | No DR | 0.94 | 0.96 | 0.95 |
Proliferate DR | 0.001 | 0.001 | 0.001 | Proliferate DR | 0.579 | 0.252 | 0.344 |
Severe | 0.001 | 0.001 | 0.001 | Severe | 0.328 | 0.209 | 0.251 |
Weighted Avg | 0.629 | 0.701 | 0.625 | Weighted Avg | 0.739 | 0.748 | 0.728 |
Authors | Dataset Used | Method | Accuracy |
---|---|---|---|
Sharma et al. [22] | APTOS 2019 Blindness Detection dataset [34] | CNN proposed with six convolution layers and one fully connected layer | 74.04% |
Lin and Wu [20] | Revised ResNet-50 model for diabetic retinopathy detection | 74.16% | |
Lam et al. [27] | CNNs to Modified GoogLeNet and AlexNet for multistage classification of diabetic retinopathy. CLAHE (Contrast Limited Adaptive Histogram Equalization) and data augmentation | 74.5% | |
Our model | Used different architectures based on CNN, namely DenseNet201, ResNet50, VGG19, and MobileNetV2. The focus is on balancing accuracy and computation efficiency, cross-validating and tuning hyperparameters to obtain the best-performing model like MobileNetV2. Gaussian filtering and image resizing were attempted for data preprocessing to enhance classification. Accuracy is improved by ensembling MobileNetV2 and GCN | 78.22% and 82.5% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mostafa, F.; Khan, H.; Farhana, F.; Miah, M.A.H. Application of Deep Learning Framework for Early Prediction of Diabetic Retinopathy. AppliedMath 2025, 5, 11. https://doi.org/10.3390/appliedmath5010011
Mostafa F, Khan H, Farhana F, Miah MAH. Application of Deep Learning Framework for Early Prediction of Diabetic Retinopathy. AppliedMath. 2025; 5(1):11. https://doi.org/10.3390/appliedmath5010011
Chicago/Turabian StyleMostafa, Fahad, Hafiz Khan, Fardous Farhana, and Md Ariful Haque Miah. 2025. "Application of Deep Learning Framework for Early Prediction of Diabetic Retinopathy" AppliedMath 5, no. 1: 11. https://doi.org/10.3390/appliedmath5010011
APA StyleMostafa, F., Khan, H., Farhana, F., & Miah, M. A. H. (2025). Application of Deep Learning Framework for Early Prediction of Diabetic Retinopathy. AppliedMath, 5(1), 11. https://doi.org/10.3390/appliedmath5010011