"Explainable Deep Learning for Cataract Detection in Retinal Images: A Dual-Eye and Knowledge Distillation Approach"

MohammadReza Abbaszadeh Bavil Soflaei, Karim SamadZamini · 2025

Read "Explainable Deep Learning for Cataract Detection in Retinal Images: A Dual-Eye and Knowledge Distillation Approach" by MohammadReza Abbaszadeh Bavil Soflaei, Karim SamadZamini (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-22696.txt.

Introduction

MohammadReza Abbaszadeh Bavil Soflaei and Karim SamadZamini detect cataracts from retinal photos with models small enough for clinics. Cataracts cloud the lens and remain a top cause of vision loss worldwide. Early detection from fundus images can speed treatment. Their pipeline classifies images from a data set with left and right eye photos of five thousand patients.

A Swin transformer scored highest on accuracy and F1. A distilled MobileNet nearly matched it at far lower cost, by learning from the big model. A dual-eye variant that merges both eyes scored close behind. Grad-CAM heat maps showed the networks focus on medically sensible signs, like lens opacity and central blur.

Catalog record

CREATORMohammadReza Abbaszadeh Bavil Soflaei, Karim SamadZamini
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE27 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2509-22696

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

"Explainable Deep Learning for Cataract Detection in Retinal Images: A Dual-Eye and Knowledge Distillation Approach" MohammadReza Abbaszadeh Bavil Soflaei, Karim SamadZamini Abstract Cataract remains a leading cause of visual impairment worldwide, and early detection from retinal imaging is critical for timely intervention. We present a deep learning pipeline for cataract classification using the Ocular Disease Recognition dataset, containing left and right fundus photographs from 5000 patients. We evaluated CNNs, transformers, lightweight architectures, and knowledge-distilled models. The top-performing model, Swin-Base Transformer, achieved 98.58% accuracy and an F1-score of 0.9836. A distilled MobileNetV3, trained with Swin-Base knowledge, reached 98.42% accuracy and a 0.9787 F1-score with greatly reduced computational cost. The proposed dual-eye Siamese variant of the distilled MobileNet, integrating information from both eyes, achieved an accuracy of 98.21%. Explainability analysis using Grad-CAM demonstrated that the CNNs concentrated on medically significant features, such as lens opacity and central blur. These results show that accurate, interpretable cataract detection is achievable even with lightweight models, supporting potential clinical integration in resource-limited settings. keywords Cataract detection, Deep learning, Explainable AI, Knowledge distillation, Vision transformer, Retinal image analysis, Dual-eye modeling 1 Introduction Cataracts are the world’s leading cause of vision loss from disease, affecting more than 94 million people aged 50 and older in 2020 Steinmetz et al. 2021 . With populations aging, this number is set to rise. Cataract surgery is both effective and affordable, yet millions still go undiagnosed and untreated Chua et al. 2017 , making early detection through accessible screening tools essential. Fundus photography offers a quick, non-invasive, and widely available way to capture images of the retina, revealing signs of cataracts such as blurring, loss of optic disc clarity, and reduced vessel contrast Xie et al. 2023b . Unlike slit-lamp or OCT examinations, it often requires no eye dilation and can be used in community clinics or low-resource settings Khan et al. 2024 . Deep learning (DL) has already proven its ability to match or even surpass expert performance in detecting diseases like diabetic retinopathy Ting et al. 2017 , age-related macular degeneration Leng et al. 2023 , and glaucoma Ling et al. 2025 ; Kermany et al. 2018 . Building on these successes, DL is now a promising approach for detecting cataracts from fundus images. In this study, we evaluate a range of architectures—including convolutional neural networks (CNNs) LeCun et al. 2015 , Vision Transformers (ViTs) Dosovitskiy et al. 2021b , and lightweight models such as MobileNet Howard et al. 2017 —for cataract classification. We employ knowledge distillation Hinton et al. 2015 to transfer representations from large, high-performing models to compact student networks, to balance accuracy and computational efficiency.We also introduce a novel dual-eye Siamese network Koch et al. 2015 that processes left and right fundus images together, leveraging correlations between the eyes to improve performance. To improve model interpretability, we apply Grad-CAM Selvaraju et al. 2017 for CNNs, enabling comparison of model focus with known clinical markers. 2 Related Work Deep learning has transformed ophthalmic disease detection, notably for diabetic retinopathy (DR) Atwany et al. 2022 , glaucoma, and age-related macular degeneration (AMD) Deng et al. 2022 . CNNs applied to fundus images have achieved expert-level accuracy in DR diagnosis and grading Tsiknakis et al. 2021 ; Alyoubi et al. 2020 . For AMD and glaucoma, deep learning models analyzing OCT and fundus images have demonstrated high sensitivity and specificity, sometimes surpassing human experts Koseoglu et al. 2023 ; Sheng et al. 2022 . Multi-disease AI tools capable of simultaneous DR and AMD detection show promise for integrated screening González-Gonzalo et al. 2019 . Despite cataract’s clinical importance, deep learning on fundus images for cataract detection remains less explored. Surveys highlight a gap in fundus-based systems compared to other imaging modalities Zhang et al. 2022 . Some recent studies developed CNN-based models such as MobileNet-V2 and DenseNet variants, achieving accuracies above 90% Elloumi 2021 ; Xie et al. 2023a ; Padalia et al. 2022 . However, literature is sparse on diverse architectures, benchmarking, and lightweight explainable models, especially for resource-limited settings. Standard CNNs like ResNet and EfficientNet are widely used in medical imaging due to robust feature extraction and scalability He et al. 2015 ; Tan and Le 2020 . Vision Transformers (ViT, Swin, DeiT) have gained traction for modeling long-range dependencies with strong classification performance Dosovitskiy et al. 2021b ; Liu et al. 2021 ; Touvron et al. 2021 . Explainability techniques such as Grad-CAM and attention visualization enhance clinical trust by localizing decision-relevant regions Selvaraju et al. 2019 ; Dosovitskiy et al. 2021b . To the best of our knowledge, no previous study has combined knowledge distillation with a dual-eye Siamese architecture for cataract detection, making this a novel fusion of model compression and inter-eye relational learning. For a summarized overview of these studies, see Table 4 in Appendix A. 3 Methodology This section outlines our approach to automated cataract detection from retinal fundus images, covering dataset preprocessing, the design and training of single-eye and dual-eye models, the application of knowledge distillation, and the use of explainability techniques—each contributing to improved performance and interpretability. 3.1 Dataset We used the publicly available Ocular Disease Intelligent Recognition (ODIR-5K) dataset from Kaggle Larxel 2020 , which includes paired left and right fundus photographs from approximately 5,000 patients (around 10,000 images total). Each record contains high-resolution color images and metadata such as age, gender, and diagnostic labels for multiple ocular diseases. This paired-eye format supports both single-eye and dual-eye learning approaches. For this study, we focused on the binary classification task of differentiating “Normal” versus “Cataract” eyes by filtering samples accordingly. The resulting dataset is heavily imbalanced, with 2,873 normal images and only 293 cataract images. To manage data loading and preprocessing, we implemented a custom PyTorch dataset class, FundusDataset , which accepts a pandas DataFrame containing image filenames and labels, applying specified transformations during access. Figure 1: Fundus image samples: normal and cataract eyes 3.2 Dual-Eye Dataset To utilize paired fundus images per patient, we created a custom PyTorch dataset, DualEyeFundusDataset , which returns both left and right eye images with a single binary label. We filtered out ambiguous or noisy cases, keeping only samples where both eyes were clearly labeled as either Normal Fundus (0) or Cataract (1). At retrieval, both images are loaded and preprocessed identically. The pair’s label is set to 1 (cataract) if either eye has cataract; otherwise, it is 0 (normal). This dual-eye approach lets us explore if combining information from both eyes improves classification compared to single-eye models. With this filtering and labeling strategy, the total number of dual-eye samples available for training and evaluation was 2,254. 3.3 Preprocessing To prepare the fundus images for input into the neural networks, we applied a series of preprocessing steps using torchvision.transforms , designed to standardize inputs and enhance model robustness. All images were resized to 224\times 224 pixels to ensure compatibility with standard backbone architectures such as Vision Transformers and EfficientNet. To improve generalization and reduce overfitting, we applied data augmentation techniques including random resized cropping, horizontal flipping, small-angle rotations within \pm 15^{\circ} , and color jittering (adjustments to brightness and contrast). After resizing and augmentation, images were normalized using ImageNet mean and standard deviation statistics (

Read the complete text