Importance Sampling Cams For Weakly-Supervised Segmentation

Arvi Jonnarth, Michael Felsberg

TL;DR

This paper introduces two novel techniques to improve Class Activation Maps (CAMs) for weakly-supervised semantic segmentation. By using importance sampling to generate more comprehensive object activations and a feature similarity loss to sharpen contour predictions, they achieve significantly better contour accuracy while maintaining competitive region similarity compared to state-of-the-art methods.

What Problem Does This Paper Address?

Semantic segmentation, the task of assigning a class label to every pixel in an image, is crucial for many computer vision applications. Fully supervised methods achieve excellent results but require extensive pixel-level annotations, which are costly and time-consuming to create. Weakly-supervised semantic segmentation (WSSS) aims to overcome this by using weaker forms of supervision, such as image-level labels. A common WSSS approach involves generating "pseudo-labels" using Class Activation Maps (CAMs) derived from classification networks. However, standard CAMs have two main limitations: they tend to focus only on the most discriminative parts of an object, ignoring the rest, and they produce blurry boundaries, making it difficult to precisely segment objects. This paper tackles these two issues to generate more accurate and useful pseudo-labels for WSSS.

Methods

The authors propose two key contributions to improve CAM generation:

  1. Importance Sampling for Stochastic Predictions: Instead of relying on global average pooling (GAP) or global max pooling (GMP) to derive image-level predictions from CAMs, they introduce importance sampling. This method samples individual pixels based on the probability mass function derived from the CAM itself. This encourages the CAMs to activate over a larger extent of the object, capturing more than just the discriminative regions. This is integrated into the training loss as a stochastic prediction term, combined with the standard max-pooling prediction.
  2. Feature Similarity Loss: To address the issue of blurry CAM contours, they introduce a novel feature similarity loss. This loss encourages the predicted contours of the CAMs to align with image edges. It works by penalizing dissimilar predictions for pixels that are spatially close and have similar features, and conversely, penalizing similar predictions for pixels that are spatially close but have dissimilar features. This loss implicitly learns the "cross-over point" where pixels should be considered dissimilar enough to potentially belong to different classes.

Datasets

The experiments were conducted on the PASCAL VOC 2012 dataset. The authors also incorporated additional data from Hariharan et al. [27], resulting in a total of 10,582 training images. Importantly, only image-level labels were used for training, adhering to the weakly-supervised paradigm.

Key Insights and Ideas

  • Beyond Discriminative Regions: The core insight is that by moving away from simple pooling and embracing stochastic sampling guided by the CAM itself, we can force the network to consider a broader context of the object, leading to more complete activations.
  • Edges as Implicit Supervision: The feature similarity loss cleverly leverages the fact that object boundaries often correspond to significant changes in image features (edges). By penalizing mismatches between predicted class changes and feature changes, the model learns to produce sharper, more accurate contours.
  • Synergy of Sampling and Edge Alignment: The paper demonstrates that combining these two techniques yields a significant improvement, particularly in contour accuracy, suggesting that both comprehensive object coverage and precise boundary localization are crucial for effective WSSS.

Key Results

  • Improved Contour Accuracy: The proposed method significantly boosts contour accuracy, as measured by the F-score, by up to 13% compared to the SEAM baseline (Table 1).
  • Competitive Region Similarity: While prioritizing contour accuracy, the method maintains comparable region similarity (mIoU) to state-of-the-art methods on the PASCAL VOC 2012 benchmark (Table 2).
  • Ablation Study: An ablation study (Figure 2) confirms that both importance sampling and the feature similarity loss contribute positively to performance, with the feature similarity loss showing a particularly strong impact on contour accuracy.

Limitations and Future Work

  • Computational Cost: While not explicitly detailed as a limitation, the introduction of importance sampling and a new loss term likely increases training time.
  • Hyperparameter Tuning: The paper mentions learning parameters for the feature similarity loss, suggesting that careful tuning might still be required.
  • Future Directions: The authors suggest that their approach can be extended to other WSSS tasks and potentially other weakly-supervised learning scenarios. Further exploration of different sampling strategies and feature representations could also yield improvements.

Summary updated

BibTeX
@inproceedings{jonnarth2022importance,
  author = {Arvi Jonnarth and Michael Felsberg},
  title = {{Importance Sampling Cams For Weakly-Supervised Segmentation}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2022},
}
Figure