This project demonstrates the implementation of a Generative Adversarial Network (GAN) using the CelebA face dataset. The GAN is built with PyTorch and utilizes the Wasserstein GAN with Gradient Penalty (WGAN-GP) technique. The project showcase my ability to build a GAN model from different research papers and provides a starting point for further experimentation and improvement.
The dataset used is a subset of the CelebA dataset, which contains facial images. For this project, the dataset was reduced to 5000 images. You can access the dataset here.
- Base CNN Model: The CNN architecture used is based on the paper Deep Residual Learning for Image Recognition.
- Wasserstein GAN: The GAN framework is based on the Wasserstein GAN paper.
- Wasserstein GAN with Gradient Penalty: The WGAN-GP technique is implemented following the Wasserstein GAN with Gradient Penalty paper.
- Epochs: The model was trained for 200 epochs.
- Results: The current results may not be optimal due to the limited number of training epochs and the complexity of the model. The trained generator and discriminator are included for further experimentation.
To run the project:
- Open the provided Jupyter notebook.
- Load the pre-trained models:
generator.pth
discriminator.pth
- You can also further train the models to improve results. Note that a deeper neural network with more parameters might yield better performance.
generator.pth
: The pre-trained generator model.discriminator.pth
: The pre-trained discriminator model.notebook.ipynb
: Jupyter notebook for running and experimenting with the models.
- The models may benefit from additional training epochs and/or a more complex neural network architecture to achieve better results.