SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.15768 · 2022

SAMURAI: Shape And Material from Unconstrained Real-world Arbitrary Image collections

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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 7 have no contract verdict; 0 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/2205.15768.json · badge: /api/ran/2205.15768.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
google/samurai community (classifier label)
classifier basis not recorded on the link
7 ran · 5 no recorded run
FunctionStatusWhere it lives
add_args Ran
ran on a synthesized input
google/samurai/train_samurai.py
code served (permissive licence) · get_code("9f397292332658db")
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 ArgumentParser. 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 argparse

ARGS = {
    'parser': argparse.ArgumentParser(description='Test parser for add_args')
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
batch_cam_bce Ran
ran on a synthesized input
google/samurai/losses/samurai.py
code served (permissive licence) · get_code("c3567310bee1cb8c")
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 SymbolicTensor. 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 tensorflow as tf
import numpy as np

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

# Create small test tensors
batch_size = 2
num_samples = 4

# true: binary labels, shape (batch_size, num_samples)
true = tf.constant([[0.0, 1.0, 1.0, 0.0],
                    [1.0, 0.0, 1.0, 1.0]], dtype=tf.float32)

# pred: predicted probabilities, shape (batch_size, num_samples)
pred = tf.constant([[0.1, 0.9, 0.8, 0.2],
                    [0.7, 0.3, 0.85, 0.95]], dtype=tf.float32)

# confidence: optional weights, shape (batch_size, num_samples)
confidence = tf.constant([[1.0, 1.0, 0.5, 1.0],
                          [1.0, 0.8, 1.0, 1.0]], dtype=tf.float32)

# num_gpus: number of GPUs (integer)
num_gpus = 2

ARGS = {
    "num_gpus": num_gpus,
    "true": true,
    "pred": pred,
    "confidence": confidence
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
chi_squared_error Ran
ran on a synthesized input
google/samurai/losses/samurai.py
code served (permissive licence) · get_code("ec8c80f8d30fc57b")
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 tensorflow as tf
import numpy as np

# Set random seeds for reproducibility
np.random.seed(0)
tf.random.set_seed(0)

# Create small test tensors (batch size 2, dimension 4)
true_vals = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
pred_vals = tf.constant([[1.1, 2.1, 2.9, 4.1], [4.9, 6.1, 7.1, 7.9]], dtype=tf.float32)

ARGS = {
    "gpus": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
prediction_to_specular Ran
ran on a synthesized input
google/samurai/models/samurai/brdf_helper.py
code served (permissive licence) · get_code("4d288518eb2cf074")
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 EagerTensor, ndim 4, dtype family float, shape (2, 4, 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 tensorflow as tf

# Create a small prediction tensor
# Shape: [batch_size, height, width, num_classes]
# batch_size=2, height=4, width=3, num_classes=6
batch_size = 2
height = 4
width = 3
num_classes = 6

prediction = tf.random.normal(
    shape=[batch_size, height, width, num_classes],
    dtype=tf.float32
)

ARGS = {
    "prediction": prediction
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 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
scale_diffuse Ran
ran on a synthesized input
google/samurai/models/samurai/brdf_helper.py
code served (permissive licence) · get_code("603ac1299e72e004")
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 SymbolicTensor. 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 tensorflow as tf
import numpy as np

# Create small test tensors
# The function expects tensors where the last dimension can be reduced
# diffuse and specular should have compatible shapes for element-wise operations

batch_size = 2
feature_dim = 4

# Create diffuse tensor (batch_size x feature_dim)
diffuse = tf.constant(np.random.rand(batch_size, feature_dim).astype(np.float32))

# Create specular tensor (batch_size x feature_dim)
specular = tf.constant(np.random.rand(batch_size, feature_dim).astype(np.float32))

ARGS = {
    "diffuse": diffuse,
    "specular": specular
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
scale_inputs Ran
ran on a synthesized input
google/samurai/models/samurai/input_generation_utils.py
code served (permissive licence) · get_code("c55dd0b146f20dbe")
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. 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 tensorflow as tf

class TargetsStandIn:
    def __init__(self):
        # Create small RGB and mask target tensors
        # Shape: (batch, height, width, channels)
        self.rgb_target = tf.constant([
            [[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]],
              [[7.0, 8.0, 9.0], [10.0, 11.0, 12.0]]],
            [[[13.0, 14.0, 15.0], [16.0, 17.0, 18.0]],
              [[19.0, 20.0, 21.0], [22.0, 23.0, 24.0]]]
        ], dtype=tf.float32)
        
        self.mask_target = tf.constant([
            [[[1.0], [0.5]],
              [[0.8], [0.2]]],
            [[[0.3], [0.9]],
              [[0.6], [0.1]]]
        ], dtype=tf.float32)

# Create targets object with rgb_target and mask_target attributes
targets = TargetsStandIn()

# Define ARGS dictionary with all required parameters
ARGS = {
    "max_dimension_size": 8,
    "dims": (4, 6),
    "targets": targets
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
transform_specular_and_diffuse_prediction Ran
ran on a synthesized input
google/samurai/models/samurai/brdf_helper.py
code served (permissive licence) · get_code("c25b3832e09b1acc")
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 3, 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 tensorflow as tf

# Create small test tensors
# specular_class_prediction: should be logits of shape (..., NUM_CLASSES) where NUM_CLASSES=6
# The function will apply softmax and then compute weighted sum over classes to get RGB output
batch_size = 2
num_classes = 6
color_channels = 3

# specular_class_prediction: shape (2, 6) - batch of 2, 6 classes
specular_class_prediction = tf.random.normal([batch_size, num_classes], dtype=tf.float32)

# diffuse: shape (2, 3) - batch of 2, RGB channels
diffuse = tf.random.uniform([batch_size, color_channels], minval=0.0, maxval=1.0, dtype=tf.float32)

ARGS = {
    "specular_class_prediction": specular_class_prediction,
    "diffuse": diffuse,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
add_args Not yet run
unverified (harvested, no recorded run)
google/samurai/models/samurai/config.py
code served (permissive licence) · get_code("d0f5cfa444c569da")
How it ran

no invocation recorded.

batch_cam_chi_squared_error Not yet run
unverified (harvested, no recorded run)
google/samurai/losses/samurai.py
code served (permissive licence) · get_code("9972e03030bf25dd")
How it ran

no invocation recorded.

get_targets_from_coordinates Not yet run
unverified (harvested, no recorded run)
google/samurai/models/samurai/input_generation_utils.py
code served (permissive licence) · get_code("1fda2c58600244de")
How it ran

no invocation recorded.

render_full_datapoint Not yet run
unverified (harvested, no recorded run)
google/samurai/train_samurai.py
code served (permissive licence) · get_code("f5ab584c10bfbb2d")
How it ran

no invocation recorded.

render_video Not yet run
unverified (harvested, no recorded run)
google/samurai/train_samurai.py
code served (permissive licence) · get_code("d73f64c830dc93d2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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 12 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-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

Inverse rendering of an object under entirely unknown capture conditions is a fundamental challenge in computer vision and graphics. Neural approaches such as NeRF have achieved photorealistic results on novel view synthesis, but they require known camera poses. Solving this problem with unknown camera poses is highly challenging as it requires joint optimization over shape, radiance, and pose. This problem is exacerbated when the input images are captured in the wild with varying backgrounds and illuminations. Standard pose estimation techniques fail in such image collections in the wild due to very few estimated correspondences across images. Furthermore, NeRF cannot relight a scene under any illumination, as it operates on radiance (the product of reflectance and illumination). We propose a joint optimization framework to estimate the shape, BRDF, and per-image camera pose and illumination. Our method works on in-the-wild online image collections of an object and produces relightable 3D assets for several use-cases such as AR/VR. To our knowledge, our method is the first to tackle this severely unconstrained task with minimal user interaction. Project page: https://markboss.me/publication/2022-samurai/ Video: https://youtu.be/LlYuGDjXp-8

For agents

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

get_harvested_code_for_paper("2205.15768")
get_code_for_paper("2205.15768")
have("2205.15768")

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

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

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

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

Connect an agent — have() is free.