Mining Cross-Image Semantics for Weakly Supervised Semantic Segmentation

Guolei Sun, Wenguan Wang, Jifeng Dai, Luc Van Gool

TL;DR

This paper introduces a novel approach to Weakly Supervised Semantic Segmentation (WSSS) by shifting the focus from individual images to cross-image relationships. By using a dual co-attention mechanism to mine both common and unique semantics between pairs of images, the authors significantly improve the quality of object localization maps, setting new state-of-the-art benchmarks on the PASCAL VOC 2012 dataset.

Introduction

Semantic segmentation traditionally requires dense, pixel-level annotations, which are costly and time-consuming to produce. Weakly Supervised Semantic Segmentation (WSSS) addresses this by training models using cheaper image-level tags (e.g., "this image contains a cat").

The standard approach uses Class Activation Maps (CAMs) to identify discriminative regions. However, CAMs often suffer from a "sparse-to-dense" problem, highlighting only the most distinctive parts of an object (e.g., a bird's beak) rather than its full extent. This paper argues that the key to denser localization lies in mining the semantic context shared across different images in the dataset.

Methodology: Mining Cross-Image Semantics

The authors propose the Mining Cross-Image Semantics (MCIS) framework, which transitions from single-image learning to a paired-image paradigm to gain class-level context.

Overview of the MCIS framework: (a) traditional single-image training, (b) the proposed paired-image training, and (c) inference using extra class-level context.

The Co-attention Classification Network

The core of MCIS is a classifier trained on image pairs. It features two primary innovations to refine feature extraction:

  1. Cross-Image Common Semantics Mining (Co-attention): When given two images sharing a label (e.g., "Person"), the network uses an affinity matrix to identify shared features. This helps the model associate the label with the entire object by observing it in various contexts across the dataset.
  2. Cross-Image Exclusive Semantics Mining (Contrastive Co-attention): To prevent confusion between different objects, this mechanism identifies regions unique to each image in a pair (e.g., a "Table" in one image vs. a "Cow" in another). By disentangling these exclusive features, the model learns more precise object boundaries.
Detailed architecture of the co-attention classifier during training, showing the generation of co-attentive and contrastive features.

Workflow and Inference

  • Training: The network is optimized using a combined loss function that includes standard classification, co-attention, and contrastive losses. Training on pairs naturally acts as a massive data augmentation strategy.
  • Inference: During inference, the model generates localization maps by comparing a target image against several "reference" images of the same class. This "multi-round co-attentive prediction" produces more robust and complete pseudo-ground-truth maps.
  • Segmentation: These refined maps are then used to train a standard segmentation network, such as DeepLab.

Key Results

The MCIS method was evaluated on the PASCAL VOC 2012 benchmark, achieving state-of-the-art results across multiple supervision settings:

  • Standard WSSS: Reached 66.2% mIoU on the validation set, a significant improvement over previous state-of-the-art methods like OAA+.
  • Enhanced Supervision: Performance rose to 67.1% with extra single-label data (from ImageNet/Caltech-256) and 67.7% when using noisy web data crawled from Bing.
  • Efficiency: The model achieves approximately 87% of the performance of fully supervised models, demonstrating the narrowing gap between weak and full supervision.

Conclusion

By leveraging cross-image relationships, MCIS overcomes the inherent limitations of single-image CAMs. While the authors noted a performance bottleneck when using too many reference images during inference—likely due to noise accumulation from imperfect localizations—the approach represents a significant step forward in making semantic segmentation more accessible. Future work may explore more selective reference pairing or extending these mechanisms to video data for temporal consistency.

Summary updated

BibTeX
@inproceedings{sun2020mining,
  author = {Guolei Sun and Wenguan Wang and Jifeng Dai and Luc Van Gool},
  title = {{Mining Cross-Image Semantics for Weakly Supervised Semantic Segmentation}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58536-5\_21},
}
Figure