Learning Meta-class Memory for Few-Shot Semantic Segmentation

Zhonghua Wu, Xiangxi Shi, Guosheng Lin, Jianfei Cai

Abstract

Few-shot semantic segmentation (FSS) aims to segment novel object classes using only a few labeled examples. Traditional methods often treat this as a class-agnostic matching problem, overlooking the shared visual primitives across different categories. We introduce MM-Net, a framework that utilizes a learnable "meta-class memory" to capture middle-level features—such as edges, shapes, and parts—common across object classes. By explicitly memorizing these "meta-classes," MM-Net achieves a significant 5.1% mIoU boost over previous state-of-the-art models on the COCO dataset.

Introduction

Few-shot semantic segmentation is a challenging task where a model must generalize to unseen classes given a small "support" set. Most existing approaches focus on comparing high-level features between support and query images. However, this ignores the fundamental reality that different object classes often share common components; for instance, birds and airplanes share wing-like structures, while chairs and people share limb-like vertical supports.

The authors define these shared middle-level features as meta-class information. Standard methods fail to leverage this "universal language" of visual shapes, limiting their ability to generalize to novel objects. MM-Net addresses this by introducing a memory bank specifically designed to store and retrieve these shared visual patterns.

Methodology

MM-Net is built around three core innovations designed to bridge the gap between base and novel classes:

Meta-class Memory Module (MMM)

The MMM is the central component of the architecture. it consists of a set of learnable embeddings (optimized at 50 units) that act as a memory bank for middle-level features. During training, these embeddings learn to recognize recurring patterns across all base classes. To ensure the memory remains diverse and doesn't collapse into redundant patterns, the authors implemented a Memory Reconstruction Loss, forcing the embeddings to be capable of reconstructing the original input features.

Activation Propagation Module (APM)

The APM utilizes the meta-class memory to generate activation maps for both support and query images. By calculating the similarity between these maps, the module "propagates" the label information from the support mask to the query image, effectively identifying regions in the query that share meta-class characteristics with the support foreground.

The MM-Net architecture highlights the Meta-class Memory Module and the Activation Propagation Module, which work together to refine query predictions.

Quality Measurement and Confidence

In $k$-shot scenarios, the Quality Measurement Module (QMM) learns to weight support images based on their relevance to the query, preventing low-quality support examples from degrading the final prediction. Additionally, a Foreground Confidence Module helps refine the final mask by estimating the likelihood of foreground pixels in the query image.

Experimental Results

MM-Net was evaluated on the PASCAL-$5^i$ and COCO benchmarks, demonstrating superior performance across the board:

  • COCO Dataset: In the 1-shot setting, MM-Net achieved 37.5% mIoU, representing a 5.1% improvement over the previous leader, PFENet. This is particularly significant given the complexity and scale of the COCO dataset.
  • PASCAL-$5^i$: The model reached 61.8% mIoU (1-shot) and 63.4% mIoU (5-shot), outperforming established methods like CANet.

Qualitative Analysis

Visualizing the memory maps reveals that individual embeddings specialize in specific visual cues, such as human heads, torso edges, or horizontal boundaries. This specialization confirms that the model successfully learns a "vocabulary" of parts that can be recombined to understand new classes.

Qualitative results showing the support input, query mask prediction, and the generated foreground confidence map across various object classes.

Discussion and Limitations

While MM-Net sets a new standard for accuracy, it introduces a trade-off in computational efficiency. The model operates at approximately 17 FPS and requires 2.4 GB of GPU memory, making it slower and more resource-intensive than PFENet (42 FPS / 1.9 GB). Future research may focus on optimizing the memory architecture for real-time applications and exploring dynamic memory sizes that adapt to dataset complexity.

In conclusion, MM-Net demonstrates that explicitly modeling shared middle-level features through a meta-class memory is a powerful strategy for few-shot learning, providing a robust bridge for knowledge transfer to unseen visual categories.

Summary updated

BibTeX
@inproceedings{wu2021learning,
  author = {Zhonghua Wu and Xiangxi Shi and Guosheng Lin and Jianfei Cai},
  title = {{Learning Meta-class Memory for Few-Shot Semantic Segmentation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00056},
}
Figure