Visual Prompt Selection for In-Context Learning Segmentation

Wei Suo, Lanqing Lai, Mengyang Sun, Hanwang Zhang, Peng Wang +1 more
2/14/2026

No official code found. Best implementation: LanqingL/SCS (14 stars, last commit 2024-12-13).

Abstract

As a fundamental and extensively studied task in computer vision, image segmentation aims to locate and identify different semantic concepts at the pixel level. Recently, inspired by In-Context Learning (ICL), several generalist segmentation frameworks have been proposed, providing a promising paradigm for segmenting specific objects. However, existing works mostly ignore the value of visual prompts or simply apply similarity sorting to select contextual examples. In this paper, we focus on rethinking and improving the example selection strategy. By comprehensive comparisons, we first demonstrate that ICL-based segmentation models are sensitive to different contexts. Furthermore, empirical evidence indicates that the diversity of contextual prompts plays a crucial role in guiding segmentation. Based on the above insights, we propose a new stepwise context search method. Different from previous works, we construct a small yet rich candidate pool and adaptively search the well-matched contexts. More importantly, this method effectively reduces the annotation cost by compacting the search space. Extensive experiments show that our method is an effective strategy for selecting examples and enhancing segmentation performance.

View on arXivView PDF

Code Implementations(1)

LanqingL/SCSCommunity100%

"Visual Prompt Selection for In-Context Learning Segmentation Framework"

141PythonJul 13, 20241 years ago

Similar Papers

Cite this paper

@article{suo2026visual,
  title  = {Visual Prompt Selection for In-Context Learning Segmentation},
  author = {Wei Suo and Lanqing Lai and Mengyang Sun and Hanwang Zhang and Peng Wang and Yanning Zhang},
  year   = {2026},
  eprint = {2407.10233},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2407.10233},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.10233.svg)](https://codeofpaper.com/paper/2407.10233)

Discussion