PR-MaGIC: Prompt Refinement Via Mask Decoder Gradient Flow For In-Context Segmentation
Not on the map. Why?
Abstract (arXiv)
Visual Foundation Models (VFMs) such as the Segment Anything Model (SAM) have significantly advanced broad use of image segmentation. However, SAM and its variants necessitate substantial manual effort for prompt generation and additional training for specific applications. Recent approaches address these limitations by integrating SAM into in-context (one/few shot) segmentation, enabling auto-prompting through semantic alignment between query and support images. Despite these efforts, they still generate sub-optimal prompts that degrade segmentation quality due to visual inconsistencies between support and query images. To tackle this limitation, we introduce PR-MaGIC (Prompt Refinement via Mask Decoder Gradient Flow for In-Context Segmentation), a training-free test-time framework that refines prompts via gradient flow derived from SAM's mask decoder. PR-MaGIC seamlessly integrates into in-context segmentation frameworks, being theoretically grounded yet practically stabilized through a simple top-1 selection strategy that ensures robust performance across samples. Extensive evaluations demonstrate that PR-MaGIC consistently improves segmentation quality across various benchmarks, effectively mitigating inadequate prompts without requiring additional training or architectural modifications.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 24 of its 31 references that are in the map. First posted on arXiv 13 Apr 2026.
Builds on
24 of 31 references.
References · 24
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2020End-to-End Object Detection with Transformerscited by 7,384
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2021Per-Pixel Classification is Not All You Need for Semantic Segmentationcited by 1,148
- 2021Segmenter: Transformer for Semantic Segmentationcited by 855
- 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 837
- 2023Medical SAM Adapter: Adapting Segment Anything Model for Medical Image Segmentationcited by 485
- 2023Segment Anything in High Qualitycited by 373
- 2023Faster Segment Anything: Towards Lightweight SAM for Mobile Applicationscited by 345
12 more
- 2017One-Shot Learning for Semantic Segmentationcited by 337
- 2023Personalize Segment Anything Model with One Shotcited by 250
- 2014Detect What You Can: Detecting and Representing Objects using Holistic Models and Body Partscited by 230
- 2019Feature Weighting and Boosting for Few-Shot Segmentationcited by 189
- 2019FSS-1000: A 1000-Class Dataset for Few-Shot Segmentationcited by 160
- 2023PACO: Parts and Attributes of Common Objectscited by 146
- 2023Matcher: Segment Anything with One Shot Using All-Purpose Feature Matchingcited by 142
- 2022Cost Aggregation with 4D Convolutional Swin Transformer for Few-Shot Segmentationcited by 114
- 2022Highly Accurate Dichotomous Image Segmentationcited by 110
- 2024VRP-SAM: SAM with Visual Reference Promptcited by 75
- 2022Feature-Proxy Transformer for Few-Shot Segmentationcited by 58
- 2020Refining Deep Generative Models via Discriminator Gradient Flowcited by 45
Built on by
Not cited yet.