Few-shot medical image segmentation (FSMIS) has achieved notable progress, yet most existing methods mainly rely on semantic correspondences from scarce annotations while under-utilizing a key property of medical imagery: anatomical targets exhibit repeatable high-frequency morphology (e.g., boundary geometry and spatial layout) across patients and acquisitions. We propose RAP, a training-free framework that retrieves, adapts, and prompts Segment Anything Model 2 (SAM2) for FSMIS. First, RAP retrieves morphologically compatible supports from an archive using DINOv3 features to reduce brittleness in single-support choice. Second, it adapts the retrieved support mask to the query by fitting boundary-aware structural cues, yielding an anatomy-consistent pre-mask under domain shifts. Third, RAP converts the pre-mask into prompts by sampling positive points via Voronoi partitioning and negative points via sector-based sampling, and feeds them into SAM2 for final refinement without any fine-tuning. Extensive experiments on multiple medical segmentation benchmarks show that RAP consistently surpasses prior FSMIS baselines and achieves state-of-the-art performance. Overall, RAP demonstrates that explicit structural fitting combined with retrieval-augmented prompting offers a simple and effective route to robust training-free few-shot medical segmentation.
Figures & tables
Fig. 1 : Overview of the proposed RAP framework. Given a query image, we first retrieve the most similar support from a database using DINOv3 features (Retrieve). Then, we adapt the support shape to the query through oriented chamfer matching with semantic gating (Adapt). Finally, we generate Voronoi-based point prompts and feed them to SAM2 for segmentation (Prompt-Fit).
Fig. 2 : Frequency-domain style adaptation via wavelet transform. The support’s low-frequency (LL) subband is replaced with the query’s LL to align global appearance while preserving high-frequency edge details.
Method
Abd-MRI
Abd-CT
Liver
LK
RK
Spleen
Mean
Liver
LK
RK
Spleen
Mean
PANet
39.24
26.47
37.35
26.79
32.46
40.29
30.61
26.66
30.21
31.94
SSL-ALPNet
70.74
55.49
67.43
58.39
63.01
71.38
34.48
32.32
51.67
47.46
RPT
49.22
42.45
47.14
48.84
46.91
65.87
40.07
35.97
51.22
48.28
PATNet
57.01
50.23
53.01
51.63
52.97
75.94
46.62
42.68
63.94
57.29
IFA
50.22
35.99
34.00
42.21
40.61
46.62
25.13
26.56
24.85
30.79
TABLE I : Quantitative comparison (Dice %) on Abd-MRI and Abd-CT datasets.
Method
LV-BP
LV-MYO
RV
Mean
PANet
51.42
25.75
25.75
36.66
SSL-ALPNet
83.47
22.73
66.21
57.47
RPT
60.84
42.28
57.30
53.47
PATNet
65.35
50.63
68.34
61.44
IFA
50.43
31.32
30.74
37.50
FAMNet
86.64
51.82
76.26
71.58
TABLE II : Quantitative comparison (Dice %) on Card-MRI dataset.
OCM
SG
VP
Mean Dice (%)
78.29
✓
80.17
✓
✓
81.02
✓
✓
✓
81.87
TABLE III : Ablation study on Card-MRI (RV structure). OCM: Oriented Chamfer Matching, SG: Semantic Gating, VP: Voronoi-based Prompts.
Fig. 3 : Qualitative results on Card-MRI for three cardiac structures. Our method produces more accurate boundaries, especially for the thin myocardium (LV-MYO).
Few-shot medical image segmentation (FS-MIS) aims to segment novel regions of interest (ROIs) from a few annotated support examples. Despite rapid progress, existing FS-MIS solutions span diverse paradigms but are evaluated under inconsistent settings, leaving their relative effectiveness unclear. We introduce FAME, a unified benchmark for evaluating FS-MIS solutions, covering specialists, SAM-based methods, CLIP-based methods, and MLLM-based methods. FAME contains 14,958 test samples across 7 anatomical sites, 9 imaging modalities, and 14 ROI categories, and evaluates models under zero-shot and ten-shot settings with additional assessment of target-absence recognition and generalization under covariate and semantic shifts. Our evaluation reveals several findings. First, effective few-shot segmentation depends on how models exploit support examples: direct visual adaptation generally outperforms prompt-based strategies. Second, increasing support examples improves performance only when models can effectively utilize them. Third, semantic transfer remains substantially more challenging than imaging-domain adaptation, and strong localization ability does not necessarily imply reliable target-absence recognition. We hope FAME provides a comprehensive understanding of current FS-MIS solutions and facilitates the development of more effective and reliable few-shot medical segmentation methods.
Conventional few-shot medical image segmentation (FSMIS) approaches face performance bottlenecks that hinder broader clinical applicability. Although the Segment Anything Model (SAM) exhibits strong category-agnostic segmentation capabilities, its direct application to medical images often leads to over-segmentation due to ambiguous anatomical boundaries. In this paper, we reformulate SAM-based FSMIS as a prompt localization task and propose FoB (Focus on Background), a background-centric prompt generator that provides accurate background prompts to constrain SAM's over-segmentation. Specifically, FoB bridges the gap between segmentation and prompt localization by category-agnostic generation of support background prompts and localizing them directly in the query image. To address the challenge of prompt localization for novel categories, FoB models rich contextual information to capture foreground-background spatial dependencies. Moreover, inspired by the inherent structural patterns of background prompts in medical images, FoB models this structure as a constraint to progressively refine background prompt predictions. Experiments on three diverse medical image datasets demonstrate that FoB outperforms other baselines by large margins, achieving state-of-the-art performance on FSMIS, and exhibiting strong cross-domain generalization. Our code is available at https://github.com/primebo1/FoB_SAM.
Yuntian Bo, Yazhou Zhu, Piotr Koniusz +1
Nanjing University of Science and Technology · University of New South Wales · Data61 CSIRO
Medical image segmentation remains difficult to scale because high-performing methods typically rely on dense expert annotations and task-specific training. We introduce GazeRefine, a training-free framework that uses gaze as an inference-time prompt for zero-shot medical image segmentation. Sparse, duration-weighted fixations are converted into foreground and background priors that initialize semantic prototypes in frozen DINOv3 feature space. These prototypes are iteratively refined through foreground-background discrimination, feature-space affinity propagation, and anchoring to the initial gaze guidance, allowing segmentation to extend beyond directly fixated regions while limiting semantic drift. GazeRefine requires no segmentation masks, fine-tuning, adapters, prompt encoders, or gradient updates. We evaluate the method on gaze-annotated polyp segmentation and prostate MRI segmentation. The results show strong performance on colonoscopy images and competitive performance on prostate MRI, supporting gaze-guided prototype refinement as a promising approach for segmentation-label-efficient, human-in-the-loop medical image segmentation. Our tools and code can be found in the following repository: https://github.com/MohammedOussamaBEN/GazeRefine.git
Mohammed Oussama Benyahia, Marouane Tliba, Mohamed Amine Kerkouri +10
Université Sorbonne Paris Nord · Northwestern University · VSB-Technical University of Ostrava