nashory / pggan-pytorch

:fire::fire: PyTorch implementation of "Progressive growing of GANs (PGGAN)" :fire::fire:
MIT License
819 stars 134 forks source link
celeba-hq-dataset gan generative-adversarial-network progressive-gan progressively-growing-gan pytorch tensorboard

Pytorch Implementation of "Progressive growing GAN (PGGAN)"

PyTorch implementation of PROGRESSIVE GROWING OF GANS FOR IMPROVED QUALITY, STABILITY, AND VARIATION
YOUR CONTRIBUTION IS INVALUABLE FOR THIS PROJECT :)

image

What's different from official paper?

How to use?

[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

[step 3.] Run 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

Experimental results

The result of higher resolution(larger than 256x256) will be updated soon.

Generated Images







Loss Curve

image

To-Do List (will be implemented soon)

Compatability

Acknowledgement

Author

MinchulShin, @nashory

Contributors

DeMarcus Edwards, @Djmcflush
MakeDirtyCode, @MakeDirtyCode
Yuan Zhao, @yuanzhaoYZ
zhanpengpan, @szupzp