Learning Affinity from Attention: End-to-End Weakly-Supervised Semantic Segmentation with Transformers
Lixiang Ru, Yibing Zhan, Baosheng Yu, Bo Du
Abstract
Weakly-supervised semantic segmentation (WSSS) with image-level labels is an important and challenging task. Due to the high training efficiency, end-to-end solutions for WSSS have received increasing attention from the community. However, current methods are mainly based on convolutional neural networks and fail to explore the global information properly, thus usually resulting in incomplete object regions. In this paper, to address the aforementioned problem, we introduce Transformers, which naturally integrate global information, to generate more integral initial pseudo labels for end-to-end WSSS. Motivated by the inherent consistency between the self-attention in Transformers and the semantic affinity, we propose an Affinity from Attention (AFA) module to learn semantic affinity from the multi-head self-attention (MHSA) in Transformers. The learned affinity is then leveraged to refine the initial pseudo labels for segmentation. In addition, to efficiently derive reliable affinity labels for supervising AFA and ensure the local consistency of pseudo labels, we devise a Pixel-Adaptive Refinement module that incorporates low-level image appearance information to refine the pseudo labels. We perform extensive experiments and our method achieves 66.0% and 38.9% mIoU on the PASCAL VOC 2012 and MS COCO 2014 datasets, respectively, significantly outperforming recent end-to-end methods and several multi-stage competitors. Code is available at https://github.com/rulixiang/afa.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers51
- DiffuMask: Synthesizing Images with Pixel-level Annotations for Semantic Segmentation Using Diffusion ModelsWeijia Wu, Yuzhong Zhao, Mike Zheng Shou, Hong Zhou et al.ICCV 2023 · 198 citations
- Self Correspondence Distillation for End-to-End Weakly-Supervised Semantic SegmentationRongtao Xu, Changwei Wang, Jiaxi Sun, Shibiao Xu et al.AAAI 2023 · 82 citations
- DeMT: Deformable Mixer Transformer for Multi-Task Learning of Dense PredictionYangyang Xu, Yibo Yang, Lefei ZhangAAAI 2023 · 81 citations
- Uncovering Prototypical Knowledge for Weakly Open-Vocabulary Semantic SegmentationFei Zhang, Tianfei Zhou, Boyang Li, Hao He et al.NeurIPS 2023 · 46 citations
- Hunting Attributes: Context Prototype-Aware Learning for Weakly Supervised Semantic SegmentationFeilong Tang, Zhongxing Xu, Zhaojun Qu, Wei Feng et al.CVPR 2024 · 41 citations
Builds on25
- SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar et al.NeurIPS 2021 · 9,661 citations
- ViViT: A Video Vision TransformerAnurag Arnab, Mostafa Dehghani, Georg Heigold, Chen Sun et al.ICCV 2021 · 2,947 citations
- Vision Transformers for Dense PredictionRené Ranftl, Alexey Bochkovskiy, Vladlen KoltunICCV 2021 · 2,647 citations
- Per-Pixel Classification is Not All You Need for Semantic SegmentationBowen Cheng, Alexander G. Schwing, Alexander KirillovNeurIPS 2021 · 2,196 citations
- TS-CAM: Token Semantic Coupled Attention Map for Weakly Supervised Object LocalizationWei Gao, Fang Wan, Xingjia Pan, Zhiliang Peng et al.ICCV 2021 · 260 citations
Related papers
- DINO is Also a Semantic Guider: Exploiting Class-aware Affinity for Weakly Supervised Semantic SegmentationYuanchen Wu, Xiaoqiang Li, Jide Li, Kequan Yang et al.ACM MM 2024 · 12 citations
- CIAN: Cross-Image Affinity Net for Weakly Supervised Semantic SegmentationJunsong Fan, Zhaoxiang Zhang, Tieniu Tan, Chunfeng Song et al.AAAI 2020 · 230 citations
- Semantic-Aware Superpixel for Weakly Supervised Semantic SegmentationSangtae Kim, Daeyoung Park, Byonghyo ShimAAAI 2023 · 35 citations
- Multi-class Token Transformer for Weakly Supervised Semantic SegmentationLian Xu, Wanli Ouyang, Mohammed Bennamoun, Farid Boussaïd et al.CVPR 2022 · 275 citations
- Frequency-Aware Affinity for Weakly Supervised Semantic SegmentationZiqian Yang, Xianglin Qiu, Xinqiao Zhao, Xiaolei Wang et al.CVPR 2026
