internal learning


  • Number of checkpoints: 3

  • Number of configs: 3

  • Number of papers: 1

    • ALGORITHM: 1

SinGAN (ICCV’2019)

Task: Internal Learning


We introduce SinGAN, an unconditional generative model that can be learned from a single natural image. Our model is trained to capture the internal distribution of patches within the image, and is then able to generate high quality, diverse samples that carry the same visual content as the image. SinGAN contains a pyramid of fully convolutional GANs, each responsible for learning the patch distribution at a different scale of the image. This allows generating new samples of arbitrary size and aspect ratio, that have significant variability, yet maintain both the global structure and the fine textures of the training image. In contrast to previous single image GAN schemes, our approach is not limited to texture images, and is not conditional (i.e. it generates samples from noise). User studies confirm that the generated samples are commonly confused to be real images. We illustrate the utility of SinGAN in a wide range of image manipulation tasks.

Results and Models

SinGAN balloons
Model Dataset Num Scales Download
SinGAN balloons.png 8 ckpt | pkl
SinGAN fish.jpg 10 ckpt | pkl
SinGAN bohemian.png 10 ckpt | pkl

Notes for using SinGAN

When training SinGAN models, users may obtain the number of scales (stages) in advance via the following commands. This number is important for constructing config file, which is related to the generator, discriminator, the training iterations and so on.

>>> from mmgen.datasets.singan_dataset import create_real_pyramid
>>> import mmcv
>>> real = mmcv.imread('real_img_path')
>>> _, _, num_scales = create_real_pyramid(real, min_size=25, max_size=300, scale_factor_init=0.75)

When testing SinGAN models, users have to modify the config file to add the test_cfg. As shown in configs/singan/, the only thing you need to do is add the path for pkl data. There are some important data containing in the pickle files which you can download from our website.

test_cfg = dict(
    _delete_ = True
    pkl_data = 'path to pkl data'


  title={Singan: Learning a generative model from a single natural image},
  author={Shaham, Tamar Rott and Dekel, Tali and Michaeli, Tomer},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
Read the Docs v: latest
On Read the Docs
Project Home

Free document hosting provided by Read the Docs.