All models

pix2pixhd_global_generator

The 1024 × 512 global generator of pix2pixHD, a conditional GAN that paints photos from label maps.

Diffusion and generative · 103 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (4 KB)

Open in a new tab

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
182.5M
Operations
103
Framework
PyTorch
Recurrent
No
Published
CVPR 2018
Cited by
4,512 (as of 18 October 2026)
Authors
Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu and others
License
BSD-2-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8197
Graph hash
7d134d7480c2c3b065480e5d1f5baeaa238f5153a8fbdf6f962c03896cd9e3c5
Skeleton hash
ea8b2eb88b7d661c376fd1439d1228dd9afa0ed1f6643f41ffa766624763c5b9
Architecture hash
a12e60ad66af664c1f1ab1582aa9f8e3439032e12d93811eaec50f330eb6c2a9
Diagram SHA-256
dd208ad57afe4672392310257a292ac637525741d6d1f9e58d66d07eddf7aef5
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

pix2pixHD is a conditional GAN for turning semantic label maps into high-resolution photo-realistic images. The graph here is only the first half of its generator: the global generator network, which operates at a resolution of 1024 × 512, without the local enhancer that doubles each image dimension. That split exists because applying the earlier pix2pix framework directly to high resolution gave unstable training and unsatisfactory images.

The global generator is built on the architecture that Johnson and colleagues proposed for neural style transfer on images up to 512 × 512. Read off the appendix, it is a 7 × 7 stem with 64 filters, four stride-2 downsampling convolutions up to 1024 channels, nine residual blocks at 1024 channels, four fractional-strided upsampling layers back down to 64, and a final 7 × 7 convolution to 3 channels. The downsampling layers are 3 × 3 Convolution-InstanceNorm-ReLU with stride 2, and reflection padding is used to reduce boundary artifacts. Its input is more than a one-hot label map: the instance boundary map is concatenated with the one-hot representation of the semantic label map and fed into the generator. A pixel in that boundary map is 1 if its object ID is different from any of its 4-neighbors, and 0 otherwise. When instance boundary information is added, adjacent cars have sharper boundaries.

Training is staged: the global generator is trained first, then the local enhancer, and then all the networks are jointly fine-tuned. Three discriminators with an identical network structure operate at different image scales. Without the multi-scale discriminators, many repeated patterns often appear in the generated images. The GAN loss is extended with a feature matching loss based on the discriminator, which stabilizes training because the generator has to produce natural statistics at multiple scales. On Cityscapes, the authors' result scores 83.78 pixel accuracy and 0.6389 mean IoU under an off-the-shelf segmentation network, against 84.29 and 0.6857 for the original images. In the pairwise study, 69.2% of participants prefer the results with multi-scale discriminators.

Key idea. A novel adversarial loss together with new multi-scale generator and discriminator architectures that let a conditional GAN generate 2048x1024 visually appealing results from label maps. Object instance segmentation information is folded in, which enables object manipulations such as removing or adding objects and changing the object category.

  • pix2pixHD
  • pix2pix HD
  • global generator
  • GlobalGenerator
  • label2city
  • Cityscapes
  • semantic label map to image
  • high-resolution image synthesis
  • conditional GAN
  • image-to-image translation
  • NVIDIA
  • multi-scale discriminator
  • feature matching loss

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wang2018highresolutionimagesynthesissemantic,
      title={High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs}, 
      author={Ting-Chun Wang and Ming-Yu Liu and Jun-Yan Zhu and Andrew Tao and Jan Kautz and Bryan Catanzaro},
      year={2018},
      eprint={1711.11585},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1711.11585}, 
}