SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.02047 · CVPR · 2021

Cuboids Revisited: Learning Robust 3D Shape Fitting to Single RGB Images

Bodo Rosenhahn, Florian Kluger, Michael Yang, Eric Brachmann, Hanno Ackermann

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 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, 2 violated it and 0 have no contract verdict; 3 failures of our instrument; 5 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/2105.02047.json · badge: /api/ran/2105.02047.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
fkluger/cuboids_revisited canonical (classifier label)
classifier basis: census
8 ran · 5 no recorded run
FunctionStatusWhere it lives
fexp Ran
ran, violated the contract we drafted
fkluger/cuboids_revisited/util/equal_distance_sampler_sq.py
code served (permissive licence) · get_code("f1547b350abc7741")
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 1, dtype family float, shape (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

def fexp(x, p):
    return np.sign(x) * np.abs(x) ** p

# Construct valid arguments
x = np.array([-2.5, -1.0, 0.0, 1.5, 2.0])
p = 0.5

ARGS = {
    'x': x,
    'p': p
}
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 1, dtype family float, shape (5,) — shape (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
manual_jacobian_x Ran
ran; our contract draft was wrong, not the code
fkluger/cuboids_revisited/networks/layers.py
code served (permissive licence) · get_code("2ae614a668daf19f")
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, 3, 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)

# Create a simple function to compute y from x for testing
# y = f(x), where we can compute jacobian with respect to x
# We need y to require grad and x to require grad

# y should have shape (B, num_out)
# x should have shape (B, num_points, 3)
B = 2
num_out = 4
num_points = 3

# Create x with requires_grad=True
x = torch.randn(B, num_points, 3, requires_grad=True)

# Create y as a simple function of x, e.g., sum of x^2
# This ensures y depends on x and we can compute gradients
y = (x ** 2).sum(dim=2)  # Shape: (B, num_points)

# But the function expects y to have shape (B, num_out)
# Let's reshape/compute y differently
# We can create y as a linear combination of x
y = torch.randn(B, num_out, requires_grad=True)

# Actually, we need y to be computed from x for the gradient to work
# Let's do it properly:
x = torch.randn(B, num_points, 3, requires_grad=True)
# Create a simple output by summing over the last dimension
y = x.sum(dim=2)  # Shape: (B, num_points)

# But we need (B, num_out). Let's create num_out = num_points
num_out = num_points

# Or create y with a different computation
x = torch.randn(B, num_points, 3, requires_grad=True)
y = (x * 2).sum(dim=2) + x.mean(dim=2)  # Shape: (B, num_points)

# Ensure y requires grad
y.requires_grad_(True)

ARGS = {
    "y": y,
    "x": x,
    "create_graph": 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 Tensor, ndim 4, dtype family float, shape (2, 3, 3, 3) — shape (2, 3, 3, 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
rgb2gray Ran
ran, violated the contract we drafted
fkluger/cuboids_revisited/datasets/smh.py
code served (permissive licence) · get_code("eb7801586aa2560a")
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 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 numpy as np

# Create a small RGB image array
# Shape: (height, width, channels) where channels includes RGB + potentially extra
# Using shape (2, 4, 3) for a 2x4 RGB image
rgb_image = np.random.rand(2, 4, 3).astype(np.float32)

ARGS = {
    "rgb": rgb_image
}
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 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
sample_spherical Ran
ran, honoured the contract we drafted
fkluger/cuboids_revisited/datasets/synthetic_cuboids.py
code served (permissive licence) · get_code("6a85549fd5684f82")
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 1, dtype family float, shape (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 numpy as np

def sample_spherical(ndim=3):
    vec = np.random.randn(ndim)
    vec /= np.linalg.norm(vec, axis=0)
    return vec

ARGS = {
    "ndim": 3
}
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 1, dtype family float, shape (3,) — shape (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
sigmoid Ran
ran; our contract draft was wrong, not the code
fkluger/cuboids_revisited/util/consistency.py
code served (permissive licence) · get_code("78bb52ae71e528a9")
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

torch.manual_seed(0)

# The sigmoid function takes a single parameter 'x' which should be a tensor
# The function applies torch.exp and arithmetic operations on it
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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, 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
sigmoid_ Ran
ran, honoured the contract we drafted
fkluger/cuboids_revisited/util/consistency.py
code served (permissive licence) · get_code("13e6282360f1c5bb")
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 float, 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 math

def sigmoid_(x):
    return 1.0 / (1.0 + math.exp(-x))

# The function takes a single parameter 'x' which is used in a mathematical expression
# It expects a numeric value (int, float, or similar)

ARGS = {
    'x': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
soft_inlier_fun_gen Ran
ran; our contract draft was wrong, not the code
fkluger/cuboids_revisited/util/consistency.py
code served (permissive licence) · get_code("00b04bc234d801ff")
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 function. 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)

# soft_inlier_fun_gen takes two parameters: beta and tau
# Looking at the function body:
# - beta is used in arithmetic operations (beta * d, beta * tau)
# - tau is used in arithmetic operations (beta * tau)
# Both appear to be scalars or broadcastable to tensors
# The returned function f takes d (a tensor) and performs element-wise operations

beta = 2.0
tau = 0.5

ARGS = {
    "beta": beta,
    "tau": tau,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
sq_surface Ran
ran, honoured the contract we drafted
fkluger/cuboids_revisited/util/equal_distance_sampler_sq.py
code served (permissive licence) · get_code("ebb6838ea65260c2")
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 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 numpy as np

ARGS = {
    'a1': 1.5,
    'a2': 2.0,
    'a3': 1.0,
    'e1': 2.5,
    'e2': 2.5,
    'eta': np.pi / 4,
    'omega': np.pi / 3,
}
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 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
cuboid_mesh Not yet run
unverified (harvested, no recorded run)
fkluger/cuboids_revisited/datasets/synthetic_cuboids.py
code served (permissive licence) · get_code("34820b208495b44c")
How it ran

no invocation recorded.

e_step Not yet run
unverified (harvested, no recorded run)
fkluger/cuboids_revisited/util/em_algorithm.py
code served (permissive licence) · get_code("40ed722d7c0a8379")
How it ran

no invocation recorded.

estimate_planes Not yet run
unverified (harvested, no recorded run)
fkluger/cuboids_revisited/util/fitting.py
code served (permissive licence) · get_code("c90770b4d4fe58ba")
How it ran

no invocation recorded.

manual_jacobian_p Not yet run
unverified (harvested, no recorded run)
fkluger/cuboids_revisited/networks/layers.py
code served (permissive licence) · get_code("7c81a4c434f45a23")
How it ran

no invocation recorded.

twist_to_matrix Not yet run
unverified (harvested, no recorded run)
fkluger/cuboids_revisited/networks/pose_net.py
code served (permissive licence) · get_code("13a01a6a29372a67")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 11 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
rgb2gray 4 other papers
1 dated earlier, 3 later
1909.08313 (2019-09)
Unsupervised Sketch-to-Photo Synthesis
2109.15271 (2021-09)
TöRF: Time-of-Flight Radiance Fields for Dynamic Scene View Synthesis
2203.08586 (2022-03)
Deep vanishing point detection: Geometric priors make dataset variations vanish
and 1 more not named here
sigmoid 1 other paper
1 later
2108.03225 (2021-08)
GLASS: Geometric Latent Augmentation for Shape Spaces

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

Humans perceive and construct the surrounding world as an arrangement of simple parametric models. In particular, man-made environments commonly consist of volumetric primitives such as cuboids or cylinders. Inferring these primitives is an important step to attain high-level, abstract scene descriptions. Previous approaches directly estimate shape parameters from a 2D or 3D input, and are only able to reproduce simple objects, yet unable to accurately parse more complex 3D scenes. In contrast, we propose a robust estimator for primitive fitting, which can meaningfully abstract real-world environments using cuboids. A RANSAC estimator guided by a neural network fits these primitives to 3D features, such as a depth map. We condition the network on previously detected parts of the scene, thus parsing it one-by-one. To obtain 3D features from a single RGB image, we additionally optimise a feature extraction CNN in an end-to-end manner. However, naively minimising pointto-primitive distances leads to large or spurious cuboids occluding parts of the scene behind. We thus propose an occlusion-aware distance metric correctly handling opaque scenes. The proposed algorithm does not require labourintensive labels, such as cuboid annotations, for training. Results on the challenging NYU Depth v2 dataset demonstrate that the proposed algorithm successfully abstracts cluttered real-world 3D scene layouts.

For agents

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

get_harvested_code_for_paper("2105.02047")
get_code_for_paper("2105.02047")
have("2105.02047")

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

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

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

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

Connect an agent — have() is free.