Home

Awesome

Chainer-GAN-lib

This repository collects chainer implementation of state-of-the-art GAN algorithms.
These codes are evaluated with the inception score on Cifar-10 dataset.
Note that our codes are not faithful re-implementation of the original paper.

How to use

Install the requirements first:

pip install -r requirements.txt

This implementation has been tested with the following versions.

python 3.5.2
chainer 4.0.0
+ https://github.com/chainer/chainer/pull/3615
+ https://github.com/chainer/chainer/pull/3581
cupy 3.0.0
tensorflow 1.2.0 # only for downloading inception model
numpy 1.11.1

Download the inception score module forked from https://github.com/hvy/chainer-inception-score.

git submodule update -i

Download the inception model.

cd common/inception
python download.py --outfile inception_score.model

You can start training with train.py.

python train.py --gpu 0 --algorithm dcgan --out result_dcgan

Please see example.sh to train other algorithms.

Quantitative evaluation

InceptionInception (Official)FID
Real data12.011.243.2 (train vs test)
Progressive8.58.819.1
SN-DCGAN7.57.4123.6
WGAN-GP6.87.86 (ResNet)28.2
DFM7.37.7230.1
Cramer GAN6.4-32.7
DRAGAN7.16.9031.5
DCGAN-vanilla6.76.16 [WGAN2] 6.99 [DRAGAN]34.3
minibatch discrimination7.06.86 (-L+HA)31.3
BEGAN5.45.6284.0

Inception scores are calculated by average of 10 evaluation with 5000 samples.

FIDs are calculated with 50000 train dataset and 10000 generated samples.

Generated images

progressive

sndcagn

wgangp

dfm

cramer

dragan

dcgan

minibatch_dis

began

License

MIT License. Please see the LICENSE file for details.