Tensorflow implementation of Deep Convolutional Generative Adversarial Networks which is a stabilize Generative Adversarial Networks. The referenced torch code can be found here.
- Brandon Amos wrote an excellent blog post and image completion code based on this repo.
- To avoid the fast convergence of D (discriminator) network, G (generatior) network is updatesd twice for each D network update which is a different from original paper.
- Python 2.7 or Python 3.3+
- Tensorflow
- SciPy
- (Optional) Align&Cropped Images.zip : Large-scale CelebFaces Dataset
First, download dataset with:
$ python download.py mnist
$ python download.py celebA
To train a model with downloaded dataset:
$ python main.py --dataset mnist --is_train True
$ python main.py --dataset celebA --is_train True --is_crop True
$ python main.py --dataset cats --is_train True --is_crop True --image_size -1
To test with an existing model:
$ python main.py --dataset mnist
$ python main.py --dataset celebA --is_crop True
Or, you can use your own dataset (without central crop) by:
$ mkdir data/DATASET_NAME
... add images to data/DATASET_NAME ...
$ python main.py --dataset DATASET_NAME --is_train True
$ python main.py --dataset DATASET_NAME
After 6th epoch:
After 10th epoch:
![result4](assets/test_2016-01-27 15:08:54.png)
MNIST codes are written by @PhoenixDai.
More results can be found here and here.
Details of the loss of Discriminator and Generator (with custom dataset not celebA).
Details of the histogram of true and fake result of discriminator (with custom dataset not celebA).
Taehoon Kim / @carpedm20