A Reproducible Deep Learning Framework for Explainable Cataract Screening from Retinal Fundus Images

Main Article Content

Zahid Aziz
Abdullah Zahid

Abstract

Despite the potential of cataract surgery for visual rehabilitation, cataract is still a major contributor to preventable low vision and specialist-led screening programmers are challenging to implement in communities with poor ophthalmic services. In this study, a research prototype of end-to-end Deep Learning model for binary classification of cataract from retinal fundus images was developed and tested. This contribution is not a new backbone architecture, but rather a reproducible pipeline, which combines the data integrity checking, ophthalmic images standardization, class-aware transfer learning, validation-only threshold selection, statistical evaluation, explainable artificial intelligence, and deployable single image inference. The public collection on Kaggle was examined and the duplicate repository tree was removed and 400 unique images (300 normal, 100 cataract) were isolated. Each image was then resized to 224×224 RGB with black padding in order to preserve aspect-ratio and CLAHE was used to enhance the images. The training, validation and test images were acquired by a fixed stratified split, which resulted in 280 training, 60 validation and 60 test images. The classes were trained using the same class weighted fashion in ResNet50, VGG19 and InceptionV3. Both VGG19 and ResNet50 model got 88.33% test accuracy at the traditional 0.50 threshold, with VGG19 having the highest ROC-AUC (0.9259) and specificity (95.56%) while ResNet50 had higher sensitivity (73.33%) and F1-score (75.86%). A validation-only Youden-J threshold of 0.03 resulted in a shift of the final operating point of VGG19 towards screening sensitivity – 86.67%, with accuracy of 78.33%, specificity of 75.56%, F1-score of 66.67%, ROC-AUC of 0.9259, and PR-AUC of 0.8752. Two thousand iterations of the stratified bootstrap, paired comparisons, calibration analysis and review of the confusion matrix were performed. All the test images were explained using the grad-CAM, but the faithfulness using occlusion was mixed so it was interpreted with caution. The package reproduced exactly all the test probabilities and decisions and it is now possible to do quality-aware single-image screening. This system should not be considered to be a clinically validated system, but rather an explainable research prototype. It has a clear and strong advantage in the seamless integration of the following features: model comparison, threshold trade-offs, error analysis, deployment auditing, and all on a limited fundus dataset.

Article Details

How to Cite
Aziz, Z., & Zahid, A. (2026). A Reproducible Deep Learning Framework for Explainable Cataract Screening from Retinal Fundus Images. Technical Journal, 31(02), 13-24. Retrieved from https://tj.uettaxila.edu.pk/index.php/technical-journal/article/view/2419
Section
COMPUTER SCIENCE