ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation

Ziqin Zhou, Bowen Zhang, Yinjie Lei, Lingqiao Liu, Yifan Liu
12/7/2022
cs.CV

Official code: ZiqinZhou66/ZegCLIP (257 stars, Python, MIT, last commit 2023-08-27).

Abstract

Recently, CLIP has been applied to pixel-level zero-shot learning tasks via a two-stage scheme. The general idea is to first generate class-agnostic region proposals and then feed the cropped proposal regions to CLIP to utilize its image-level zero-shot classification capability.

Show full abstract

While effective, such a scheme requires two image encoders, one for proposal generation and one for CLIP, leading to a complicated pipeline and high computational cost. In this work, we pursue a simpler-and-efficient one-stage solution that directly extends CLIP's zero-shot prediction capability from image to pixel level. Our investigation starts with a straightforward extension as our baseline that generates semantic masks by comparing the similarity between text and patch embeddings extracted from CLIP. However, such a paradigm could heavily overfit the seen classes and fail to generalize to unseen classes. To handle this issue, we propose three simple-but-effective designs and figure out that they can significantly retain the inherent zero-shot capacity of CLIP and improve pixel-level generalization ability. Incorporating those modifications leads to an efficient zero-shot semantic segmentation system called ZegCLIP. Through extensive experiments on three public benchmarks, ZegCLIP demonstrates superior performance, outperforming the state-of-the-art methods by a large margin under both "inductive" and "transductive" zero-shot settings. In addition, compared with the two-stage method, our one-stage ZegCLIP achieves a speedup of about 5 times faster during inference. We release the code at https://github.com/ZiqinZhou66/ZegCLIP.git.

View on arXivView PDF

Code Implementations(1)

MIT

Official implement of CVPR2023 ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation

25725Python, Jupyter NotebookDec 7, 20223 years agoMIT

Similar Papers

Cite this paper

@article{zhou2022zegclip,
  title  = {ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation},
  author = {Ziqin Zhou and Bowen Zhang and Yinjie Lei and Lingqiao Liu and Yifan Liu},
  year   = {2022},
  eprint = {2212.03588},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.03588}
}

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

Discussion