SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.09760 · 2019

Photorealistic Style Transfer via Wavelet Transforms

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 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; 3 honoured the contract we drafted, 1 violated it and 3 have no contract verdict; 3 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.09760.json · badge: /api/ran/1903.09760.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
leolle/StyleTransfer community (classifier label)
classifier basis: plan_row
7 ran · 0 no recorded run
lixinghpu/SCCL extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
adain Ran
ran, honoured the contract we drafted
lixinghpu/SCCL/models/network.py
pointer only (licence: NONE) · get_code("d7ba76d42b36ae5b")
How it ran

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

calc_mean_std Ran
ran, honoured the contract we drafted
lixinghpu/SCCL/models/network.py
pointer only (licence: NONE) · get_code("df27553f9e6d94d7")
How it ran

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

change_seg Ran
ran on a synthesized input
leolle/StyleTransfer/utils/io.py
code served (permissive licence) · get_code("b5f5f4e970bbce9c")
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 int, shape (4, 5) 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 small test segmentation image with RGB colors
# The function expects an array where the last dimension is RGB values (0-255)
# Shape: (height, width, 3) where 3 is for RGB channels

# Create a 4x5 image with various colors
seg = np.array([
    [[0, 0, 255], [0, 255, 0], [0, 0, 0], [255, 255, 255], [255, 0, 0]],
    [[255, 255, 0], [128, 128, 128], [0, 255, 255], [255, 0, 255], [100, 100, 100]],
    [[50, 50, 50], [200, 200, 200], [10, 20, 30], [250, 0, 0], [0, 0, 200]],
    [[255, 255, 255], [0, 0, 0], [128, 64, 32], [64, 128, 192], [1, 2, 3]]
], dtype=np.uint8)

ARGS = {
    "seg": seg
}
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 int, shape (4, 5) — shape (4, 5) 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
get_rank Ran
ran; our contract draft was wrong, not the code
leolle/StyleTransfer/utils/core.py
code served (permissive licence) · get_code("3f416806a9d75fdf")
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) and returned int, ndim 0, dtype family int, shape () 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)

# Analyze the function:
# - singular_values: indexed with [i], so needs to be indexable (list, array, or tensor)
# - dim: integer, used in range(dim - 1, -1, -1)
# - eps: float, compared with singular_values[i] >= eps
# The function iterates through singular_values and finds the rank based on threshold

# Create small test data
singular_values = torch.tensor([0.5, 0.3, 0.01, 0.001], dtype=torch.float32)
dim = 4
eps = 1e-05

ARGS = {
    "singular_values": singular_values,
    "dim": dim,
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
get_squeeze_feat Ran
ran, honoured the contract we drafted
leolle/StyleTransfer/utils/core.py
code served (permissive licence) · get_code("ca190ac7aa0a7723")
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) and returned Tensor, ndim 2, dtype family float, shape (4, 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

torch.manual_seed(0)

# The function expects a tensor with at least 2 dimensions
# It squeezes dimension 0, then reshapes to (size, -1)
# So we need a tensor with shape (1, height, width) or similar
feat = torch.randn(1, 4, 3)

ARGS = {
    "feat": feat
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (4, 3) — shape (4, 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
get_wav Ran
ran; our contract draft was wrong, not the code
leolle/StyleTransfer/model.py
code served (permissive licence) · get_code("289a3baab5b57fbb")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

# The function takes in_channels (int) and pool (bool)
# in_channels: number of input channels for the conv layers
# pool: whether to use Conv2d (True) or ConvTranspose2d (False)

ARGS = {
    'in_channels': 3,
    'pool': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
is_image_file Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from clovaai/WCT2
pointer only · get_code("59848503040bbdac")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

load_segment Ran
ran on a synthesized input
leolle/StyleTransfer/utils/io.py
code served (permissive licence) · get_code("dbe84d8aa1cb381a")
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 int, shape (32, 32) 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
from PIL import Image
import tempfile
import os

# Create a temporary image file with RGB color data
# We'll create a small segmentation image with known colors
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_seg.png")

# Create a simple RGB image (32x32) with colors that match the color_dict
# Colors: (0, 0, 255), (0, 255, 0), (0, 0, 0), (255, 255, 255), (255, 0, 0), (255, 255, 0), (128, 128, 128), (0, 255, 255), (255, 0, 255)
img_array = np.zeros((32, 32, 3), dtype=np.uint8)
# Fill with different color regions
img_array[0:4, 0:4] = [0, 0, 255]      # Blue -> 3
img_array[4:8, 0:4] = [0, 255, 0]      # Green -> 2
img_array[8:12, 0:4] = [0, 0, 0]       # Black -> 0
img_array[12:16, 0:4] = [255, 255, 255]  # White -> 1
img_array[16:20, 0:4] = [255, 0, 0]    # Red -> 4
img_array[20:24, 0:4] = [255, 255, 0]  # Yellow -> 5
img_array[24:28, 0:4] = [128, 128, 128]  # Gray -> 6
img_array[28:32, 0:4] = [0, 255, 255]  # Cyan -> 7

seg_image = Image.fromarray(img_array, mode='RGB')
seg_image.save(temp_image_path)

ARGS = {
    "image_path": temp_image_path,
    "image_size": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torchvision — 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 int, shape (32, 32) — shape (32, 32) 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
open_image Ran
ran on a synthesized input
leolle/StyleTransfer/utils/io.py
code served (permissive licence) · get_code("e7d7e6e86a4adc2e")
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 4, dtype family float, shape (1, 3, 128, 96) 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
from PIL import Image
import io

# Create a small test image in memory
torch.manual_seed(0)
img_array = np.random.randint(0, 256, (64, 48, 3), dtype=np.uint8)
img = Image.fromarray(img_array, mode='RGB')

# Save to bytes buffer
img_buffer = io.BytesIO()
img.save(img_buffer, format='PNG')
img_buffer.seek(0)

# Create a temporary file path (we'll use a string that PIL can handle)
# Since we can't do real file I/O, we'll create the image and mock the path
# by using PIL's ability to open from bytes
import tempfile
import os

temp_dir = tempfile.gettempdir()
temp_image_path = os.path.join(temp_dir, "test_image_temp.png")
img.save(temp_image_path)

ARGS = {
    "image_path": temp_image_path,
    "image_size": (128, 96)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 128, 96) — shape (1, 3, 128, 96) 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
svd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leolle/StyleTransfer/utils/core.py
code served (permissive licence) · get_code("de40dd53e9e39e11")
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) and returned tuple. 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

torch.manual_seed(0)

# Create a small feature tensor
# The function expects a 2D tensor where:
# - size[0] is the number of features/dimensions
# - size[1] is the batch size (number of samples)
# Using distinct sizes: 4 features, 3 samples
feat = torch.randn(4, 3)

# iden parameter: boolean flag for adding identity matrix
iden = False

# device parameter: CPU only
device = 'cpu'

ARGS = {
    'feat': feat,
    'iden': iden,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
is_image_file 62 other papers
6 dated earlier, 56 later
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1703.07511 (2017-03)
Deep Photo Style Transfer
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 59 more not named here
get_wav 2 other papers
2 dated earlier
1703.07511 (2017-03)
Deep Photo Style Transfer
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
adain 1 other paper
1 later
2303.15166 (2023-03)
Towards Artistic Image Aesthetics Assessment: a Large-scale Dataset and a New Method
calc_mean_std 1 other paper
1 later
2303.15166 (2023-03)
Towards Artistic Image Aesthetics Assessment: a Large-scale Dataset and a New Method
get_rank 1 other paper
1 dated earlier
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
get_squeeze_feat 1 other paper
1 dated earlier
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
svd 1 other paper
1 dated earlier
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization

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

Recent style transfer models have provided promising artistic results. However, given a photograph as a reference style, existing methods are limited by spatial distortions or unrealistic artifacts, which should not happen in real photographs. We introduce a theoretically sound correction to the network architecture that remarkably enhances photorealism and faithfully transfers the style. The key ingredient of our method is wavelet transforms that naturally fits in deep networks. We propose a wavelet corrected transfer based on whitening and coloring transforms (WCT$^2$) that allows features to preserve their structural information and statistical properties of VGG feature space during stylization. This is the first and the only end-to-end model that can stylize a $1024\times1024$ resolution image in 4.7 seconds, giving a pleasing and photorealistic quality without any post-processing. Last but not least, our model provides a stable video stylization without temporal constraints. Our code, generated images, and pre-trained models are all available at https://github.com/ClovaAI/WCT2.

For agents

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

get_harvested_code_for_paper("1903.09760")
get_code_for_paper("1903.09760")
have("1903.09760")

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

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

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

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

Connect an agent — have() is free.