PyTorch implementation of PROGRESSIVE GROWING OF GANS FOR IMPROVED QUALITY, STABILITY, AND VARIATION
YOUR CONTRIBUTION IS INVALUABLE FOR THIS PROJECT :)
[step 1.] Prepare dataset
The author of progressive GAN released CelebA-HQ dataset, and which Nash is working on over on the branch that i forked this from. For my version just make sure that all images are the children of that folder that you declare in Config.py. Also i warn you that if you use multiple classes, they should be similar as to not end up with attrocities.
---------------------------------------------
The training data folder should look like :
<train_data_root>
|--Your Folder
|--image 1
|--image 2
|--image 3 ...
---------------------------------------------
[step 2.] Prepare environment using virtualenv
For install please take your time and install all dependencies of PyTorch and also install tensorflow
$ virtualenv --python=python2.7 venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ conda install pytorch torchvision -c pytorch
[step 3.] Run training
config.py
to change parameters. (don't forget to change path to training images)config.py
to support Multi-GPU training. (example)
If using Single-GPU (device_id = 0):
$ vim config.py --> change "n_gpu=1"
$ CUDA_VISIBLE_DEVICES=0 python trainer.py
If using Multi-GPUs (device id = 1,3,7):
$ vim config.py --> change "n_gpu=3"
$ CUDA_VISIBLE_DEVICES=1,3,7 python trainer.py
[step 4.] Display on tensorboard (At the moment skip this part)
$ tensorboard --logdir repo/tensorboard --port 8888
$ <host_ip>:8888 at your browser.
[step 5.] Generate fake images using linear interpolation
CUDA_VISIBLE_DEVICES=0 python generate_interpolated.py
The result of higher resolution(larger than 256x256) will be updated soon.
Generated Images
Loss Curve
dataloader.py
)MinchulShin, @nashory
DeMarcus Edwards, @Djmcflush
MakeDirtyCode, @MakeDirtyCode
Yuan Zhao, @yuanzhaoYZ
zhanpengpan, @szupzp