Mapping my Face in the GAN Latent Space

Taken from https://github.com/tkarras/progressive_growing_of_gans
Example of interpolation between two latent vectors.

Recovering a Latent Vector

This problem can be framed as simple optimisation problem that can be solved by gradient descent. Let z be the original unknown latent vector that generated a face and ϕ be the generator. Then we want to find z’ that generates a face that is a close as possible to the original one. That is, we want to solve this optimisation problem:

Recovering my Face

This technique is very good to recover a latent vector from a face generated by the same GAN. In the case of a random real face, it is not quite possible for this algorithm to identify a good latent vector which generates a close enough version of the input face. This is what I obtain when I use my face as starting point 😅:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store