Submit your papersSubmit Now
For Enquiries: [email protected]
IIARD LogoIIARD

Loss-Aware Residual Learning for Imbalanced Multi-Class Diabetic Retinopathy Diagnosis

Miracle Ugomma Anunobi, Confidence Chigozirim Olumba, Nzubechi Augustine, Oriaku, Precious Mojolaoluwa Ojo, Richard Phiri Chafukira, Uchechi Joyce Nneji, Richard Iherorochi Nneji, Edwin Sunday Umana

Abstract

Diabetic Retinopathy (DR) is a severe complication of diabetes that can lead to vision impairment or blindness, making early detection crucial. Traditional deep learning models often struggle with class imbalance in medical datasets, leading to poor performance for minority classes. This study proposes a novel deep learning model based on Residual Networks to address the multi- class classification of DR, with a focus on mitigating class imbalance. Standard Softmax activation functions tend to favor majority classes, thereby worsening the model's performance on minority classes. To address this, the study incorporates a custom loss function, Balanced Softmax Loss, which adjusts class weights to improve the recognition of minority classes. Additionally, the model integrates advanced techniques such as Squeeze-and-Excitation (SE) blocks, learnable wavelet transforms, and multi-head attention mechanisms to enhance feature extraction and model performance. The model was trained and evaluated on the APTOS 2019 Blindness Detection dataset, achieving a micro-average accuracy of 0.83 and a macro-average accuracy of 0.73 in the 5-class classification task. In a 4-class classification task, where severe and proliferative DR were merged, the model achieved a micro-average accuracy of 0.87 and a macro-average accuracy of 0.84. The model's interpretability was further enhanced through Explainable AI techniques such as LIME, Grad-CAM, and SHAP. The trained model was deployed as a web-based application using Flask, enabling real-time classification of retinal images. The study highlights the model's effectiveness in addressing class imbalance and its potential for early DR diagnosis, thereby enhancing clinical decision support. Keyword: ResNet, Custom Loss Function, Class Imbalance, Image Imbalance, Image Classification

References

Liu, K., Si, T., Huang, C., Wang, Y., Feng, H., & Si, J. (2024). Diagnosis and detection of diabetic retinopathy based on transfer learning. Multimedia Tools and Applications, 83(35), 82945– 82996. https://doi.org/10.1007/s11042-024-18792-x Omer, H. (2024). Diabetic retinopathy detection using bilayered neural network classification model with resubstitution validation. MethodsX, 12, Article 102705. https://doi.org/10.1016/j.mex.2024.102705 Thanikachalam, V., Kabilan, K., & Erramchetty, S. K. (2024). Optimized deep CNN for detection and classification of diabetic retinopathy and diabetic macular edema. BMC Medical Imaging, 24(1), Article 1. https://doi.org/10.1186/s12880-024-01406-1 Bhimavarapu, U., Chintalapudi, N., & Battineni, G. (2023). Automatic detection and classification of diabetic retinopathy using the improved pooling function in the convolution neural network. Diagnostics, 13(15), Article 2606. https://doi.org/10.3390/diagnostics13152606 Lin, C.-L., & Wu, K.-C. (2023). Development of revised ResNet-50 for diabetic retinopathy detection. BMC Bioinformatics, 24(1), Article 157. https://doi.org/10.1186/s12859-023- 05293-1 Kallel, F., & Echtioui, A. (2024). Retinal fundus image classification for diabetic retinopathy using transfer learning technique. Signal, Image and Video Processing, 18(2), 1143–1153. https://doi.org/10.1007/s11760-023-02820-8 Karkera, T., Adak, C., Chattopadhyay, S., & Saqib, M. (2024). Detecting severity of diabetic retinopathy from fundus images: A transformer network-based review. Neurocomputing, 597, Article 127991. https://doi.org/10.1016/j.neucom.2024.127991 Arunika, M., Saranya, S., Charulekha, S., Kabilarajan, S., & Kesavan, G. (2024). A survey on explainable AI using machine learning algorithms SHAP and LIME. Proceedings of the International Conference on Computing Communication and Networking Technologies , 1–6. https://doi.org/10.1109/ICCCNT61001.2024.10725120 Cotter, F., & Kingsbury, N. (2018). Deep learning in the wavelet domain. arXiv. https://doi.org/10.48550/arXiv.1811.06115 Liu, J., Guo, F., Gao, H., Huang, Z., Zhang, Y., & Zhou, H. (2021). Image classification method on class imbalance datasets using multi-scale CNN and two-stage transfer learning. Neural Computing and Applications, 33(21), 14179–14197. https://doi.org/10.1007/s00521-021- 06066-8 Sakib, S., Ahmed, A., Jawad, A., Kabir, J., & Ahmed, H. (2018). An overview of convolutional neural network: Its architecture and applications. Preprints. https://doi.org/10.20944/preprints201811.0546.v1 Yu, C., Hung, P.-H., Hong, J.-H., & Chiang, H.-Y. (2023). Efficient max pooling architecture with zero-padding for convolutional neural networks. Proceedings of the IEEE 12th Global Conference on Consumer Electronics , 747–748. https://doi.org/10.1109/GCCE59613.2023.10315268 Xu, W., Fu, Y.-L., & Zhu, D. (2023). ResNet and its application to medical image processing: Research progress and challenges. Computer Methods and Programs in Biomedicine, 240, Article 107660. https://doi.org/10.1016/j.cmpb.2023.107660 Kaman, S., & Makandar, A. (2024). Optimizing pretrained model with squeeze-and-excitation blocks for improved image forgery detection. Proceedings of the International Conference on Innovation and Novelty in Engineering and Technology , 1–6. https://doi.org/10.1109/INNOVA63080.2024.10847047 Ba, Z., Wu, L., Hu, J., Wu, L., & Zhang, X. (2024). Multi-head attention hardware implementation and side-channel security analysis for transformer. Proceedings of the International Conference on Integrated Circuits and Microsystems , 842–846. https://doi.org/10.1109/ICICM63644.2024.10814141 Pham, T.-C., Doucet, A., Luong, C.-M., Tran, C.-T., & Hoang, V.-D. (2020). Improving skin- disease classification based on customized loss function combined with balanced mini- batch logic and real-time image augmentation. IEEE Access, 8, 150725–150737. https://doi.org/10.1109/ACCESS.2020.3016653 Kang, B., et al. (2020). Decoupling representation and classifier for long-tailed recognition. arXiv. https://doi.org/10.48550/arXiv.1910.09217 Romero-Oraá, R., Herrero-Tudela, M., López, M. I., Hornero, R., & García, M. (2024). Attention- based deep learning framework for automatic fundus image processing to aid in diabetic retinopathy grading. Computer Methods and Programs in Biomedicine, 249, Article 108160. https://doi.org/10.1016/j.cmpb.2024.108160 Hao, Q., Huang, J., Wang, B., & Zhou, F. (2024). Convolutional neural network image classification method integrating classic image features. Proceedings of the IEEE 9th International Conference on Computational Intelligence and Applications , 130– 135. https://doi.org/10.1109/ICCIA62557.2024.10719194 Chagnon, J., Hagenbuchner, M., Tsoi, A. C., & Scarselli, F. (2024). On the effects of recursive convolutional layers in convolutional neural networks. Neurocomputing, 591, Article 127767. https://doi.org/10.1016/j.neucom.2024.127767 Li, X., Wang, Y., Monday, H. N., & Nneji, G. U. (2025). A novel residual learning of multi-scale feature extraction model for the classification of rice grain varieties. Computers and Electronics in Agriculture, 237, Article 110491. Monday, H. N., Nneji, G. U., Hossin, M. A., Mark, K. D., Umana, E. S., Mgbejime, G. T., & Li, J. (2025). Enhancing ECG classification in cardiac diagnostics: A novel approach using adaptive focal cross-entropy loss function. IEEE Journal of Biomedical and Health Informatics. Nneji, G. U., Monday, H. N., Pathapati, V. S. R., Nahar, S., Mgbejime, G. T., Umana, E. S., & Hossin, M. A. (2025). FFS-IML: Fusion-based statistical feature selection for machine learning-driven interpretability of chronic kidney disease. International Journal of Machine Learning and Cybernetics, 1–34. Nneji, G. U., Cai, J., Deng J., Monday, H. N., James, E. C. and Ukwuoma C. C. (2022). “Multi- Channel Based Image Processing Scheme for Pneumonia Identification”, Diagnostics, vol. 12(2) p. 325 https://doi.org/10.3390/diagnostics12020325

More Articles from INTERNATIONAL JOURNAL OF HEALTH AND PHARMACEUTICAL RESEARCH

Antibacterial Activity of Stem Bark Extract of Boswellia Odorata Against Some Isolates of Wound Among Patients Attending Selected Hospitals in Kano Metropolis

Author: Kamal Abdulkadir Muhammad, Ismaila Ahmed, Lawan Danjuma, Raliya Sulaiman, Dauda, Isah Musa Bebeji, Zubairu Sani Ibrahim, Yahaya Ubah Yau, Binta Kabir, Muhammad, and Mukhtar Aminu Bala, Corresponding author

Prevalence and Prevention of Health Problems Among Inmates in Agodi Gate Correctional Centre, Ibadan

Author: John Betiku, a, Oluwabunmi Hannah Aremo, b, Emmanuel Olusegun Abe, a, Rachael, Omotomilayo Ajayi, c, Adenike Kaosarat Alabi, d, Kelechi Princess John, d, orcid ---