This repository contains Keras implementation of Wasserstain GAN with Gradient Penalty for face generation.
Note for people who speak Serbian language: Detaljna teorijska objašnjenja i matematička izvođenja potrebna za implementaciju Wasserstein generativnog suprotstavljenog modela sa penalizovanjem gradijenata mogu se naći na sledećem linku
The model is trained on CelebA dataset. It contains 202600 images of human faces, which are labeled with attributes such as (smiling, male, young, eyeglasses, ...).
Following results are for the model trained on images of size 64x64.
New faces are generated by sampling the vector of the latent space from the uniform distribution and passing it through the generator network.
We can create the latent space vector of the smiling man by substracting the average vector of the smiling women from the average vector of the neutral women and adding the average vector of the neutral man. If we pass the resulting vector through the generator, we can generate smiling man: Average vectors are generated from 3 handpicked generated images.
We can take 2 vectors in the latent space and gradually interpolate between them. Because the latent space of the WGAN GP is continuous and complete, if we pass the interpolated vectors through the generator we should get gradual transition from one image to another:
As you can see from the image below, there are no oscilations in the loss and there is no mode colapse.