Skip to main content
QUICK REVIEW

[论文解读] Conditional Score Guidance for Text-Driven Image-to-Image Translation

Hyun‐Soo Lee, Minsoo Kang|arXiv (Cornell University)|May 29, 2023
Generative Adversarial Networks and Image Synthesis被引用 4
一句话总结

本文提出了一种无需训练的、基于条件得分引导的文本驱动图像到图像翻译方法,利用预训练的文本到图像扩散模型。通过推导一种新颖的条件得分函数,该函数结合了源图像和源文本信息,并引入交叉注意力混合技术,该方法能够在保持无关背景内容的同时,对特定图像区域实现高保真度编辑,其在结构保真度和编辑一致性方面优于先前方法。

ABSTRACT

We present a novel algorithm for text-driven image-to-image translation based on a pretrained text-to-image diffusion model. Our method aims to generate a target image by selectively editing the regions of interest in a source image, defined by a modifying text, while preserving the remaining parts. In contrast to existing techniques that solely rely on a target prompt, we introduce a new score function that additionally considers both the source image and the source text prompt, tailored to address specific translation tasks. To this end, we derive the conditional score function in a principled manner, decomposing it into the standard score and a guiding term for target image generation. For the gradient computation of the guiding term, we assume a Gaussian distribution of the posterior distribution and estimate its mean and variance to adjust the gradient without additional training. In addition, to improve the quality of the conditional score guidance, we incorporate a simple yet effective mixup technique, which combines two cross-attention maps derived from the source and target latents. This strategy is effective for promoting a desirable fusion of the invariant parts in the source image and the edited regions aligned with the target prompt, leading to high-fidelity target image generation. Through comprehensive experiments, we demonstrate that our approach achieves outstanding image-to-image translation performance on various tasks.

研究动机与目标

  • 解决现有文本到图像扩散模型在执行图像到图像翻译时可控性不足的问题。
  • 基于修改后的文本,实现对特定图像区域的精确编辑,同时保持图像其余部分不变。
  • 开发一种无需训练的方法,通过利用源图像和源文本上下文增强扩散采样中的引导效果。
  • 通过一种新颖的交叉注意力混合策略,融合源和目标潜在表示,提升生成质量。
  • 引入一种新度量标准,用于评估翻译前后成对图像关系的保持程度。

提出的方法

  • 推导一种条件得分函数,将基于目标文本的标准得分与基于目标潜在变量和目标提示下源潜在变量后验的引导项相结合。
  • 将后验分布建模为高斯分布,无需额外训练即可估计其均值和协方差,以计算引导梯度。
  • 引入一种交叉注意力混合技术,可在每个去噪步骤中自适应地融合来自源和目标潜在变量的交叉注意力图。
  • 在DDIM采样过程中应用条件得分引导,以引导扩散过程朝向期望的编辑结果,同时保持结构一致性。
  • 使用CLIP编码处理文本提示,并利用预训练扩散模型(如Stable Diffusion)的潜在空间表示。
  • 使用背景掩码估计高斯后验的协方差矩阵,将引导聚焦于相关图像区域。

实验结果

研究问题

  • RQ1一种结合源图像和源文本信息的条件得分函数,能否提升文本驱动图像到图像翻译中的可控性?
  • RQ2基于源潜在变量高斯后验的引导项,如何在不微调的情况下提升编辑保真度?
  • RQ3交叉注意力混合在多大程度上改善了生成图像中不变背景与编辑区域的融合效果?
  • RQ4与现有无需训练和微调的方法相比,该方法在保持源图像与目标图像之间结构关系方面表现如何?
  • RQ5一种衡量成对图像关系保真度的新度量标准,能否有效评估翻译的保真度?

主要发现

  • 所提出的CSG方法在所有评估任务中均实现了最佳的结构保真度(SD)和区域级编辑一致性(RD),优于包括DDIM和Prompt-to-Prompt在内的基线方法。
  • 在LAION 5B数据集上,CSG在'dog → cat'任务中SD为0.0150,RD为0.0192,显著低于DDIM(SD: 0.0748,RD: 0.4608)。
  • 消融研究证实,条件得分引导和交叉注意力混合均对性能有贡献,且去除混合技术后性能有明显下降。
  • 定性结果表明,CSG仅成功编辑目标对象(如将猫变为狗),同时保持背景结构不变,而其他方法则会改变整个图像。
  • 该方法比Pix2Pix-Zero更高效,避免了对噪声网络进行反向传播,从而减少了内存占用和推理时间。
  • 所提出的成对关系保真度度量显示,即使在传统度量标准(如CLIP分数,CS)较低的情况下,CSG仍能更好地保持结构一致性。

更好的研究,从现在开始

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

无需绑定信用卡

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