arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2403.01108cs.CV

基于扩散模型的人脸交换

Face Swap via Diffusion Model

Feifei Wang

AI总结:

提出基于扩散模型的人脸交换框架,结合IP-Adapter、ControlNet和修复流程,通过DreamBooth-LoRA保证身份一致性,并利用面部引导优化提升对齐质量。

摘要:

本技术报告提出了一种基于扩散模型的框架,用于在两幅肖像图像之间进行人脸交换。该基本框架由三个组件组成,即IP-Adapter、ControlNet和Stable Diffusion的修复(inpainting)流程,分别用于人脸特征编码、多条件生成和人脸修复。此外,我引入了面部引导优化和基于CodeFormer的混合技术,以进一步提高生成质量。具体而言,我们采用了一种最近的轻量级定制方法(即DreamBooth-LoRA),通过1)使用稀有标识符“sks”来表示源身份,以及2)将源肖像的图像特征像文本特征一样注入每个交叉注意力层,来保证身份一致性。然后,我借助Stable Diffusion强大的修复能力,并利用目标肖像的Canny图像和人脸检测标注作为条件,引导ControlNet的生成,使源肖像与目标肖像对齐。为了进一步纠正面部对齐,我们在样本生成过程中添加了面部引导损失来优化文本嵌入。代码可在以下网址获取:https://github.com/somuchtome/Faceswap

英文摘要:

This technical report presents a diffusion model based framework for face swapping between two portrait images. The basic framework consists of three components, i.e., IP-Adapter, ControlNet, and Stable Diffusion's inpainting pipeline, for face feature encoding, multi-conditional generation, and face inpainting respectively. Besides, I introduce facial guidance optimization and CodeFormer based blending to further improve the generation quality. Specifically, we engage a recent light-weighted customization method (i.e., DreamBooth-LoRA), to guarantee the identity consistency by 1) using a rare identifier "sks" to represent the source identity, and 2) injecting the image features of source portrait into each cross-attention layer like the text features. Then I resort to the strong inpainting ability of Stable Diffusion, and utilize canny image and face detection annotation of the target portrait as the conditions, to guide ContorlNet's generation and align source portrait with the target portrait. To further correct face alignment, we add the facial guidance loss to optimize the text embedding during the sample generation. The code is available at: https://github.com/somuchtome/Faceswap

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑