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),为三维感知人脸交换铺平了道路,并且也能与其它下游StyleGAN2生成器任务兼容。源代码和模型可在 \url{https://github.com/usingcolor/LatentSwap} 处获取。