
stackgan_stage1_g
Diffusion and generative92 ops57.2M params
Text-to-image GAN that sketches a low-res image, then a second stage refines it to 256×256.
Diffusion and generative · 92 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
The generator network from the StackGAN-v2 PyTorch repository, which the readme lists with the authors' follow-up work.
About this model's family
StackGAN generates photo-realistic images from text descriptions by splitting the hard problem into two stages, in analogy to how a painter sketches and then refines. The Stage-I GAN sketches the primitive shape and colors of the object from the text and draws the background from a noise vector, yielding a low-resolution image. The Stage-II GAN takes the Stage-I result and the text again, corrects its defects and completes details, producing a high-resolution image.
The motivation is that simply adding upsampling layers to a text-conditioned GAN gives training instability and nonsensical outputs at high resolution. A roughly aligned low-resolution image makes the model distribution more likely to overlap the image distribution, which the authors give as the reason the second stage can succeed. Text enters as an embedding from a pre-trained encoder, passed through Conditioning Augmentation, which samples the conditioning vector from a Gaussian whose mean and covariance are functions of the embedding. A KL term to the standard Gaussian regularizes it, and the added randomness improves diversity and stabilizes training.
The Stage-I generator concatenates the conditioning vector with a noise vector and runs a series of up-sampling blocks. The Stage-II generator is an encoder-decoder with residual blocks: the Stage-I image is down-sampled, concatenated with spatially replicated text features, passed through residual blocks and up-sampled. No fresh noise is used in Stage-II, on the assumption that the randomness is already carried by the Stage-I result.
The captured members are generators only, from the authors' PyTorch code, which reproduces the paper's COCO results with a network structure slightly different from the TensorFlow implementation. That PyTorch release reports a higher inception score than the paper.
Key idea. StackGAN stacks a sketching Stage-I GAN and a refining Stage-II GAN, with Conditioning Augmentation on the text embedding, to generate 256×256 photo-realistic images from text descriptions.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{zhang2017stackgantextphotorealisticimage,
title={StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks},
author={Han Zhang and Tao Xu and Hongsheng Li and Shaoting Zhang and Xiaogang Wang and Xiaolei Huang and Dimitris Metaxas},
year={2017},
eprint={1612.03242},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1612.03242},
}