Abstract
Domain Generalization (DG) aims to reduce domain shifts between domains to achieve promising performance on the unseen target domain, which has been widely practiced in medical image segmentation. Single-source domain generalization (SDG) is the most challenging setting that trains on only one source domain. Although existing methods have made considerable progress on SDG of medical image segmentation, the performances are still far from the applicable standards when faced with a relatively large domain shift. In this paper, we leverage the Segment Anything Model (SAM) to SDG to greatly improve the ability of generalization. Specifically, we introduce a parallel framework, the source images are sent into the SAM module and normal segmentation module respectively. To reduce the calculation resources, we apply a merging strategy before sending images to the SAM module. We extract the bounding boxes from the segmentation module and send the refined version as prompts to the SAM module. We evaluate our model on a classic DG dataset and achieve competitive results compared to other state-of-the-art DG methods. Furthermore, We conducted a series of ablation experiments to prove the effectiveness of the proposed method.
Introduction
Medical image segmentation, such as identifying organs in MRI scans, is frequently hampered by domain shift—the variation in image appearance caused by different equipment manufacturers, models, and hospital protocols. The most rigorous test of a model's robustness is Single-Source Domain Generalization (SDG), where a system trained on data from a single site must generalize to multiple unseen environments.
While the Segment Anything Model (SAM) has emerged as a powerful foundation model for general segmentation, it lacks specific medical domain knowledge and typically requires manual prompting (e.g., bounding boxes), making it difficult to integrate into automated clinical workflows. This research introduces a novel framework that adapts SAM for SDG by using a traditional segmentation network to "auto-prompt" a fine-tuned SAM decoder, achieving significant performance gains.
Proposed Framework
The authors propose a parallel architecture that automates the prompting process and refines SAM’s output for medical contexts. The framework consists of two primary sections: a Normal Segmentation Section and a Segment Anything Section.
Auto-Prompting and Refinement
- Coarse Predictor: A standard ResNet-based segmentation network is trained on the source domain to generate an initial "coarse" mask.
- Mask-Filtering: To handle noise in the coarse predictions, a Breadth-First Search (BFS) algorithm identifies the largest connected component, discarding artifacts. This cleaned mask is used to generate a refined bounding box.
- SAM Fine-Tuning: To maintain SAM's generalization while adding medical expertise, the authors fine-tune only the lightweight mask decoder, keeping the heavy image encoder frozen.
Efficiency via Image Merging
SAM natively processes 1024x1024 images. To optimize computational resources, the framework employs a merging strategy where four 512x512 medical images are stitched into a single 1024x1024 grid. This allows the model to process four images in a single pass through the heavy image encoder, significantly reducing inference time.
Experimental Results
The model was evaluated on the Prostate dataset, a benchmark comprising T2-weighted MRI images from six different sites (A-F). The model was trained on one domain and tested on the remaining five to measure generalization.
As shown in the results table, the proposed method achieved a new state-of-the-art (SOTA) with an average Dice score of 79.54%. This represents an 8.12% absolute improvement over the previous best-performing method (ACSDG). Notably, the framework demonstrated robust performance across all six domains, whereas previous methods often showed high variance between different sites.
Discussion and Conclusion
The success of this framework hinges on the "auto-prompting" insight: a primary model does not need to be perfect; it only needs to provide a "good enough" bounding box to guide SAM. By combining this with selective fine-tuning of the mask decoder, the authors prevented "catastrophic forgetting," allowing the model to retain general shape recognition while specializing in medical textures.
While the system currently relies on the initial ResNet backbone's ability to locate the target organ, future work will focus on further reducing computational overhead and expanding the framework to other medical tasks, such as heart or lesion segmentation, to verify its universality across diverse clinical applications.
Summary updated