Spring 2022 CS 444
Assignment 4: Cat face generation with GANs
Due date: Tuesday, April 19th, 11:59:59PM
Sample images from a GAN trained on the cat face dataset
In this assignment, you will train a generative adversarial network (GAN) on a cat dataset and learn to generate cat face images. You will also implement spectral normalization of discriminator weights to improve the quality of generator images (see Algorithm 1 in Appendix A of the linked paper).
In addition to familiarizing you with generative models and recurrent neural networks, this assignment will help you gain experience with how to implement GANs in PyTorch and how to augment natural images. You will also get familiarised with one of the techniques to imporve the quality of images generated by GANs.
Download the starting code here.
Once you have extracted the zip file, go to the assignment folder and execute the download script provided:
Alternatively, you can download the cat face dataset from this download link (47.4 MB).
The provided image data are all cropped and resized to the same width and height.
The top-level notebook (
We also provide with a notebook to help with debugging called
You will need to use a GPU for training your GAN. We recommend using Colab to debug, but a Google Cloud machine once your debugging is finished. Training the GAN should take roughly an hour at most.For reference, here are some samples of GAN (left) and LSGAN (right) output at various points during training:
Extra CreditImplement an alternative GAN formulation like WGAN/WGAN-GP, DRAGAN, or BEGAN.
Environment Setup (Local)
If you will be working on the assignment on a local machine then you will need a python environment set up with the appropriate packages. We suggest that you use Conda to manage python package dependencies (https://conda.io/docs/user-guide/getting-started.html).
The assignment is given to you in the
This assignment is due on Canvas on the due date specified above. You must upload the following files:
Please refer to course policies on collaborations, late submission, etc.