Skip to main content
QUICK REVIEW

[论文解读] Zero-shot Image-to-Image Translation

Gaurav Parmar, Krishna Kumar Singh|arXiv (Cornell University)|Feb 6, 2023
Generative Adversarial Networks and Image SynthesisComputer Science被引用 3
一句话总结

本文提出 pix2pix-zero,一种无需训练、无需提示的图像到图像转换方法,利用预训练的文本到图像扩散模型实现真实图像的零样本编辑。通过在 CLIP 嵌入空间中自动发现编辑方向,并应用交叉注意力引导以保持输入结构,该方法在无需微调或手动提示的情况下,实现了内容保留和照片真实感方面的最先进性能。

ABSTRACT

Large-scale text-to-image generative models have shown their remarkable ability to synthesize diverse and high-quality images. However, it is still challenging to directly apply these models for editing real images for two reasons. First, it is hard for users to come up with a perfect text prompt that accurately describes every visual detail in the input image. Second, while existing models can introduce desirable changes in certain regions, they often dramatically alter the input content and introduce unexpected changes in unwanted regions. In this work, we propose pix2pix-zero, an image-to-image translation method that can preserve the content of the original image without manual prompting. We first automatically discover editing directions that reflect desired edits in the text embedding space. To preserve the general content structure after editing, we further propose cross-attention guidance, which aims to retain the cross-attention maps of the input image throughout the diffusion process. In addition, our method does not need additional training for these edits and can directly use the existing pre-trained text-to-image diffusion model. We conduct extensive experiments and show that our method outperforms existing and concurrent works for both real and synthetic image editing.

研究动机与目标

  • 为解决使用预训练文本到图像扩散模型编辑真实图像的挑战,这些模型通常需要繁琐的手动提示,且往往无法保留输入结构。
  • 消除图像到图像转换中对特定任务微调或图像特定文本提示的需求。
  • 实现在保持布局、物体姿态和背景细节的前提下,对多样化的真实和合成图像进行零样本编辑。
  • 开发一种方法,利用现有预训练模型,无需额外训练或昂贵的反演过程。

提出的方法

  • 通过计算源域和目标域术语(如 'cat' 与 'dog')的句子嵌入之间的均值差异,在 CLIP 嵌入空间中自动发现编辑方向。
  • 使用具有自相关性正则化的确定性 DDIM 反演,确保噪声保持接近高斯分布,从而提高反演质量和稳定性。
  • 在扩散采样过程中应用交叉注意力引导,以保持输入图像的交叉注意力图,从而维持结构一致性。
  • 直接利用预训练的文本到图像扩散模型,无需微调,从而实现对新编辑任务的零样本适应。
  • 使用成对的真实-编辑图像数据,将高保真度的扩散模型输出蒸馏为快速的条件 GAN,以实现实时推理。

实验结果

研究问题

  • RQ1是否可以在无需为每张输入图像手动提供文本提示的情况下,自动在 CLIP 嵌入空间中发现编辑方向?
  • RQ2在扩散过程中保持交叉注意力图的一致性,是否能有效保留输入图像的结构布局?
  • RQ3与现有零样本和微调方法相比,一种无需训练、无需提示的方法是否能在内容保留和照片真实感方面表现更优?
  • RQ4基于句子的编辑方向发现与交叉注意力引导的结合,在保持物体姿态和背景保真度方面是否有效?

主要发现

  • 所提方法在保持最低结构距离(0.04)和背景 LPIPS(0.05)的同时,实现了最高的 CLIP 准确率(0.87),表明编辑一致性和内容保留性更优。
  • 交叉注意力引导显著提升了结构保留能力,相比缺少该组件的消融变体,结构失真和背景误差明显降低。
  • 在照片真实感和内容保留性方面,该方法优于 SDEdit 和 DDIM + 词替换,在对象替换和风格迁移等复杂编辑任务中表现尤为突出。
  • 通过条件 GAN 蒸馏,推理速度提升了约 3,800 倍,实现在消费级硬件上的实时编辑。
  • 该方法在多样化的真实和合成图像上均表现出鲁棒性,包括对象替换(猫 → 狗)、属性编辑(添加眼镜)以及风格迁移(草图 → 油彩笔画)。

更好的研究,从现在开始

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

无需绑定信用卡

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