On-the-Fly versus Pre-Saved Data Augmentation for Deep Learning–Based Ophthalmic Image Classification

Conference: Symposium on Data Science and Statistics (SDSS) 2026
04/29/2026: 1:15 PM - 2:45 PM CDT
Lightning 

Description

Deep learning has demonstrated strong potential for automated ophthalmic image classification; however, its effectiveness is highly dependent on the availability and diversity of training data. In the absence of augmentation, baseline models trained on limited or imbalanced datasets often exhibit restricted generalization and unstable performance. Data augmentation is therefore widely employed to mitigate data scarcity, yet the effect of augmentation implementation strategy-on-the-fly (real-time) versus pre-saved (offline)-remains insufficiently quantified in ophthalmic imaging.

This study systematically compares on-the-fly and pre-saved augmentation for deep learning–based classification of ophthalmic images using MobileNetV2. Experiments were conducted on two modalities: Optical Coherence Tomography (OCT) and retinal fundus images. Five clinically plausible transformations-rotation (±10°), translation (±10%), combined rotation–translation, Gaussian noise (σ = 0.05), and horizontal flipping-were evaluated under both strategies and against a no-augmentation baseline.

On the OCT dataset, baseline training achieved only 55% accuracy (macro F1 = 0.53). On-the-fly augmentation did not provide consistent improvements, yielding accuracies between 45% and 57%. In contrast, pre-saved augmentation produced substantial gains, with accuracies of 86% (rotation), 92% (translation), 91% (rotation–translation), 89% (Gaussian noise), and 95% (horizontal flip). For fundus images, baseline performance was higher (89% accuracy). On-the-fly augmentation further improved results, reaching up to 89% accuracy with horizontal flipping and 87% with Gaussian noise. Pre-saved augmentation yielded more modest but stable improvements, with accuracies ranging from 75% to 81%.

Overall, augmentation effectiveness is strongly dataset-dependent: pre-saved strategies favor small or imbalanced datasets, while on-the-fly augmentation benefits large, diverse collections. Across all experiments, horizontal flipping emerged as the most robust and consistently beneficial transformation.

Keywords

Ophthalmic imaging

data augmentation and optical coherence tomography (OCT)

on-the-fly augmentation

pre-saved augmentation

Deep Learning and retinal fundus images

MobileNetV2 and medical image classification. 

Presenting Author

Gifty Duah, University of Texas Rio Grande Valley

First Author

Gifty Duah, University of Texas Rio Grande Valley

CoAuthor(s)

Eric Nyarko, University of Ghana
Justice Effah, University of Texas Rio Grande Valley
Isaac Numoah, Old Dominion University

Tracks

AI and LLM Applications
Symposium on Data Science and Statistics (SDSS) 2026