[论文解读] Prompt Tuning Inversion for Text-Driven Image Editing Using Diffusion Models
本文提出 Prompt Tuning Inversion(PTI),一种用户友好的文本驱动图像编辑方法,适用于扩散模型。该方法通过可学习的条件嵌入将输入图像内容编码,实现高保真度的重建与编辑。通过在目标文本嵌入与优化后的图像嵌入之间进行插值,PTI 在可编辑性与保真度之间实现了优越的平衡,在 ImageNet 上的 PSNR 达到 25.71,SSIM 达到 0.8501。
Recently large-scale language-image models (e.g., text-guided diffusion models) have considerably improved the image generation capabilities to generate photorealistic images in various domains. Based on this success, current image editing methods use texts to achieve intuitive and versatile modification of images. To edit a real image using diffusion models, one must first invert the image to a noisy latent from which an edited image is sampled with a target text prompt. However, most methods lack one of the following: user-friendliness (e.g., additional masks or precise descriptions of the input image are required), generalization to larger domains, or high fidelity to the input image. In this paper, we design an accurate and quick inversion technique, Prompt Tuning Inversion, for text-driven image editing. Specifically, our proposed editing method consists of a reconstruction stage and an editing stage. In the first stage, we encode the information of the input image into a learnable conditional embedding via Prompt Tuning Inversion. In the second stage, we apply classifier-free guidance to sample the edited image, where the conditional embedding is calculated by linearly interpolating between the target embedding and the optimized one obtained in the first stage. This technique ensures a superior trade-off between editability and high fidelity to the input image of our method. For example, we can change the color of a specific object while preserving its original shape and background under the guidance of only a target text prompt. Extensive experiments on ImageNet demonstrate the superior editing performance of our method compared to the state-of-the-art baselines.
研究动机与目标
- 解决现有文本驱动图像编辑方法依赖掩码或精确源描述的局限性。
- 通过利用扩散模型从噪声潜在表示中准确重建输入图像,提升图像编辑的保真度。
- 仅需输入图像与目标文本提示,即可实现直观、用户友好的编辑。
- 在无需领域特定微调的情况下,实现对多样化图像领域的泛化。
- 在输入图像的结构细节保留与可编辑性之间实现平衡。
提出的方法
- 提出 Prompt Tuning Inversion(PTI),一种两阶段方法:重建与编辑。
- 在重建阶段,通过优化提示微调向量,将输入图像特征编码为可学习的条件嵌入。
- 在采样过程中使用分类器自由引导,引导尺度为 7.5,以提升图像质量。
- 在编辑阶段,线性插值目标文本嵌入与优化后的图像嵌入,生成新的条件嵌入。
- 插值后的嵌入引导扩散模型生成既保留输入结构又符合目标文本的编辑图像。
- 采用可微分的优化过程以精细化条件嵌入,确保快速且准确的反演。
实验结果
研究问题
- RQ1可学习的条件嵌入是否能有效优化,以从扩散模型的噪声潜在表示中重建真实图像?
- RQ2在目标文本嵌入与优化后的图像嵌入之间进行插值,是否能改善可编辑性与保真度之间的平衡?
- RQ3所提出的方法是否能在不提供用户掩码或详细源描述的情况下实现高保真度编辑?
- RQ4与 DDIM 和 Null-Text Inversion 等现有反演技术相比,该方法在重建质量与编辑性能方面表现如何?
- RQ5哪些超参数(如插值比例与学习率)对可编辑性-保真度权衡影响最大?
主要发现
- PTI 在 ImageNet 上实现 PSNR 25.71 与 SSIM 0.8501,优于 NTI(24.45 PSNR,0.8270 SSIM)与 DDIM(13.64 PSNR,0.4641 SSIM)。
- 在所有学习率与迭代设置下,该方法收敛更快且重建质量优于 NTI。
- 消融研究显示,插值比例(η)为 0.9 时,可实现最佳的可编辑性与保真度平衡,更低值会降低性能。
- 将学习率(β)从 0.1 降低至 0.01 会恶化 CSFID-LPIPS 得分,表明更高的学习率有助于提升编辑中的平衡性。
- 尽管性能优异,该方法在同时编辑同一对象的多个实例(如多只大雁)时仍存在失败案例。
- 该方法在多样化图像领域中表现有效,且无需掩码或源文本描述,显著提升了可用性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。