[论文解读] Photoswap: Personalized Subject Swapping in Images
Photoswap 通过在扩散模型中进行注意力对换,将学习到的主体概念转移到源图像中,实现无需训练的个性化主体替换,保持姿态与背景,在人类评估中优于基线。
In an era where images and visual content dominate our digital landscape, the ability to manipulate and personalize these images has become a necessity. Envision seamlessly substituting a tabby cat lounging on a sunlit window sill in a photograph with your own playful puppy, all while preserving the original charm and composition of the image. We present Photoswap, a novel approach that enables this immersive image editing experience through personalized subject swapping in existing images. Photoswap first learns the visual concept of the subject from reference images and then swaps it into the target image using pre-trained diffusion models in a training-free manner. We establish that a well-conceptualized visual subject can be seamlessly transferred to any image with appropriate self-attention and cross-attention manipulation, maintaining the pose of the swapped subject and the overall coherence of the image. Comprehensive experiments underscore the efficacy and controllability of Photoswap in personalized subject swapping. Furthermore, Photoswap significantly outperforms baseline methods in human ratings across subject swapping, background preservation, and overall quality, revealing its vast application potential, from entertainment to professional editing.
研究动机与目标
- 为图像中的个性化主体替换 Introduce a framework for personalized subject swapping in images.
- 使用扩散模型在测试时无需训练,利用参考图像学习目标主体。
- 将源图像的注意力组件迁移以引导无缝的主体替换。
- 在插入参考主体时,保持姿态和整体构图。
- 通过广泛实验和人类评估展示有效性。
提出的方法
- 从参考图像学习目标主体 O_t,使用 DreamBooth 或类似概念学习来创建一个特殊标记。
- 对预训练扩散模型进行微调,以包含新概念,而无需对整个模型在测试时进行微调。
- 在源图像生成中,提取自注意力 M、自注意力输出 phi,以及跨注意力 A,之后将这些中间变量交换到目标图像生成过程中。
- 在早期扩散步骤中,用源图像的 phi、M、A 替换它们,同时保持来自目标提示的跨注意力输出 psi 固定,以保持目标身份。
- 对真实图像使用带空文本优化的增强版 DDIM 反演,获得可靠的起始噪声 z_T。
- 通过步长参数(lambda_phi、lambda_M、lambda_A)控制替换,以在布局保持和主体身份之间取得平衡。
- 提供一个无需训练的算法(Algorithm 1)用于进行注意力对换,而无需微调整个扩散模型。
实验结果
研究问题
- RQ1是否能够将一个构思良好的视觉主体无缝转移到目标图像,同时保持姿态和图像连贯性?
- RQ2在扩散模型中进行无需训练的注意力操控,在多大程度上能够使用参考图像实现个性化主体替换?
- RQ3不同注意力成分(phi、M、A)在布局保持和身份转移方面的贡献如何?
- RQ4概念学习方法(DreamBooth 与 Text Inversion)对替换质量有何影响?
- RQ5在对主体替换、背景保持和整体质量的人类评估中,Photoswap 相较于基线方法的表现如何?
主要发现
- Photoswap 能在合成和真实图像中实现无缝主体替换,保持姿态与整体图像连贯性。
- 在人类评估中,Photoswap 在主体替换、背景保持和整体质量方面超越 P2P+DreamBooth(如整体质量为 50.8% 对 28.0%)。
- 替换自注意力输出(phi)比仅使用跨注意力获得更强的布局控制,且早期启动替换对维持原始图像布局至关重要。
- 跨注意力映射(A)有助于布局,但若替换过于激进可能泄露提示信息;保持目标身份需要将 psi 固定自目标提示。
- 基于 DreamBooth 的概念学习被证明是有效的;Text Inversion 也可工作,但对于如人脸等复杂主体可能表现不佳。
- Photoswap 在多主体和遮挡主体场景中表现出鲁棒性,并且能够处理带反演的真实图像。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。