Skip to content

Latest commit

 

History

History
21 lines (21 loc) · 2.27 KB

README.md

File metadata and controls

21 lines (21 loc) · 2.27 KB

WGAN-GP-for-face-generation

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

DATASET

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, ...).

RESULTS

Following results are for the model trained on images of size 64x64.

Generating new faces

New faces are generated by sampling the vector of the latent space from the uniform distribution and passing it through the generator network. generated faces

Vector arithmetic in the latent space

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: smiling man Average vectors are generated from 3 handpicked generated images.

Morphing between faces

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: morphing

Training stability of WGAN GP

As you can see from the image below, there are no oscilations in the loss and there is no mode colapse. loss