Train an encoder to map a real image into latent representation z and conditional vector y. Then by changing y, and feed changed y and z into a generator, it generates a new image with altered attribute.
- Use the generator of a pre-trained conditional GAN to create a dataset of generated images x and their latent vectors 𝑧.
- Train encoder Ez by minimizing a squared reconstruction loss between z and Ez(x).
- Given an image x. Use Ez and Ey to decompose this image into a conditional representation y and a latent representation z.
- Change y to y' to explicitly change some attributes of x.
- Feed z along with y' to the generator and generate a new image x' with changed attributes.
- Why use an extra encoder with IcGAN ?
It is a way to decompose the image into explictly conditional vector y and other implicitly factors z. Then by changing y, we can change attributes of this image.