Diabetic Retinopathy (DR) stands as a primary cause of vision impairment on a global scale. The timely identification of DR through automated screening methodologies holds significant promise for enhancing patient treatment outcomes. This paper details the development of a web-based application employing deep learning for the prediction of Diabetic Retinopathy severity from digital images of the ocular fundus. Constructed using the Flask web framework and the PyTorch deep learning library, the system utilizes a carefully fine-tuned ResNet18 model to categorize retinal images into one of five distinct stages of DR severity. The user interface of the application is designed with a modern, dark-themed aesthetic, facilitating seamless image uploading, real-time diagnostic predictions, and temporary visualization of the uploaded image. This research showcases a streamlined, readily accessible, and scalable solution for DR detection, envisioned for integration within telemedicine platforms or as an initial screening tool in various healthcare settings.
Introduction
Diabetic Retinopathy (DR) is a common diabetes-related eye disease causing progressive retinal blood vessel damage. Early detection is crucial but traditional screening is time-consuming and subjective. This research presents a web application using deep learning (a ResNet18 model with transfer learning) to automatically predict DR severity from retinal fundus images. The application, built with Flask, offers quick and user-friendly diagnosis.
The study reviews previous deep learning approaches for DR detection, noting high accuracy but limited practical deployment. Using publicly available datasets (APTOS 2019 and EyePACS), images were preprocessed (resized, normalized, augmented) for training. The ResNet18 model was fine-tuned to classify DR into five severity stages (0 to 4).
Evaluation on a test set showed an overall accuracy of 85.7%, with precision, recall, and F1 scores above 82%. Some misclassification occurred between mild and moderate stages. The web app demonstrated fast prediction times and ease of use, indicating potential for telemedicine and screening in resource-poor areas.
Conclusion
This research presents a practical implementation of a deep learning-based system for the automated detection of Diabetic Retinopathy through a lightweight and accessible web application. By employing transfer learning with a fine-tuned ResNet18 model, the system efficiently classifies fundus images into five distinct severity stages of DR. The Flask-based frontend provides users with a seamless experience for uploading images and receiving diagnostic predictions.
Future work could focus on several key areas, including expanding the training dataset to improve model robustness, exploring techniques for model explainability (such as generating Grad-CAM visualizations to understand the model\'s decision-making process), integrating user authentication and secure data management, and containerizing the application for more scalable deployments.
This work establishes a solid foundation for the integration of deep learning-based DR screening into broader digital health platforms, potentially improving access to timely diagnosis and management of this sight-threatening condition.
References
[1] Gulshan, V., et al. \"Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy.\" JAMA, 2016.
[2] Pratt, H., et al. \"Convolutional Neural Networks for Diabetic Retinopathy.\" Procedia Computer Science, 2016.
[3] Gargeya, R., Leng, T. \"Automated Identification of Diabetic Retinopathy Using Deep Learning.\" Ophthalmology, 2017.
[4] Lam, C., et al. \"Retinal Lesion Detection with Deep Learning Using Image Patches.\" Investigative Ophthalmology & Visual Science, 2018.
[5] Szegedy, C., et al. \"Rethinking the Inception Architecture for Computer Vision.\" CVPR, 2016.
[6] Huang, G., et al. \"Densely Connected Convolutional Networks.\" CVPR, 2017.
[7] Abramoff, M.D., et al. \"Pivotal Trial of an Autonomous AI-based Diagnostic System for Diabetic Retinopathy Detection.\" npj Digital Medicine, 2018.
[8] Quellec, G., et al. \"Automatic detection of diabetic retinopathy signs from retinal images.\" Medical Image Analysis, 2017.
[9] Ting, D.S.W., et al. \"Development and Validation of a Deep Learning System for Diabetic Retinopathy and Related Eye Diseases.\" JAMA, 2017.
[10] Leibig, C., et al. \"Leveraging uncertainty information from deep neural networks for disease detection.\" Scientific Reports, 2017.
[11] Wang, H., et al. \"Zoom-in-net: Deep Mining Lesions for Diabetic Retinopathy Detection.\" MICCAI, 2017.
[12] Sahlsten, J., et al. \"Deep Learning Fundus Image Analysis for Diabetic Retinopathy and Macular Edema Grading.\" Scientific Reports, 2019.
[13] Liu, S., et al. \"A Two-stage Approach for Automated Detection of Diabetic Retinopathy Using Deep Learning.\" IEEE Transactions on Medical Imaging, 2019.
[14] Bhardwaj, P., et al. \"Automated diagnosis of diabetic retinopathy using fundus images: A review.\" Computers in Biology and Medicine, 2018.
[15] Abràmoff, M.D., et al. \"Improved automated detection of diabetic retinopathy on a publicly available dataset through integration of deep learning.\" Investigative Ophthalmology & Visual Science, 2016.
[16] Ghosh, R., et al. \"Early detection of diabetic retinopathy using deep learning and retinal images.\" Neural Computing and Applications, 2020.
[17] Lam, C., et al. \"Accurate and Efficient Diabetic Retinopathy Grading Using Convolutional Neural Networks.\" Computer Methods and Programs in Biomedicine, 2018.
[18] Kauppi, T., et al. \"DIARETDB1 diabetic retinopathy database and evaluation protocol.\" Proceedings of the British Machine Vision Conference, 2007.
[19] Rajalakshmi, R., et al. \"Validation of Smartphone-Based Retinal Photography for Diabetic Retinopathy Screening.\" PLOS ONE, 2015.
[20] Yao, X., et al. \"Automated Detection of Diabetic Retinopathy Using Machine Learning Algorithms.\" Journal of Diabetes Science and Technology, 2018.