Using Transfer Learning with DenseNet121 and Convolutional Block Attention Module (CBAM) for Enhanced Diabetic Retinopathy Classification
DOI:
https://doi.org/10.31577/cai_2026_3_601Keywords:
Attention mechanism, CBAM, diabetic retinopathy, DenseNet121, fundus images, transfer learningAbstract
Diabetic retinopathy (DR) is the leading cause of vision loss in the world, particularly in individuals who have had a 10 or 15 years history of diabetes. Early detection of the disease and automated fundus image analysis techniques would decrease the possibility of vision loss. In this study, a transfer learning method is proposed, which includes a Convolutional Block Attention Module (CBAM) and optimizes the DenseNet121 architecture, resulting in better feature representations, as well as the focus on relevant retinal area discoveries. The model was trained and evaluated using the publicly available Kaggle Diabetic Retinopathy dataset, which contains labeled color fundus images spanning multiple DR severity levels. To ensure a comprehensive evaluation, metrics such as accuracy, precision, recall, and F1-score were employed. We have obtained 97 % of categorization accuracy and large ablation experiments indicate that channel or spatial attention can be optimally combined. The addition of CBAM improved the network’s ability to refine features and focus on clinically meaningful retinal regions. As indicated by the available experimental data, the proposed DenseNet121 + CBAM outperforms both baseline DenseNet121 and VGG model regarding accuracy, precision, recall, and F1-score and can be applied in the real world in the context of DR. There are studies that have undertaken comprehensive ablation which demonstrate two attention modules. Ablation experiments do better than the single-module and baseline ones. Our ablation results further confirmed that the combined attention mechanism provides more stable and reliable performance gains across all metrics. It also shows high levels of improvement in F1-score, precision and recall with the model and this confirms the reliability and flexibility of this model in clinical practice. The findings indicated a consistent increase in the results of the DenseNet121 + CBAM model as compared to the baseline DenseNet121 and its single-module variants, with significant changes in parameters. The positive results of the research on the various performance indicators as well as the information gathered in ablation studies portray the possibility of the approach to aid in early diagnosis and treatment of DR. These improvements strengthen the potential of this approach to support early diagnosis and effective management of diabetic retinopathy.