Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks

Stacked GANs generate 256 by 256 photo-realistic images from text descriptions

  • Problem Text-conditioned GANs produce plausible images mainly at low resolution. Adding more upsampling layers to reach 256×256 makes training unstable and gives nonsensical outputs.
  • Method StackGAN refines a 64×64 sketch into a 256×256 image.
  • Results StackGAN reaches an inception score of 3.70 ± .04 on CUB. GAN-INT-CLS scores 2.88 ± .04 on the same dataset.

Why direct high-resolution generation from text fails

Text-conditioned GANs can capture the gist of a description, but the outputs tend to lack the fine parts that make an image look real. Reed and colleagues produced plausible text-conditioned images only at 64×64, and those images often lacked details such as beaks and eyes. Stacking more upsampling layers onto a state-of-the-art model to reach 256×256 does not fix this.

Training becomes unstable and the outputs are nonsensical.

The underlying difficulty is geometric. The region where natural images live and the region the model distribution covers may fail to intersect in a high-dimensional pixel space, and this gap widens as resolution grows. A model that starts from a coarse but roughly aligned image has a better chance of overlapping the image distribution, which is the reason the design below splits generation into stages.

Splitting generation into a sketch and a refinement

Stage-I draws the rough shape and basic colours of the object from the text embedding, and it lays out the background from a noise vector. Its output is a 64×64 image.

Stage-II has two jobs: it repairs shape distortions and missing colours in the coarse image, and it adds parts and details that the text describes but Stage-I left out. Because the second stage reads the text again, it can recover information that the first stage did not express.

Sampling the text condition with Conditioning Augmentation

Earlier text-conditioned models pass a nonlinearly transformed text embedding to the generator as a fixed condition. That embedding is high-dimensional, with more than 100 dimensions, and the authors assume that a limited number of text-image pairs leaves gaps in the conditioning manifold, which makes GAN training harder.

Conditioning Augmentation replaces the fixed vector with a draw from a Gaussian. A fully connected layer maps the text embedding to a mean µ(ϕt) and to the diagonal values of a covariance Σ(ϕt). Stage-I computes the conditioning vector as ĉ0 = µ0 + σ0 ⊙ ε with ε drawn from N(0, I), where σ0 holds the diagonal values of Σ0. The reparameterization trick lets µ0 and Σ0 be learned together with the rest of the network.

A regularizer keeps this Gaussian close to a standard normal. It is the Kullback-Leibler term \( D_{KL}(\mathcal{N}(\mu(\phi_t),\Sigma(\phi_t))\,\|\,\mathcal{N}(0,I)) \), added to the generator objective with weight λ, which is set to 1 in all experiments. The sampling is meant to smooth the conditioning manifold, so one sentence can correspond to several poses and appearances, and it also gives more training pairs from a small number of image-text pairs.

The Stage-I sketch network

The Stage-I generator concatenates the 128-dimensional conditioning vector ĉ0 with a 100-dimensional noise vector and upsamples the result into a 64×64 image. Its adversarial objective is written with real pairs of image and text, and with generated images from the sampled condition, as in the formula below.

\[ \mathcal{L}_{D_0} = \mathbb{E}_{(I_0,t)\sim p_{data}}[\log D_0(I_0,\phi_t)] + \mathbb{E}_{z\sim p_z,\,t\sim p_{data}}[\log(1-D_0(G_0(z,\hat{c}_0),\phi_t))] \] The discriminator D0 is trained to maximize this quantity, and the generator G0 is trained to minimize the second term together with the λ-weighted Kullback-Leibler regularizer.

On the discriminator side, the text embedding is compressed to 128 dimensions by a fully connected layer and replicated spatially to a 4×4 tensor.

The Stage-II refinement network

The Stage-II generator is an encoder-decoder with residual blocks. The Stage-I image is encoded by down-sampling to a 16×16 feature map, and the text conditioning vector is replicated spatially to the same size. The two feature sets are concatenated along the channel dimension, pass through residual blocks that learn joint image-text features, and an up-sampling decoder produces the 256×256 output.

The 256×256 model uses four residual blocks.

Stage-II uses the same text encoder as Stage-I but its own Conditioning Augmentation layers for the mean and standard deviation, so it can learn what Stage-I left out of the embedding. Its objective takes the Stage-I output s0 = G0(z, ĉ0) as input and drops the noise vector, on the assumption that the randomness is already carried by s0.

The discriminator is a matching-aware discriminator, which treats real images with their own text as positive pairs and treats two kinds of input as negatives: real images with mismatched text, and synthetic images with their text. The same discriminator design is used in both stages, and Stage-II adds extra down-sampling blocks because its images are larger.

Training schedule and optimizer

Training runs in two phases. Stage-I's discriminator and generator are trained for 600 epochs while Stage-II stays fixed, and then Stage-II's networks are trained for another 600 epochs while Stage-I stays fixed. All networks are trained with the ADAM solver, a batch size of 64 and an initial learning rate of 0.0002, which is halved every 100 epochs.

Up-sampling blocks use nearest-neighbour upsampling followed by a 3×3 convolution, and residual blocks use two residual blocks in the 128×128 models and four in the 256×256 models. These settings are reported for the StackGAN models, and they are the defaults that the ablations below vary one component at a time.

Comparison with GAN-INT-CLS and GAWWN

On CUB the inception score is 3.70 ± .04 for StackGAN, against 2.88 ± .04 for GAN-INT-CLS, which the authors report as a 28.47% improvement. GAWWN scores 3.62 ± .07 on CUB, so it sits just below StackGAN, but it relies on object part location annotations that the other methods do not use.

On Oxford-102 StackGAN scores 3.20 ± .01 against 2.66 ± .03 for GAN-INT-CLS, which the authors report as a 20.30% improvement. On COCO the scores are 8.45 ± .03 for StackGAN and 7.88 ± .07 for GAN-INT-CLS.

Average human rank on CUB is 1.37 ± .02 for StackGAN, 1.99 ± .04 for GAWWN and 2.81 ± .03 for GAN-INT-CLS, and a lower rank is better. Human raters were 10 users who ranked results for the same descriptions: 50 per class for CUB and Oxford-102, and 4k randomly chosen COCO validation descriptions with 5 images per sentence.

Across the three datasets, StackGAN has the highest inception score and the lowest average human rank among the compared methods.

What the component ablations isolate

Removing Conditioning Augmentation from the 256×256 StackGAN lowers the CUB inception score from 3.70 to 3.31 ± .03. Giving the text only to Stage-I lowers it to 3.45 ± .02, with Conditioning Augmentation kept. Each variant removes one component and keeps the rest of the 256×256 configuration, so the drops isolate that component's share of the inception score.

Lowering the output to 128×128 with both components gives 3.35 ± .02, so the 256×256 model scores higher. The authors read this as evidence that the larger model adds detail, because an increase in size alone would leave the score unchanged. All images are rescaled to 299×299 before the inception score is computed, and the scores use 30,000 samples per model.

At 256×256, the Stage-I GAN without Conditioning Augmentation scores 2.48 ± .00 and the one with it scores 3.02 ± .01. The 128×128 and 256×256 numbers come from the StackGAN models, so the gain from Conditioning Augmentation on Stage-I alone is not the same as the gain inside the full model.

The inception score cannot show whether generated images match their text, so these ablations describe sample statistics and not text conditioning.

Stage-I and Stage-II outputs side by side

Stage-I outputs usually capture rough shape and colour, but they are often blurry, carry defects and miss details, especially in foreground objects.

Stage-II produces 4× the resolution of Stage-I and adds more convincing details that reflect the text. In one example, a blue crown in the Stage-I output is corrected to the reddish brown crown the description asks for. In an extreme case where Stage-I fails to draw a plausible shape, Stage-II still produces a reasonable object.

Stage-II also carries over the background from Stage-I and refines it at higher resolution.

Smoothness of the sentence embedding path

Two sentence embeddings are linearly interpolated while the noise vector is held fixed at zeros, so the image depends only on the text. For simple colour sentences, the generated birds change colour gradually and keep plausible shapes.

For more detailed sentences, the primary colour shifts from red to blue and the wing colour shifts from black to brown along the path. This shows the learned embedding space varies smoothly along the interpolation path, and the experiment covers only the sentence pairs the authors chose.

Limitations

The inception score is the main quantitative measure, and it does not reflect whether a generated image is well conditioned on its text, so the human ranking was added to cover that gap. The human ranking uses 10 users and the sample sizes given above, so it is a smaller study than the inception score.

Table 1 reports GAWWN only on CUB, and the authors state that GAWWN fails to produce plausible images when it is conditioned on text alone.

Stage-I quality limits what Stage-II can refine: the authors identify blurry and defective Stage-I images as the weak point of the design.

The experiments cover CUB, Oxford-102 and COCO. COCO is the hardest set, with multiple objects and varied backgrounds, and its results are presented as qualitative examples alongside the same two metrics.

Paper info

Authors
Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, Dimitris Metaxas
Venue
arXiv · Preprint
First published
2016-12-10
Added
2026-11-12
Updated
2017-8-5
Version
v2
arXiv
1612.03242
Category
cs.CV · cs.AI · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, Dimitris Metaxas (2016). StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks. arXiv:1612.03242v2. https://arxiv.org/abs/1612.03242v2

BibTeX
@misc{zhang2016stackgan,
  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 = {2016},
  eprint = {1612.03242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.03242v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up