FunOTTA: On-the-Fly Adaptation on Cross-Domain Fundus Image via Stable Test-time Training
Qian Zeng, Le Zhang, Yipeng Liu, Ce Zhu, Fan Zhang
TL;DR
The paper addresses domain shifts in fundus image diagnosis across devices and sites by introducing FunOTTA, a training-based test-time adaptation framework that operates online with a frozen feature extractor, a dynamic memory bank, and a prototypical ensemble. It combines a dynamic filtering mechanism, class-conditional estimation, a confidence-guided contrastive loss, and dual-level alignment to achieve stable, bias-reducing adaptation with minimal prior knowledge leakage. Empirical results on diabetic retinopathy and glaucoma benchmarks show FunOTTA outperforms a broad range of SOTA TTA methods, with strong robustness to hyperparameters and label shifts. This work enables real-time, privacy-conscious deployment of cross-domain fundus diagnosis models and points to future extensions for open-set medical imaging scenarios.
Abstract
Fundus images are essential for the early screening and detection of eye diseases. While deep learning models using fundus images have significantly advanced the diagnosis of multiple eye diseases, variations in images from different imaging devices and locations (known as domain shifts) pose challenges for deploying pre-trained models in real-world applications. To address this, we propose a novel Fundus On-the-fly Test-Time Adaptation (FunOTTA) framework that effectively generalizes a fundus image diagnosis model to unseen environments, even under strong domain shifts. FunOTTA stands out for its stable adaptation process by performing dynamic disambiguation in the memory bank while minimizing harmful prior knowledge bias. We also introduce a new training objective during adaptation that enables the classifier to incrementally adapt to target patterns with reliable class conditional estimation and consistency regularization. We compare our method with several state-of-the-art test-time adaptation (TTA) pipelines. Experiments on cross-domain fundus image benchmarks across two diseases demonstrate the superiority of the overall framework and individual components under different backbone networks. Code is available at https://github.com/Casperqian/FunOTTA.
