Skip to main content
QUICK REVIEW

[论文解读] ZeroCap: Zero-Shot Image-to-Text Generation for Visual-Semantic Arithmetic

Yoad Tewel, Yoav Shalev|arXiv (Cornell University)|Nov 29, 2021
Multimodal Machine Learning Applications被引用 6
一句话总结

ZeroCap 提出了一种零样本图像到文本生成方法,通过结合 CLIP 的视觉-语义嵌入与预训练语言模型(GPT-2),在无需任何微调的情况下生成多样化且语义合理的描述。通过利用 CLIP 的语义对齐能力与 GPT-2 的生成能力,该方法实现了新颖的视觉-语义运算,如基于图像的类比与比较,在视觉关系基准上达到最先进性能的同时保持了高水平的语义保真度。

ABSTRACT

Recent text-to-image matching models apply contrastive learning to large corpora of uncurated pairs of images and sentences. While such models can provide a powerful score for matching and subsequent zero-shot tasks, they are not capable of generating caption given an image. In this work, we repurpose such models to generate a descriptive text given an image at inference time, without any further training or tuning steps. This is done by combining the visual-semantic model with a large language model, benefiting from the knowledge in both web-scale models. The resulting captions are much less restrictive than those obtained by supervised captioning methods. Moreover, as a zero-shot learning method, it is extremely flexible and we demonstrate its ability to perform image arithmetic in which the inputs can be either images or text, and the output is a sentence. This enables novel high-level vision capabilities such as comparing two images or solving visual analogy tests. Our code is available at: https://github.com/YoadTew/zero-shot-image-to-text.

研究动机与目标

  • 实现无需任何微调或模型重训练的零样本图像字幕生成。
  • 克服监督式字幕模型因依赖人工标注而产生刻板、受限字幕的局限,通过利用大规模网络预训练模型实现突破。
  • 实现视觉-语义运算,支持如基于图像的类比与比较等任务。
  • 生成反映现实世界知识并超越人工标注数据集语义多样性的字幕。
  • 证明结合 CLIP 与语言模型可实现高级视觉能力,如图像类比求解。

提出的方法

  • 该方法将 CLIP 的视觉与文本编码器与 GPT-2 的自回归语言生成机制结合,在推理阶段生成图像字幕。
  • 在解码过程中,对 GPT-2 所有层与头的键值对进行修改,使生成的标记与 CLIP 的视觉-语义嵌入空间对齐。
  • 字幕生成过程完全为零样本,仅依赖 CLIP 与 GPT-2 的预训练权重,无需任何参数更新。
  • 通过将图像与文本视为共享 CLIP 嵌入空间中的向量,实现多模态运算,支持如 'A 之于 B,正如 C 之于 X' 的操作。
  • 使用 CLIP-score 作为关键评估指标,衡量生成字幕与输入图像之间的语义对齐程度。
  • 该方法支持图像到文本与文本到图像的运算,例如通过文本提示将白天图像转换为夜间版本。
Figure 1 : Our novel captioning method ZeroCap exhibits real-world knowledge, generates text that is more diverse and less scripted than existing methods, can address the written content of an image, and can perform visual-semantic arithmetic.
Figure 1 : Our novel captioning method ZeroCap exhibits real-world knowledge, generates text that is more diverse and less scripted than existing methods, can address the written content of an image, and can perform visual-semantic arithmetic.

实验结果

研究问题

  • RQ1是否能通过零样本方法在不微调图像-字幕数据集的情况下,生成多样化且语义丰富的字幕?
  • RQ2是否仅通过预训练模型即可实现视觉-语义运算,支持如图像类比求解等任务?
  • RQ3与监督式基线相比,该方法在语义对齐与多样性方面生成的字幕质量如何?
  • RQ4该模型在多大程度上能生成反映现实世界知识、超越精选数据集的字幕?
  • RQ5通过在共享嵌入空间中结合图像与文本,该方法能否实现多模态推理?

主要发现

  • ZeroCap 在视觉关系基准上达到 0.70 的 CLIP-score,显著优于基线模型 ClipCap(0.24),表明其与输入图像具有更优的语义对齐。
  • 在相同基准上,该方法的 BLEU-1 得分为 0.10,Recall@5 为 0.32,分别显著优于 ClipCap 的 0.003 与 0.035,证明字幕质量明显提升。
  • 生成的字幕比监督式模型更具多样性且更少刻板,反映出更广泛的真实世界知识与语义丰富性。
  • 该模型成功实现了视觉-语义运算,例如通过文本引导提示 'day' 和 'night',从 'breakfast' 图像生成 'Nighttime dinner'。
  • 该方法实现了新颖的高级视觉任务,包括对两幅图像进行语义比较,以及使用公式 X ∼ C + B - A 解决视觉类比问题。
  • 尽管使用的是 GPT-2(而非 GPT-3),该方法仍展现出强大的零样本能力,凸显了大规模预训练模型结合的强大潜力。
Figure 2 : An overview of our approach. We guide the model towards the phrase ‘eagle’ instead of ‘man’. We do this by adjusting the context ( $C_{4}$ ), using the gradients of CLIP loss ( $\mathcal{L}_{\text{CLIP}}$ ) illustrated with a red arrow. To maintain language attributes, we optimize the min
Figure 2 : An overview of our approach. We guide the model towards the phrase ‘eagle’ instead of ‘man’. We do this by adjusting the context ( $C_{4}$ ), using the gradients of CLIP loss ( $\mathcal{L}_{\text{CLIP}}$ ) illustrated with a red arrow. To maintain language attributes, we optimize the min

更好的研究,从现在开始

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

无需绑定信用卡

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