cs.CVMar 29, 2026

RAP: Retrieve, Adapt, and Prompt-Fit for Training-Free Few-Shot Medical Image Segmentation

Authors: Zhihao Mao, Bangpu Chen

Organizations: School of Computer Science, China University of Geosciences, Wuhan, China

Abstract

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

Explore similar work

CardsList
  1. Focus on Background: Exploring SAM's Potential in Few-shot Medical Image Segmentation with Background-centric Prompting

    Mar 22, 2026Yuntian Bo, Yazhou Zhu, Piotr Koniusz +1Few-Shot Medical Image SegmentationPromptable Image Segmentation

  2. GazeRefine: Expert Gaze as a Test-Time Prompt for Training-Free Medical Image Segmentation

    Sep 1, 2026Mohammed Oussama Benyahia, Marouane Tliba, Mohamed Amine Kerkouri +10Interactive Medical Image SegmentationImage Segmentation