How to project image to latent vector in StyleGan2 (unofficial implementation)?

Viewed 231

I implemented a custom version of StyleGan2 from scratch.

Now i'd like to obtain the latent vector of a particular image. I looked at the original github StyleGan2 repo on how to project images to latent space, but there is no explanation for the code used to achieve that.

From my knowledge we will have to use the generator part of the model to generate an image and compare it with the required image to create a loss value and run gradient descent to update the input latent vector, to minimize the loss.

But how do we update the input vector? As far as i know the input vector is not trainable? Any ideas?

0 Answers
Related