Lightweight Retinal Disease Classification for Offline Mobile Screening: Model Selection, TensorFlow Lite Optimization, and Flutter Deployment
DOI:
https://doi.org/10.29284/7admmd22Keywords:
Eye disease classification; fundus images; MobileNetV2; EfficientNetB0; TensorFlow Lite; model quantization; on-device inference; Flutter; mobile health; resource-constrained environments.Abstract
Early detection of retinal diseases such as cataract, diabetic retinopathy, and glaucoma is essential to prevent irreversible vision loss, particularly in low-resource regions where access to specialists and reliable internet connectivity may be limited. This study presents an end-to-end pipeline for lightweight retinal disease classification and fully offline mobile deployment. Two efficient convolutional neural networks, MobileNetV2 and EfficientNetB0, were evaluated on a public Kaggle fundus image dataset containing four classes (Cataract, Diabetic Retinopathy, Glaucoma, and Normal). Under identical training conditions, MobileNetV2 achieved superior performance, reaching 91.52% test accuracy with only 2.26 million parameters, outperforming EfficientNetB0 (90.74%). Several TensorFlow Lite post-training optimization techniques were investigated, including FP16 quantization, dynamic-range INT8, full-integer INT8, pruning, and knowledge distillation. Among these, FP16 quantization provided the best balance between accuracy, model size, and latency, reducing the model size from 20.76 MB to 4.26 MB while preserving accuracy (91.99%). The optimized model was integrated into a Flutter-based Android application capable of fully offline inference. Latency benchmarks on multiple mid-range smartphones (128–316 ms per image) demonstrate the feasibility of real-time screening. Although evaluated on a relatively small public dataset, the proposed pipeline demonstrates that carefully optimized lightweight CNNs can enable practical and privacy-preserving retinal disease screening directly on commodity smartphones.
References
[1] G. Brian and H. Taylor, "Cataract blindness—challenges for the 21st century," Bulletin of the World Health Organization, pp. 249-256, 2001.
[2] L. S. Lim, P. Mitchell, J. M. Seddon, F. G. Holz and T. Y. Wong, "Age-related macular degeneration," The Lancet, pp. 1728-1738, 2012.
[3] R. N. Weinreb, T. Aung and F. A. Medeiros, "The pathophysiology and treatment of glaucoma: a review," JAMA, pp. 1901-1911, 2014.
[4] M. D. Abràmoff, M. K. Garvin and M. Sonka, "Retinal imaging and image analysis," IEEE Reviews in Biomedical Engineering, pp. 169-208, 2010.
[5] World Health Organization, "World report on vision," Geneva: WHO, 2023.
[6] D. S. Kermany and et al, "Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning," Cell, pp. 1122-1131, 2018.
[7] V. Gulshan and et al, "Development and Validation of a Deep Learning Algorithm for Detection of Diabetic Retinopathy in Retinal Fundus Photographs," JAMA, pp. 2402-2410, 2016.
[8] D. S. W. Ting and et al, "Development and Validation of a Deep Learning System for Diabetic Retinopathy and Related Eye Diseases Using Retinal Images from Multiethnic Populations With Diabetes," JAMA, pp. 2211-2223, 2017.
[9] J. De Fauw and et al, "Clinically applicable deep learning for diagnosis and referral in retinal disease," Nature Medicine, pp. 1342-1350, 2018.
[10] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov and L.-C. Chen, "MobileNetV2: Inverted Residuals and Linear Bottlenecks," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 2018.
[11] M. Tan and Q. V. Le, "EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks," in Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA, 2019.
[12] G. V. Doddi, "Eye Diseases Classification," Kaggle, 2022. [Online]. Available: https://www.kaggle.com/datasets/gunavenkatdoddi/eye-diseases-classification.
[13] A. G. Howard and et al, "MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017.
[14] X. Zhang, X. Zhou, M. Lin and J. Sun, "ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices," in Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 2018.
[15] A. K. B. Arnob, M. H. R. Chayon, F. Al Farid, M. N. Husen and F. Ahmed, "A Lightweight CNN for Multiclass Retinal Disease Screening with Explainable AI," J. Imaging, pp. 45-58, 2025.
[16] H. Wang and et al, "Many-MobileNet: Multi-Model Augmentation for Robust Retinal Disease Classification," arxiv:2412.02825 (cs), 2024.
[17] A. Zafar, K. S. Kim, M. U. Ali, J. H. Byun and S.-H. Kim, "A lightweight multi-deep learning framework for accurate diabetic retinopathy detection and multi-level severity identification," Frontiers in Medicine, p. 112345, 2025.
[18] S. M. Saqib I. M. Qureshi and M. A. Khan, "Cataract and glaucoma detection based on Transfer Learning using MobileNet," Heliyon, pp. 2405-8440, 2024.
[19] H. Fu and et al, "Disc-Aware Ensemble Network for Glaucoma Screening from Fundus Image," IEEE Transactions on Medical Imaging, pp. 2493-2501, 2018.
[20] J. Sahlsten and et al, "Deep Learning Fundus Image Analysis for Diabetic Retinopathy and Macular Edema Grading," Scientific Reports, p. 10750, 2019.
[21] A. Krizhevsky, I. Sutskever and G. E. Hinton, "ImageNet Classification with Deep Convolutional Neural Networks," in Advances in Neural Information Processing Systems (NeurIPS), Lake Tahoe, Nevada, USA, 2012.
[22] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens and Z. Wojna, "Rethinking the Inception Architecture for Computer Vision," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016.
[23] G. Huang, Z. Liu, L. v. d. Maaten and K. Q. Weinberger, "Densely Connected Convolutional Networks," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017.
[24] K. He, X. Zhang, S. Ren and J. Sun, "Deep Residual Learning for Image Recognition," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016.
[25] J. Deng and et al, "ImageNet: A Large-Scale Hierarchical Image Database," in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Miami, Florida, USA, 2009.
[26] S. J. Pan and Q. Yang, "A survey on transfer learning," IEEE Transactions on Knowledge and Data Engineering, pp. 1345-1359, 2010.
[27] C. Szegedy and et al, "Going deeper with convolutions," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 2015.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

