Learning class-agnostic masks with cross-task refinement for weakly supervised semantic segmentation

Lian Xu, Mohammed Bennamoun, Farid Boussaïd, Wanli Ouyang, Dan XuNeural Computing and Applications 2023

Abstract

Weakly Supervised Semantic Segmentation (WSSS) aims to reduce the high cost of pixel-level annotation by training models on image-level tags. However, traditional Class Activation Mapping (CAM) often fails to capture full object extents and produces poor boundaries. This paper proposes a novel framework that jointly learns semantic segmentation and class-agnostic masks. By introducing probability-based CAM (pCAM) and a cross-task label refinement mechanism, the method significantly improves pseudo-label quality, achieving state-of-the-art performance on PASCAL VOC 2012 and MS COCO benchmarks.

Introduction

Semantic segmentation is a cornerstone of computer vision, yet its reliance on dense pixel-level labels makes it difficult to scale. WSSS offers a solution by utilizing cheaper image-level labels. The standard pipeline uses CAM to generate initial pseudo-labels, but these maps typically suffer from two issues: sparsity (focusing only on discriminative parts like a bird's beak) and poor boundary alignment. While saliency maps are often used to improve boundaries, they are class-blind and frequently highlight irrelevant background objects, such as a dog house instead of the dog itself.

Methodology

The proposed framework addresses these challenges through a multi-branch network that simultaneously performs image classification, class-agnostic (CA) segmentation, and semantic segmentation (SS).

Probability-based CAM (pCAM)

Unlike standard CAM (sCAM), which uses spatial-wise normalization and often highlights only the most active "peaks," the authors introduce pCAM. By applying a softmax operation across the channel dimension, pCAM forces the model to evaluate the class probability distribution for every pixel. This shift encourages the network to discover the full extent of objects rather than just their most discriminative features.

Joint Learning and Cross-Task Refinement

The network learns a binary foreground/background mask (class-agnostic) alongside the semantic branch. This CA task acts as a regularizer, teaching the backbone to recognize general "objectness" and sharp boundaries.

Figure 3: Illustration of the cross-task refinement process. The top row shows the input image and initial masks. The bottom row demonstrates how semantic information (a) and class-agnostic information (b) are fused to produce a refined, high-quality pseudo-label (c).

The core innovation is the Cross-Task Label Refinement loop. Semantic segmentation masks provide the "what" (class identity), while class-agnostic masks provide the "where" (precise boundaries). These are fused using a Conditional Random Field (CRF) to create superior pseudo-labels, which are then used to iteratively re-train the network.

Experimental Results

The model was evaluated on the PASCAL VOC 2012 and MS COCO datasets, establishing new state-of-the-art (SOTA) benchmarks for image-level WSSS:

  • PASCAL VOC 2012: The method achieved a mean Intersection-over-Union (mIoU) of 69.7% on the validation set and 69.9% on the test set, outperforming previous leaders like AuxSegNet.
  • MS COCO: On this more complex dataset, the model reached 33.3% mIoU, a notable improvement over the previous best of 32.8% (CONTA).
  • Ablation Studies: Results showed that joint learning of all three tasks improved mIoU by 2.5% over the baseline even before post-processing, validating the symbiotic relationship between semantic and class-agnostic learning.

Conclusion and Future Work

This research demonstrates that bridging the gap between class-specific activations and class-agnostic boundaries through joint learning is a highly effective strategy for WSSS. While the current multi-step training procedure is computationally intensive, it provides a robust foundation for future work. The authors suggest that moving toward an end-to-end framework—integrating refinement directly into the training loop—will be the next step in making this approach more efficient for large-scale applications.

Summary updated

BibTeX
@article{xu2023learning,
  author = {Lian Xu and Mohammed Bennamoun and Farid Boussaïd and Wanli Ouyang and Dan Xu},
  title = {{Learning class-agnostic masks with cross-task refinement for weakly supervised semantic segmentation}},
  journal = {Neural Computing and Applications},
  year = {2023},
  doi = {10.1007/s00521-023-08826-0},
}
Figure