跳到正文
arXiv:cs.AI· Minjae Lee, Sungwoo Hur, Soojin Hwang, Won Hwa Kim·· 5 小时前

PR-MaGIC:用掩码解码器梯度流优化提示词,提升上下文分割质量

PR-MaGIC: Prompt Refinement Via Mask Decoder Gradient Flow For In-Context Segmentation

AI 导读

PR-MaGIC 是一个免训练的测试时框架,通过从 SAM 掩码解码器提取的梯度流来优化提示词,并可无缝集成到上下文分割框架中。它采用简单的 top-1 选择策略保证跨样本稳定性,在多个基准上持续提升分割质量,无需额外训练或修改架构。

正文

View PDF HTML (experimental)

Abstract: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.
Subjects: Computer Vision and Pattern Recognition (cs.CV); Artificial Intelligence (cs.AI)
Cite as: arXiv:2604.12113 [cs.CV]
  (or arXiv:2604.12113v2 [cs.CV] for this version)
  https://doi.org/10.48550/arXiv.2604.12113

arXiv-issued DOI via DataCite

Submission history

From: Minjae Lee [view email]
[v1] Mon, 13 Apr 2026 22:40:04 UTC (44,376 KB)
[v2] Tue, 13 Oct 2026 09:23:56 UTC (39,873 KB)

来源:arXiv:cs.AI · arxiv.org