gaugan2
A GAN generator that turns a semantic segmentation mask into a photorealistic image using SPADE layers.
Diffusion and generative · 283 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.
At a glance
- Parameters
- 97.5M
- Operations
- 283
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2019
- Cited by
- 2,970 (as of 23 October 2026)
- Authors
- Taesung Park, Ming-Yu Liu, Ting-Chun Wang, Jun-Yan Zhu
- Source
- GitHub: NVlabs/SPADE
- License
- CC-BY-NC-SA-4.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
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.
Details
- Stable ID
- m5126
- Graph hash
- b2b9997c3cbaadba71ee29a7bcc549610d5fa09761e7d01a325eab34c2f71d30
- Skeleton hash
- 2cc9757c0891c7032bee2f158a3d62bcb106a00656cf48c30b40c79d2ec3ff6e
- Architecture hash
- d3350f047282e80917d0d5b9b20bb231e160a8d8d16b1563b932cb8c870be4a0
- Diagram SHA-256
- 5d59c01db44dc765b2684dd023c0077475dd6c4ede64bafba08cacc726395983
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
The SPADE generator turns a semantic segmentation mask into a photorealistic image, and is built around a normalization layer the paper calls spatially-adaptive normalization. The paper argues that feeding the layout in as input and passing it through stacks of convolution, normalization and nonlinearity layers is suboptimal, because the normalization layers tend to remove semantic information.
In a SPADE layer the mask is projected onto an embedding space and convolved to produce the scale and bias, which, unlike in earlier conditional normalization methods, are tensors with spatial dimensions. The generator is a series of SPADE residual blocks with upsampling layers. The encoder part common in earlier generators is discarded, since the mask already enters through every normalization layer. Training uses the multi-scale discriminator and loss function of pix2pixHD, with the least squared loss term replaced by a hinge loss term.
The paper reports better segmentation scores (mIoU and pixel accuracy) and FID than the methods it compares against on all of its benchmark datasets. The official repository links an interactive demo called GauGAN. GauGAN2, which NVIDIA describes as the latest version of that painting demo, combines segmentation mapping, inpainting and text-to-image generation in a single model.
Key idea. SPADE feeds the semantic layout into every normalization layer through a spatially-adaptive, learned transformation, so the generator keeps semantic information that ordinary normalization layers tend to remove.
- SPADE
- GauGAN
- gaugan2
- spatially-adaptive normalization
- semantic image synthesis
- segmentation mask to image
- label map to image
- conditional GAN
- conditional image synthesis
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{park2019semanticimagesynthesisspatiallyadaptive,
title={Semantic Image Synthesis with Spatially-Adaptive Normalization},
author={Taesung Park and Ming-Yu Liu and Ting-Chun Wang and Jun-Yan Zhu},
year={2019},
eprint={1903.07291},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1903.07291},
}