Skip to main content
QUICK REVIEW

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

Yuqi Lin, Minghao Chen|arXiv (Cornell University)|Dec 16, 2022
Multimodal Machine Learning ApplicationsComputer Science7 citations
TL;DR

This paper proposes CLIP-ES, a text-driven, weakly supervised semantic segmentation framework that leverages frozen CLIP models to generate high-quality pseudo masks from image-level labels without additional training. By integrating softmax-regularized GradCAM, text-driven prompt strategies, a class-aware attention-based affinity module, and a confidence-guided loss, CLIP-ES achieves state-of-the-art performance on PASCAL VOC 2012 (73.9% mIoU) and MS COCO 2014 (45.4% mIoU) with only 10% of the time required by prior methods.

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. 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.

Motivation & Objective

  • To simplify weakly supervised semantic segmentation (WSSS) by eliminating the need for fine-tuning or training auxiliary models.
  • To exploit CLIP’s zero-shot capabilities for object localization using only image-level labels.
  • To reduce training cost while maintaining or improving segmentation accuracy through novel text-driven and attention-based modules.
  • To generate reliable pseudo masks for downstream segmentation without additional supervision or model adaptation.

Proposed method

  • Introduces softmax regularization into GradCAM to enforce mutual exclusivity among classes and suppress background and non-target class confusion.
  • Proposes sharpness-based prompt selection and synonym fusion to optimize text inputs for improved class-specific activation maps.
  • Designs a class-aware attention-based affinity (CAA) module that leverages CLIP-ViT’s multi-head self-attention for real-time, class-aware CAM refinement.
  • Employs a confidence-guided loss (CGL) during final segmentation training that down-weights uncertain regions in pseudo masks.
  • Uses frozen CLIP as the backbone, enabling zero-shot transfer to new classes and datasets without fine-tuning.
  • Integrates all components into an end-to-end, text-driven WSSS pipeline that avoids training separate classification and affinity models.

Experimental results

Research questions

  • RQ1Can CLIP, without fine-tuning, generate high-quality segmentation masks using only image-level labels?
  • RQ2How can text inputs be optimized to improve class-specific activation maps in CLIP-based WSSS?
  • RQ3Can CLIP’s intrinsic attention mechanism replace external affinity networks for CAM refinement?
  • RQ4Does a confidence-guided loss improve segmentation performance when training on noisy pseudo masks?
  • RQ5Can the framework generalize to new classes and datasets without retraining?

Key findings

  • CLIP-ES achieves 73.9% mIoU on the PASCAL VOC 2012 test set, setting a new state-of-the-art.
  • On MS COCO 2014, CLIP-ES achieves 45.4% mIoU on the validation set, surpassing all prior methods.
  • The use of softmax in GradCAM improves mIoU by 9.2% across all classes and reduces confusion between similar categories like 'boat' and 'water'.
  • Synonym fusion boosts performance on 'person' from 43.6% to 51.6% mIoU, demonstrating the effectiveness of text augmentation.
  • The CAA module improves CAM refinement beyond vanilla MHSA, with visualizations showing more complete and accurate object activations.
  • Pseudo mask generation with CLIP-ES takes only 10% of the time required by previous methods, significantly improving training efficiency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.