Generalized Few-Shot Semantic Segmentation

Zhuotao Tian, Xin Lai, Li Jiang, Michelle Shu, Hengshuang Zhao, Jiaya JiaCVPR 2020 · DOI

Introduction: Beyond Traditional Few-Shot Segmentation

Traditional Few-Shot Segmentation (FS-Seg) aims to segment novel classes in a query image given only a few annotated support examples. While successful in controlled settings, FS-Seg suffers from two critical limitations that hinder real-world deployment. First, it assumes prior knowledge of which novel classes are present in the query image. Second, it typically ignores "base" classes—categories the model was extensively trained on—during the evaluation of novel classes.

To address these shortcomings, this paper introduces Generalized Few-Shot Semantic Segmentation (GFS-Seg). In this more realistic setting, a model must simultaneously identify and segment all possible classes—both the well-learned base classes and the newly registered novel classes—in a single pass, without prior knowledge of the query image's content.

Comparison between classic FS-Seg (a) and the proposed GFS-Seg framework (b).

Context-Aware Prototype Learning (CAPL)

The authors propose a baseline for GFS-Seg that utilizes Prototype Learning. In this approach, feature vectors (prototypes) are extracted from novel support images and integrated into a unified classifier alongside base class weights. However, simple concatenation often fails to capture the complex relationships between objects.

To enhance this, the Context-Aware Prototype Learning (CAPL) framework is introduced. CAPL is a plug-and-play method designed to leverage contextual information through two primary modules:

  1. Support Contextual Enrichment (SCE): Recognizing that novel objects often co-occur with familiar ones, SCE uses the presence of base classes within novel support images to update prototypes. This allows the model to "borrow" representational strength from well-known categories to better define new ones.
  2. Dynamic Query Contextual Enrichment (DQCE): Unlike static classifiers, DQCE adapts the classifier's weights dynamically based on the specific content of the query image. By mining contextual hints from a preliminary prediction of the query scene, the model can better distinguish between competing classes in varying environments.
The CAPL architecture, featuring Support Contextual Enrichment (SCE) and Dynamic Query Contextual Enrichment (DQCE) modules to refine the final classifier.

Experimental Evaluation

The proposed method was evaluated on two benchmark datasets: Pascal-5i (20 categories) and COCO-20i (80 categories). The researchers compared CAPL against several state-of-the-art FS-Seg models adapted for the generalized setting.

Key Results

  • Performance Gains: On Pascal-5i (1-shot), the CAPL-enhanced model achieved a total mIoU of 54.38%, a significant improvement over the 49.54% baseline and vastly outperforming adapted traditional models like PANet (26.97%).
  • Robustness: CAPL remains highly competitive even in traditional FS-Seg tasks, proving that its contextual enhancements do not come at the cost of specialized performance.
  • Efficiency: As a plug-and-play module that modifies only the registration and inference logic, CAPL maintains inference speeds comparable to standard base models.

Insights and Future Directions

The study highlights that top-tier FS-Seg models often struggle when forced to handle base and novel classes simultaneously. By leveraging contextual co-occurrence and dynamic adaptation, CAPL provides a robust path forward.

However, challenges remain. There is still a notable performance gap between base and novel class accuracy. Furthermore, while CAPL excels at semantic context, it does not explicitly model dense spatial correlations (pixel-to-pixel reasoning), which remains a promising area for future integration. Combining contextual cues with advanced spatial reasoning, as seen in models like HSNet, could further bridge the gap toward truly generalized machine vision.

Summary updated

BibTeX
@inproceedings{tian2020generalized,
  author = {Zhuotao Tian and Xin Lai and Li Jiang and Michelle Shu and Hengshuang Zhao and Jiaya Jia},
  title = {{Generalized Few-Shot Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr52688.2022.01127},
}
Figure