Application of artificial neural networks for binary detection of red eye syndrome
DOI:
https://doi.org/10.47796/ing.v8i00.1400Keywords:
ocular hyperemia, deep learning, computer vision, binary classificationAbstract
Red eye syndrome is one of the most frequent reasons for consultation in primary care, and its early diagnosis is challenging due to the clinical similarity among different etiologies. In this study, a binary detection approach (“red eye” vs. “normal”) was developed and evaluated by comparing convolutional neural network (CNN) architectures, Transformer-based models, and a hybrid model. A dataset of 2,298 images reorganized into two classes was used and trained under homogeneous conditions using transfer learning and fixed hyperparameters. The experiments were conducted in Python 3.10.0 using PyTorch 2.7.1+cu118, torchvision 0.22.1+cu118, timm 1.0.17, scikit-learn 1.6.1, NumPy 1.26.4, Albumentations 2.0.8, and Matplotlib 3.8.2, on hardware equipped with an NVIDIA RTX 4060 GPU (8 GB). The results showed high performance across all evaluated models (F1 > 0.92, MCC > 0.90, and AUC ≥ 0.98). The hybrid model achieved the best overall performance (AUC = 0.996, MCC = 0.925, F1 = 0.924, and accuracy = 94.20%). McNemar’s test indicated no statistically significant differences between the hybrid model and the best-performing individual model (ResNet).
Downloads
References
Bitto, A. K. (2024). Image Dataset on Eye Diseases Classification (Uveitis, Conjunctivitis, Cataract, Eyelid) with Symptoms and SMOTE Validation. Mendeley Data, 2. https://doi.org/10.17632/n9zp473wfw.2
Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics 21(1). https://doi.org/10.1186/s12864-019-6413-7
Dag, Y., Seyfi Aydın, & Ebrar Kumantas. (2024). The profile of patients attending to the general emergency department with ocular complaints within the last year: is it a true ocular emergency? BMC Ophthalmology, 24(1). https://doi.org/10.1186/s12886-024-03608-1
Devikala, S., Vinoth, S., Shaby, S. M., Govindaraju, A. B., Vidhya, K., & Vijayalakshmi, K. (2025). A Multi-Component Attention Graph Convolutional Neural Network Optimized by the Gooseneck Barnacle Algorithm for High-Precision ECG Arrhythmia Classification in Sensor-Based Biomedical Systems. Biomedical Signal Processing and Control, 113, 108866. https://doi.org/10.1016/j.bspc.2025.108866
Hasan, M. M., Phu, J., Wang, H., Sowmya, A., Kalloniatis, M., & Meijering, E. (2025). OCT-based diagnosis of glaucoma and glaucoma stages using explainable machine learning. Scientific Reports, 15(1). https://doi.org/10.1038/s41598-025-87219-w
Hui, J., Ang, E., Srinivasan, S., Lei, X., Loh, J., Quek, T. C., Xue, C., Xu, X., Liu, Y., Cheng, C.-Y., Rajapakse, J. C., & Tham, Y.-C. (2024). Comparative Analysis of Vision Transformers and Conventional Convolutional Neural Networks in Detecting Referable Diabetic Retinopathy. Ophthalmology Science, 4(6), 100552–100552. https://doi.org/10.1016/j.xops.2024.100552
Le, N. T., Le Truong, T., Deelertpaiboon, S., Srisiri, W., Pongsachareonnont, P. F., Suwajanakorn, D., Mavichak, A., Itthipanichpong, R., Asdornwised, W., Benjapolakul, W., Chaitusaney, S., & Kaewplung, P. (2024). ViT‐AMD: A New Deep Learning Model for Age‐Related Macular Degeneration Diagnosis From Fundus Images. International Journal of Intelligent Systems, 2024(1). https://doi.org/10.1155/2024/3026500
Li, Z., Jiang, J., Chen, K., Chen, Q., Zheng, Q., Liu, X., Weng, H., Wu, S., & Chen, W. (2021). Preventing corneal blindness caused by keratitis using artificial intelligence. Nature Communications, 12(1). https://doi.org/10.1038/s41467-021-24116-6
Molina Arias, M. (2024). Un intruso de otro mundo: F1-score. Revista Electrónica AnestesiaR, 16(4), 3. https://doi.org/10.30445//rear.v16i4.1258
Müller, D., Soto-Rey, I., & Kramer, F. (2022). Towards a guideline for evaluation metrics in medical image segmentation. BMC Research Notes, 15(1). https://doi.org/10.1186/s13104-022-06096-y
Ong, Z. Z., Sadek, Y., Qureshi, R., Liu, S.-H., Li, T., Liu, X., Takwoingi, Y., Sounderajah, V., Ashrafian, H., Ting, D. S. W., Mehta, J. S., Rauz, S., Said, D. G., Dua, H. S., Burton, M. J., & Ting, D. S. J. (2024). Diagnostic performance of deep learning for infectious keratitis: a systematic review and meta-analysis. EClinicalMedicine, 77, 102887. https://doi.org/10.1016/j.eclinm.2024.102887
Pan, Y., Liu, J., Cai, Y., Yang, X., Zhang, Z., Long, H., Zhao, K., Yu, X., Zeng, C., Duan, J., Xiao, P., Li, J., Cai, F., Yang, X., & Tan, Z. (2023). Fundus image classification using Inception V3 and ResNet-50 for the early diagnostics of fundus diseases. Frontiers in Physiology, 14. https://doi.org/10.3389/fphys.2023.1126780
Rainio, O., Teuho, J., & Klén, R. (2024). Evaluation metrics and statistical tests for machine learning. Scientific Reports, 14(1). https://doi.org/10.1038/s41598-024-56706-x
Rajatha, & Ashoka, D. V. (2025). EffiViT: Hybrid CNN-Transformer for Retinal Imaging. Computers in Biology and Medicine, 191, 110164. https://doi.org/10.1016/j.compbiomed.2025.110164
Reifs Jiménez, D., Casanova-Lozano, L., Grau-Carrión, S., & Reig-Bolaño, R. (2025). Artificial Intelligence Methods for Diagnostic and Decision-Making Assistance in Chronic Wounds: A Systematic Review. Journal of Medical Systems, 49(1). https://doi.org/10.1007/s10916-025-02153-8
Sargolzaeimoghaddam, M., Maral Sargolzaeimoghaddam, Kothari, Z., Sebhat, A. M., & Soleimani, M. (2025). Review of ophthalmic emergencies in primary care: a comprehensive approach to red eye. Annals of Eye Science, 10, 20–20. https://doi.org/10.21037/aes-25-10
Tamimi, A., Allawi, M. N., & Kishore Hanumantharayappa. (2023). Characterization of red eye cases presented to the eye emergency clinic at a tertiary care hospital during COVID-19 Pandemic. Oman Journal of Ophthalmology, 16(2), 220–226. https://doi.org/10.4103/ojo.ojo_224_22
Ueno, Y., Oda, M., Yamaguchi, T., Fukuoka, H., Nejima, R., Kitaguchi, Y., Miyake, M., Akiyama, M., Miyata, K., Kashiwagi, K., Maeda, N., Shimazaki, J., Noma, H., Mori, K., & Oshika, T. (2024). Deep learning model for extensive smartphone-based diagnosis and triage of cataracts and multiple corneal diseases. British Journal of Ophthalmology, 108(10), 1406–1413. https://doi.org/10.1136/bjo-2023-324488
Xu, Z., Xu, J., Shi, C., Xu, W., Jin, X., Han, W., Jin, K., Grzybowski, A., & Yao, K. (2023). Artificial Intelligence for Anterior Segment Diseases: A Review of Potential Developments and Clinical Applications. Ophthalmology and Therapy, 12(3), 1439–1455. https://doi.org/10.1007/s40123-023-00690-4
Zhang, W., Belcheva, V., & Ermakova, T. (2025). Interpretable Deep Learning for Diabetic Retinopathy: A Comparative Study of CNN, ViT, and Hybrid Architectures. Computers, 14(5), 187–187. https://doi.org/10.3390/computers14050187
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Marcelino Torres Villanueva, Juan Pedro Santos Fernández

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





