Context-aware Feature Generation for Zero-shot Semantic Segmentation

Zhangxuan Gu, Siyuan Zhou, Li Niu, Zihan Zhao, Liqing ZhangACM Multimedia 2020 · DOI

Abstract

Existing semantic segmentation models heavily rely on dense pixel-wise annotations. To reduce the annotation pressure, we focus on a challenging task named zero-shot semantic segmentation, which aims to segment unseen objects with zero annotations. This task can be accomplished by transferring knowledge across categories via semantic word embeddings. In this paper, we propose a novel context-aware feature generation method for zero-shot segmentation named CaGNet. In particular, with the observation that a pixel-wise feature highly depends on its contextual information, we insert a contextual module in a segmentation network to capture the pixel-wise contextual information, which guides the process of generating more diverse and context-aware features from semantic word embeddings. Our method achieves state-of-the-art results on three benchmark datasets for zero-shot segmentation.

Introduction

Semantic segmentation—the task of assigning a category label to every pixel in an image—is notoriously data-hungry, requiring expensive and time-consuming dense annotations. Zero-shot semantic segmentation (ZS3) aims to alleviate this burden by training models to recognize "unseen" categories for which no labeled pixels were provided during training. This is typically achieved by using semantic word embeddings (e.g., Word2Vec) to bridge the gap between seen and unseen classes.

However, existing ZS3 methods, such as ZS3Net, often generate synthetic features for unseen classes by simply adding random noise to a category's word embedding. This approach ignores the spatial context. In reality, a pixel's appearance is highly dependent on its surroundings (e.g., a cat's ear vs. its belly). Ignoring this context leads to "mode collapse," where the generator produces a limited variety of features that fail to capture the complex spatial realities of real-world scenes.

Methodology: The CaGNet Framework

To address these limitations, we propose CaGNet (Context-aware Feature Generation Network). The core innovation is the integration of a Contextual Module (CM) into the segmentation pipeline, replacing random noise with pixel-specific contextual information.

The CaGNet architecture overview, illustrating the flow from input image to feature generation and classification.

The Contextual Module (CM)

The CM is positioned after the main backbone (e.g., ResNet-101). It utilizes multiple dilated convolutional layers to capture information at various scales, representing small, medium, and large receptive fields. A "context selector" then adaptively weights these scales for each pixel, recognizing that some pixels require local detail while others benefit from global context.

The internal structure of the Contextual Module (CM), highlighting the multi-scale dilated convolutions and the context-selector.

Instead of random noise, the CM produces a "contextual latent code" for every pixel. During training, the generator ($G$) learns to reconstruct real visual features using the word embedding of a seen class and its corresponding contextual latent code. Because there is a one-to-one mapping (bijection) between the context and the feature, the model effectively avoids mode collapse.

Finetuning for Unseen Classes

Once the generator is trained, it can take word embeddings for unseen classes (e.g., "cow" or "sofa") and combine them with sampled contextual codes to synthesize realistic features. These synthetic features are then used to finetune the final classifier, allowing the model to recognize categories it has never seen in a labeled image.

Experiments and Results

CaGNet was evaluated on three major computer vision benchmarks using the hIoU (harmonic Mean Intersection over Union) metric, which balances performance on both seen and unseen classes:

  • Pascal-Context: Achieved an hIoU of 20.61%, nearly doubling the performance of the previous ZS3Net (12.46%).
  • COCO-stuff: Reached 18.19% hIoU, significantly outperforming the previous state-of-the-art (SPNet) at 13.98%.
  • Pascal-VOC 2012: Reached a high of 39.72% hIoU.

Qualitative analysis confirms that the Contextual Module allows the model to generate much more accurate and diverse features for unseen objects compared to noise-based methods.

Conclusion

CaGNet demonstrates that context is the key to diversity in feature generation for zero-shot learning. By encoding the environment into the latent space, the generator produces features that naturally "fit" into a scene. While the model currently depends on the quality of word embeddings and may inherit biases from the backbone trained on seen classes, it sets a new standard for ZS3 performance. Future work may involve exploring relational graphs or self-supervised learning to further refine the model's understanding of object relationships.

Summary updated

BibTeX
@inproceedings{gu2020context,
  author = {Zhangxuan Gu and Siyuan Zhou and Li Niu and Zihan Zhao and Liqing Zhang},
  title = {{Context-aware Feature Generation for Zero-shot Semantic Segmentation}},
  booktitle = {ACM Multimedia},
  year = {2020},
  doi = {10.1145/3394171.3413593},
}
Figure