Automated Detection and Classification of Diabetic Retinopathy Stages Using SVM, Random Forest, and k-NN on Retinal Fundus Images
Abstract
Diabetic retinopathy (DR) is a leading cause of blindness globally, which makes early detection not only crucial but also the most effective way to manage the disease. In this research, a machine learning (ML) model for automated DR identification and staging primarily using retinal fundus images was proposed. Classical ML methods, namely Support Vector Machine (SVM), Random Forest (RF), and k-Nearest Neighbors (k-NN), were utilized on the basis of image features such as texture, color, and luminance. The images were resized and normalized, and data was augmented to help the models learn better and generalize well to new data. Results from the experiments indicated that SVM and RF, besides k-NN, showed better accuracy, precision, and sensitivity, suggesting their effectiveness in addressing complicated classification problems. Accuracy, F1-score, and ROC-AUC were the additional metrics used to assess the models performance, which demonstrated consistent classification of different DR stages. The Brier Score (BS) and Expected Calibration Error (ECE) used for calibration checking also showed well calibrated probability forecasts. Although the study provided initial evidence supporting the efficacy of machine learning in DR screening, further research is needed to address the identified issues such as class imbalance and reliance on handcrafted features. In a nutshell, the paper demonstrates machine learning approaches as fast and cost effective automated DR screening instruments, presents a strong argument for the usage of such techniques, and brings to light the complexity of real world clinical implementation.References
[1] F. M. Dejene et al., “Machine learning for diabetic retinopathy screening: A systematic review,” BMC Biomedical Engineering, vol. 7, no. 1, pp. 1–15, 2025.
[2] A. Sebastian et al., “Deep learning-based diabetic retinopathy classification: A review,” Diagnostics, vol. 13, no. 3, p. 345, 2023.
[3] T. M. Usman, Y. K. Saheed, D. Ignace, and A. Nsang, “Diabetic retinopathy detection using machine learning techniques,” Artificial Intelligence in Medicine, vol. 140, p. 102500, 2023.
[4] D. Bhulakshmi and D. S. Rajput, “Deep learning techniques for diabetic retinopathy detection,” PeerJ Computer Science, vol. 10, p. e1234, 2024.
[5] S. Akhtar et al., “Automated diabetic retinopathy grading using deep learning,” Scientific Reports, vol. 15, no. 1, pp. 1–12, 2025.
[6] M. Sushith et al., “Hybrid deep learning framework for diabetic retinopathy detection,” Scientific Reports, vol. 15, no. 1, pp. 1–14, 2025.
[7] N. U. Haq et al., “Recent advances in explainable AI for diabetic retinopathy detection,” Artificial Intelligence Review, vol. 58, no. 2, pp. 1–25, 2024.
[8] T. M. Usman, Y. K. Saheed, D. Ignace, and A. Nsang, “Machine learning techniques for diabetic retinopathy detection,” Artificial Intelligence in Medicine, vol. 140, p. 102500, 2023.
[9] D. Bhulakshmi and D. S. Rajput, “Deep learning techniques for diabetic retinopathy detection,” PeerJ Computer Science, vol. 10, p. e1234, 2024.
[10] A. Sebastian et al., “Deep learning-based diabetic retinopathy classification: A review,” Diagnostics, vol. 13, no. 3, p. 345, 2023.
[11] F. M. Dejene et al., “Transfer learning for automated diabetic retinopathy screening,” BMC Biomedical Engineering, vol. 7, no. 1, pp. 1–15, 2025.
[12] M. Sushith et al., “Attention-based hybrid deep learning model for diabetic retinopathy detection,” Scientific Reports, vol. 15, no. 1, pp. 1–14, 2025.
[13] S. Akhtar et al., “Ensemble deep learning models for diabetic retinopathy grading,” Scientific Reports, vol. 15, no. 1, pp. 1–12, 2025.
[14] N. U. Haq et al., “Explainable AI techniques for diabetic retinopathy detection,” Artificial Intelligence Review, vol. 58, no. 2, pp. 1–25, 2024.
[15] A. K. Gangwar and V. Ravi, “Challenges in diabetic retinopathy detection using deep learning,” in Evolution in Computational Intelligence, Springer, 2023, pp. 679–689.
[16] Kaggle, “APTOS 2019 Blindness Detection Dataset,” 2019.
[17] Kumar, A., & Chawla, M. (2025)., “A novel deep learning architecture for the detection of diabetic retinopathy,” International Journal of Diabetes in Developing Countries, 1-18.
[18] A. Sebastian et al., “Preprocessing techniques for retinal image analysis,” Diagnostics, vol. 13, no. 3, p. 345, 2023.
[19] T. M. Usman et al., “Machine learning approaches for diabetic retinopathy detection,” Artificial Intelligence in Medicine, vol. 140, p. 102500, 2023.
[20] F. M. Dejene et al., “Optimization of machine learning models for DR screening,” BMC Biomedical Engineering, vol. 7, no. 1, pp. 1–15, 2025.
[21] N. U. Haq et al., “Evaluation metrics in medical image classification,” Artificial Intelligence Review, vol. 58, no. 2, pp. 1–25, 2024.
[22] Chawla, M. (2026)., “Enhancing diabetic retinopathy detection using an optimized MobileNet architecture.,” Biomedical Signal Processing and Control, 113, 109207.
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.