TransCAM: Transformer Attention-based CAM Refinement for Weakly Supervised Semantic Segmentation

Ruiwen Li, Zheda Mai, Chiheb Trabelsi, Zhibo Zhang, Jongseong Jang +1 more
3/14/2022
cs.CV
transformer-attention

Official code: liruiwen/TransCAM (61 stars, Jupyter Notebook, last commit 2023-03-26).

Abstract

Weakly supervised semantic segmentation (WSSS) with only image-level supervision is a challenging task. Most existing methods exploit Class Activation Maps (CAM) to generate pixel-level pseudo labels for supervised training.

Show full abstract

However, due to the local receptive field of Convolution Neural Networks (CNN), CAM applied to CNNs often suffers from partial activation -- highlighting the most discriminative part instead of the entire object area. In order to capture both local features and global representations, the Conformer has been proposed to combine a visual transformer branch with a CNN branch. In this paper, we propose TransCAM, a Conformer-based solution to WSSS that explicitly leverages the attention weights from the transformer branch of the Conformer to refine the CAM generated from the CNN branch. TransCAM is motivated by our observation that attention weights from shallow transformer blocks are able to capture low-level spatial feature similarities while attention weights from deep transformer blocks capture high-level semantic context. Despite its simplicity, TransCAM achieves a new state-of-the-art performance of 69.3% and 69.6% on the respective PASCAL VOC 2012 validation and test sets, showing the effectiveness of transformer attention-based refinement of CAM for WSSS.

View on arXivView PDF

Code Implementations(1)

liruiwen/TransCAMOfficial100%
619Jupyter Notebook, PythonMar 12, 20223 years ago

Similar Papers

Cite this paper

@article{li2022transcam,
  title  = {TransCAM: Transformer Attention-based CAM Refinement for Weakly Supervised Semantic Segmentation},
  author = {Ruiwen Li and Zheda Mai and Chiheb Trabelsi and Zhibo Zhang and Jongseong Jang and Scott Sanner},
  year   = {2022},
  eprint = {2203.07239},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.07239}
}

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

Discussion