Search code examples
generategenerative-adversarial-network

StyleGAN how to generate B image using A source image


I am studying the StyleGAN. It is new for me, and I could not understand mix style of generating images.

In this image showed, that using A created B images. How can I do that, If I want to use A source image not from training data? image


Solution

  • In that example image, the A source images are not training data. They are generated images, of people who do not exist. The trained network (which is just the generator part) does not take any images as input, it only takes a random 512-dimensional vector (latent).

    Thus, it is impossible to do what you ask using just the StyleGAN. You would need some way to reduce an input image to a latent vector, which is hard to do and isn't guaranteed to give reasonable results anyway.

    The followup paper, StyleGAN2 (https://github.com/NVlabs/stylegan2) has an architecture where it is slightly easier to try to find a matching latent for an input image, and they even talk a bit about how to do it.