Token Contrast for Weakly-Supervised Semantic Segmentation

Lixiang Ru, Heliang Zheng, Yibing Zhan, Bo Du
3/1/2023

No official code found. Best implementation: rulixiang/ToCo (180 stars, last commit 2023-05-08).

Abstract

Weakly-Supervised Semantic Segmentation (WSSS) using image-level labels typically utilizes Class Activation Map (CAM) to generate the pseudo labels. Limited by the local structure perception of CNN, CAM usually cannot identify the integral object regions. Though the recent Vision Transformer (ViT) can remedy this flaw, we observe it also brings the over-smoothing issue, i.e., the final patch tokens incline to be uniform. In this work, we propose Token Contrast (ToCo) to address this issue and further explore the virtue of ViT for WSSS. Firstly, motivated by the observation that intermediate layers in ViT can still retain semantic diversity, we designed a Patch Token Contrast module (PTC). PTC supervises the final patch tokens with the pseudo token relations derived from intermediate layers, allowing them to align the semantic regions and thus yield more accurate CAM. Secondly, to further differentiate the low-confidence regions in CAM, we devised a Class Token Contrast module (CTC) inspired by the fact that class tokens in ViT can capture high-level semantics. CTC facilitates the representation consistency between uncertain local regions and global objects by contrasting their class tokens. Experiments on the PASCAL VOC and MS COCO datasets show the proposed ToCo can remarkably surpass other single-stage competitors and achieve comparable performance with state-of-the-art multi-stage methods. Code is available at https://github.com/rulixiang/ToCo.

View on arXivView PDF

Code Implementations(1)

rulixiang/ToCoCommunity100%

[CVPR 2023] Token Contrast for Weakly-Supervised Semantic Segmentation

18014Python, DockerfileJan 31, 20233 years ago

Similar Papers

Cite this paper

@article{ru2023token,
  title  = {Token Contrast for Weakly-Supervised Semantic Segmentation},
  author = {Lixiang Ru and Heliang Zheng and Yibing Zhan and Bo Du},
  year   = {2023},
  eprint = {2303.01267},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2303.01267},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.01267.svg)](https://codeofpaper.com/paper/2303.01267)

Discussion