SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.03677 · 2020

Semantic Image Manipulation Using Scene Graphs

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2004.03677.json · badge: /api/ran/2004.03677.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
he-dhamo/simsg canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
change_id_constrained Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
he-dhamo/simsg/scripts/evaluate_changes_vg.py
code served (permissive licence) · get_code("54a17e049f9053df")
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 list, ndim 1, dtype family int; 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# The function takes:
# - id: an integer representing an object class id
# - box: a bounding box (appears to be [x1, y1, x2, y2] format based on usage)
# - num_samples: number of samples to return (default 7)

# Create test arguments
id_value = 6  # This is in the 'objects' list, will trigger first condition
box_value = [0.1, 0.2, 0.25, 0.5]  # box[2] - box[0] = 0.15 < 0.3, satisfies constraint
num_samples_value = 7

ARGS = {
    "id": id_value,
    "box": box_value,
    "num_samples": num_samples_value
}
Setup block drafted by
a language model, Claude Haiku 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 list, ndim 1, dtype family int — a list 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
change_relationship Ran
ran, violated the contract we drafted
he-dhamo/simsg/scripts/evaluate_changes_vg.py
code served (permissive licence) · get_code("66d59bfddface44b")
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 list, ndim 2, dtype family int; 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

torch.manual_seed(0)

# Construct objs tensor
# The function checks: triples[j, 0] != objs.size(0) - 1 and triples[j, 2] != objs.size(0) - 1
# So objs needs a size(0) dimension. Let's make it small: 5 objects
objs = torch.randn(5, 4)  # 5 objects, 4 features each

# Construct triples tensor
# The function iterates over triples.size(0) and accesses:
# - triples[j, 1] as source_id (predicate)
# - triples[j, 0] and triples[j, 2] as subject/object indices
# Format: [subject_idx, predicate_id, object_idx]
# We need some triples where:
# - triples[j, 0] != 4 (objs.size(0) - 1)
# - triples[j, 2] != 4 (objs.size(0) - 1)
# - triples[j, 1] is in mapping keys: 31, 13, or 22
triples = torch.tensor([
    [0, 31, 1],  # subject=0, predicate=31, object=1 -> valid
    [1, 13, 2],  # subject=1, predicate=13, object=2 -> valid
    [2, 22, 3],  # subject=2, predicate=22, object=3 -> valid
    [3, 5, 4],   # subject=3, predicate=5, object=4 -> invalid (object is objs.size(0)-1)
    [4, 31, 1],  # subject=4, predicate=31, object=1 -> invalid (subject is objs.size(0)-1)
], dtype=torch.long)

with_auto = False

ARGS = {
    "objs": objs,
    "triples": triples,
    "with_auto": with_auto,
}
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 list, ndim 2, dtype family int — a list 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
process_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
he-dhamo/simsg/scripts/evaluate_reconstruction.py
code served (permissive licence) · get_code("39bca03bd6813ec0")
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 small tensors for images (batch_size=2, channels=3, height=4, width=4)
imgs = torch.randn(2, 3, 4, 4)
imgs_in = torch.randn(2, 3, 4, 4)

# Create object labels (total 6 objects across 2 images)
objs = torch.LongTensor([0, 1, 2, 0, 1, 2])

# Create bounding boxes (6 boxes, 4 coordinates each)
boxes = torch.tensor([
    [0.1, 0.1, 0.5, 0.5],
    [0.2, 0.2, 0.6, 0.6],
    [0.3, 0.3, 0.7, 0.7],
    [0.1, 0.1, 0.5, 0.5],
    [0.2, 0.2, 0.6, 0.6],
    [0.3, 0.3, 0.7, 0.7],
], dtype=torch.float32)

# Create triples (subject, predicate, object) - 4 triples total
triples = torch.LongTensor([
    [0, 0, 1],
    [1, 1, 2],
    [3, 0, 4],
    [4, 1, 5],
])

# Map objects to images (3 objects per image)
obj_to_img = torch.LongTensor([0, 0, 0, 1, 1, 1])

# Map triples to images (2 triples per image)
triples_to_img = torch.LongTensor([0, 0, 1, 1])

# Device (CPU only)
device = torch.device('cpu')

ARGS = {
    'imgs': imgs,
    'imgs_in': imgs_in,
    'objs': objs,
    'boxes': boxes,
    'triples': triples,
    'obj_to_img': obj_to_img,
    'triples_to_img': triples_to_img,
    'device': device,
    'use_feats': True,
    'filter_box': False,
}
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 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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-21.

Repositories linked to this paper

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

Abstract

Image manipulation can be considered a special case of image generation where the image to be produced is a modification of an existing image. Image generation and manipulation have been, for the most part, tasks that operate on raw pixels. However, the remarkable progress in learning rich image and object representations has opened the way for tasks such as text-to-image or layout-to-image generation that are mainly driven by semantics. In our work, we address the novel problem of image manipulation from scene graphs, in which a user can edit images by merely applying changes in the nodes or edges of a semantic graph that is generated from the image. Our goal is to encode image information in a given constellation and from there on generate new constellations, such as replacing objects or even changing relationships between objects, while respecting the semantics and style from the original image. We introduce a spatio-semantic scene graph network that does not require direct supervision for constellation changes or image edits. This makes it possible to train the system from existing real-world datasets with no additional annotation effort.

For agents

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

get_harvested_code_for_paper("2004.03677")
get_code_for_paper("2004.03677")
have("2004.03677")

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

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

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

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

Connect an agent — have() is free.