Few-Shot Classification of Retinal OCT Images Using Prototypical Networks with Pretrained Encoders
Abstract
Some of the causes of irreversible visual impairment in the world include retinal diseases like choroidal neovascularization (CNV), diabetic macular edema (DME), and drusen deposits. Even though optical coherence tomography (OCT) is now regarded as the gold-standard of non-invasive imaging modality in the evaluation of the retina, the scarcity of expert annotations of OCT has been a severe bottleneck in supervised deep learning algorithms. In order to overcome this drawback, a few-shot learning system is suggested on the basis of Prototypical Networks with the pretrained ResNet18 encoder trained through episodic meta-learning. Class prototypes are calculated as average embedding of K support samples per class and then classification is performed using the Euclidean distance in a 512 dimensional embedding space. The experimentation is carried out using the publicly available benchmark of Kermany OCT2017 that contains 84495 images and four diagnostic groups CNV, DME, DRUSEN, and NORMAL. The proposed model achieves 99.33 ± 0.15% accuracy at 4-way 5-shot setting evaluated over 200 test episodes. Per-shot accuracies are 97.82 ± 0.36% (1-shot), 99.33 ± 0.15% (5-shot), and 99.18% ± 0.16% (10-shot). Per-class accuracies are 98.9% (CNV), 99.2% (DME), 99.0% (DRUSEN), and 99.3% (NORMAL). t-SNE, prototype space, and Grad-CAM analyses confirm clinically meaningful, well-separated embeddings directed toward pathology-specific retinal structures. These results demonstrate that Prototypical Networks with ImageNet-pretrained encoders surpass all prior few-shot methods on the Kermany benchmark without generative augmentation, achieving near-perfect classification from as few as one labeled example per class and constituting a clinically viable approach for automated retinal diagnosis in annotation-scarce settings.
Keywords
References
- Agbareia, R., Omar, M., Zloto, O., Glicksberg, B. S., Nadkarni, G. N., & Klang, E. (2025). Multimodal LLMs for retinal disease diagnosis via OCT: Few-shot versus single-shot learning. Therapeutic Advances in Ophthalmology, 17. https://doi.org/10.1177/25158414251340569
- Chen, W.-Y., Liu, Y.-C., Kira, Z., Wang, Y.-C. F., & Huang, J.-B. (2019). A closer look at few-shot classification. In: Proceedings of the Seventh International Conference on Learning Representations (ICLR 2019) (6-9 May 2019), New Orleans.
- Finn, C., Abbeel, P., & Levine, S. (2017). Model-agnostic meta-learning for fast adaptation of deep networks. In: D. Precup, & Y. W. Teh (Eds.), Proceedings of the 34th International Conference on Machine Learning (ICML’17) (11-16 August 2017, vol. 70, pp. 1126-1135), Sydney NSW Australia.
- Gholami, P., Roy, P., Parthasarathy, M. K., & Garg, V. (2020). OCTID: Optical coherence tomography image database. Computers and Electrical Engineering, 81, 106532. https://doi.org/10.1016/j.compeleceng.2019.106532
- He, J., Wang, J., Han, Z., Ma, J., Wang, C., & Qi, M. (2023). An interpretable transformer network for the retinal disease classification using optical coherence tomography. Scientific Reports, 13, 3637. https://doi.org/10.1038/s41598-023-30853-z
- He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), (27-30 June 2016, 770-778), Las Vegas, NV, USA.
- Kermany, D. S., Goldbaum, M., Cai, W., Valentim, C. C. S., Liang, H., Baxter, S. L., McKeown, A., Yang, G., Wu, X., Yan, F., Dong, J., Prasadha, M. K., Pei, J., Ting, M. Y. L., Zhu, J., Li, C., Hewett, S., Dong, J., Ziyar, I., … Zhang, K. (2018). Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, 172(5), 1122-1131. https://doi.org/10.1016/j.cell.2018.02.010
- Kulyabin, M., Zhdanov, A., Nikiforova, A., Stepichev, A., Kuznetsova, A., Ronkin, M., Borisov, V., Bogachev, A., Korotkich, S., Constable, P. A., & Maier, A. (2024). OCTDL: Optical coherence tomography dataset for image-based deep learning methods. Scientific Data, 11, 365. https://doi.org/10.1038/s41597-024-03182-7
Details
Primary Language
English
Subjects
Machine Learning (Other)
Journal Section
Research Article
Authors
Publication Date
June 30, 2026
Submission Date
April 1, 2026
Acceptance Date
June 5, 2026
Published in Issue
Year 2026 Volume: 13 Number: 2