Each Test Image Deserves A Specific Prompt: Continual Test-Time Adaptation for 2D Medical Image Segmentation

Ziyang Chen, Yiwen Ye, Mengkang Lu, Yongsheng Pan, Yong Xia
2/14/2026

No official code found. Best implementation: Chen-Ziyang/VPTTA (87 stars, MIT, last commit 2024-12-17).

Abstract

Distribution shift widely exists in medical images acquired from different medical centres and poses a significant obstacle to deploying the pretrained semantic segmentation model in real-world applications. Test-time adaptation has proven its effectiveness in tackling the cross-domain distribution shift during inference. However, most existing methods achieve adaptation by updating the pretrained models, rendering them susceptible to error accumulation and catastrophic forgetting when encountering a series of distribution shifts (i.e., under the continual test-time adaptation setup). To overcome these challenges caused by updating the models, in this paper, we freeze the pretrained model and propose the Visual Prompt-based Test-Time Adaptation (VPTTA) method to train a specific prompt for each test image to align the statistics in the batch normalization layers. Specifically, we present the low-frequency prompt, which is lightweight with only a few parameters and can be effectively trained in a single iteration. To enhance prompt initialization, we equip VPTTA with a memory bank to benefit the current prompt from previous ones. Additionally, we design a warm-up mechanism, which mixes source and target statistics to construct warm-up statistics, thereby facilitating the training process. Extensive experiments demonstrate the superiority of our VPTTA over other state-of-the-art methods on two medical image segmentation benchmark tasks. The code and weights of pretrained source models are available at https://github.com/Chen-Ziyang/VPTTA.

View on arXivView PDF

Code Implementations(1)

Chen-Ziyang/VPTTACommunity66%
MIT

Code for [CVPR 2024] Each Test Image Deserves A Specific Prompt: Continual Test-Time Adaptation for 2D Medical Image Segmentation.

8712Shell, PythonNov 28, 20231 years agoMIT

Similar Papers

Cite this paper

@article{chen2026each,
  title  = {Each Test Image Deserves A Specific Prompt: Continual Test-Time Adaptation for 2D Medical Image Segmentation},
  author = {Ziyang Chen and Yiwen Ye and Mengkang Lu and Yongsheng Pan and Yong Xia},
  year   = {2026},
  eprint = {2311.18363},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2311.18363},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.18363.svg)](https://codeofpaper.com/paper/2311.18363)

Discussion