Skip to main content
QUICK REVIEW

[论文解读] Zero-Shot Contrastive Loss for Text-Guided Diffusion Image Style Transfer

Serin Yang, Hyunmin Hwang|arXiv (Cornell University)|Mar 15, 2023
Generative Adversarial Networks and Image Synthesis被引用 5
一句话总结

本文提出了一种无需训练的零样本对比损失(ZeCon),用于文本引导的扩散模型,通过在预训练扩散模型的特征空间中对输入图像和生成图像的图像块进行对比学习,实现在不损失内容的前提下转移风格。该方法在风格迁移、图像到图像翻译以及图像编辑任务中无需微调或辅助网络,性能优于现有方法。

ABSTRACT

Diffusion models have shown great promise in text-guided image style transfer, but there is a trade-off between style transformation and content preservation due to their stochastic nature. Existing methods require computationally expensive fine-tuning of diffusion models or additional neural network. To address this, here we propose a zero-shot contrastive loss for diffusion models that doesn't require additional fine-tuning or auxiliary networks. By leveraging patch-wise contrastive loss between generated samples and original image embeddings in the pre-trained diffusion model, our method can generate images with the same semantic content as the source image in a zero-shot manner. Our approach outperforms existing methods while preserving content and requiring no additional training, not only for image style transfer but also for image-to-image translation and manipulation. Our experimental results validate the effectiveness of our proposed method.

研究动机与目标

  • 解决基于扩散模型的图像生成中风格迁移与内容保留之间的权衡问题。
  • 消除在文本引导风格迁移中对微调或额外神经网络的需求。
  • 通过利用预训练扩散模型的嵌入实现零样本内容保留。
  • 在保持结构和语义内容保真度的同时,提升风格迁移质量。
  • 将适用范围扩展至图像到图像翻译和图像编辑任务。

提出的方法

  • 提出一种基于预训练扩散模型潜在空间中提取的图像块特征的零样本对比损失(ZeCon)。
  • 利用预训练扩散模型自身的特征嵌入,在输入图像和生成图像的图像块之间计算对比损失。
  • 将ZeCon损失与基于CLIP的文本引导相结合,引导扩散过程向目标风格演进。
  • 在反向去噪过程中应用该损失,通过ZeCon和CLIP损失的梯度,在每一步更新去噪图像。
  • 采用基于图像块的对比学习,在保留细粒度结构细节的同时实现全局风格迁移。
  • 无需任何额外训练、微调或辅助网络,因此计算效率高且可即插即用。
Figure 1: Our style transfer method produces impressive results when applied to a range of artistic styles. The method preserves the underlying structure of the source images while transforming them into the desired styles.
Figure 1: Our style transfer method produces impressive results when applied to a range of artistic styles. The method preserves the underlying structure of the source images while transforming them into the desired styles.

实验结果

研究问题

  • RQ1零样本对比损失能否在不微调的情况下保留文本引导扩散图像风格迁移中的语义内容?
  • RQ2基于图像块的对比学习与VGG或MSE损失相比,在保留结构细节方面表现如何?
  • RQ3所提方法能否在多种风格下实现高质量风格迁移,同时保持内容保真度?
  • RQ4该方法是否能泛化至风格迁移之外的图像到图像翻译和图像编辑任务?
  • RQ5全局与方向性CLIP损失,以及基于图像块与整图引导,在风格迁移质量中的相对贡献如何?

主要发现

  • 用户研究表明,ZeCon损失显著提升了内容保留效果,其内容得分达到4.81,优于单独使用MSE(4.29)和VGG(3.29)损失。
  • 消融实验证实,ZeCon对于保留细粒度结构细节(如建筑窗户)至关重要,若省略则此类细节会丢失。
  • 全局与方向性CLIP损失的结合可生成更具风格化的输出,表明方向性引导能增强风格调制效果。
  • 基于图像块的引导相比整图引导,能实现更一致且大范围的风格迁移,而整图引导通常仅影响局部区域。
  • 推理时间仅需38秒,显著快于DiffusionCLIP(96秒)和DDIB(12秒),且无需训练或数据准备。
  • 该方法在图像到图像翻译和外观编辑(如年龄、性别、妆容)任务中也表现出良好泛化能力,展现出广泛适用性。
Figure 2: Our proposed method. To guide the diffusion model in our proposed method, we calculate the ZeCon loss using a noise estimator $\epsilon_{\theta}(\cdot)$ and the CLIP loss using the CLIP model. These losses allow us to add gradients to the denoised image at each time step.
Figure 2: Our proposed method. To guide the diffusion model in our proposed method, we calculate the ZeCon loss using a noise estimator $\epsilon_{\theta}(\cdot)$ and the CLIP loss using the CLIP model. These losses allow us to add gradients to the denoised image at each time step.

更好的研究,从现在开始

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

无需绑定信用卡

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