Submitted:
10 February 2025
Posted:
11 February 2025
You are already at the latest version
Abstract
Background: Ocular diseases have been a severe problem worldwide, specifically in underdeveloped countries that do not have enough technology or economy to treat them. It would be beneficial to have software with low installation complexity and ease of use, allowing allowing the high efficacy in diagnosing eye diseases. This study aims to design and implement an algorithm based on Deep Learning to classify ocular diseases with high precision; (2) Methods: This work de-scribes digital image processing techniques for easier handling of eye images; in particular, Blur filters were used. The Canny filter was also applied to obtain the edges that allow the difference between the analyzed diseases. Once the images were pre-processed, a Convolutional Neural Network of our own design was applied to perform the classification task. The validation algorithm used in this work was the Hold-Out (80-20). The metrics used to evaluate our proposal were the confusion matrix, accuracy, recall precision, and F1-score; (3) Results: The dataset has five classes: Normal, Cataract, Diabetic Retinopathy, Glaucoma, and other Retina diseases. The network ar-chitecture consists of 11 layers, including three Convolutional layers, three Max Pooling layers, one Batch Normalization layer, one Flattening layer, two Hidden layers, and one output layer. This model resulted in 97% efficiency across all metrics; Conclusions: With the individual analysis of each metric, it can be observed that the proposed algorithm is capable of differentiating, first, normal images from diseased ones, and second, adequately classifying eye diseases.
Keywords:
1. Introduction
1.1 Eye diseases
1.2 Related work
2. Materials and Methods
2.1 Blur filters
2.2 Convolutional Neural Networks
2.3 Evaluation metrics
2.4 Methodology
2.5 Dataset
2.6 Pre-processing
2.7 Classification
3. Results
- 8th generation Intel CORE i7 + processor at 2.2 GHz and Turbo Boost at 4GHz.
- NVIDIA GEFORCE GTX 1050 graphics card
- 8 GB RAM
- Windows 10 Home operating system
- Class 0 (Glaucoma): It is observed that, of the 33 instances of glaucoma, 32 were correctly classified, with only one instance misclassified as another condition.
- Class 1 (Cataract): For the 48 instances of cataract, 47 were correctly classified, and one was incorrectly classified.
- Class 2 (Retina): Of the 37 instances of retinopathy, 36 were classified correctly, with one error.
- Class 3 (Diabetic retinopathy): All 38 instances of diabetes were correctly classified, showing perfect performance in this class.
- Class 4 (Normal): From the 44 normal instances, 43 were correctly classified, with only one error.
| Accuracy | |
| Normalized accuracy | 0.97 |
| Non-Normalized Accuracy | 194 |
4. Discussion
| Year | Algorithm | Classes | Metrics |
| 2022 | Vision Transformer-based approach with three architectures with 8, 14, 24 layers [6] | Age-related macular degeneration, Cataracts, Diabetes, Glaucoma, Hypertension, and Myopia | With 14 layers F1-score=83.49%, sensitivity=84% precision= 83%, and Kappa score=0.802 |
| 2023 | Single-Shot detection, Whale Optimization algorithm with Levy Flight and Wavelet search strategy, and ShuffleNet V2 model [7] | Glaucoma, Cataract, Diabetic retinopathy and Normal | Accuracy = 99.1%, Precision = 98.9%, Recall = 99%, F1 – Score = 98.9%, Kappa = 96.4%, Sensitivity = 98.9% and Specificity = 96.3%. |
| 2023 | EfficientNetB0, VGG-16, and VGG-19 models [8] | Glaucoma, Cataract, Diabetic Retinopathy and Normal | With EfficientNetB0 Accuracy = 98.47%, Precision = 96.98%, Recall = 96.91%, and AUC = 99.84%. |
| 2023 | CLAHE and Convolutional Neural Network [9] | Glaucoma, cataract, diabetes, age-related macular degeneration, hypertension, and pathological myopia, as well as other diseases that are not specifically mentioned | Experiment 1: multiclass classification Accuracy=60.31% and AUC=85% Experiment 2: Binary classification Accuracy was between 98% and 100%, Recall from 97.99% to 100%, and Precision between 96% and 100%. |
| 2023 | Convolutional Neural Network and a pre-trained model: EfficientNet CNN [10] | Glaucoma, Cataract, Diabetic retinopathy and Normal | With EfficientNet CNN Accuracy=94% |
| 2024 | VGG-16 Convolutional Neural Network [11] | Normal retina, Diabetic Macular Edema, Choroidal Neo-vascular Membranes, and Age-related Macular Degeneration | Accuracy=94% and, after fine tuning, it approaches to 97%. |
| 2024 | VGG-16, Xception and MobileNet for feature selection and CNN for classification [12] | Choroidal neovascularization, Diabetic macular edema and Drusen and Normal | MobileNet with CNN ensemble model Accuracy of 95.34% |
| 2024 | Fundus-DeepNet system [13] | Normal, Diabetic retinopathy, Glaucoma, Cataracts, AMD, Myopia, Hypertension, and other abnormalities | F1-score=88.56 %, Kappa score=88.92 %, and AUC= 99.76 % |
| 2024 | Our proposal | Glaucoma, Cataract, Retina diseases, Diabetic retinopathy and Normal | Precision=97%, Accuracy=97%, Recall=97% and F1-score=97% |
Acknowledgments
References
- UNAM Global, En México, cerca de 1.5 millones de personas tienen glaucoma. Boletín: Número 221, CDMX, Ciudad Univer-sitaria.
- Piñero, R. , Lora, M., Andrés, M. I. Glaucoma, Offarm, 2005, Volume 24(2), pp. 88-96.
- Aliseda, D. and Berastegui, L. Retinopatía diabética. Anales Sis San Navarra [online]. 2008, Volume 31(3), pp.23-34.
- Tenorio, G., Ramírez-Sánchez, V. Retinopatía diabética: conceptos actuales. Revista Médica del Hospital General de México, 2010, Volume 73(3), pp. 193-201.
- American Academy of Ophthalmology, https://www.aao.org/salud-ocular/enfermedades/que-son-las-cataratas.
- Dheeraj, S. and Ghosh, A. Classification of Ocular Diseases: A Vision Transformer-Based Approach. Innovations in Computa-tional Intelligence and Computer Vision, Lecture Notes in Networks and Systems 680, 2022. [CrossRef]
- Wahab, S. Artificial Intelligence-Driven Eye Disease Classification Model. Appl. Sci., 2023, Volume 13.
- Sener, B. and Sumer, E. Classification of Eye Disease from Retinal Images Using Deep Learning. 14th International Conference on Electrical and Electronics Engineering (ELECO), Bursa, Turkey, 30 Nov. – 2 Dec, 2023.
- Mostafa, K., Hany, M., Ashraf, A. and Mahmoud, M. Deep Learning-Based Classification of Ocular Diseases Using Convolu-tional Neural Networks, Intelligent Methods, Systems, and Applications (IMSA), Arab Republic of Egypt, July 15-16, 2023.
- Babaqi, T., Jaradat, M., Yildirim, A., Al-Nimer, S., and Won, D. Eye Disease Classification Using Deep Learning Techniques. Proceedings of the IISE Annual Conference & Expo, April 2023.
- Elkholy, M. and Marzouk, M.A. Deep learning-based classification of eye diseases using Convolutional Neural Network for OCT images. Front. Comput. Sci., 2024, Volume 5.
- Gulati, S., Guleria, K., Goyal, N. Detection and Multiclass Classification of Ocular Diseases using Deep Learning-based En-semble Model. International Journal of Intelligent Systems and Applications in Engineering, 2024, Volume 12(19s), pp. 18–29.
- Al-Fahdawi, S., Al-Waisy, A. S., Diyar Zeebaree, Q., Qahwaji, R., Natiq, H., Mohammed, M. A., Nedoma, J., Martinek, R., Deveci, M. Fundus-DeepNet: Multi-label deep learning classification system for enhanced detection of multiple ocular diseases through data fusion of fundus images. Information Fusion, 2024, Volume 102, pp. 1-11.
- Domínguez, T. Filtros de Procesamiento de Imágenes, In Visión artificial: Aplicaciones prácticas con Open CV – Python. 1st Ed., Marcombo, 2021, pp. 183-204.
- Moocarme, M., Abdolahnejad, M. and Bhagwat, R. Computer Vision with Convolutional Neural Netwoks. In The Deep Learning with Keras Workshop, 2nd Ed. Publisher: Packt Publishing Ltd. 2020.
- Cataract Prediction dataset. Available online: https://www.kaggle.com/datasets/jr2ngb/cataractdataset.
- Eye disease classification dataset. Available online: https://www.kaggle.com/datasets/gunavenkatdoddi/eye-diseases-classification.




| True Negatives | False Positives |
| False Negatives | True Positives |
| Precision | |
| Precision macro | 0.9799 |
| Precisión micro | 0.97 |
| Precision weighted | 0.9712 |
| Precision none Glaucoma Cataract Retina Diabetic retinopathy Normal |
1 0.9591 0.925 1 0.9767 |
| Recall | |
| Recall macro | 0.9701 |
| Recall micro | 0.97 |
| Recall weighted | 0.97 |
| Recall none Glaucoma Cataract Retina Diabetic retinopathy Normal |
0.9696 0.9791 1 0.9473 0.9545 |
| F1-score | |
| F1-score macro | 0.9706 |
| F1-score micro | 0.97 |
| F1-score weighted | 0.97 |
| F1-score none Glaucoma Cataract Retina Diabetic retinopathy Normal |
0.9846 0.9690 0.9610 0.9729 0.9655 |
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/).