Lightweight Deep Learning Models for Diabetic Retinopathy Grading: A Cross Dataset Generalization and Edge Deployment Study
Keywords:
Diabetic Retinopathy, Lightweight Deep Learning, Domain Shift, INT8 Quantization, Edge Deployment, Grad CAMAbstract
Diabetic retinopathy (DR) is a leading cause of preventable blindness. Automated grading of fundus photographs could expand screening where eye specialists are few. Few studies test lightweight models on a second dataset or under deployment limits. This study compares five lightweight networks (MobileNetV3, EfficientNet Lite0, ShuffleNetV2, GhostNet and MobileViT XS) and a ResNet50 reference on APTOS 2019 and EyePACS. Duplicates are removed and each model is trained with three seeds. Same dataset quadratic weighted kappa (QWK) is 0.865 to 0.895 on APTOS and 0.420 to 0.533 on EyePACS. Cross dataset QWK falls to 0.162 to 0.342 from APTOS to EyePACS and 0.350 to 0.653 in the other direction. For referable DR the models detect only 14% to 23% of referable cases from APTOS to EyePACS (specificity 0.95 to 0.98). From EyePACS to APTOS sensitivity is 0.87 to 0.99 but specificity is 0.36 to 0.72. MobileViT XS gives the highest mean QWK in three of four settings. Adding about 10 percent labelled target images raises its cross dataset QWK to 0.506 and 0.823. Controls show that this gain comes from target images and not from more training data. INT8 quantization made files 2.8 to 3.9 times smaller. It keeps QWK for ShuffleNetV2, EfficientNet Lite0 and ResNet50 (loss at most 0.048) but not for MobileNetV3, GhostNet and MobileViT XS (loss 0.217 to 0.478). Percentile calibration reduces this loss but does not remove it. On a 4-core CPU the fp32 median latency is 6.9 to 113.8 ms per image and peak memory is 86 to 293 MB. Latency is not measured on edge hardware. Lightweight models need cross dataset and deployment tests before screening use.
References
H. Sun et al., “IDF Diabetes Atlas: Global, regional and country-level diabetes prevalence estimates for 2021 and projections for 2045,” Diabetes Res. Clin. Pract., vol. 183, Jan. 2022, doi: 10.1016/J.DIABRES.2021.109119.
Z. L. Teo et al., “Global Prevalence of Diabetic Retinopathy and Projection of Burden through 2045: Systematic Review and Meta-analysis,” Ophthalmology, vol. 128, no. 11, pp. 1580–1591, Nov. 2021, doi: 10.1016/J.OPHTHA.2021.04.027.
I. Saleh et al., “AI-based methods for diagnosing and grading diabetic retinopathy: A comprehensive review,” Artif. Intell. Med., vol. 168, Oct. 2025, doi: 10.1016/j.artmed.2025.103221.
H. Guan and M. Liu, “Domain Adaptation for Medical Image Analysis: A Survey,” IEEE Trans. Biomed. Eng., vol. 69, no. 3, pp. 1173–1185, Feb. 2021, doi: 10.1109/TBME.2021.3117407.
A. Matsun, D. O. Mohamed, S. Chokuwa, M. Ridzuan, and M. Yaqub, “DGM-DR: Domain Generalization with Mutual Information Regularized Diabetic Retinopathy Classification,” Sep. 2023, Accessed: Oct. 20, 2026. [Online]. Available: https://arxiv.org/pdf/2309.09670
H. Che, Y. Cheng, H. Jin, and H. Chen, “Towards Generalizable Diabetic Retinopathy Grading in Unseen Domains,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 14224 LNCS, pp. 430–440, Jul. 2023, doi: 10.1007/978-3-031-43904-9_42.
M. Atwany and M. Yaqub, “DRGen: Domain Generalization in Diabetic Retinopathy Classification,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 13432 LNCS, pp. 635–644, 2022, doi: 10.1007/978-3-031-16434-7_61.
S. Chokuwa and M. H. Khan, “Generalizing Across Domains in Diabetic Retinopathy via Variational Autoencoders,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 14393, pp. 265–274, Sep. 2023, doi: 10.1007/978-3-031-47401-9_26.
J. S. Yoon, K. Oh, Y. Shin, M. A. Mazurowski, and H.-I. Suk, “Domain Generalization for Medical Image Analysis: A Review,” Proc. IEEE, vol. 112, no. 10, pp. 1583–1609, Dec. 2024, doi: 10.1109/JPROC.2024.3507831.
A. Vinora, J. A. Fathima, and K. J. T. Rakshitaa, “Diabetic Retinopathy Detection using Convolutional Neural Network on Mobile Device,” 2025 IEEE 1st Int. Conf. Innov. Eng. Next-Generation Technol. Sustain. ICINVENTS 2025, 2025, doi: 10.1109/ICINVENTS64613.2025.11401781.
A. Asare, D. A. N. Gookyi, D. Boateng, and F. A. Wulnye, “Deploying and Evaluating Multiple Deep Learning Models on Edge Devices for Diabetic Retinopathy Detection,” Jun. 2025, Accessed: Oct. 20, 2026. [Online]. Available: https://arxiv.org/pdf/2506.14834
A. Gholami, S. Kim, Z. Dong, Z. Yao, M. W. Mahoney, and K. Keutzer, “A Survey of Quantization Methods for Efficient Neural Network Inference,” Low-Power Comput. Vis., pp. 291–326, Mar. 2021, doi: 10.1201/9781003162810-13.
Z. Liu, Y. Wang, K. Han, W. Zhang, S. Ma, and W. Gao, “Post-Training Quantization for Vision Transformer,” Adv. Neural Inf. Process. Syst., vol. 34, pp. 28092–28103, Jun. 2021, Accessed: Oct. 20, 2026. [Online]. Available: https://arxiv.org/pdf/2106.14156
R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra, “Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization,” Int. J. Comput. Vis., vol. 128, no. 2, pp. 336–359, Oct. 2016, doi: 10.1007/s11263-019-01228-7.
M. Ghassemi, L. Oakden-Rayner, and A. L. Beam, “The false hope of current approaches to explainable artificial intelligence in health care,” Lancet Digit. Heal., vol. 3, no. 11, pp. e745–e750, Nov. 2021, doi: 10.1016/S2589-7500(21)00208-9.
S. Dey et al., “Managing Diabetic Retinopathy with Deep Learning: A Data Centric Overview,” Wiley Interdiscip. Rev. Data Min. Knowl. Discov., vol. 16, no. 3, Apr. 2026, doi: 10.1002/widm.70113.
“APTOS 2019 Blindness Detection | Kaggle.” Accessed: Oct. 20, 2026. [Online]. Available: https://www.kaggle.com/c/aptos2019-blindness-detection
“Diabetic Retinopathy Detection | Kaggle.” Accessed: Oct. 20, 2026. [Online]. Available: https://www.kaggle.com/competitions/diabetic-retinopathy-detection/data
“Diabetic Retinopathy 224x224 (2019 Data).” Accessed: Oct. 20, 2026. [Online]. Available: https://www.kaggle.com/datasets/sovitrath/diabetic-retinopathy-224x224-2019-data
“Diabetic Retinopathy (resized).” Accessed: Oct. 20, 2026. [Online]. Available: https://www.kaggle.com/datasets/tanlikesmath/diabetic-retinopathy-resized/code
S. M. Pizer et al., “Adaptive histogram equalization and its variations,” Comput. vision, Graph. image Process., vol. 39, no. 3, pp. 355–368, Sep. 1987, doi: 10.1016/S0734-189X(87)80186-X.
A. Howard et al., “Searching for MobileNetV3,” Proc. IEEE Int. Conf. Comput. Vis., vol. 2019-October, pp. 1314–1324, May 2019, doi: 10.1109/ICCV.2019.00140.
M. Tan and Q. V. Le, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks,” Int. Conf. Mach. Learn., 2019.
N. Ma, X. Zhang, H. T. Zheng, and J. Sun, “ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 11218 LNCS, pp. 122–138, Jul. 2018, doi: 10.1007/978-3-030-01264-9_8.
K. Han, Y. Wang, Q. Tian, J. Guo, C. Xu, and C. Xu, “GhostNet: More Features from Cheap Operations,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., pp. 1577–1586, Nov. 2019, doi: 10.1109/CVPR42600.2020.00165.
M. R. Sachin Mehta, “MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer,” arXiv:2110.02178, 2021, doi: https://doi.org/10.48550/arXiv.2110.02178.
K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., vol. 2016-December, pp. 770–778, Dec. 2016, doi: 10.1109/CVPR.2016.90.
I. Gulrajani and D. Lopez-Paz, “In Search of Lost Domain Generalization,” ICLR 2021 - 9th Int. Conf. Learn. Represent., Jul. 2020, Accessed: Oct. 20, 2026. [Online]. Available: https://arxiv.org/pdf/2007.01434
M. Nagel, M. Fournarakis, R. A. Amjad, Y. Bondarenko, M. van Baalen, and T. Blankevoort, “A White Paper on Neural Network Quantization,” Jun. 2021, Accessed: Oct. 20, 2026. [Online]. Available: https://arxiv.org/pdf/2106.08295
Z. Yuan, C. Xue, Y. Chen, Q. Wu, and G. Sun, “PTQ4ViT: Post-training quantization for vision transformers with twin uniform quantization,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 13672 LNCS, pp. 191–207, Nov. 2021, doi: 10.1007/978-3-031-19775-8_12.
P. Porwal et al., “IDRiD: Diabetic Retinopathy – Segmentation and Grading Challenge,” Med. Image Anal., vol. 59, Jan. 2020, doi: 10.1016/j.media.2019.101561.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 50sea

This work is licensed under a Creative Commons Attribution 4.0 International License.


















