We propose LatentSwap, a simple face swapping framework generating a face swap latent code of a given generator. Utilizing randomly sampled latent codes, our framework is light and does not require datasets besides employing the pre-trained models, with the training procedure also being fast and straightforward. The loss objective consists of only three terms, and can effectively control the face swap results between source and target images. By attaching a pre-trained GAN inversion model independent to the model and using the StyleGAN2 generator, our model produces photorealistic and high-resolution images comparable to other competitive face swap models. We show that our framework is applicable to other generators such as StyleNeRF, paving a way to 3D-aware face swapping and is also compatible with other downstream StyleGAN2 generator tasks. The source code and models can be found at \url{https://github.com/usingcolor/LatentSwap}.
翻译:我们提出LatentSwap,一种简单的换脸框架,可为给定生成器生成换脸潜在编码。利用随机采样的潜在编码,我们的框架轻量且无需依赖数据集(除使用预训练模型外),训练过程同样快速直接。损失目标仅包含三项,可有效控制源图像与目标图像之间的换脸结果。通过附加与模型无关的预训练GAN逆映射模型,并使用StyleGAN2生成器,我们的模型可生成与其他竞争性换脸模型相媲美的逼真高分辨率图像。我们展示该框架可应用于其他生成器(如StyleNeRF),为3D感知换脸开辟道路,同时兼容其他下游StyleGAN2生成器任务。源代码和模型可在\url{https://github.com/usingcolor/LatentSwap}获取。