Skip to content

Keras implementation of WGAN GP for face generation. The model is trained on CelebA dataset.

Notifications You must be signed in to change notification settings

Data-Science-kosta/WGAN-GP-for-Face-Generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Keras implementation of WGAN GP for face generation. The model is trained on CelebA dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages