Multi-class Token Transformer for Weakly Supervised Semantic Segmentation

Lian Xu, Wanli Ouyang, Mohammed Bennamoun, Farid Boussaid, Dan Xu
3/6/2022
cs.CV
transformer-attention

Official code: xulianuwa/MCTformer (187 stars, Python, last commit 2023-08-24).

Abstract

This paper proposes a new transformer-based framework to learn class-specific object localization maps as pseudo labels for weakly supervised semantic segmentation (WSSS). Inspired by the fact that the attended regions of the one-class token in the standard vision transformer can be leveraged to form a class-agnostic localization map, we investigate if the transformer model can also effectively capture class-specific attention for more discriminative object localization by learning multiple class tokens within the transformer.

Show full abstract

To this end, we propose a Multi-class Token Transformer, termed as MCTformer, which uses multiple class tokens to learn interactions between the class tokens and the patch tokens. The proposed MCTformer can successfully produce class-discriminative object localization maps from class-to-patch attentions corresponding to different class tokens. We also propose to use a patch-level pairwise affinity, which is extracted from the patch-to-patch transformer attention, to further refine the localization maps. Moreover, the proposed framework is shown to fully complement the Class Activation Mapping (CAM) method, leading to remarkably superior WSSS results on the PASCAL VOC and MS COCO datasets. These results underline the importance of the class token for WSSS.

View on arXivView PDF

Code Implementations(1)

Code for CVPR 2022 paper "Multi-Class Token Transformer for Weakly Supervised Semantic Segmentation"

18717Python, ShellMar 8, 20223 years ago

Similar Papers

Cite this paper

@article{xu2022multiclass,
  title  = {Multi-class Token Transformer for Weakly Supervised Semantic Segmentation},
  author = {Lian Xu and Wanli Ouyang and Mohammed Bennamoun and Farid Boussaid and Dan Xu},
  year   = {2022},
  eprint = {2203.02891},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.02891}
}

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/2203.02891.svg)](https://codeofpaper.com/paper/2203.02891)

Discussion