The goal of this project is to train a DCGAN to generate new works of abstract art. The implementation will be done in PyTorch.
This project will utilze the model proposed by the 2015 paper "UNSUPERVISED REPRESENTATION LEARNING WITH DEEP CONVOLUTIONAL GENERATIVE ADVERSARIAL NETWORKS", which advocates the idea of using strided convolution to replace pooling layers.
Dataset used: https://www.kaggle.com/datasets/bryanb/abstract-art-gallery
Huggingface Demo: https://huggingface.co/spaces/therealcyberlord/abstract-art-generation
Download the libraries used with
pip install -r requirements.txt
- Update: ESRGAN model exceeds the github-LF size, please download it from my huggingface model page: https://huggingface.co/therealcyberlord/ESRGAN-Abstract-Art/tree/main
download the huggingface repo and paste esrgan.pt into the Checkpoints folder otherwise the demo will not work properly
Navigate to the cloned/downloaded directory (DCGAN-Abstract-Art) and run
python Main.py [num_images] [--seed=somenumber] [--checkpoint=somenumber] [--srgan]
eg: python Main.py 6 --seed 90 --checkpoint 150 --srgan
the arg values will be in type integer and num_images must be in the range (0, 120], only the argument num_images is required. Try reducing the number of images that you are applying super resolution if you are running out of memory.
checkpoint_num: default: 150, you can also use your own trained checkpoints, see the ipynb notebook to continue training.
Run python Main.py -h
for more information
Sources:
- DCGAN Arxiv Paper: https://arxiv.org/pdf/1511.06434v2.pdf
- ESRGAN Arvix Paper: https://arxiv.org/pdf/1809.00219.pdf
- PyTorch GANS: https://github.com/eriklindernoren/PyTorch-GAN
- This also take a lot of inspiration from the PyTorch DCGAN Tutorial, check it out here