  In this paper, we propose a novel approach to enhance medical image
segmentation during test time. Instead of employing hand-crafted transforms or
functions on the input test image to create multiple views for test-time
augmentation, we advocate for the utilization of an advanced domain-fine-tuned
generative model (GM), e.g., stable diffusion (SD), for test-time augmentation.
Given that the GM has been trained to comprehend and encapsulate comprehensive
domain data knowledge, it is superior than segmentation models in terms of
representing the data characteristics and distribution. Hence, by integrating
the GM into test-time augmentation, we can effectively generate multiple views
of a given test sample, aligning with the content and appearance
characteristics of the sample and the related local data distribution. This
approach renders the augmentation process more adaptable and resilient compared
to conventional handcrafted transforms. Comprehensive experiments conducted
across three medical image segmentation tasks (nine datasets) demonstrate the
efficacy and versatility of the proposed TTGA in enhancing segmentation
outcomes. Moreover, TTGA significantly improves pixel-wise error estimation,
thereby facilitating the deployment of a more reliable segmentation system.
Code will be released at: https://github.com/maxiao0234/TTGA.
