SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.03336 · CVPR · 2021

Wide-Baseline Relative Camera Pose Estimation with Directional Learning

Noah Snavely, Kefan Chen

arXiv · PDF · Open in the Atlas

Code that ran

10 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; 0 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 0 failures of our instrument; 0 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/2106.03336.json · badge: /api/ran/2106.03336.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
arthurchen0518/DirectionNet canonical (classifier label)
classifier basis: census
10 ran · 0 no recorded run
FunctionStatusWhere it lives
degrees_to_radians Ran
ran on a synthesized input
arthurchen0518/DirectionNet/util.py
code served (permissive licence) · get_code("add176ae11cc1e10")
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 degrees_to_radians(degree):
    """Convert degrees to radians."""
    return math.pi * degree / 180.0

ARGS = {
    "degree": 90.0
}
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
direction_loss Ran
ran on a synthesized input
arthurchen0518/DirectionNet/losses.py
code served (permissive licence) · get_code("8a35b6f36c1fec15")
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.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# Create valid unit vectors for batch size 2, vector dimension 3
batch_size = 2
vector_dim = 3

# Create normalized vectors (unit vectors)
v_pred_np = np.array([
    [1.0, 0.0, 0.0],
    [0.0, 1.0, 0.0]
], dtype=np.float32)

v_true_np = np.array([
    [0.0, 1.0, 0.0],
    [0.0, 0.0, 1.0]
], dtype=np.float32)

# Convert to TensorFlow tensors
v_pred = tf.constant(v_pred_np, dtype=tf.float32)
v_true = tf.constant(v_true_np, dtype=tf.float32)

ARGS = {
    "v_pred": v_pred,
    "v_true": v_true,
}
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
generate_cartesian_grid Ran
ran on a synthesized input
arthurchen0518/DirectionNet/pano_utils/geometry.py
code served (permissive licence) · get_code("92e34842e72d657e")
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 math
import tensorflow.compat.v1 as tf

tf.disable_v2_behavior()

ARGS = {
    "resolution": [480, 640],
    "fov": 45.0,
}
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 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
image_to_world_projection Ran
ran on a synthesized input
arthurchen0518/DirectionNet/dataset.py
code served (permissive licence) · get_code("2efd1fd3887a218a")
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.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# Create small test tensors
height = 2
width = 3

# depth: [HEIGHT, WIDTH, 1]
depth = tf.constant(np.random.rand(height, width, 1).astype(np.float32), dtype=tf.float32)

# intrinsics: [3, 3] camera intrinsic matrix
intrinsics = tf.constant([
    [500.0, 0.0, 160.0],
    [0.0, 500.0, 120.0],
    [0.0, 0.0, 1.0]
], dtype=tf.float32)

# pose_c2w: [3, 4] camera to world transformation matrix
pose_c2w = tf.constant([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 5.0]
], dtype=tf.float32)

ARGS = {
    "depth": depth,
    "intrinsics": intrinsics,
    "pose_c2w": pose_c2w
}
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
overlap_mask Ran
ran on a synthesized input
arthurchen0518/DirectionNet/dataset.py
code served (permissive licence) · get_code("68fa3de8e3a6a7aa")
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.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# Create small test tensors
HEIGHT = 4
WIDTH = 3

# depth1: [HEIGHT, WIDTH, 1] - depth map of first view
depth1 = tf.constant(np.random.rand(HEIGHT, WIDTH, 1).astype(np.float32) + 1.0)

# pose1_c2w: [3, 4] - camera to world pose for first view
pose1_c2w = tf.constant(np.array([
    [1.0, 0.0, 0.0, 0.5],
    [0.0, 1.0, 0.0, 0.2],
    [0.0, 0.0, 1.0, -2.0]
], dtype=np.float32))

# depth2: [HEIGHT, WIDTH, 1] - depth map of second view
depth2 = tf.constant(np.random.rand(HEIGHT, WIDTH, 1).astype(np.float32) + 1.0)

# pose2_c2w: [3, 4] - camera to world pose for second view
pose2_c2w = tf.constant(np.array([
    [0.9999, -0.0175, 0.0, 0.7],
    [0.0175, 0.9999, 0.0, 0.1],
    [0.0, 0.0, 1.0, -1.8]
], dtype=np.float32))

# intrinsics: [3, 3] - camera intrinsic matrix
intrinsics = tf.constant(np.array([
    [500.0, 0.0, 160.0],
    [0.0, 500.0, 120.0],
    [0.0, 0.0, 1.0]
], dtype=np.float32))

ARGS = {
    'depth1': depth1,
    'pose1_c2w': pose1_c2w,
    'depth2': depth2,
    'pose2_c2w': pose2_c2w,
    'intrinsics': intrinsics
}
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 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
radians_to_degrees Ran
ran on a synthesized input
arthurchen0518/DirectionNet/pano_utils/math_utils.py
code served (permissive licence) · get_code("f6637e47f4b941ba")
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 radians_to_degrees(radians):
    """Convert radians to degrees."""
    return 180.0 * radians / math.pi

# Setup code
ARGS = {
    "radians": math.pi / 4
}
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
read_pickle Ran
ran on a synthesized input
arthurchen0518/DirectionNet/util.py
code served (permissive licence) · get_code("263dd17f8d97dd82")
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 pickle
import tempfile
import os

# Create a temporary pickle file with test data
test_data = {
    b'key1': 'value1',
    b'key2': [1, 2, 3],
    b'key3': {'nested': 'dict'}
}

# Write test data to a temporary pickle file
temp_file = tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.pkl')
pickle.dump(test_data, temp_file)
temp_file.close()

ARGS = {
    'file': temp_file.name
}
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 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
safe_sqrt Ran
ran on a synthesized input
arthurchen0518/DirectionNet/util.py
code served (permissive licence) · get_code("7479db1305b74713")
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.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# The function safe_sqrt takes a single parameter x
# and applies tf.sqrt to it after ensuring it's at least 1e-20
# x should be a TensorFlow tensor or something convertible to one

# Create a small test tensor with some values
x_values = np.array([[0.0, 1.0, 4.0, 9.0],
                      [16.0, 0.0, 0.25, 0.01]], dtype=np.float32)

# Convert to TensorFlow tensor
x_tensor = tf.constant(x_values)

ARGS = {
    'x': x_tensor
}
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
spread_loss Ran
ran on a synthesized input
arthurchen0518/DirectionNet/losses.py
code served (permissive licence) · get_code("770ae6ae01418710")
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.compat.v1 as tf
import numpy as np

# Disable v1 behavior warnings
tf.disable_v2_behavior()

# Create a small batch of predicted unnormalized vectors
# Shape: [BATCH=2, 3] as specified in docstring
batch_size = 2
vector_dim = 3

# Create a numpy array and convert to TensorFlow tensor
v_pred_np = np.random.randn(batch_size, vector_dim).astype(np.float32)
v_pred = tf.constant(v_pred_np)

ARGS = {
    "v_pred": v_pred
}
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
world_to_image_projection Ran
ran on a synthesized input
arthurchen0518/DirectionNet/dataset.py
code served (permissive licence) · get_code("004ee38e6509c29d")
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.compat.v1 as tf
import numpy as np

tf.disable_v2_behavior()

# Create small test data
HEIGHT = 2
WIDTH = 3

# p_world: [HEIGHT, WIDTH, 3] points in world's coordinate frame
p_world_np = np.random.randn(HEIGHT, WIDTH, 3).astype(np.float32)
p_world = tf.constant(p_world_np)

# intrinsics: [3, 3] camera's intrinsic matrix
intrinsics_np = np.array([
    [500.0, 0.0, 160.0],
    [0.0, 500.0, 120.0],
    [0.0, 0.0, 1.0]
], dtype=np.float32)
intrinsics = tf.constant(intrinsics_np)

# pose_w2c: [3, 4] camera pose matrix (world to camera)
pose_w2c_np = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 5.0]
], dtype=np.float32)
pose_w2c = tf.constant(pose_w2c_np)

ARGS = {
    "p_world": p_world,
    "intrinsics": intrinsics,
    "pose_w2c": pose_w2c
}
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 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 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, 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 10 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

Modern deep learning techniques that regress the relative camera pose between two images have difficulty dealing with challenging scenarios, such as large camera motions resulting in occlusions and significant changes in perspective that leave little overlap between images. These models continue to struggle even with the benefit of large supervised training datasets. To address the limitations of these models, we take inspiration from techniques that show regressing keypoint locations in 2D and 3D can be improved by estimating a discrete distribution over keypoint locations. Analogously, in this paper we explore improving camera pose regression by instead predicting a discrete distribution over camera poses. To realize this idea, we introduce DirectionNet, which estimates discrete distributions over the 5D relative pose space using a novel parameterization to make the estimation problem tractable. Specifically, DirectionNet factorizes relative camera pose, specified by a 3D rotation and a translation direction, into a set of 3D direction vectors. Since 3D directions can be identified with points on the sphere, DirectionNet estimates discrete distributions on the sphere as its output. We evaluate our model on challenging synthetic and real pose estimation datasets constructed from Matterport3D and InteriorNet. Promising results show a near 50% reduction in error over direct regression methods. * Work done while Kefan was a member of the Google AI Residency program (g.co/airesidency).

For agents

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

get_harvested_code_for_paper("2106.03336")
get_code_for_paper("2106.03336")
have("2106.03336")

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

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

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

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

Connect an agent — have() is free.