TL;DR
TanGo is a novel framework for medical image segmentation that bridges training-time preparation and test-time adaptation. By distilling robust style priors from vision foundation models (VFMs) during training and dynamically calibrating individual image styles at inference, it effectively combats domain shift and prevents error accumulation in continuously changing clinical environments.
What Problem Does This Paper Address?
Deep learning models for medical image segmentation often perform poorly when deployed in the real world. A model trained on prostate or retinal scans from one hospital frequently fails at another due to "domain shifts" caused by different scanner manufacturers, imaging protocols, or patient demographics.
To fix this on the fly, researchers use Continual Test-Time Adaptation (CTTA), which updates the model using unlabeled data as it arrives during deployment. However, current CTTA methods face two major hurdles:
- Brittle Source Models: The initial model is often heavily overfitted to the source hospital's data, making its features unstable anchors for adaptation.
- Error Accumulation: In dynamic, continuously changing environments, small prediction errors snowball over time, leading the model to completely forget its original training (catastrophic forgetting).
Methods
TanGo breaks the problem into a two-stage paradigm: Distribution-wise Consistency Learning during training, and Instance-wise Style Adaptive Calibration during testing.
1. Training Phase: Foundation-Guided Pre-adaptation
Instead of training a standard segmentation model, TanGo leverages a frozen Vision Foundation Model (VFM), such as SAM or DINOv2, which already possesses massive, generalized visual knowledge.
- Frequency Aware Prior Injection (FAFPI): Using a 2D Fast Fourier Transform (FFT), TanGo extracts low-frequency amplitude components (which represent image style) from the VFM and injects them into the specialist model.
- Consistency Training: The model is forced to output identical semantic predictions for both the original source images and the style-perturbed images via a bidirectional consistency loss ($L_{FCL}$). This bakes a broad, domain-harmonized feature space directly into the source model before it ever encounters a test image.
2. Testing Phase: Dynamic Style Calibration
At test time, the model encounters completely unseen target domains.
- Learnable Instance Aware Decorator (LID): Instead of using a one-size-fits-all prompt, a lightweight network dynamically alters each individual test image to shift its style back toward the familiar, enhanced source distribution.
- Source Knowledge Anchored Recalibration (SKAR): To ensure the decorator doesn't generate unrealistic or corrupted images, TanGo applies three joint constraints: a distributional loss ($L_{sad}$) using normalized Gram matrices to align styles, a semantic loss ($L_{sas}$) to preserve anatomy, and an entropy minimization loss ($L_{ent}$) to reduce prediction uncertainty.
Datasets
The authors validated TanGo on two challenging medical image segmentation tasks across multiple distinct datasets:
- Fundus (Optic Disc/Optic Cup Segmentation): Evaluated across 5 public datasets representing different medical centers: RIM-ONE-r3, REFUGE, ORIGA, REFUGE-Validation/Test, and Drishti-GS.
- Polyp Segmentation: Evaluated across 4 widely used colonoscopy datasets: BKAI-IGH-NeoPolyp, CVC-ClinicDB, ETIS-LaribPolypDB, and Kvasir-Seg.
Key Insights and Ideas
- Style is Low-Frequency: The core insight leveraging the Fourier transform is that an image's clinical/anatomical structure resides in its high frequencies, while its domain style (scanner type, lighting) resides in its low frequencies. Manipulating only the low frequencies allows the model to simulate domain shifts safely.
- Instance-Specific Adaptation Matters: Standard test-time adaptation methods apply the same prompt or statistical correction to an entire batch of data. TanGo recognizes that medical images have high intra-domain variability, meaning each individual image deserves its own custom style decoration.
- VFMs as Generalization Anchors: Rather than fine-tuning massive foundation models (which is computationally expensive at inference), TanGo uses the VFM purely as a teacher during training to build a resilient, lightweight specialist model.
Key Results
TanGo achieved state-of-the-art performance across both benchmarks, significantly outperforming existing TTA and CTTA methods:
- Fundus Segmentation: TanGo achieved an average Dice Similarity Coefficient (DSC) of 85.23%, outperforming the second-best method (GraTa) by 10.91% and the non-adapted baseline by 19.37%.
- Polyp Segmentation: TanGo reached an average DSC of 83.70%, outperforming the prominent VPTTA method by 3.24%.
As shown in the t-SNE visualizations, TanGo drastically reduces the gaps between different hospitals (domains) while forming tight, distinct clusters for different anatomical structures (categories), proving its superior feature robustness.
Limitations and Future Work
Not discussed in the paper.
Summary updated