Few-shot Semantic Segmentation with Self-supervision from Pseudo-classes

Yiwen Li, Gratianus Wesley Putra Data, Yunguan Fu, Yipeng Hu, Victor Adrian Prisacariu

Introduction

Semantic segmentation typically demands extensive, pixel-level annotations, which are costly and time-consuming to produce. Few-shot Semantic Segmentation (FSS) aims to alleviate this by enabling models to segment novel "target" classes using only a few labeled examples, known as the support set. However, a significant bottleneck in current FSS models is their performance degradation when query images contain multiple object categories.

Most existing FSS methods treat the segmentation task as a binary classification problem: pixels are either part of the "target" class or the "background." This oversimplification is problematic. For instance, if a target "cat" is sitting on a "sofa," the model treats the sofa no differently than the floor or the sky. This lack of granularity prevents the model from learning a discriminative feature space, causing performance to drop sharply as the number of non-target classes in an image increases.

Methodology: Learning from the Background

To address this, the authors propose a self-supervised training strategy that teaches the model that the "background" is not just empty space but a collection of distinct semantic entities. This is achieved by adding a self-supervised (pseudo-class) pathway to the standard FSS training process.

The Standard Pathway

In the standard supervised pathway, the model processes a support image/mask pair and a query image. Features are extracted via a shared backbone and specialized heads, then compared to predict the target class mask in the query image.

The standard few-shot semantic segmentation architecture used as a baseline.

The Pseudo-class Pathway

The core innovation is the generation of "pseudo-classes" from the background of the query image itself. This process involves several steps:

  1. Superpixel Generation: The query image is partitioned into coherent clusters of pixels called superpixels using the Felzenszwalb algorithm.
  2. Refinement: Superpixels overlapping with the ground-truth target class are removed to ensure the pseudo-class represents the background.
  3. Pseudo-class Selection: An activation score is calculated for the remaining superpixels. One is randomly selected from the "top-5" most active superpixels to serve as a pseudo-class.
  4. Self-supervised Task: The model is then tasked with segmenting this pseudo-class from the rest of the image. In this pathway, the image effectively acts as its own support and query.
The process of generating pseudo-classes: (a) original image, (b) superpixel segmentation, (c) background regions after masking the target, and (d) the resulting pseudo-class mask.

By forcing the model to distinguish arbitrary pseudo-classes from the rest of the background, it learns to recognize the structural and semantic diversity within the non-target regions.

Experimental Evaluation

The approach was evaluated on two major benchmarks: PASCAL-5i (a subset of PASCAL VOC 2012) and COCO-20i (a more complex dataset based on MS COCO). Both use a four-fold cross-validation setup where the model is tested on classes never seen during training.

Key Results and Insights

The proposed "SS-" (Self-Supervised) versions of existing models showed consistent improvements:

  • Performance Gains: On PASCAL-5i, the method improved the state-of-the-art PFENet by 2.5% in 1-shot and 6.7% in 5-shot tasks. On COCO, improvements reached 5.1% (1-shot) and 4.4% (5-shot).
  • Robustness to Complexity: The method significantly mitigated the performance decay typically seen in "busy" images. While baseline models often struggle when multiple objects are present, the pseudo-class supervision maintains a more discriminative feature space.
  • Feature Disentanglement: t-SNE visualizations confirmed that the self-supervised task helps "disentangle" the feature space, creating more distinct clusters for different semantic categories compared to the baseline.
  • Versatility: The strategy proved to be architecture-agnostic, providing boosts across different backbones (VGG-16, ResNet-50) and FSS frameworks (PFENet, PANet).

Conclusion and Future Work

This research demonstrates that the unlabeled "background" in segmentation datasets is a goldmine of structural information. By asking the model to identify pseudo-classes within these regions, it develops a more nuanced understanding of the visual world without requiring additional manual labels.

Current limitations include a reliance on low-level superpixel algorithms, which may not always align perfectly with semantic boundaries. Future work could explore using higher-level features to define pseudo-classes, potentially improving the model's ability to handle complex intra-class variations like lighting and color changes.

Summary updated

BibTeX
@inproceedings{li2021few,
  author = {Yiwen Li and Gratianus Wesley Putra Data and Yunguan Fu and Yipeng Hu and Victor Adrian Prisacariu},
  title = {{Few-shot Semantic Segmentation with Self-supervision from Pseudo-classes}},
  booktitle = {BMVC},
  year = {2021},
  url = {https://openreview.net/forum?id=retE_G7SJMv},
}
Figure