SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.09188 · CVPR · 2021

High-Resolution Photorealistic Image Translation in Real-Time: A Laplacian Pyramid Translation Network

Lei Zhang, Jie Liang, Hui Zeng

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2105.09188.json · badge: /api/ran/2105.09188.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
csjliang/LPTN marked official in Papers with Code
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
Lap_Pyramid_Conv Ran
ran on a synthesized input
csjliang/LPTN/codes/models/archs/LPTN_arch.py
code served (permissive licence) · get_code("72fd4a39def792cf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list. 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 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

# INIT_ARGS for Lap_Pyramid_Conv.__init__
INIT_ARGS = {
    'num_high': 3
}

# The class uses pyramid_decom as the main computation method
# We need to call it explicitly since it's not forward()
METHOD = 'pyramid_decom'

# ARGS for pyramid_decom method
# pyramid_decom takes an image tensor of shape (batch, channels, height, width)
ARGS = {
    'img': torch.randn(2, 3, 32, 32)  # batch=2, channels=3, height=32, width=32
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ResidualBlock Ran
ran on a synthesized input
csjliang/LPTN/codes/models/archs/LPTN_arch.py
code served (permissive licence) · get_code("a40fefd4ac78d15a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 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 torch
import torch.nn as nn

class ResidualBlock(nn.Module):

    def __init__(self, in_features):
        super(ResidualBlock, self).__init__()
        self.block = nn.Sequential(nn.Conv2d(in_features, in_features, 3, padding=1), nn.LeakyReLU(), nn.Conv2d(in_features, in_features, 3, padding=1))

    def forward(self, x):
        return x + self.block(x)


INIT_ARGS = {
    'in_features': 4
}

ARGS = {
    'x': torch.randn(2, 4, 3, 5)
}

if __name__ == '__main__':
    model = ResidualBlock(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print("ResidualBlock executed successfully")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Trans_high Ran
ran on a synthesized input
csjliang/LPTN/codes/models/archs/LPTN_arch.py
code served (permissive licence) · get_code("4d7ba437b9821d9d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list. 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 torch.nn as nn

# Import the classes
class ResidualBlock(nn.Module):
    def __init__(self, in_features):
        super(ResidualBlock, self).__init__()
        self.block = nn.Sequential(nn.Conv2d(in_features, in_features, 3, padding=1), nn.LeakyReLU(), nn.Conv2d(in_features, in_features, 3, padding=1))

    def forward(self, x):
        return x + self.block(x)

class Trans_high(nn.Module):
    def __init__(self, num_residual_blocks, num_high=3):
        super(Trans_high, self).__init__()
        self.num_high = num_high
        model = [nn.Conv2d(9, 64, 3, padding=1), nn.LeakyReLU()]
        for _ in range(num_residual_blocks):
            model += [ResidualBlock(64)]
        model += [nn.Conv2d(64, 3, 3, padding=1)]
        self.model = nn.Sequential(*model)
        for i in range(self.num_high):
            trans_mask_block = nn.Sequential(nn.Conv2d(3, 16, 1), nn.LeakyReLU(), nn.Conv2d(16, 3, 1))
            setattr(self, 'trans_mask_block_{}'.format(str(i)), trans_mask_block)

    def forward(self, x, pyr_original, fake_low):
        pyr_result = []
        mask = self.model(x)
        for i in range(self.num_high):
            mask = nn.functional.interpolate(mask, size=(pyr_original[-2 - i].shape[2], pyr_original[-2 - i].shape[3]))
            result_highfreq = torch.mul(pyr_original[-2 - i], mask) + pyr_original[-2 - i]
            self.trans_mask_block = getattr(self, 'trans_mask_block_{}'.format(str(i)))
            result_highfreq = self.trans_mask_block(result_highfreq)
            setattr(self, 'result_highfreq_{}'.format(str(i)), result_highfreq)
        for i in reversed(range(self.num_high)):
            result_highfreq = getattr(self, 'result_highfreq_{}'.format(str(i)))
            pyr_result.append(result_highfreq)
        pyr_result.append(fake_low)
        return pyr_result

INIT_ARGS = {
    'num_residual_blocks': 2,
    'num_high': 3
}

ARGS = {
    'x': torch.randn(2, 9, 8, 8),
    'pyr_original': [
        torch.randn(2, 3, 32, 32),
        torch.randn(2, 3, 16, 16),
        torch.randn(2, 3, 8, 8),
        torch.randn(2, 3, 4, 4),
    ],
    'fake_low': torch.randn(2, 3, 4, 4)
}

if __name__ == '__main__':
    model = Trans_high(**INIT_ARGS)
    output = model(**ARGS)
    print("Output is a list of length:", len(output))
    for i, tensor in enumerate(output):
        print(f"  output[{i}] shape: {tensor.shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Trans_low Ran
ran on a synthesized input
csjliang/LPTN/codes/models/archs/LPTN_arch.py
code served (permissive licence) · get_code("f65067dbfac1d4b4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 8, 8) 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 torch.nn as nn

INIT_ARGS = {
    'num_residual_blocks': 2
}

ARGS = {
    'x': torch.randn(2, 3, 8, 8)
}

if __name__ == '__main__':
    model = nn.Module()
    
    # Import the classes
    class ResidualBlock(nn.Module):
        def __init__(self, in_features):
            super(ResidualBlock, self).__init__()
            self.block = nn.Sequential(nn.Conv2d(in_features, in_features, 3, padding=1), nn.LeakyReLU(), nn.Conv2d(in_features, in_features, 3, padding=1))

        def forward(self, x):
            return x + self.block(x)

    class Trans_low(nn.Module):
        def __init__(self, num_residual_blocks):
            super(Trans_low, self).__init__()
            model = [nn.Conv2d(3, 16, 3, padding=1), nn.InstanceNorm2d(16), nn.LeakyReLU(), nn.Conv2d(16, 64, 3, padding=1), nn.LeakyReLU()]
            for _ in range(num_residual_blocks):
                model += [ResidualBlock(64)]
            model += [nn.Conv2d(64, 16, 3, padding=1), nn.LeakyReLU(), nn.Conv2d(16, 3, 3, padding=1)]
            self.model = nn.Sequential(*model)

        def forward(self, x):
            out = x + self.model(x)
            out = torch.tanh(out)
            return out
    
    # Construct and call
    trans_low = Trans_low(**INIT_ARGS)
    output = trans_low(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output dtype: {output.dtype}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float, shape (2, 3, 8, 8) — shape (2, 3, 8, 8) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LPTN Not yet run
unverified (harvested, no recorded run)
csjliang/LPTN/codes/models/archs/LPTN_arch.py
code served (permissive licence) · get_code("b666168472c0a667")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 4 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
ResidualBlock
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2301.08880 (2023-01)
A Large-scale Film Style Dataset for Learning Multi-frequency Driven Film Enhancement

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

Existing image-to-image translation (I2IT) methods are either constrained to low-resolution images or long inference time due to their heavy computational burden on the convolution of high-resolution feature maps. In this paper, we focus on speeding-up the high-resolution photorealistic I2IT tasks based on closed-form Laplacian pyramid decomposition and reconstruction. Specifically, we reveal that the attribute transformations, such as illumination and color manipulation, relate more to the low-frequency component, while the content details can be adaptively refined on high-frequency components. We consequently propose a Laplacian Pyramid Translation Network (LPTN) to simultaneously perform these two tasks, where we design a lightweight network for translating the low-frequency component with reduced resolution and a progressive masking strategy to efficiently refine the high-frequency ones. Our model avoids most of the heavy computation consumed by processing high-resolution feature maps and faithfully preserves the image details. Extensive experimental results on various tasks demonstrate that the proposed method can translate 4K images in real-time using one normal GPU while achieving comparable transformation performance against existing methods. Datasets and codes are available: https://github.com/csjliang/LPTN.

For agents

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

get_harvested_code_for_paper("2105.09188")
get_code_for_paper("2105.09188")
have("2105.09188")

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

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

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

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

Connect an agent — have() is free.