This is a simple DCGAN network that generates cartoon faces. The code from this implementation is pretty much borrowed form this awesome PyTorch tutorial with some minor adjustments. The only purpose of this repo is to explore/experiment GAN and have some fun.
While the dataset used in this repos is cartoon faces, the code can pretty much generate all kinds of images.
to get started, do pip install -r requirements.txt
use python run.py --begin_training True --img_path [PATH to training images directory]
to train model
use python run.py --generate_img True --num_img [number of images]
to generate image(s) from random noise
For more options, see python run.py -h
Noise:
Generated output:
You should be able to build a grid of whatever size you configure.
An example of grid size =3, which means running (python run.py --generate_img True --num_img 9
):