Generative adversarial networks (GANs) can synthesize high-quality (HQ) images, and GAN inversion is a technique that discovers how to invert given images back to latent space. While existing methods perform on StyleGAN inversion, they have limited performance and are not generalized to different GANs. To address these issues, we proposed a self-supervised method to pre-train and fine-tune GAN encoders. First, we designed an adaptive block to fit different encoder architectures for inverting diverse GANs. Then we pre-train GAN encoders using synthesized images and emphasize local regions through cropping images. Finally, we fine-tune the pre-trained GAN encoder for inverting real images. Compared with state-of-the-art methods, our method achieved better results that reconstructed high-quality images on mainstream GANs. Our code and pre-trained models are available at: https://github.com/disanda/Deep-GAN-Encoders.
翻译:生成对抗网络(GAN)能够合成高质量(HQ)图像,而GAN逆映射是一种将给定图像反演至潜在空间的技术。现有方法主要针对StyleGAN逆映射,其性能有限且难以推广至不同的GAN架构。为解决这些问题,我们提出了一种自监督方法来预训练并微调GAN编码器。首先,我们设计了一个自适应模块以适应不同编码器架构,实现对多样化GAN的逆映射。随后,我们使用合成图像预训练GAN编码器,并通过裁剪图像强调局部区域特征。最后,我们对预训练的GAN编码器进行微调以实现真实图像的逆映射。与现有先进方法相比,我们的方法在主流GAN上实现了更优的重建效果,生成了更高质量的图像。我们的代码与预训练模型已开源:https://github.com/disanda/Deep-GAN-Encoders。