Skip to content

ujjawalsharma15/GeneratingFacesUsingDCGAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeneratingFacesUsingDCGAN

Implementation of DCGAN on celeb faces dataset in pytorch.

link to paper here

Dataset

Dataset used is celeb faces dataset containing 2,02,599 images of celeb faces.

link to dataset here

Network Architecture

Generator consists of 5 ConvTranspose layers along with BatchNorm and leaky ReLU layers, with noise z as input and the output image is of 64x64x3 in shape.

here is the image of Generator:- alt text

Discriminator consists of 5 convolutional layers and outputs the probability of being real image, along with LeakyReLU and BatchNorm layers.

here is the image of the Discriminator:-

alt text

Implementation Details

Used Binary Cross Entropy loss, trained Discriminator for classifying real inputs first and then on fake images seperately and adding up the gradients to subtract from the weights for gradient descent, used SGD with Momentum to train Discriminator. For Generator used Adam optimizer, learning rate for both generator and discriminator training was set to 0.00015.

Refrence used for tricks to achieve stable training of GAN is ganhacks

For tracking running losses as well as to track how well our generator is performing, used TensorboardX for visualization.

Results

images generated during training:-

screenshot from 2019-02-11 17-58-17 screenshot from 2019-02-11 17-58-27 screenshot from 2019-02-11 17-58-50

images generated after training:-

screenshot from 2019-02-11 17-59-16 screenshot from 2019-02-11 17-56-41

Discriminator Loss:-

screenshot from 2019-02-11 18-12-43

Generator Loss:-

screenshot from 2019-02-11 18-12-53

Releases

No releases published

Packages

No packages published

Languages