SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1905.01164 · 2019

SinGAN: Learning a Generative Model from a Single Natural Image

arXiv · PDF · Open in the Atlas

Code that ran

5 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 3 failures of our instrument; 6 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1905.01164.json · badge: /api/ran/1905.01164.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
JackonLiu/SinGAN-Easy community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
ilyak93/SinGan extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
CREVIOS/MediSinGAN community (classifier label)
classifier basis not recorded on the link
1 ran · 3 no recorded run
maminio/sample-generating reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
ryyAudrey/ConMixSinGAN-master reimplementation (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
Wenyuan-Vincent-Li/sinGAN community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
ConvNd Ran
ran on a synthesized input
CREVIOS/MediSinGAN/SinGAN/SinGAN/models.py
code served (permissive licence) · get_code("edfc0a9b28208a14")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Conv. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from flax import linen as nn

torch.manual_seed(0)

ARGS = {
    'out_channel': 64,
    'kernel_size': 3,
    'strides': 1,
    'padding': 1,
    'dim': 2,
    'name': 'conv_layer'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv — a Conv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_image_np Ran
ran; our contract draft was wrong, not the code
JackonLiu/SinGAN-Easy/run_train/functions.py
code served (permissive licence) · get_code("39cacd95ae3b90ad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (4, 5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function convert_image_np expects a tensor input
# Looking at the code:
# - It checks if inp.shape[1] == 3 (number of channels)
# - It accesses inp[-1, :, :, :] for 4D tensors (batch, channels, height, width)
# - Or inp[-1, -1, :, :] for other cases
# - It calls denorm, move_to_cpu, numpy(), and transpose on it

# Case 1: 4D tensor with 3 channels (RGB image)
# Shape: (batch, channels, height, width) = (2, 3, 4, 5)
inp_rgb = torch.randn(2, 3, 4, 5)

ARGS = {
    "inp": inp_rgb
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 5, 3) — shape (4, 5, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
denorm Ran
ran; our contract draft was wrong, not the code
ilyak93/SinGan/SinGAN/functions.py
pointer only (licence: NOASSERTION) · get_code("289ace78904e68a8")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ilyak93/SinGan (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

move_to_gpu Ran
ran on a synthesized input
JackonLiu/SinGAN-Easy/run_train/imresize.py
code served (permissive licence) · get_code("5d8022d115a3f72e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor on CPU
tensor_input = torch.randn(2, 4)

ARGS = {
    "t": tensor_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
norm Ran
ran; our contract draft was wrong, not the code
ilyak93/SinGan/SinGAN/functions.py
pointer only (licence: NOASSERTION) · get_code("0489bfec4716b314")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, ilyak93/SinGan (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_activation_statistics Not yet run
unverified (harvested, no recorded run)
CREVIOS/MediSinGAN/SinGAN_pytorch/SIFID/sifid_score.py
code served (permissive licence) · get_code("ad99ad5ed3ed94c9")
How it ran

no invocation recorded.

calculate_frechet_distance Not yet run
unverified (harvested, no recorded run)
CREVIOS/MediSinGAN/SinGAN_pytorch/SIFID/sifid_score.py
code served (permissive licence) · get_code("0def50a351111624")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

get_activations Not yet run
unverified (harvested, no recorded run)
CREVIOS/MediSinGAN/SinGAN_pytorch/SIFID/sifid_score.py
code served (permissive licence) · get_code("747615e2328307c2")
How it ran

no invocation recorded.

get_scale_factor Not yet run
unverified (harvested, no recorded run)
maminio/sample-generating/main_train.py
pointer only (licence: NONE) · get_code("e2374363406636d5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, maminio/sample-generating when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_scale_factor Not yet run
unverified (harvested, no recorded run)
ryyAudrey/ConMixSinGAN-master/main_train.py
code served (permissive licence) · get_code("1aa060cb8d2163de")
How it ran

no invocation recorded.

read_image Not yet run
unverified (harvested, no recorded run)
Wenyuan-Vincent-Li/sinGAN/SinGAN/functions.py
code served (permissive licence) · get_code("a9664a766916a962")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 9 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 9 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
calculate_frechet_distance 74 other papers
7 dated earlier, 67 later
1610.09585 (2016-10)
Conditional Image Synthesis With Auxiliary Classifier GANs
1706.08500 (2017-06)
GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium
1807.11458 (2018-07)
To learn image super-resolution, use a GAN to learn how to do image degradation first
and 71 more not named here
denorm 5 other papers
5 later
2001.06001 (2020-01)
Curriculum Labeling: Revisiting Pseudo-Labeling for Semi-Supervised Learning
2003.11512 (2020-03)
Improved Techniques for Training Single-Image GANs
2110.02900 (2021-10)
Meta Internal Learning
and 2 more not named here
move_to_gpu 4 other papers
4 later
2003.11512 (2020-03)
Improved Techniques for Training Single-Image GANs
2110.02900 (2021-10)
Meta Internal Learning
2211.12445 (2022-11)
SinDiffusion: Learning a Diffusion Model from a Single Natural Image
and 1 more not named here
norm 4 other papers
4 later
2003.11512 (2020-03)
Improved Techniques for Training Single-Image GANs
2110.02900 (2021-10)
Meta Internal Learning
2211.12445 (2022-11)
SinDiffusion: Learning a Diffusion Model from a Single Natural Image
and 1 more not named here
calculate_activation_statistics 1 other paper
1 later
2309.00216 (2023-09)
Human-Inspired Facial Sketch Synthesis with Dynamic Adaptation
convert_image_np 1 other paper
1 later
2003.11512 (2020-03)
Improved Techniques for Training Single-Image GANs
get_activations 1 other paper
1 later
2309.00216 (2023-09)
Human-Inspired Facial Sketch Synthesis with Dynamic Adaptation
get_scale_factor 1 other paper
1 later
2003.11512 (2020-03)
Improved Techniques for Training Single-Image GANs
read_image 1 other paper
1 later
2212.10305 (2022-12)
Which Pixel to Annotate: a Label-Efficient Nuclei Segmentation Framework

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

More are linked than shown here.

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1905.01164")
get_code_for_paper("1905.01164")
have("1905.01164")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1905.01164.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1905.01164.svg)](https://syntology.ai/paper/1905.01164)

Connect an agent — have() is free.