SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.02774 · 2022

Local Relighting of Real Scenes

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 failures of our instrument; 3 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/2207.02774.json · badge: /api/ran/2207.02774.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
audreycui/relight canonical (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
apply_ablation_replacement Ran
ran, honoured the contract we drafted
audreycui/relight/rewrite_utils/nethook.py
code served (permissive licence) · get_code("69e273e3d4d3702a")
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

torch.manual_seed(0)

# Create a small dummy model that satisfies the function's interface
class DummyModel(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = torch.nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Create test data
x = torch.randn(2, 4)  # batch size 2, feature dim 4

# Create the model
imodel = DummyModel()

# Create buffers dict with ablation and replacement tensors
buffers = {
    'ablation': torch.tensor([[0.5]]),  # shape (1, 1) to be broadcast
    'replacement': torch.tensor([[0.3, 0.2, 0.1, 0.4]])  # shape (1, 4)
}

ARGS = {
    'x': x,
    'imodel': imodel,
    'buffers': buffers
}
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
define_D Ran
ran; our contract draft was wrong, not the code
audreycui/relight/models/networks.py
code served (permissive licence) · get_code("6b05ff6ac40aab1f")
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 MultiscaleDiscriminator. 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
import functools
import numpy as np

torch.manual_seed(0)

ARGS = {
    'input_nc': 3,
    'ndf': 64,
    'n_layers_D': 3,
    'norm': 'instance',
    'use_sigmoid': False,
    'num_D': 3,
    'getIntermFeat': False,
    'gpu_ids': []
}
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 MultiscaleDiscriminator — a MultiscaleDiscriminator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiscaleDiscriminator 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
get_norm_layer Ran
ran; our contract draft was wrong, not the code
audreycui/relight/models/networks.py
code served (permissive licence) · get_code("29bb0088c8c38ae4")
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 partial. 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 functools

torch.manual_seed(0)

ARGS = {
    'norm_type': 'instance'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
l1_loss Ran
ran on a synthesized input
audreycui/relight/rewrite_utils/losses.py
code served (permissive licence) · get_code("39175c94bd9a0052")
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; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:27Z. 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

torch.manual_seed(0)

# Create small tensors for out and target
# Using distinct shapes: out is (2, 4), target is (2, 3) to show they could differ
out = torch.randn(2, 4)
target = torch.randn(2, 4)

ARGS = {
    "out": out,
    "target": target,
}
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 — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
l2_loss Ran
ran on a synthesized input
audreycui/relight/rewrite_utils/losses.py
code served (permissive licence) · get_code("21522a921f8fca95")
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 l2_loss function takes two parameters: out and target
# It computes (target - out) ** 2
# Both should be tensors that support subtraction and squaring
# We'll create small tensors with distinct shapes to allow probing

out = torch.randn(2, 4)
target = torch.randn(2, 4)

ARGS = {
    "out": out,
    "target": target,
}
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
make_matching_tensor Ran
ran; our contract draft was wrong, not the code
audreycui/relight/rewrite_utils/nethook.py
code served (permissive licence) · get_code("3ad9c7c45efc52b5")
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 3, dtype family float, shape (1, 1, 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 torch
import numpy

torch.manual_seed(0)

# Create a valuedict with various entries to test the function
valuedict = {
    'numpy_scalar': numpy.float32(2.5),
    'numpy_array': numpy.array([1.0, 2.0, 3.0]),
    'tensor_low_dim': torch.tensor([1.0, 2.0]),
    'tensor_correct': torch.tensor([[1.0, 2.0, 3.0, 4.0]]),
    'tensor_wrong_dtype': torch.tensor([1, 2, 3, 4], dtype=torch.int32),
}

# Create reference data tensor with shape (2, 4, 3) - batch_size=2, feature_dim=4, depth=3
data = torch.randn(2, 4, 3, dtype=torch.float32, device='cpu')

# Test with a name that exists in valuedict
name = 'numpy_scalar'

ARGS = {
    'valuedict': valuedict,
    'name': name,
    'data': data,
}
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 3, dtype family float, shape (1, 1, 1) — shape (1, 1, 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
recursive_copy Ran
ran; our contract draft was wrong, not the code
audreycui/relight/rewrite_utils/nethook.py
code served (permissive licence) · get_code("e678289f478b4652")
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 dict. 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 test structure with tensors, dicts, and lists
tensor1 = torch.randn(2, 4, requires_grad=True)
tensor2 = torch.randn(3, 5)
tensor3 = torch.randn(2, 4, requires_grad=True)

# Test with a nested structure combining dict, list, and tensors
x = {
    "a": tensor1,
    "b": [tensor2, tensor3],
    "c": {
        "nested": torch.randn(2, 3),
        "list_in_dict": [torch.randn(1, 2), torch.randn(4, 1)]
    }
}

ARGS = {
    "x": x,
    "clone": True,
    "detach": False,
    "retain_grad": False
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
create_model Not yet run
unverified (harvested, no recorded run)
audreycui/relight/models/models.py
code served (permissive licence) · get_code("34fd565f2856a69f")
How it ran

no invocation recorded.

define_G Not yet run
unverified (harvested, no recorded run)
audreycui/relight/models/networks.py
code served (permissive licence) · get_code("e1763bb6022b8fc0")
How it ran

no invocation recorded.

invertibility_loss Not yet run
unverified (harvested, no recorded run)
audreycui/relight/rewrite_utils/losses.py
code served (permissive licence) · get_code("1fbe849c025411da")
How it ran

no invocation recorded.

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, 9 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 3 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
recursive_copy 48 other papers
48 later
2210.07229 (2022-10)
Mass-Editing Memory in a Transformer
2302.12461 (2023-02)
Analyzing And Editing Inner Mechanisms Of Backdoored Language Models
2311.09053 (2023-11)
Assessing Knowledge Editing in Language Models via Relation Perspective
and 45 more not named here
get_norm_layer 8 other papers
5 dated earlier, 3 later
1711.11585 (2017-11)
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
1805.04487 (2018-05)
Non-Stationary Texture Synthesis by Adversarial Expansion
1808.07535 (2018-08)
Learning Hierarchical Semantic Image Manipulation through Structured Representations
and 5 more not named here
apply_ablation_replacement 4 other papers
4 dated earlier
2003.13659 (2020-03)
Exploiting Deep Generative Prior for Versatile Image Restoration and Manipulation
2007.15646 (2020-07)
Rewriting a Deep Generative Model
2009.05041 (2020-09)
Understanding the Role of Individual Units in a Deep Neural Network
and 1 more not named here
make_matching_tensor 4 other papers
4 dated earlier
2003.13659 (2020-03)
Exploiting Deep Generative Prior for Versatile Image Restoration and Manipulation
2007.15646 (2020-07)
Rewriting a Deep Generative Model
2009.05041 (2020-09)
Understanding the Role of Individual Units in a Deep Neural Network
and 1 more not named here
create_model 2 other papers
2 later
2307.03190 (2023-07)
Text-Guided Synthesis of Eulerian Cinemagraphs
2403.14186 (2024-03)
StyleCineGAN: Landscape Cinemagraph Generation using a Pre-trained StyleGAN
define_D 1 other paper
1 dated earlier
2108.09752 (2021-08)
Graph2Pix: A Graph-Based Image to Image Translation Framework
invertibility_loss 1 other paper
1 dated earlier
2005.01703 (2020-05)
Transforming and Projecting Images into Class-conditional Generative Networks
l1_loss 1 other paper
1 dated earlier
2005.01703 (2020-05)
Transforming and Projecting Images into Class-conditional Generative Networks
l2_loss 1 other paper
1 dated earlier
2005.01703 (2020-05)
Transforming and Projecting Images into Class-conditional Generative Networks

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 introduce the task of local relighting, which changes a photograph of a scene by switching on and off the light sources that are visible within the image. This new task differs from the traditional image relighting problem, as it introduces the challenge of detecting light sources and inferring the pattern of light that emanates from them. We propose an approach for local relighting that trains a model without supervision of any novel image dataset by using synthetically generated image pairs from another model. Concretely, we collect paired training images from a stylespace-manipulated GAN; then we use these images to train a conditional image-to-image model. To benchmark local relighting, we introduce Lonoff, a collection of 306 precisely aligned images taken in indoor spaces with different combinations of lights switched on. We show that our method significantly outperforms baseline methods based on GAN inversion. Finally, we demonstrate extensions of our method that control different light sources separately. We invite the community to tackle this new task of local relighting.

For agents

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

get_harvested_code_for_paper("2207.02774")
get_code_for_paper("2207.02774")
have("2207.02774")

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

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

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

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

Connect an agent — have() is free.