In this project, I defined and trained a DCGAN on a dataset of faces. The goal of this project is to get a generator network to generate new images of faces that look as realistic as possble. The image below is a result of the training:
- Clone the repository and navigage to the downloaded folder.
git clone https://github.com/ayowolet/Face-Generation cd Face-Generation
- Open the
dlnd_face_generation.ipynb
file. The HTML version of the file is also available.jupyter notebook dlnd_face_generation.ipynb
- Read and follow the instructions! This repository does not include the dataset of faces. You can find and download it in the notebook.
- Pre-processed Data
- Create a DataLoader
- Define the Model
- Discriminator
- Generator
- Initialize the weights of your network
- Build complete network
- Discriminator and Generator Losses
- Optimizers
- Training
- Training Loss
- Generator samples from training
The list below represents main libraries and its objects for the project.
- PyTorch (Generator and Discriminator)
Training is very time consuming, try to use GPU to train.
You can use Amazon Web Services to launch an EC2 GPU instance. It is not free though.