Home

Awesome

image

gans-collection.torch

Torch implementation of various types of GANs (e.g. DCGAN, ALI, Context-encoder, DiscoGAN, CycleGAN, EBGAN). Note that EBGAN and BEGAN implementation is still not stable yet. I am working on this.

image

Contents

Prerequisites

Usage

  1. download training data:
python download.py --datasets <dataset>
(e.g) python run.py --datasets celebA

---------------------------------------
The training data folder should look like : 
<train_data_root>
                |--classA
                        |--image1A
                        |--image2B ...
                |--classB
                        |--image1B
                        |--image2B ...
---------------------------------------
  1. run GANs training:
    Note that you need to change parameter options in "script/opts.lua" for each GANs.
python run.py --type <gan_type>
(e.g) python run.py --type dcgan

Display GUI : How to see generated images in real-time?

step by step instruction:

1. set server-related options(ip, port, etc.) in "script.opts.lua"
2. run server (python server.py --type <gan_type>)
3. open web browser, and connect. (https://<server_ip>:<server_port>)

you will see like this: image

Results

trainingFinal
<img src="https://github.com/nashory/gif/blob/master/_gans/dcgan.gif" width="400" height="400"><img src="https://puu.sh/xDkqw/634f93b72f.jpg" width="400" height="400">
<img src="https://github.com/nashory/gif/blob/master/_gans/lsgan.gif" width="400" height="400"><img src="https://puu.sh/xUmf4/066a6ae4fc.jpg" width="400" height="400">
<img src="https://github.com/nashory/gif/blob/master/_gans/discogan_celeba.gif" width="400" height="400"><img src="https://puu.sh/xE2eB/2a8a5e48a7.jpg" width="400" height="400">
<img src="https://github.com/nashory/gif/blob/master/_gans/discogan_ferg.gif" width="400" height="400"><img src="https://puu.sh/xE2dV/08a9b14d20.jpg" width="400" height="400">
<img src="https://github.com/nashory/gif/blob/master/_gans/cyclegan_celeba.gif" width="400" height="400"><img src="https://puu.sh/xUmdS/e2e57daada.jpg" width="400" height="400">
<img src="https://github.com/nashory/gif/blob/master/_gans/cyclegan_ferg.gif" width="400" height="400"><img src="https://puu.sh/xUmbb/c03b9151a0.jpg" width="400" height="400">

Acknowledgement

Author

MinchulShin, @nashory
Will keep updating other types of GANs.
Any insane bug reports or questions are welcome. (min.stellastra[at]gmail.com) :-)