Papers › Self-Prompting Large Vision Models for Few-Shot Medical Image Segmentation

Self-Prompting Large Vision Models for Few-Shot Medical Image Segmentation

15 Aug 2023arXiv:2308.07624archive 2025-07-28

Qi Wu, Yuyao Zhang, Marawan Elbatel

Recent advancements in large foundation models have shown promising potential in the medical industry due to their flexible prompting capability. One such model, the Segment Anything Model (SAM), a prompt-driven segmentation model, has shown remarkable performance improvements, surpassing state-of-the-art approaches in medical image segmentation. However, existing methods primarily rely on tuning strategies that require extensive data or prior prompts tailored to the specific task, making it particularly challenging when only a limited number of data samples are available. In this paper, we propose a novel perspective on self-prompting in medical vision applications. Specifically, we harness the embedding space of SAM to prompt itself through a simple yet effective linear pixel-wise classifier. By preserving the encoding capabilities of the large model, the contextual information from its decoder, and leveraging its interactive promptability, we achieve competitive results on multiple datasets (i.e. improvement of more than 15% compared to fine-tuning the mask decoder using a few images).

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2308.07624")

Code

Syntology Ran 5 of 12 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 2 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

peteryyzhang/few-shot-self-prompt-sam officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 5 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · fixture could not drive it
3ran
7unverified

Licence: 12 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from peteryyzhang/few-shot-self-prompt-sam. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

dice_coef peteryyzhang/few-shot-self-prompt-sam/utils/utils.py official repository ran no licence file found · pointer only · 45eaa68ef8aa8826 · report
get_max_dist_point peteryyzhang/few-shot-self-prompt-sam/utils/utils.py official repository ran no licence file found · pointer only · e6afb0d7c1af79eb · report
get_rel_pos peteryyzhang/few-shot-self-prompt-sam/segment_anything/modeling/image_encoder.py official repository ran · fixture could not drive it no licence file found · pointer only · 733d7f0bedcb74c2 · report
iou_coef peteryyzhang/few-shot-self-prompt-sam/utils/utils.py official repository ran fingerprinted no licence file found · pointer only · e8f9be520fd4d382 · report
window_partition peteryyzhang/few-shot-self-prompt-sam/segment_anything/modeling/image_encoder.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 105fa08885dc36cc · report
box_xyxy_to_xywh peteryyzhang/few-shot-self-prompt-sam/segment_anything/utils/amg.py official repository unverified no licence file found · pointer only · 7069d6e0ba7c409e · report
build_sam_vit_b peteryyzhang/few-shot-self-prompt-sam/segment_anything/build_sam.py official repository unverified no licence file found · pointer only · f9bc5f31ce61cee8 · report
build_sam_vit_h peteryyzhang/few-shot-self-prompt-sam/segment_anything/build_sam.py official repository unverified no licence file found · pointer only · 6b77c1f11fff3ed6 · report
build_sam_vit_l peteryyzhang/few-shot-self-prompt-sam/segment_anything/build_sam.py official repository unverified no licence file found · pointer only · 3f8890e695469246 · report
is_box_near_crop_edge peteryyzhang/few-shot-self-prompt-sam/segment_anything/utils/amg.py official repository unverified no licence file found · pointer only · 114a3e68a54ab16c · report
mask_to_rle_pytorch peteryyzhang/few-shot-self-prompt-sam/segment_anything/utils/amg.py official repository unverified no licence file found · pointer only · d59832deec0972a0 · report
window_unpartition peteryyzhang/few-shot-self-prompt-sam/segment_anything/modeling/image_encoder.py official repository unverified no licence file found · pointer only · 27be441cc8213e52 · report

Tasks

DecoderImage SegmentationMedical Image SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SAM

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections