Pytorch implementation for reproducing StackGAN_v2 results in the paper StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks by Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, Dimitris Metaxas.
python 2.7
Pytorch
In addition, please add the project folder to PYTHONPATH and pip install
the following packages:
tensorboard
python-dateutil
easydict
pandas
torchfile
Data
data/
data/birds/
data/imagenet/
data/lsun
Training
python main.py --cfg cfg/birds_3stages.yml --gpu 0
python main.py --cfg cfg/dog_3stages_color.yml --gpu 0
python main.py --cfg cfg/cat_3stages_color.yml --gpu 0
python main.py --cfg cfg/bedroom_3stages_color.yml --gpu 0
python main.py --cfg cfg/church_3stages_color.yml --gpu 0
*.yml
files are example configuration files for training/evaluation our models.Pretrained Model
models/
(The inception score for this Model is 4.04±0.05)models/
(The inception score for this Model is 9.55±0.11)models/
models/
models/
Evaluating
python main.py --cfg cfg/eval_birds.yml --gpu 1
to generate samples from captions in birds validation set.eval_*.yml
files to generate images from other pre-trained models. Examples generated by StackGAN-v2
Tsne visualization of randomly generated birds, dogs, cats, churchs and bedrooms
If you find StackGAN useful in your research, please consider citing:
@article{Han17stackgan2,
author = {Han Zhang and Tao Xu and Hongsheng Li and Shaoting Zhang and Xiaogang Wang and Xiaolei Huang and Dimitris Metaxas},
title = {StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks},
journal = {arXiv: 1710.10916},
year = {2017},
}
@inproceedings{han2017stackgan,
Author = {Han Zhang and Tao Xu and Hongsheng Li and Shaoting Zhang and Xiaogang Wang and Xiaolei Huang and Dimitris Metaxas},
Title = {StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks},
Year = {2017},
booktitle = {{ICCV}},
}
Our follow-up work
References