Explainable Diabetic Retinopathy Diagnosis using a Hybrid Vision Transformer–CNN Model with Grad-CAM Visualization
Explainable Diabetic Retinopathy Diagnosis using a Hybrid Vision Transformer–CNN Model with Grad-CAM Visualization
Vishal Sharma,Vinay Kukreja,Rishu
Abstract
Diabetic Retinopathy (DR) is one of the major causes of preventable blindness, which requires proper and explainable systems of automated screening in the early stages of the disorder. This paper introduces a new Hybrid Vision Transformer-CNN platform that uses local lesion-sensitive convolutional features and global spatial thinking provided by self-attention transformers to classify the DR into five clinically relevant categories: No DR, Mild DR, Moderate DR, Severe DR, and Proliferative DR (PDR). It was tested using a mixed APTOS + EyePACS dataset (54,312 fundus images), using standardized illumination correction, vessel enhancements, and lesion-saving augmentation. The hybrid model proposed had a better diagnostic performance with an overall Accuracy of 94.87, Precision of 94.56, Recall of 93.88, and F1-score of 94.12 with a Cohen Kappa of 0.921, indicating a strong agreement with the expert graders. The AUC of 0.963 was achieved with the macro-averaged AUC of 0.98 (No DR), 0.95 (Mild), 0.96 (Moderate), 0.94 (Severe), and 0.97 (PDR). The model was demonstrated to be constantly superior in the accuracy and AUC margins by up to 4.2 and 2.3 percent compared to state-of-the-art CNNs and transformer baselines, respectively. Grad-CAM and Grad-CAM++ heatmaps also guaranteed explainability and precisely localized microaneurysms, hemorrhases, exudates, and neovascularization, thus validating the model to be based on clinically significant areas. The results show that hybrid transformer-CNN frameworks could be used to provide reliable, explainable, and scalable DR screening systems that can be used in the real-world ophthalmic context.
