CLIMS: Cross Language Image Matching for Weakly Supervised Semantic Segmentation

Jinheng Xie, Xianxu Hou, Kai Ye, Linlin Shen

Abstract

It has been widely known that CAM (Class Activation Map) usually only activates discriminative object regions and falsely includes lots of object-related backgrounds. As only a fixed set of image-level object labels are available to the WSSS (weakly supervised semantic segmentation) model, it could be very difficult to suppress those diverse background regions consisting of open set objects. In this paper, we propose a novel Cross Language Image Matching (CLIMS) framework, based on the recently introduced Contrastive Language-Image Pre-training (CLIP) model, for WSSS. The core idea of our framework is to introduce natural language supervision to activate more complete object regions and suppress closely-related open background regions. In particular, we design object, background region and text label matching losses to guide the model to excite more reasonable object regions for CAM of each category. In addition, we design a co-occurring background suppression loss to prevent the model from activating closely-related background regions, with a predefined set of class-related background text descriptions. These designs enable the proposed CLIMS to generate a more complete and compact activation map for the target objects. Extensive experiments on PASCAL VOC2012 dataset show that our CLIMS significantly outperforms the previous state-of-the-art methods. Code will be available at https://github.com/CVI-SZU/CLIMS.

1. Introduction

Weakly Supervised Semantic Segmentation (WSSS) aims to train segmentation models using only image-level labels, significantly reducing the cost of pixel-level annotation. The standard approach relies on Class Activation Maps (CAMs) to generate pseudo-labels. However, CAMs typically suffer from two major issues: they tend to focus only on the most discriminative parts of an object (underestimation) and often falsely activate background regions that frequently co-occur with the object (background bias), such as railroad tracks appearing with trains.

2. Methodology: The CLIMS Framework

To address these limitations, we propose the Cross Language Image Matching (CLIMS) framework. CLIMS integrates the "open-world" knowledge of the Contrastive Language-Image Pre-training (CLIP) model, which has been trained on 400 million image-text pairs. Unlike traditional closed-set classifiers that only recognize a fixed set of labels, CLIMS uses natural language prompts to guide the model in distinguishing objects from their environments.

Comparison of the standard CAM framework and the proposed CLIMS framework.

The framework optimizes the backbone network using four specialized loss functions:

  • Object Region and Text Label Matching ($L_{OTM}$): Maximizes the similarity between the masked object region and its text description (e.g., "a photo of a train").
  • Background Region and Text Label Matching ($L_{BTM}$): Ensures the background region does not match the object description, encouraging the mask to cover the entire object.
  • Co-occurring Background Suppression ($L_{CBS}$): Penalizes the model for activating predefined background elements (e.g., "railroad" for trains, "river" for boats), preventing background leakage.
  • Area Regularization ($L_{REG}$): A pixel-level constraint to maintain compact and clean activation maps.

3. Experiments and Results

We evaluated CLIMS on the PASCAL VOC 2012 dataset, a standard benchmark featuring 20 object categories. The framework utilizes a ResNet-50 backbone and the pre-trained CLIP model.

Quantitative Performance

CLIMS achieved state-of-the-art results across multiple stages of the WSSS pipeline. The initial CAM quality reached 56.6% mIoU, significantly higher than previous leaders like AdvCAM (55.6%) and SEAM (55.4%). After standard refinement steps, the pseudo-labels reached 70.5% mIoU. When used to train a standard DeepLabV2 network, CLIMS achieved a final segmentation performance of 70.4% mIoU on the validation set.

Qualitative Analysis

Visualizations demonstrate that CLIMS produces masks that tightly adhere to object boundaries. While previous methods often included large background areas (e.g., water around a boat or tracks under a train), CLIMS successfully suppresses these regions.

Qualitative comparison of activation maps generated by CAM, Adv-CAM, and CLIMS (Ours) against Ground Truth (GT).

4. Conclusion

CLIMS demonstrates that leveraging cross-modal pre-trained models like CLIP can effectively bridge the gap between image-level labels and pixel-level masks. By introducing negative supervision through co-occurring background descriptions, the model successfully suppresses persistent background noise. Future work will explore the automatic discovery of background categories to further enhance the framework's scalability.

Summary updated

BibTeX
@inproceedings{xie2022clims,
  author = {Jinheng Xie and Xianxu Hou and Kai Ye and Linlin Shen},
  title = {{CLIMS: Cross Language Image Matching for Weakly Supervised Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=_oajHg_Zsu},
}
Figure