Visual Prompting for Generalized Few-shot Segmentation: A Multi-scale Approach

Mir Rayat Imtiaz Hossain, Mennatullah Siam, Leonid Sigal, James J. Little
2/9/2026

No official code found. Best implementation: rayat137/VisualPromptGFSS (29 stars, last commit 2024-12-03).

Abstract

The emergence of attention-based transformer models has led to their extensive use in various tasks, due to their superior generalization and transfer properties. Recent research has demonstrated that such models, when prompted appropriately, are excellent for few-shot inference. However, such techniques are under-explored for dense prediction tasks like semantic segmentation. In this work, we examine the effectiveness of prompting a transformer-decoder with learned visual prompts for the generalized few-shot segmentation (GFSS) task. Our goal is to achieve strong performance not only on novel categories with limited examples, but also to retain performance on base cat-egories. We propose an approach to learn visual prompts with limited examples. These learned visual prompts are used to prompt a multiscale transformer decoder to facilitate accurate dense predictions. Additionally, we introduce a unidirectional causal attention mechanism between the novel prompts, learned with limited examples, and the base prompts, learned with abundant data. This mecha-nism enriches the novel prompts without deteriorating the base class performance. Overall, this form of prompting helps us achieve state-of-the-art performance for GFSS on two different benchmark datasets: COCO-20i and Pascal-Si, without the need for test-time optimization (or transduction). Furthermore, test-time optimization leveraging unlabelled test data can be used to improve the prompts, which we refer to as transductive prompt tuning.

View on arXivView PDF

Code Implementations(1)

Source code for Visual Prompting for Generalized Few-shot Segmentation: A Multi-scale Approach (CVPR 2024)

292C++, CudaMay 25, 20241 years ago

Similar Papers

Cite this paper

@article{hossain2026visual,
  title  = {Visual Prompting for Generalized Few-shot Segmentation: A Multi-scale Approach},
  author = {Mir Rayat Imtiaz Hossain and Mennatullah Siam and Leonid Sigal and James J. Little},
  year   = {2026},
  eprint = {2404.11732},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2404.11732},
  journal = {CVPR 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/2404.11732.svg)](https://codeofpaper.com/paper/2404.11732)

Discussion