Skip to main content
QUICK REVIEW

[论文解读] ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation

Ziqin Zhou, Bowen Zhang|arXiv (Cornell University)|Dec 7, 2022
Domain Adaptation and Few-Shot Learning被引用 9
一句话总结

ZegCLIP 提出了一种单阶段、高效的零样本语义分割方法,通过使用轻量级解码器,直接将 CLIP 的图像级零样本分类能力扩展到像素级预测。该方法在 VOC、COCO 和 Context 数据集上实现了最先进性能,显著优于先前方法,并且推理速度比两阶段基线方法快约 5 倍,同时通过三种关键设计在未见类别上保持了强大的泛化能力:深度提示微调(Deep Prompt Tuning)、非互斥损失(Non-mutually Exclusive Loss)和关系描述符(Relationship Descriptor)。

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

研究动机与目标

  • 简化现有基于 CLIP 的零样本语义分割方法的两阶段流程,这些方法需要为区域提议和 CLIP 推理分别使用独立的图像编码器。
  • 在不微调视觉编码器的前提下,直接将 CLIP 的图像级零样本分类能力迁移至像素级分割。
  • 在归纳式和归纳式零样本设置下,提升对未见类别的泛化能力,同时保持对已见类别的强性能。
  • 开发一种轻量化、高效且端到端的单阶段框架,避免对已见类别过拟合,同时保留 CLIP 本身固有的零样本能力。

提出的方法

  • 提出一种单阶段框架,利用 CLIP 的 patch 特征和可学习解码器,直接将文本提示与像素级别的局部图像特征进行匹配。
  • 应用深度提示微调(DPT)对 CLIP 文本编码器进行微调,而非更新视觉编码器,从而保留 CLIP 的零样本泛化能力。
  • 引入非互斥损失(NEL),采用 Sigmoid 交叉熵损失,允许对多个类别进行独立预测,从而提升对长尾和新类别类别的性能。
  • 引入关系描述符(RD),在匹配前将图像级语义先验注入文本嵌入,减少对已见类别的过拟合。
  • 使用轻量级解码器(带自注意力机制)通过比较文本嵌入与 CLIP patch 特征,执行像素级分类。
  • 采用混合训练策略:视觉编码器固定或通过 DPT 微调,解码器在已见类别的子集上端到端训练。

实验结果

研究问题

  • RQ1是否可以无需使用两个独立的图像编码器,直接以单阶段方式将 CLIP 的图像级零样本分类能力扩展到像素级分割?
  • RQ2为何对 CLIP 进行朴素的单阶段扩展在语义分割任务中会因对已见类别过拟合而难以泛化到未见类别?
  • RQ3在密集预测任务中进行微调或适配时,如何保留 CLIP 本身固有的零样本泛化能力?
  • RQ4哪些特定的架构或训练改进能显著提升对新类别的零样本泛化能力,同时保持对已见类别的性能?
  • RQ5能否设计一个统一框架,无需在训练时知晓未见类别名称,即可同时处理归纳式和归纳式零样本语义分割?

主要发现

  • 在归纳式设置下,ZegCLIP 在 VOC 数据集上对已见类别的平均交并比(mIoU)达到 91.9%,对未见类别的 mIoU 达到 77.8%,显著优于先前 SOTA 方法。
  • 在 COCO 数据集上,ZegCLIP 对未见类别的 mIoU 达到 41.4%,远超基线模型的 39.0% 和先前 SOTA 的 40.2%。
  • 仅使用关系描述符(RD)即可使 VOC 和 COCO 数据集上未见类别的 mIoU 提升近 10 个百分点,证明其在防止过拟合中的关键作用。
  • 由于消除了区域提议生成和独立 CLIP 编码的需求,ZegCLIP 的推理速度比两阶段方法(如 zsseg 和 ZegFormer)快约 5 倍。
  • 在从 COCO 到 Context 的跨域迁移中,ZegCLIP 实现了 41.2% 的 mIoU 和 68.4% 的 mAcc,优于 ZegFormer 的 36.1% mIoU 和 64.0% mAcc,展现出强大的跨领域泛化能力。
  • 深度提示微调、NEL 和 RD 的组合使已见类别达到 94.6% 的像素准确率和 91.9% 的 mIoU,未见类别 mIoU 达到 77.8%,充分验证了整体设计的有效性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。