Papers › ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation

ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation

7 Dec 2022CVPR 2023 1arXiv:2212.03588archive 2025-07-28

Ziqin Zhou, BoWen Zhang, Yinjie Lei, Lingqiao Liu, Yifan Liu

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

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2212.03588")

Code

Syntology Ran 8 of 9 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 4 ran with no contract checked.

By repository: official repository: 9 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ZiqinZhou66/ZegCLIP officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 8 ran; 1 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
4ran
1unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ZiqinZhou66/ZegCLIP. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

basic_clean ZiqinZhou66/ZegCLIP/models/segmentor/untils.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 98f385d847636a3e · report
cosine_margin_loss ZiqinZhou66/ZegCLIP/models/losses/criterion.py official repository ran MIT (permissive) · 864ff812c98727df · report
dice_loss ZiqinZhou66/ZegCLIP/models/losses/criterion.py official repository ran fingerprinted MIT (permissive) · 016dba4163da28df · report
get_angles ZiqinZhou66/ZegCLIP/models/decode_heads/utils.py official repository ran · honoured contract fingerprinted MIT (permissive) · 7816c6d65ab55d8f · report
get_pairs ZiqinZhou66/ZegCLIP/models/segmentor/untils.py official repository ran · our draft was wrong MIT (permissive) · d919ae32e5e4e616 · report
positional_encoding ZiqinZhou66/ZegCLIP/models/decode_heads/utils.py official repository ran MIT (permissive) · da3acf7173bd84f0 · report
sigmoid_focal_loss ZiqinZhou66/ZegCLIP/models/losses/criterion.py official repository ran fingerprinted MIT (permissive) · 2675e89c94ae08bf · report
whitespace_clean ZiqinZhou66/ZegCLIP/models/segmentor/untils.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 9542161e9640b858 · report
nested_tensor_from_tensor_list ZiqinZhou66/ZegCLIP/models/losses/misc.py official repository unverified MIT (permissive) · 58cc9ff3bf75e753 · report

Tasks

Semantic SegmentationZero-Shot LearningZero-Shot Semantic Segmentation

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Zero-Shot Semantic Segmentation COCO-Stuff ZegCLIP Inductive Setting hIoU 40.8 #4 of 15 Archive leaderboard report
Zero-Shot Semantic Segmentation COCO-Stuff ZegCLIP Transductive Setting hIoU 48.5 #4 of 15 Archive leaderboard report
Zero-Shot Semantic Segmentation PASCAL VOC ZegCLIP Inductive Setting hIoU 84.3 #4 of 13 Archive leaderboard report
Zero-Shot Semantic Segmentation PASCAL VOC ZegCLIP Transductive Setting hIoU 91.1 #4 of 13 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

CLIPfail

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections