CLIP is Also an Efficient Segmenter: A Text-Driven Approach for Weakly Supervised Semantic Segmentation

Yuqi Lin, Minghao Chen, Wenxiao Wang, Boxi Wu, Ke Li +3 more
12/16/2022
cs.CVcs.AI
transformer-attention

Official code: linyq2117/CLIP-ES (215 stars, Python, MIT, last commit 2024-09-16).

Abstract

Weakly supervised semantic segmentation (WSSS) with image-level labels is a challenging task. Mainstream approaches follow a multi-stage framework and suffer from high training costs.

Show full abstract

In this paper, we explore the potential of Contrastive Language-Image Pre-training models (CLIP) to localize different categories with only image-level labels and without further training. To efficiently generate high-quality segmentation masks from CLIP, we propose a novel WSSS framework called CLIP-ES. Our framework improves all three stages of WSSS with special designs for CLIP: 1) We introduce the softmax function into GradCAM and exploit the zero-shot ability of CLIP to suppress the confusion caused by non-target classes and backgrounds. Meanwhile, to take full advantage of CLIP, we re-explore text inputs under the WSSS setting and customize two text-driven strategies: sharpness-based prompt selection and synonym fusion. 2) To simplify the stage of CAM refinement, we propose a real-time class-aware attention-based affinity (CAA) module based on the inherent multi-head self-attention (MHSA) in CLIP-ViTs. 3) When training the final segmentation model with the masks generated by CLIP, we introduced a confidence-guided loss (CGL) focus on confident regions. Our CLIP-ES achieves SOTA performance on Pascal VOC 2012 and MS COCO 2014 while only taking 10% time of previous methods for the pseudo mask generation. Code is available at https://github.com/linyq2117/CLIP-ES.

View on arXivView PDF

Code Implementations(1)

linyq2117/CLIP-ESOfficial100%
MIT

[CVPR 2023] CLIP is Also an Efficient Segmenter: A Text-Driven Approach for Weakly Supervised Semantic Segmentation

21516PythonDec 15, 20222 years agoMIT

Similar Papers

Cite this paper

@article{lin2022clip,
  title  = {CLIP is Also an Efficient Segmenter: A Text-Driven Approach for Weakly Supervised Semantic Segmentation},
  author = {Yuqi Lin and Minghao Chen and Wenxiao Wang and Boxi Wu and Ke Li and Binbin Lin and Haifeng Liu and Xiaofei He},
  year   = {2022},
  eprint = {2212.09506},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.09506}
}

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

Discussion