Table of Contents
Fetching ...

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

Mir Rayat Imtiaz Hossain, Mennatullah Siam, Leonid Sigal, James J. Little

TL;DR

This work tackles generalized few-shot segmentation (GFSS) by introducing a visual prompting framework that uses a multi-scale transformer decoder with learnable prompts. A uni-directional novel-to-base causal attention mechanism and a transductive prompt-tuning regime enable robust learning for novel classes while preserving base-class performance, without requiring test-time optimization in the inductive setting. The approach achieves state-of-the-art GFSS results on COCO-$20^i$ and Pascal-$5^i$, with transductive fine-tuning offering additional gains, and demonstrates strong cross-dataset robustness and efficiency advantages. Overall, the method provides a practical, prompt-based alternative to meta-learning for dense prediction, enabling effective few-shot segmentation across diverse scales and contexts.

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 categories. 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 mechanism 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-$20^i$ and Pascal-$5^i$, 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.

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

TL;DR

This work tackles generalized few-shot segmentation (GFSS) by introducing a visual prompting framework that uses a multi-scale transformer decoder with learnable prompts. A uni-directional novel-to-base causal attention mechanism and a transductive prompt-tuning regime enable robust learning for novel classes while preserving base-class performance, without requiring test-time optimization in the inductive setting. The approach achieves state-of-the-art GFSS results on COCO- and Pascal-, with transductive fine-tuning offering additional gains, and demonstrates strong cross-dataset robustness and efficiency advantages. Overall, the method provides a practical, prompt-based alternative to meta-learning for dense prediction, enabling effective few-shot segmentation across diverse scales and contexts.

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 categories. 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 mechanism 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- and Pascal-, 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.
Paper Structure (26 sections, 9 equations, 11 figures, 7 tables)

This paper contains 26 sections, 9 equations, 11 figures, 7 tables.

Figures (11)

  • Figure 1: Overview of the Proposed Approach. Prompting multi-scale transformer decoders for generalized few-shot segmentation. Our approach is a simple approach that allows test-time transductive prompt tuning (see red arrows).
  • Figure 2: Detailed architecture of our proposed visual prompting of multiscale transformer decoder. Our design initializes the novel visual prompts using the support set. This is followed by consecutive novel-to-base causal attention, $\mathcal{CA}$, and prompt-to-target features cross attention, $\mathcal{C}$, across scales. Note that causal attention uses shared weights across the scales and decoder layers. Our design allows for transductive fine-tuning of the visual prompts leveraging the unlabelled test image.
  • Figure 3: Confusion Matrix for: (left) model with Novel-to-Base Causal Attention; (right) model without Novel-to-Base Causal Attention. Note that Novel-to-Base Causal Attention reduces confusion between novel and base categories (bottom-left block).
  • Figure 4: TSNE visualization of the learned base and novel prompt features: (left) with Novel-to-Base Causal Attention; (right) without Novel-to-Base Casual Attention.
  • Figure 5: Qualitative Results for 1-shot on Pascal-$5^i$. The leftomost two columns show image and ground truth mask; (Third) Baseline without causal attention; (Fourth); Ours in inductive setting; (Fifth) Ours in transductive setting; (Last) DIaM hajimiri2023strong. Last row illustrates a failure.
  • ...and 6 more figures