NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Activating the Discriminability of Novel Classes for Few-shot Segmentation

Dianwen Mei, Wei Zhuo, Jiandong Tian, Guangming Lu, Wenjie Pei · DOI

Abstract

Few-shot segmentation (FSS) is a challenging computer vision task that requires models to segment novel object categories using only a few annotated support images. Current approaches often suffer from two critical issues: the suppression of novel classes during training—where they are treated as background—and a significant semantic gap between the support and query images due to variations in pose, lighting, and context. This paper introduces a novel framework comprising two main components: Semantic-Preserving Feature Learning (SPFL) and a Self-Refined Online Foreground-Background (SROFB) classifier. SPFL utilizes unsupervised region proposals and hierarchical clustering to learn discriminative features for latent objects within the background during the base training phase. SROFB provides a mechanism for online adaptation, training a lightweight classifier on the fly that refines itself using high-confidence pixels from the query image. Our method achieves state-of-the-art results on the PASCAL-5i and COCO-20i benchmarks, highlighting the importance of background discriminability and online adaptation.

Introduction

The goal of few-shot segmentation is to generalize from a set of "base" classes with abundant data to "novel" classes with very few examples. Despite recent progress, two major hurdles persist. First, Novel Class Suppression: during standard supervised training on base classes, any pixel not belonging to a base class is labeled as background. This teaches the model to ignore potential novel classes, effectively "killing" their discriminability before they are even encountered. Second, the Semantic Gap: a single support image often fails to capture the full intra-class variation. For instance, a side-view prototype of a dog may not match a query image showing a dog from the front or in a different environment.

Methodology

To address these challenges, we propose a two-stage solution designed to "activate" the discriminability of novel classes.

Overview of the proposed SPFL and SROFB modules.

Semantic-Preserving Feature Learning (SPFL)

SPFL aims to prevent the model from treating the background as a monolithic, uninformative entity. Instead, it treats the background as a "treasure trove" of latent semantic information.

  1. Unsupervised Discovery: We employ a region segmentation tool (e.g., MCG) to identify object-like blobs in the background of training images.
  2. Hierarchical Clustering: These discovered blobs are clustered into "hierarchical semantic prototypes." This hierarchy ranges from fine-grained parts to broader semantic categories, capturing a wide spectrum of visual features.
  3. Pseudo-Labeling: During training, the model is tasked with a pretext goal: classifying every pixel into one of these discovered clusters. This auxiliary loss forces the feature encoder to learn discriminative features for all potential objects in the scene, ensuring that novel classes are not suppressed.

Self-Refined Online Foreground-Background Classifier (SROFB)

Rather than relying on a static prototype matching scheme, SROFB treats the final segmentation as a mini-learning task performed during inference.

  • Online Adaptation: For each new query, we train a lightweight binary classifier (typically a two-layer MLP) specifically for the current task.
  • Self-Refinement: The classifier performs an initial "rough" pass on the query image to identify high-confidence foreground and background pixels. These pixels are then used as additional training data to refine the classifier. This allows the model to adapt to the specific visual characteristics (lighting, pose, context) of the query image, effectively bridging the semantic gap.

Experimental Setup

We evaluated our model on two standard FSS benchmarks: PASCAL-5i and COCO-20i. PASCAL-5i consists of 20 categories across four splits, while COCO-20i is a more complex dataset with 80 categories and cluttered scenes. The model's performance is measured using the mean Intersection over Union (mIoU) metric across different cross-validation folds.

Results and Discussion

Our method consistently outperforms previous leaders such as MLC and PFENet across both datasets.

Performance comparison on the PASCAL-5i dataset.

As shown in the table above, on PASCAL-5i with a ResNet-50 backbone, we achieved a mean mIoU of 63.7% for 1-shot tasks, representing a 1.6% improvement over the previous best. Furthermore, our model exhibits excellent scalability; as the number of support images increases (5-shot), the performance gain is more pronounced because the SROFB classifier has more data to optimize its parameters. Qualitative results confirm that the model succeeds in "hard" cases—like segmenting a boat from a distance when the support image is a close-up—where traditional matching methods fail.

Conclusion

This paper demonstrates that the "background" in training data is not merely noise but contains vital information for future novel classes. By preserving these semantics through SPFL and employing an online refinement strategy with SROFB, we can significantly enhance the discriminability and adaptability of FSS models. While the online training phase introduces some computational overhead, the use of lightweight MLPs keeps the system efficient for practical use. Future work will focus on improving the selection of high-confidence pixels for refinement and reducing the dependency on external unsupervised proposal generators.

Summary updated

BibTeX
@misc{mei2022activating,
  author = {Dianwen Mei and Wei Zhuo and Jiandong Tian and Guangming Lu and Wenjie Pei},
  title = {{Activating the Discriminability of Novel Classes for Few-shot Segmentation}},
  year = {2022},
  eprint = {2212.01131},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.01131},
}
Figure