SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.03085 · NeurIPS · 2020

Wasserstein Distances for Stereo Disparity Estimation

Kilian Weinberger, Wei-Lun Chao, Mark Campbell, Divyansh Garg, Yan Wang, Bharath Hariharan

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 2 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 1 failure of our instrument; 1 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/2007.03085.json · badge: /api/ran/2007.03085.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
Div99/W-Stereo-Disp canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
dataloader Ran
ran on a synthesized input
Div99/W-Stereo-Disp/src/disp_dataloader/KITTILoader3D.py
code served (permissive licence) · get_code("74a08f63b12add42")
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 tempfile
import os

# Create temporary directory structure and files
tmpdir = tempfile.mkdtemp()

# Create required subdirectories
os.makedirs(os.path.join(tmpdir, 'image_2'), exist_ok=True)
os.makedirs(os.path.join(tmpdir, 'image_3'), exist_ok=True)
os.makedirs(os.path.join(tmpdir, 'depth_map'), exist_ok=True)
os.makedirs(os.path.join(tmpdir, 'calib'), exist_ok=True)

# Create train index file
train_file = os.path.join(tmpdir, 'train.txt')
with open(train_file, 'w') as f:
    f.write('000000\n')
    f.write('000001\n')

# Create val index file
val_file = os.path.join(tmpdir, 'val.txt')
with open(val_file, 'w') as f:
    f.write('000010\n')
    f.write('000011\n')

# Create dummy image files
for img_id in ['000000', '000001', '000010', '000011']:
    open(os.path.join(tmpdir, 'image_2', f'{img_id}.png'), 'w').close()
    open(os.path.join(tmpdir, 'image_3', f'{img_id}.png'), 'w').close()
    open(os.path.join(tmpdir, 'depth_map', f'{img_id}.npy'), 'w').close()
    open(os.path.join(tmpdir, 'calib', f'{img_id}.txt'), 'w').close()

ARGS = {
    'filepath': tmpdir,
    'train_file': train_file,
    'val_file': val_file,
    'kitti2015': False,
}
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, 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
default_loader Ran
ran, honoured the contract we drafted
Div99/W-Stereo-Disp/src/disp_dataloader/KITTILoader_dataset3d.py
pointer only (licence: MIT); the stored copy get_code serves, from xlgsyzp/cvpt, is pointer only (licence: NONE) · get_code("ac269a0e4b8d946e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xlgsyzp/cvpt, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

default_loader Ran
ran, honoured the contract we drafted
Div99/W-Stereo-Disp/src/disp_dataloader/SceneFlowLoader.py
code served (permissive licence) · get_code("0b3ce8456d675a8c")
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 Image. 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 tempfile
from PIL import Image
import os

# Create a temporary image file
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.jpg")

# Create a simple RGB image and save it
img = Image.new('RGB', (100, 100), color='red')
img.save(temp_image_path)

# Define ARGS with the path parameter
ARGS = {
    'path': temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
disparity_loader Ran
ran on a synthesized input
Div99/W-Stereo-Disp/src/disp_dataloader/KITTILoader_dataset3d.py
code served (permissive licence) · get_code("8d9f5f6ce951aa15")
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 (4, 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
import tempfile
import os

# Create a temporary .npy file with sample disparity data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "disparity.npy")

# Create sample disparity data (2D array of float values)
disparity_data = np.random.rand(4, 3).astype(np.float32)
np.save(temp_file, disparity_data)

ARGS = {
    "path": temp_file
}
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 (4, 3) — shape (4, 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
dynamic_baseline Ran
ran on a synthesized input
Div99/W-Stereo-Disp/src/disp_dataloader/KITTI_submission_loader.py
code served (permissive licence) · get_code("b9ee501ff15b4629")
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 float64, 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 numpy as np

# The function expects a calib_info dict with 'P3' and 'P2' keys
# Each should be array-like data that can be reshaped to [3, 4]
# The function accesses elements [0, 3] and [0, 0] of the reshaped matrices

# Create sample calibration matrices as 12-element arrays (3x4 when reshaped)
P3_matrix = np.array([
    [520.0, 0.0, 320.0, 0.0],
    [0.0, 520.0, 240.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
])

P2_matrix = np.array([
    [520.0, 0.0, 320.0, 50.0],
    [0.0, 520.0, 240.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
])

calib_info = {
    'P3': P3_matrix.flatten(),  # 12-element array
    'P2': P2_matrix.flatten()   # 12-element array
}

ARGS = {
    'calib_info': calib_info
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
is_image_file Ran
ran, violated the contract we drafted
Div99/W-Stereo-Disp/src/disp_dataloader/KITTILoader3D.py
pointer only (licence: MIT); the stored copy get_code serves, from sgoldyaev/DeepFashion.ADGAN, is pointer only (licence: NONE) · get_code("ab4109634b75ef8b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sgoldyaev/DeepFashion.ADGAN, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

readPFM Ran
ran on a synthesized input
Div99/W-Stereo-Disp/src/disp_dataloader/readpfm.py
code served (permissive licence) · get_code("aaea02c311c902eb")
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 tempfile
import os
import numpy as np
import struct

# Create a temporary PFM file for testing
temp_dir = tempfile.mkdtemp()
pfm_file = os.path.join(temp_dir, "test.pfm")

# Create a simple valid PFM file (color format)
height, width = 4, 3
scale = 1.0

# Write PFM file manually
with open(pfm_file, 'wb') as f:
    # Write header
    f.write(b'PF\n')  # Color PFM
    f.write(f'{width} {height}\n'.encode('utf-8'))
    f.write(f'{scale}\n'.encode('utf-8'))
    
    # Write image data (height x width x 3 floats)
    # Data should be written in little-endian or big-endian based on scale sign
    data = np.random.rand(height, width, 3).astype(np.float32)
    # Flip upside down before writing (PFM convention)
    data = np.flipud(data)
    data.tofile(f)

ARGS = {
    'file': pfm_file
}
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 — 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
read_calib_file Ran
ran; our contract draft was wrong, not the code
Div99/W-Stereo-Disp/src/disp_dataloader/KITTI_submission_loader.py
code served (permissive licence) · get_code("e18b9288494dc86a")
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 dict. 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 tempfile
import os

# Create a temporary calibration file with valid content
temp_dir = tempfile.mkdtemp()
filepath = os.path.join(temp_dir, "calib.txt")

with open(filepath, 'w') as f:
    f.write("P0: 7.215377e+02 0.000000e+00 6.095593e+02 0.000000e+00 0.000000e+00 7.215377e+02 1.728540e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00\n")
    f.write("P1: 7.215377e+02 0.000000e+00 6.095593e+02 -3.861448e+02 0.000000e+00 7.215377e+02 1.728540e+02 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00\n")
    f.write("R0_rect: 9.999239e-01 9.837760e-03 -7.445570e-03 -9.869795e-03 9.999421e-01 -4.278459e-03 7.402527e-03 4.351614e-03 9.999631e-01\n")
    f.write("Tr_velo_to_cam: 7.533745e-03 -9.999714e-01 -6.166020e-04 -4.069766e-03 1.480249e-02 7.280733e-04 -9.998902e-01 -7.631618e-02 9.998621e-01 7.523790e-03 1.480755e-02 -2.717806e-01\n")
    f.write("Tr_imu_to_velo: 9.999976e-01 7.553071e-03 -8.086759e-03 -8.968064e-02 -7.854027e-03 9.998898e-01 -1.221053e-02 -2.738405e-01 8.051860e-03 1.216677e-02 9.999852e-01 -6.923454e-02\n")

ARGS = {
    "filepath": filepath
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
disparity_loader Not yet run
unverified (harvested, no recorded run)
Div99/W-Stereo-Disp/src/disp_dataloader/SceneFlowLoader.py
code served (permissive licence) · get_code("aaf877e27c4a3c3e")
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 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 2 later) and 2 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
is_image_file 62 other papers
15 dated earlier, 47 later
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1703.07511 (2017-03)
Deep Photo Style Transfer
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 59 more not named here
default_loader 27 other papers
11 dated earlier, 16 later
1710.03463 (2017-10)
Learning to Generalize: Meta-Learning for Domain Generalization
1803.08669 (2018-03)
Pyramid Stereo Matching Network
1810.11408 (2018-10)
Anytime Stereo Image Depth Estimation on Mobile Devices
and 24 more not named here
disparity_loader 2 other papers
2 dated earlier
1803.08669 (2018-03)
Pyramid Stereo Matching Network
1810.11408 (2018-10)
Anytime Stereo Image Depth Estimation on Mobile Devices
disparity_loader 2 other papers
2 dated earlier
1810.11408 (2018-10)
Anytime Stereo Image Depth Estimation on Mobile Devices
1906.06310 (2019-06)
Pseudo-LiDAR++: Accurate Depth for 3D Object Detection in Autonomous Driving
readPFM 1 other paper
1 dated earlier
1810.11408 (2018-10)
Anytime Stereo Image Depth Estimation on Mobile Devices
read_calib_file 1 other paper
1 dated earlier
1906.06310 (2019-06)
Pseudo-LiDAR++: Accurate Depth for 3D Object Detection in Autonomous Driving

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

Existing approaches to depth or disparity estimation output a distribution over a set of pre-defined discrete values. This leads to inaccurate results when the true depth or disparity does not match any of these values. The fact that this distribution is usually learned indirectly through a regression loss causes further problems in ambiguous regions around object boundaries. We address these issues using a new neural network architecture that is capable of outputting arbitrary depth values, and a new loss function that is derived from the Wasserstein distance between the true and the predicted distributions. We validate our approach on a variety of tasks, including stereo disparity and depth estimation, and the downstream 3D object detection. Our approach drastically reduces the error in ambiguous regions, especially around object boundaries that greatly affect the localization of objects in 3D, achieving the state-of-the-art in 3D object detection for autonomous driving. Our code will be available at https://github.com/Div99/W-Stereo-Disp.

For agents

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

get_harvested_code_for_paper("2007.03085")
get_code_for_paper("2007.03085")
have("2007.03085")

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

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

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

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

Connect an agent — have() is free.