Comparison of ResNet-50 and DenseNet-121 Architectures in Classifying Diabetic Retinopathy
DOI:
https://doi.org/10.56705/ijodas.v6i1.232Keywords:
Deep Learning, DenseNet-121, Diabetic Retinopathy, ResNet-50, Image ClassificationAbstract
Introduction: Diabetic Retinopathy (DR) is a vision-threatening complication of diabetes that requires early and accurate diagnosis. Deep learning offers promising solutions for automating DR classification from retinal images. This study compares the performance of two convolutional neural network (CNN) architectures—ResNet-50 and DenseNet-121—for classifying DR severity levels. Methods: A dataset of 2,000 pre-processed and augmented retinal images was used, categorized into four classes: normal, mild, moderate, and severe. Both models were trained using two approaches: standard train-test split and Stratified K-Fold Cross Validation (k=5). Data augmentation techniques such as flipping, rotation, zooming, and translation were applied to enhance model generalization. The models were trained using the Adam optimizer with a learning rate of 0.001, dropout of 0.2, and learning rate adjustment via ReduceLROnPlateau. Performance was evaluated using accuracy, precision, recall, and F1-score. Results: ResNet-50 outperformed DenseNet-121 across all evaluation metrics. Without K-Fold, ResNet-50 achieved 84% accuracy compared to DenseNet-121’s 80%; with K-Fold, ResNet-50 scored 83% and DenseNet-121 81%. ResNet-50 also demonstrated better balance in class-wise classification, with higher recall and F1-score, especially for moderate and severe DR classes. Confusion matrices confirmed fewer misclassifications with ResNet-50. Conclusions: ResNet-50 provides superior accuracy and robustness in classifying DR severity levels compared to DenseNet-121. While K-Fold Cross Validation enhances model stability, it slightly reduces overall accuracy. These findings support the use of ResNet-50 in developing reliable deep learning-based screening tools for early DR detection in clinical practice
Downloads
References
Y. Miao and S. Tang, “Classification of Diabetic Retinopathy Based on Multiscale Hybrid Attention Mechanism and Residual Algorithm,” Wirel. Commun. Mob. Comput., vol. 2022, 2022, doi: 10.1155/2022/5441366.
Y. Huang, L. Lin, P. Cheng, J. Lyu, R. Tam, and X. Tang, “Identifying the Key Components in ResNet-50 for Diabetic Retinopathy Grading from Fundus Images: A Systematic Investigation,” Diagnostics, vol. 13, no. 10, 2023, doi: 10.3390/diagnostics13101664.
A. Mustapha, L. Mohamed, H. Hamid, and K. Ali, “Diabetic Retinopathy Classification Using ResNet50 and VGG-16 Pretrained Networks,” Int. J. Comput. Eng. Data Sci., vol. 1, no. 1, pp. 2737–8543, 2021.
M. Saini and S. Susan, “Diabetic retinopathy screening using deep learning for multi-class imbalanced datasets,” Comput. Biol. Med., vol. 149, no. August, 2022, doi: 10.1016/j.compbiomed.2022.105989.
S. C. Pravin, S. P. K. Sabapathy, S. Selvakumar, S. Jayaraman, and S. V. Subramani, “An Efficient DenseNet for Diabetic Retinopathy Screening,” Int. J. Eng. Technol. Innov., vol. 13, no. 2, pp. 125–136, 2023, doi: 10.46604/IJETI.2023.10045.
Dewi Widyawati and Amaliah Faradibah, “Comparison Analysis of Classification Model Performance in Lung Cancer Prediction Using Decision Tree, Naive Bayes, and Support Vector Machine,” Indones. J. Data Sci., vol. 4, no. 2, pp. 80–89, 2023, doi: 10.56705/ijodas.v4i2.76.
A. Sai Bharadwaj Reddy and D. Sujitha Juliet, “Transfer learning with RESNET-50 for malaria cell-image classification,” Proc. 2019 IEEE Int. Conf. Commun. Signal Process. ICCSP 2019, no. August, pp. 945–949, 2019, doi: 10.1109/ICCSP.2019.8697909.
S. Qummar et al., “A Deep Learning Ensemble Approach for Diabetic Retinopathy Detection,” IEEE Access, vol. 7, pp. 150530–150539, 2019, doi: 10.1109/ACCESS.2019.2947484.
C. L. Lin and K. C. Wu, “Development of revised ResNet-50 for diabetic retinopathy detection,” BMC Bioinformatics, vol. 24, no. 1, pp. 1–18, 2023, doi: 10.1186/s12859-023-05293-1.
S. R. Syed and M. A. Saleem Durai, “A diagnosis model for detection and classification of diabetic retinopathy using deep learning,” Netw. Model. Anal. Heal. Informatics Bioinforma., vol. 12, no. 1, pp. 1–18, 2023, doi: 10.1007/s13721-023-00432-3.
M. M. Farag, M. Fouad, and A. T. Abdel-Hamid, “Automatic Severity Classification of Diabetic Retinopathy Based on DenseNet and Convolutional Block Attention Module,” IEEE Access, vol. 10, no. Ml, pp. 38299–38308, 2022, doi: 10.1109/ACCESS.2022.3165193.
K. Ahnaf Alavee et al., “Enhancing Early Detection of Diabetic Retinopathy Through the Integration of Deep Learning Models and Explainable Artificial Intelligence,” IEEE Access, vol. 12, no. May, pp. 73950–73969, 2024, doi: 10.1109/ACCESS.2024.3405570.
S. Almas et al., “Visual impairment prevention by early detection of diabetic retinopathy based on stacked auto-encoder,” Sci. Rep., vol. 15, no. 1, p. 2554, 2025, doi: 10.1038/s41598-025-85752-2.
O. F. Gurcan, O. F. Beyca, and O. Dogan, “A comprehensive study of machine learning methods on diabetic retinopathy classification,” Int. J. Comput. Intell. Syst., vol. 14, no. 1, pp. 1132–1141, 2021, doi: 10.2991/IJCIS.D.210316.001.
V. Dong, D. D. Sevgi, S. S. Kar, S. K. Srivastava, J. P. Ehlers, and A. Madabhushi, “Evaluating the utility of deep learning for predicting therapeutic response in diabetic eye disease,” Front. Ophthalmol., vol. 2, no. August, pp. 1–13, 2022, doi: 10.3389/fopht.2022.852107.
S. S. Mondal, N. Mandal, K. K. Singh, A. Singh, and I. Izonin, “EDLDR: An Ensemble Deep Learning Technique for Detection and Classification of Diabetic Retinopathy,” Diagnostics, vol. 13, no. 1, pp. 1–14, 2023, doi: 10.3390/diagnostics13010124.
S. Tummala, V. S. G. Thadikemalla, S. Kadry, M. Sharaf, and H. T. Rauf, “EfficientNetV2 Based Ensemble Model for Quality Estimation of Diabetic Retinopathy Images from DeepDRiD,” Diagnostics, vol. 13, no. 4, 2023, doi: 10.3390/diagnostics13040622.
A. E. Minarno et al., “Classification of Diabetic Retinopathy Disease Using Convolutional Neural Network,” Int. J. Informatics Vis., vol. 6, no. 1, pp. 12–18, 2022.
B. T. Chicho and A. B. Sallow, “A Comprehensive Survey of Deep Learning Models Based on Keras Framework,” J. Soft Comput. Data Min., vol. 2, no. 2, pp. 49–62, 2021, doi: 10.30880/jscdm.2021.02.02.005.
B. O. Olorunfemi et al., “Efficient diagnosis of diabetes mellitus using an improved ensemble method,” Sci. Rep., vol. 15, no. 1, p. 3235, 2025, doi: 10.1038/s41598-025-87767-1.
I. P. W. Prasetia and I Made Gede Sunarya, “Image Classification of Balinese Seasoning Base Genep Based on Deep Learning,” J. Nas. Pendidik. Tek. Inform., vol. 13, no. 1, 2024, doi: 10.23887/janapati.v13i1.67967.
I. P. B. G. Prasetyo Raharja, I. M. Suwija Putra, and T. Le, “Kekarangan Balinese Carving Classification Using Gabor Convolutional Neural Network,” Lontar Komput. J. Ilm. Teknol. Inf., vol. 13, no. 1, p. 1, 2022, doi: 10.24843/lkjiti.2022.v13.i01.p01.
I. G. Putra, M. Yusadara, N. Made, R. Masita, I. G. Bintang, and A. Budaya, “Performance Comparison of KNN and CNN in Classifying Balinese Gangsa Instrument Tones,” vol. 8, no. 4, pp. 2233–2241, 2024.
A. Bilal, G. Sun, Y. Li, S. Mazhar, and A. Q. Khan, “Diabetic Retinopathy Detection and Classification Using Mixed Models for a Disease Grading Database,” IEEE Access, vol. 9, pp. 23544–23553, 2021, doi: 10.1109/ACCESS.2021.3056186.
P. N. Chen, C. C. Lee, C. M. Liang, S. I. Pao, K. H. Huang, and K. F. Lin, “General deep learning model for detecting diabetic retinopathy,” BMC Bioinformatics, vol. 22, pp. 1–14, 2021, doi: 10.1186/s12859-021-04005-x.
Downloads
Published
Issue
Section
License
Authors retain copyright and full publishing rights to their articles. Upon acceptance, authors grant Indonesian Journal of Data and Science a non-exclusive license to publish the work and to identify itself as the original publisher.
Self-archiving. Authors may deposit the submitted version, accepted manuscript, and version of record in institutional or subject repositories, with citation to the published article and a link to the version of record on the journal website.
Commercial permissions. Uses intended for commercial advantage or monetary compensation are not permitted under CC BY-NC 4.0. For permissions, contact the editorial office at ijodas.journal@gmail.com.
Legacy notice. Some earlier PDFs may display “Copyright © [Journal Name]” or only a CC BY-NC logo without the full license text. To ensure clarity, the authors maintain copyright, and all articles are distributed under CC BY-NC 4.0. Where any discrepancy exists, this policy and the article landing-page license statement prevail.










