All models

singan_generator_concat_skip

One scale of SinGAN's pyramid: five conv blocks that add detail to an upsampled image plus noise.

Diffusion and generative · 16 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 (25 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
29.8K
Operations
16
Framework
PyTorch
Recurrent
No
Published
ICCV 2019
Cited by
928 (as of 17 October 2026)
Authors
Tamar Rott Shaham, Tali Dekel, Tomer Michaeli
License
MIT
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
m9199
Graph hash
b9b9d863421c882ba3f68557b99ba47445d7d38fde2641c040c108b80b6da1b8
Skeleton hash
ffd5013365f830f3f5690b4c53c6e19f13e14326a0dd04d92851aa05523ab1a2
Architecture hash
66ab102197241d1e5cc1688b4c914c6842afd59cea530759b83af01021fdd9e8
Diagram SHA-256
4779b92fb41055bd5f0b1f4115fe2f7d138706437e0d1e175ce22861b04e0e4b
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

SinGAN is an unconditional generative model learned from a single natural image: it captures the internal distribution of patches within that image and then produces diverse samples with the same visual content. The model is a pyramid of fully convolutional GANs, each responsible for the patch distribution at one scale of the image. The network captured here is one generator from that pyramid, the single generator class the official code defines.

Generation starts at the coarsest scale and passes through every generator up to the finest, with noise injected at every scale. At each scale the noise is added to the upsampled image from the previous scale before the convolutional layers, so the GAN cannot disregard it. The convolutional layers only generate the missing details, which are added back to the upsampled image in a residual fashion. Each generator is a fully convolutional net of 5 conv-blocks of the form Conv(3x3)-BatchNorm-LeakyReLU, starting from 32 kernels per block at the coarsest scale and doubling every 4 scales. Because the generators are fully convolutional, images of arbitrary size and aspect ratio can be generated at test time by changing the noise map dimensions.

The GANs have small receptive fields and limited capacity, which keeps them from memorizing the single image. Training uses the WGAN-GP loss, with the loss defined over the whole image rather than random crops, at a batch size of 1. The authors set the minimal dimension at the coarsest scale to 25 pixels, pick the number of scales so the scaling factor is as close as possible to 4/3, and resize training images to a maximal dimension of 250 pixels. The official PyTorch code lists the paper under the ICCV 2019 Best paper award (Marr prize).

Key idea. A pyramid of lightweight fully convolutional patch GANs that learns an unconditional generative model from one natural image, not just textures.

  • SinGAN
  • SinGAN generator
  • GeneratorConcatSkip2CleanAdd
  • single image GAN
  • internal learning
  • learning a generative model from a single natural image
  • Shaham
  • multi-scale GAN pyramid

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

Cite the paper

@misc{shaham2019singanlearninggenerativemodel,
      title={SinGAN: Learning a Generative Model from a Single Natural Image}, 
      author={Tamar Rott Shaham and Tali Dekel and Tomer Michaeli},
      year={2019},
      eprint={1905.01164},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1905.01164}, 
}