Skip to content

Deep convolutional generative adversarial networks (DCGANs) for generating fake faces with Tensorflow and Keras.

Notifications You must be signed in to change notification settings

mark-antal-csizmadia/dcgan-fake-faces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dcgan-fake-faces

Open In Colab

Deep convolutional generative adversarial networks (DCGANs) for generating fake faces with Tensorflow and Keras.

Final project for DD2424 Deep Learning in Data Science at KTH Royal Institute of Technology, Stockholm.

Note that this project is a fork of Cool GANs and Fake Celebrities that was a collaboration of the group:

Data

The Large-scale CelebFaces Attributes (CelebA) Dataset is publicly available here.

The dcgan.ipynb includes code to download and prepare the dataset, but it can also be done manually.

Implementation

The implementation follows that of Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks.

The code is in dcgan.ipynb.

Our experiments and results are discussed in the report and the presentation

The models are evaluated based on the generator and the discriminator losses, and the Fréchet Inception Distance (FID) metric proposed in GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium .

Due to the limit of accessibility to adequate hardware to training the DCGAN on the original faces dataset dimensions of 218 x 178, the models are trained on 32 x 32 and 64 x 64 images.

The implementation is first tested on the MNIST dataset, and then on the faces dataset.

Results

Some samples of generated images are shown below.

MNIST Results

All the generated MNIST images are of size 28 x 28. After 50 epochs:

drawing

Faces Results

Below are some results of generating 32 x 32 images. After 75 epochs:

drawing

The GIFs show the evolution of the generator. The evolution of the 32 x 32 generator (from another experiment than above):

alt text

Below are some results of generating 64 x 64 images. After 125 epochs:

alt text

The evolution of the 64 x 64 generator (from the same experiment as above):

alt text

Logs

Training logs are located at logs and can be visualized with Tensorboard.

Some examples are shown below for a model trained on the 32 x 32 faces dataset.

Discriminator Loss

drawing

Generator Loss

drawing

FID Score

drawing

Conclusions

GANs are cool, DCGANs are cooler.

About

Deep convolutional generative adversarial networks (DCGANs) for generating fake faces with Tensorflow and Keras.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published