SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.12723 · CVPR · 2021

DeFLOCNet: Deep Image Editing via Flexible Low-level Controls

Wei Liu, Jing Liao, Yibing Song, Wei Huang, Xintong Han, Hongyu Liu, Ziyu Wan, Bin Jiang

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 4 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/2103.12723.json · badge: /api/ran/2103.12723.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
KumapowerLIU/DeFLOCNet marked official in Papers with Code
Papers with Code archive
5 ran · 4 no recorded run
FunctionStatusWhere it lives
BaseModel Ran
ran on a synthesized input · constructed an object; no result was computed
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("168b32e53ccb089e")
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 an instance of its own class, BaseModel: the run constructed the object and did not call it, so no result was computed. 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 os
import tempfile

torch.manual_seed(0)

# Create a minimal options/config object
class Opt:
    def __init__(self):
        self.gpu_ids = []  # CPU only
        self.isTrain = True
        self.checkpoints_dir = tempfile.gettempdir()
        self.name = "test_model"

# Create a minimal neural network module for testing
class DummyNet(nn.Module):
    def __init__(self):
        super(DummyNet, self).__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal optimizer
dummy_net = DummyNet()
dummy_optimizer = torch.optim.Adam(dummy_net.parameters(), lr=0.001)

# Create scheduler
dummy_scheduler = torch.optim.lr_scheduler.StepLR(dummy_optimizer, step_size=1)

# Build the arguments dictionary
ARGS = {
    'opt': Opt()
}
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 BaseModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BaseModel 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
GANLoss Ran
ran on a synthesized input · constructed an object; no result was computed
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("62df9ae4cddfdd59")
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 an instance of its own class, GANLoss: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# GANLoss parameters
gan_mode = 'original'
target_real_label = 1.0
target_fake_label = 0.0
tensor = torch.FloatTensor

class DummyOpt:
    pass

opt = DummyOpt()

ARGS = {
    'gan_mode': gan_mode,
    'target_real_label': target_real_label,
    'target_fake_label': target_fake_label,
    'tensor': tensor,
    'opt': opt
}
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 GANLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GANLoss 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
InnerLoss Ran
ran on a synthesized input
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("6ef5b462e6696992")
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 0, 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 numpy as np
from scipy import ndimage

INIT_ARGS = {
    "weights": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
}

# Create input tensors for the computation
batch_size = 2
channels = 1
height, width = 128, 128

# Input for the InnerLoss (list of tensors at different resolutions)
input_tensors = [
    torch.randn(batch_size, channels, 128, 128),
    torch.randn(batch_size, channels, 64, 64),
    torch.randn(batch_size, channels, 32, 32),
    torch.randn(batch_size, channels, 16, 16),
    torch.randn(batch_size, channels, 8, 8),
    torch.randn(batch_size, channels, 4, 4)
]

# Sketch tensor (batch_size, 1, height, width)
sketch = torch.randn(batch_size, 1, height, width)

# Color tensor (not used in the loss, but required by the method signature)
color = torch.randn(batch_size, 3, height, width)

ARGS = {
    "input": input_tensors,
    "sketch": sketch,
    "color": color
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
TVloss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("5eb67c32fcfb5f7f")
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 0, dtype family float, 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 torch.nn as nn

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
channels = 3
height = 4
width = 5

# image tensor: (batch, channels, height, width)
image = torch.randn(batch_size, channels, height, width)

# mask tensor: (batch, channels, height, width)
# Values should be between 0 and 1 for a valid mask
mask = torch.rand(batch_size, channels, height, width)

# method string: either 'sum' or 'mean'
method = 'sum'

ARGS = {
    'image': image,
    'mask': mask,
    'method': method
}
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 0, dtype family float, 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
dialation_holes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("5e14b9034e5790ba")
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 (2, 3, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small hole_mask tensor
# Shape: (batch=2, channels=3, height=4, width=5)
hole_mask = torch.randint(0, 2, (2, 3, 4, 5)).float()

ARGS = {
    "hole_mask": hole_mask
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 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
DeFLOCNet Not yet run
unverified (harvested, no recorded run)
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("8d25a2a65b9b8d96")
How it ran

no invocation recorded.

PerceptualLoss Not yet run
unverified (harvested, no recorded run)
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("8f0e643eae874a29")
How it ran

no invocation recorded.

StyleLoss Not yet run
unverified (harvested, no recorded run)
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("2b598c6a1f793f37")
How it ran

no invocation recorded.

VGG16 Not yet run
unverified (harvested, no recorded run)
KumapowerLIU/DeFLOCNet/model/DeFLOCNet.py
code served (permissive licence) · get_code("df8e8572ea450b5a")
How it ran

no invocation recorded.

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 (1 with at least one paper dated earlier, 0 the same month, 4 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
dialation_holes
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1804.07723 (2018-04)
Image Inpainting for Irregular Holes Using Partial Convolutions
2105.02201 (2021-05)
PD-GAN: Probabilistic Diverse GAN for Image Inpainting
PerceptualLoss
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2105.02201 (2021-05)
PD-GAN: Probabilistic Diverse GAN for Image Inpainting
TVloss
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2105.02201 (2021-05)
PD-GAN: Probabilistic Diverse GAN for Image Inpainting
VGG16
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2105.02201 (2021-05)
PD-GAN: Probabilistic Diverse GAN for Image Inpainting

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

The results and code are available at https://github.com/KumapowerLIU/DeFLOCNet. another decoder branch for texture generation and detail enhancement. Both structures and textures are rendered in the decoder, leading to user-intended editing results. Experiments on benchmarks demonstrate that DeFLOCNet effectively transforms different user intentions to create visually pleasing content.

For agents

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

get_harvested_code_for_paper("2103.12723")
get_code_for_paper("2103.12723")
have("2103.12723")

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

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

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

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

Connect an agent — have() is free.