Activation extending based on long-range dependencies for weakly supervised semantic segmentation

Haipeng Liu, Yibo Zhao, Meng Wang, Meiyan Ma, Zhaoyu ChenPLoS 2023

Abstract

Weakly supervised semantic segmentation (WSSS) principally obtains pseudo-labels based on class activation maps (CAM) to handle expensive annotation resources. However, CAM often involves false and local activation due to the lack of dense annotation information. This paper suggests weakly supervised learning as semantic information mining to extend object masks. We propose a novel architecture to mine semantic information by modeling long-range dependencies from both in-sample and inter-sample data. Considering the confusion caused by global long-range dependencies, images are divided into blocks where regional self-attention operations are performed to reduce false predictions. Moreover, we perform global-to-local weighted self-supervised contrastive learning among image blocks, allowing local activations of CAM to be transferred to different foreground areas. Experiments on PASCAL VOC 2012 demonstrate that the proposed model achieves 76.6% and 77.4% mIoU in validation and test sets, respectively, which is superior to comparison baselines.

Introduction

Semantic segmentation typically requires expensive, pixel-perfect masks for training. Weakly Supervised Semantic Segmentation (WSSS) aims to bypass this by training models using only image-level tags. The standard approach utilizes Class Activation Maps (CAMs) to identify which pixels led the model to its classification. However, CAMs suffer from two major flaws: local activation, where the model only identifies the most discriminative part of an object (e.g., a bird’s beak instead of its body), and false activation, where the model incorrectly classifies background context (like water) as part of the object (like a boat) due to frequent co-occurrence.

This research introduces a framework designed to "extend" these activations to cover the full object while filtering out background noise caused by misleading long-range dependencies.

Methodology

The proposed architecture features two primary innovations designed to refine semantic information mining:

Regional Self-Attention (RSA)

Instead of performing self-attention on the entire image—which can lead to "information confusion" between different classes—the RSA module divides the image into a 2x2 grid of blocks. By calculating correlations within these smaller, less class-dense areas, the model captures finer semantic details and reduces the "causal interference" from unrelated background pixels. This effectively simplifies the scene for the model, making it harder to misattribute context to an object.

Cross-image Foreground Feature Comparison (CFC)

This module uses self-supervised contrastive learning to look across different images in a training batch. It identifies similar foreground features (e.g., the relationship between a person and a vehicle) and minimizes the feature distance between them. Crucially, a "rank weight" system based on cosine similarity is used to prioritize semantically similar pairs, helping the model "transfer" activation from a well-identified part of an object in one image to a less-identified part in another.

Modeling long-range dependencies between semantic regions (e.g., person and vehicle) across different samples.

Experimental Results

The model was evaluated on two industry-standard benchmarks: PASCAL VOC 2012 and MS COCO 2014.

  • PASCAL VOC 2012: The method achieved 76.6% mIoU on the validation set and 77.4% mIoU on the test set, representing a significant improvement over the baseline PuzzleCam results.
  • MS COCO 2014: On this more challenging dataset with 80 classes, the model achieved 43.8% mIoU (when combined with RW and CRF post-processing), outperforming competitors like SEAM and IRNET.

Qualitative visualizations show that the masks generated by this method are much "fuller" and have smoother, more accurate boundaries compared to previous methods, which often produced fragmented or incomplete masks.

Conclusion

By forcing the model to look at smaller blocks (RSA) and comparing foreground features across images (CFC), this framework successfully addresses the limitations of traditional CAMs. While the model excels at capturing large and medium-sized objects, small object detection remains a challenge, as the fixed-grid RSA module may bisect very small objects. Future research will explore adaptive blocking strategies to further refine object boundaries without losing the benefits of long-range dependencies.

Summary updated

BibTeX
@inproceedings{liu2023activation,
  author = {Haipeng Liu and Yibo Zhao and Meng Wang and Meiyan Ma and Zhaoyu Chen},
  title = {{Activation extending based on long-range dependencies for weakly supervised semantic segmentation}},
  booktitle = {PLoS},
  year = {2023},
  doi = {10.1371/journal.pone.0288596},
}
Figure