SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.07291 · 2019

Semantic Image Synthesis with Spatially-Adaptive Normalization

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 4 failures of our instrument; 0 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/1903.07291.json · badge: /api/ran/1903.07291.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
manicman1999/StyleGAN-Keras reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
taki0112/SPADE-Tensorflow community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
GrahamRigby/GauGanPlus extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
PacktPublishing/Hands-On-Image-Generation-with-TensorFlow-2.0 community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
get_rand Ran
ran; our contract draft was wrong, not the code
manicman1999/StyleGAN-Keras/stylegan.py
code served (permissive licence) · get_code("739a22fef98ba093")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (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 numpy as np

# Create a numpy array with shape (10, 3) - 10 samples, 3 features each
array = np.random.randn(10, 3)

# Amount of samples to randomly select
amount = 5

ARGS = {
    'array': array,
    'amount': amount
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 3) — shape (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
load_segmap Ran
ran on a synthesized input
taki0112/SPADE-Tensorflow/utils.py
code served (permissive licence) · get_code("e918f87e4b0b7abb")
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 4, dtype family float, shape (1, 4, 6, 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 numpy as np
import tempfile
import os

# Create a temporary directory for the dataset
temp_dir = tempfile.mkdtemp()

# Create the segmap_label.txt file with color-to-class mapping
segmap_label_content = "{(255, 0, 0): 0, (0, 255, 0): 1, (0, 0, 255): 2}"
segmap_label_path = os.path.join(temp_dir, 'segmap_label.txt')
with open(segmap_label_path, 'w') as f:
    f.write(segmap_label_content)

# Create a temporary image file with color segmentation
image_path = os.path.join(temp_dir, 'test_image.png')
import cv2
# Create a simple 4x6 RGB image with different colored regions
test_image = np.zeros((4, 6, 3), dtype=np.uint8)
test_image[0:2, 0:2] = [255, 0, 0]  # Red
test_image[0:2, 2:4] = [0, 255, 0]  # Green
test_image[2:4, 0:3] = [0, 0, 255]  # Blue
test_image[2:4, 3:6] = [255, 0, 0]  # Red
cv2.imwrite(image_path, cv2.cvtColor(test_image, cv2.COLOR_RGB2BGR))

ARGS = {
    'dataset_path': temp_dir,
    'image_path': image_path,
    'img_width': 6,
    'img_height': 4,
    'img_channel': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (1, 4, 6, 3) — shape (1, 4, 6, 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
load_style_image Ran
ran on a synthesized input
taki0112/SPADE-Tensorflow/utils.py
code served (permissive licence) · get_code("19e181f299bf6f5c")
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 4, dtype family float, shape (1, 48, 64, 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 numpy as np
import cv2
import tempfile
import os

# Create a temporary image file for testing
def create_test_image(width, height, channels):
    """Create a simple test image and save it to a temporary file."""
    if channels == 1:
        img = np.random.randint(0, 256, (height, width), dtype=np.uint8)
    else:
        img = np.random.randint(0, 256, (height, width, channels), dtype=np.uint8)
    
    # Create temporary file
    temp_fd, temp_path = tempfile.mkstemp(suffix='.png')
    os.close(temp_fd)
    
    # Save image
    if channels == 1:
        cv2.imwrite(temp_path, img)
    else:
        # Convert RGB to BGR for cv2.imwrite
        img_bgr = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
        cv2.imwrite(temp_path, img_bgr)
    
    return temp_path

# Create test images
image_path_rgb = create_test_image(64, 48, 3)
image_path_gray = create_test_image(32, 24, 1)

ARGS = {
    "image_path": image_path_rgb,
    "img_width": 64,
    "img_height": 48,
    "img_channel": 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (1, 48, 64, 3) — shape (1, 48, 64, 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
noise Ran
ran, honoured the contract we drafted
manicman1999/StyleGAN-Keras/stylegan.py
code served (permissive licence) · get_code("62432992de807ab4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (2, 512) 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 numpy as np

# The function noise(n) takes a single parameter n which represents the number of samples
# It returns a numpy array of shape [n, latent_size] where latent_size is 512

ARGS = {
    'n': 2
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 512) — shape (2, 512) 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
noiseImage Ran
ran, honoured the contract we drafted
manicman1999/StyleGAN-Keras/stylegan.py
code served (permissive licence) · get_code("e5e3d7e6398e9f0f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 4, dtype family float, shape (2, 256, 256, 1) 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 numpy as np

# The function noiseImage takes a single parameter 'n' which represents the number of images to generate
# Based on the function body, it creates n images of size [n, im_size, im_size, 1]
# where im_size is 256

n = 2  # Keep it small as per instructions

ARGS = {
    'n': n
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (2, 256, 256, 1) — shape (2, 256, 256, 1) 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
noiseer Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GrahamRigby/GauGanPlus/Models.py
pointer only (licence: NONE) · get_code("a4aac99f2ef193c4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, GrahamRigby/GauGanPlus 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. A run is recorded.

preprocessing Ran
ran on a synthesized input
taki0112/SPADE-Tensorflow/utils.py
code served (permissive licence) · get_code("eab7ba887c245523")
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. 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 preprocessing takes x and performs a simple normalization
# x / 127.5 - 1
# x should be a tensor or array that supports division and subtraction

# Create a small tensor with values in a typical image range (0-255)
x = torch.tensor([[100.0, 127.5, 200.0, 255.0],
                   [0.0, 50.0, 150.0, 200.0]], dtype=torch.float32)

ARGS = {
    'x': x
}
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 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
reparameterize Ran
ran; our contract draft was wrong, not the code
GrahamRigby/GauGanPlus/Models.py
pointer only (licence: NONE) · get_code("26ebad4d064f2bf8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, GrahamRigby/GauGanPlus 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. A run is recorded.

umeyama Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
PacktPublishing/Hands-On-Image-Generation-with-TensorFlow-2.0/Chapter09/utils/umeyama.py
code served (permissive licence) · get_code("02ad9540c42e69f9")
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 2, dtype family float, shape (3, 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 numpy as np

# Create small, distinct-sized point clouds for source and destination
np.random.seed(0)

# M=3 points, N=2 dimensions
src = np.array([
    [0.0, 0.0],
    [1.0, 0.0],
    [0.0, 1.0]
], dtype=np.double)

dst = np.array([
    [1.0, 2.0],
    [2.0, 2.0],
    [1.0, 3.0]
], dtype=np.double)

estimate_scale = True

ARGS = {
    "src": src,
    "dst": dst,
    "estimate_scale": estimate_scale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 5 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
preprocessing 8 other papers
3 dated earlier, 5 later
1703.00848 (2017-03)
Unsupervised Image-to-Image Translation Networks
1804.04732 (2018-04)
Multimodal Unsupervised Image-to-Image Translation
1812.09912 (2018-12)
Image-to-Image Translation via Group-wise Deep Whitening-and-Coloring Transformation
and 5 more not named here
get_rand 1 other paper
1 later
1904.06991 (2019-04)
Improved Precision and Recall Metric for Assessing Generative Models
noise 1 other paper
1 dated earlier
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
umeyama 1 other paper
1 later
2203.12208 (2022-03)
Self-supervised Learning of Adversarial Example: Towards Good Generalizations for Deepfake Detection

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

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

Abstract

We propose spatially-adaptive normalization, a simple but effective layer for synthesizing photorealistic images given an input semantic layout. Previous methods directly feed the semantic layout as input to the deep network, which is then processed through stacks of convolution, normalization, and nonlinearity layers. We show that this is suboptimal as the normalization layers tend to ``wash away'' semantic information. To address the issue, we propose using the input layout for modulating the activations in normalization layers through a spatially-adaptive, learned transformation. Experiments on several challenging datasets demonstrate the advantage of the proposed method over existing approaches, regarding both visual fidelity and alignment with input layouts. Finally, our model allows user control over both semantic and style. Code is available at https://github.com/NVlabs/SPADE .

For agents

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

get_harvested_code_for_paper("1903.07291")
get_code_for_paper("1903.07291")
have("1903.07291")

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

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

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

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

Connect an agent — have() is free.