Weakly Supervised Co-training with Swapping Assignments for Semantic Segmentation

Xinyu Yang, Hossein Rahmani, Sue Black, Bryan M. Williams

Introduction

Semantic segmentation is a cornerstone of computer vision, yet its reliance on pixel-level annotations makes it prohibitively expensive for large-scale applications. Weakly Supervised Semantic Segmentation (WSSS) addresses this by utilizing image-level tags. Traditionally, WSSS relies on Class Activation Maps (CAMs) to identify discriminative regions. However, CAMs are often incomplete or noisy, necessitating complex multi-stage pipelines involving offline refinement (e.g., Conditional Random Fields) and multiple training rounds.

This paper introduces CoSA (Co-training with Swapping Assignments), the first single-stage framework that eliminates these offline steps while outperforming state-of-the-art multi-stage methods. By treating CAM generation and segmentation as a joint optimization problem through a dual-stream "swapping" architecture, CoSA achieves superior accuracy and efficiency.

The CoSA Framework

The core of CoSA is a dual-stream setup consisting of an Online Network (ON) and an Assignment Network (AN), where the AN is a moving average of the ON. The framework's primary innovation is the Swapping Assignment mechanism, which creates a mutual learning loop between classification and segmentation tasks.

Swapping Assignment and Mutual Supervision

In this architecture, the AN generates two types of targets to supervise the ON:

  1. CAM Pseudo-Labels (CPL): Derived from the AN's classification branch to supervise the ON’s segmentation head.
  2. Segmentation Pseudo-Labels (SPL): Derived from the AN's segmentation branch to supervise the ON’s CAM generation.

This "swap" allows the segmentation task to act as a teacher for the classification task and vice-versa. As shown in the experimental analysis, guiding CAMs with segmentation masks (SPL) forces the heatmaps to cover the entire object rather than just the most discriminative parts.

Quantitative and qualitative analysis of different guidance strategies. (a) Classification AP, (b) CAM mIoU, and (c) qualitative heatmaps comparing Ground Truth (GT), Segmentation Pseudo-Labels (SPL), No guide (NO), and Negative Saliency (NS).

Adaptive Refinement and Contrastive Separation

To handle the inherent noise in pseudo-labels, CoSA incorporates several advanced modules:

  • Reliability-based Adaptive Weighting (RAW): This module calculates pixel-wise uncertainty (perplexity). Regions with high confusion are down-weighted in the loss function, preventing the model from over-fitting to noisy boundaries.
  • Dynamic Thresholding: Instead of static values, CoSA employs a Gaussian Mixture Model (GMM) to adaptively separate foreground from background based on the current confidence distribution.
  • Contrastive Separation (CSC): To solve the "coexistence problem" (e.g., trains always appearing on tracks), CSC utilizes low-level features from shallower network layers. By applying contrastive learning to these high-resolution features, the model learns to distinguish objects from their frequent backgrounds.

Experimental Results

CoSA was evaluated on the PASCAL VOC 2012 and MS COCO benchmarks, setting new records for single-stage WSSS.

Accuracy and Performance

CoSA achieved an mIoU of 76.2% on PASCAL VOC and 51.0% on MS COCO. Notably, these results surpass many established multi-stage frameworks that utilize additional supervision like saliency maps. The effectiveness of the SPL guide is clearly visible in the quantitative plots, where CAM mIoU improves drastically compared to unguided baselines.

Efficiency Gains

Beyond accuracy, CoSA offers significant practical advantages:

  • Training Speed: It is 240% faster to train than previous leading models like BECO.
  • Model Complexity: It utilizes 50% fewer parameters.
  • Inference: By removing the need for post-processing steps like CRF, inference speed is increased by up to 300%.

Conclusion

CoSA represents a paradigm shift in weakly supervised semantic segmentation. By demonstrating that a single-stage, end-to-end framework can outperform complex multi-stage pipelines, it paves the way for more efficient and scalable segmentation models. While challenges remain in perfectly resolving the coexistence problem for highly correlated classes, the integration of mutual supervision and contrastive learning provides a robust foundation for future research in weak supervision.

Summary updated

BibTeX
@inproceedings{yang2024weakly,
  author = {Xinyu Yang and Hossein Rahmani and Sue Black and Bryan M. Williams},
  title = {{Weakly Supervised Co-training with Swapping Assignments for Semantic Segmentation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72992-8\_26},
}
Figure