Abstract
Image-level weakly supervised semantic segmentation (WSSS) relies on class activation maps (CAMs) for pseudo labels generation. As CAMs only highlight the most discriminative regions of objects, the generated pseudo labels are usually unsatisfactory to serve directly as supervision. To solve this, most existing approaches follow a multi-training pipeline to refine CAMs for better pseudo-labels, which includes: 1) re-training the classification model to generate CAMs; 2) post-processing CAMs to obtain pseudo labels; and 3) training a semantic segmentation model with the obtained pseudo labels. However, this multi-training pipeline requires complicated adjustment and additional time. To address this, we propose a class-conditional inference strategy and an activation aware mask refinement loss function to generate better pseudo labels without retraining the classifier. The class conditional inference-time approach is presented to separately and iteratively reveal the classification network’s hidden object activation to generate more complete response maps. Further, our activation aware mask refinement loss function introduces a novel way to exploit saliency maps during segmentation training and refine the foreground object masks without suppressing background objects. Our method achieves superior WSSS results without requiring re-training of the classifier.
Introduction
Semantic segmentation—the task of labeling every pixel in an image—usually requires expensive, pixel-perfect manual annotations. Weakly Supervised Semantic Segmentation (WSSS) attempts to mitigate this by using cheaper image-level labels (e.g., "there is a cat here"). The standard bridge between image labels and pixel masks is the Class Activation Map (CAM). However, CAMs are inherently "greedy": because a classifier only needs to identify the most discriminative part of an object (like a bird’s beak) to classify it, CAMs often fail to highlight the entire object.
Most existing solutions attempt to fix this by re-training the classifier multiple times or adding complex sub-networks, which is time-consuming and difficult to tune. This paper introduces a way to generate high-quality object masks using a novel inference-time strategy that "hides and seeks" different object parts and a specialized loss function for saliency maps, achieving state-of-the-art results while significantly reducing pipeline complexity.
Methods
The proposed approach works with a standard, pre-trained classification network through two primary mechanisms.
Class-Conditional Inference Module
Instead of modifying the training process, the authors change how the model "looks" at an image during inference through two sub-modules:
- Split & Unite: The image is divided into four patches based on the "center of mass" of the initial CAM. Forcing the network to look at these patches individually uncovers discriminative features in areas previously overshadowed by dominant features in the full image.
- Iterative Inference: The system identifies highly activated regions, "erases" them (replaces them with the mean color), and re-feeds the image into the classifier. This forces the network to reveal "hidden" activations in less-discriminative parts of the object.
Activation Aware Mask Refinement Loss
Saliency maps are often used in WSSS but suffer from "center bias" and often miss object parts. The authors introduce a Conflict Temperature ($\tau$) in their loss function. This dynamically adjusts the influence of the saliency map based on its agreement with the model's current pseudo-labels, preventing the suppression of valid object parts that may be off-center.
Experimental Results
The researchers evaluated their method on the PASCAL VOC 2012 dataset, using 10,582 training images and 1,449 validation images across 20 foreground object classes.
Performance and Efficiency
The method achieved a 70.8% mIoU on the PASCAL VOC validation set and 71.8% on the test set. A key advantage is efficiency: while many top-tier methods require 6+ hours of re-training the classification backbone, this method generates its response maps in about 40 minutes using direct inference on a fixed model.
Qualitative Analysis
Qualitative results demonstrate significantly better coverage. While baseline CAMs might only catch a sheep's head, this method consistently captures the entire body, leading to much cleaner pseudo-labels for the final segmentation training. This confirms the insight that a standard classifier already "knows" where the rest of the object is; it simply needs to be prompted to report it.
Conclusion
This work demonstrates that the knowledge required for full-object segmentation is often already latent within standard classifiers. By using class-conditional inference and conflict-aware loss functions, the proposed method achieves state-of-the-art WSSS performance without the need for expensive classifier re-training. While the iterative inference process adds some overhead per image, the overall reduction in training time and complexity makes it a compelling approach for large-scale weakly supervised tasks.
Summary updated