SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.13325 · 2021

MVS2D: Efficient Multi-view Stereo via Attention-Driven 2D Convolutions

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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 5 failures of our instrument; 1 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/2104.13325.json · badge: /api/ran/2104.13325.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
zhenpeiyang/MVS2D canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_depth_expectation Ran
ran; our contract draft was wrong, not the code
zhenpeiyang/MVS2D/networks/module.py
code served (permissive licence) · get_code("bf60c0386e0f9109")
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 3, dtype family float, shape (2, 3, 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 torch

torch.manual_seed(0)

# Analyzing the function:
# - p: tensor that gets multiplied with depth_values along dimension 1
# - depth_values: tensor that gets viewed and summed with p
# The function does: torch.sum(p * depth_values, 1)
# This suggests p has shape (batch, num_depths, height, width)
# and depth_values has shape (num_depths,)

batch_size = 2
num_depths = 4
height = 3
width = 5

# p: probability map, shape (batch, num_depths, height, width)
p = torch.rand(batch_size, num_depths, height, width)

# depth_values: depth values for each depth plane, shape (num_depths,)
depth_values = torch.linspace(0.5, 5.0, num_depths)

ARGS = {
    "p": p,
    "depth_values": depth_values,
}
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 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 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
homo_warping Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhenpeiyang/MVS2D/networks/module.py
code served (permissive licence) · get_code("a5858f54a383c6a8")
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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Build small tensors with distinct dimensions
batch_size = 2
channels = 4
height_ref = 3
width_ref = 3
height_src = 4
width_src = 5
num_depth = 2

# Source feature map: (batch, channels, height_src, width_src)
src_fea = torch.randn(batch_size, channels, height_src, width_src)

# Source projection matrix: (batch, 4, 4)
src_proj = torch.randn(batch_size, 4, 4)

# Reference projection matrix: (batch, 4, 4)
ref_proj = torch.randn(batch_size, 4, 4)

# Depth values: (batch, num_depth, height_ref, width_ref)
depth_values = torch.randn(batch_size, num_depth, height_ref, width_ref).abs() + 0.1

ARGS = {
    "src_fea": src_fea,
    "src_proj": src_proj,
    "ref_proj": ref_proj,
    "depth_values": depth_values,
}
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 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
init_dist_pytorch Ran
ran on a synthesized input
zhenpeiyang/MVS2D/utils.py
code served (permissive licence) · get_code("b94803b3c59145e2")
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 int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import torch.distributed as dist
import torch.multiprocessing as mp

torch.manual_seed(0)

# Since this function uses distributed PyTorch which requires actual process spawning
# and GPU availability, we can only construct the arguments. The function itself
# will fail when trying to initialize the process group without proper setup,
# but we can provide valid argument values.

ARGS = {
    'tcp_port': 29500,
    'local_rank': 0,
    'backend': 'gloo'  # Using 'gloo' instead of 'nccl' since we're CPU-only
}
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 tuple, ndim 1, dtype family int — 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
init_dist_slurm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhenpeiyang/MVS2D/utils.py
code served (permissive licence) · get_code("6ab25db611067c33")
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 int; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 os
import torch
import torch.distributed as dist

# Mock the SLURM environment variables
os.environ['SLURM_PROCID'] = '0'
os.environ['SLURM_NTASKS'] = '1'
os.environ['SLURM_NODELIST'] = 'node[0]'

# Mock subprocess.getoutput to avoid actual system calls
import subprocess
original_getoutput = subprocess.getoutput
subprocess.getoutput = lambda cmd: 'localhost'

# Set random seed for reproducibility
torch.manual_seed(0)

# Define arguments for init_dist_slurm
ARGS = {
    'tcp_port': 29500,
    'local_rank': 0,
    'backend': 'gloo'  # Use 'gloo' instead of 'nccl' for CPU-only execution
}
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 tuple, ndim 1, dtype family int — 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
randomRotation Ran
ran, honoured the contract we drafted
zhenpeiyang/MVS2D/utils.py
code served (permissive licence) · get_code("1d9ae8194939c4a4")
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 (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 numpy as np

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

# epsilon parameter: controls the magnitude of rotation perturbation
# Should be a small float value (typically between 0 and 1)
epsilon = 0.1

ARGS = {
    "epsilon": epsilon
}
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 (3, 3) — shape (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
read_camera_parameters Ran
ran on a synthesized input
zhenpeiyang/MVS2D/patchmatch_fusion.py
code served (permissive licence) · get_code("0c21ad29e1868b8e")
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 numpy as np
import tempfile
import os

# Create a temporary file with valid camera parameters
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "camera_params.txt")

# Write camera parameters in the expected format
# Line 0: comment/header
# Lines 1-4: 4x4 extrinsics matrix
# Line 5: empty/comment
# Line 6: comment
# Lines 7-9: 3x3 intrinsics matrix

content = """# Camera parameters
1.0 0.0 0.0 0.1
0.0 1.0 0.0 0.2
0.0 0.0 1.0 0.3
0.0 0.0 0.0 1.0

# Intrinsics
520.0 0.0 320.0
0.0 520.0 240.0
0.0 0.0 1.0
"""

with open(temp_file, 'w') as f:
    f.write(content)

ARGS = {
    "filename": 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 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_img Ran
ran; our contract draft was wrong, not the code
zhenpeiyang/MVS2D/patchmatch_fusion.py
code served (permissive licence) · get_code("b300805ea5cbcf18")
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 3, dtype family float, shape (6, 5, 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 cv2
from PIL import Image
import tempfile
import os

# Create a temporary image file for testing
temp_dir = tempfile.gettempdir()
temp_img_path = os.path.join(temp_dir, "test_img.png")

# Create a simple test image (3x4 RGB image)
test_array = np.random.randint(0, 256, (3, 4, 3), dtype=np.uint8)
test_img = Image.fromarray(test_array, mode='RGB')
test_img.save(temp_img_path)

ARGS = {
    "filename": temp_img_path,
    "img_wh": (5, 6)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (6, 5, 3) — shape (6, 5, 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
reducePts Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhenpeiyang/MVS2D/dtu_pyeval.py
code served (permissive licence) · get_code("6796b30737222b94")
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 numpy as np
from scipy import spatial

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

# Create a small set of 3D points
pts = np.array([
    [0.0, 0.0, 0.0],
    [0.1, 0.1, 0.1],
    [1.0, 1.0, 1.0],
    [1.1, 1.1, 1.1],
    [5.0, 5.0, 5.0],
    [5.1, 5.1, 5.1],
], dtype=np.float64)

# Distance threshold for reduction
dst = 0.2

# Verbose flag
verbose = False

ARGS = {
    'pts': pts,
    'dst': dst,
    'verbose': verbose,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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_pfm Not yet run
unverified (harvested, no recorded run)
zhenpeiyang/MVS2D/patchmatch_fusion.py
code served (permissive licence) · get_code("1b4028697eac1b3b")
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 9 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 7 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
read_camera_parameters 4 other papers
1 dated earlier, 3 later
1912.06378 (2019-12)
Cascade Cost Volume for High-Resolution Multi-View Stereo and Stereo Matching
2201.01501 (2022-01)
Rethinking Depth Estimation for Multi-View Stereo: A Unified Representation
and 1 more not named here
compute_depth_expectation 1 other paper
1 later
2403.07535 (2024-03)
Adaptive Fusion of Single-View and Multi-View Depth for 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

Deep learning has made significant impacts on multi-view stereo systems. State-of-the-art approaches typically involve building a cost volume, followed by multiple 3D convolution operations to recover the input image's pixel-wise depth. While such end-to-end learning of plane-sweeping stereo advances public benchmarks' accuracy, they are typically very slow to compute. We present \ouralg, a highly efficient multi-view stereo algorithm that seamlessly integrates multi-view constraints into single-view networks via an attention mechanism. Since \ouralg only builds on 2D convolutions, it is at least $2\times$ faster than all the notable counterparts. Moreover, our algorithm produces precise depth estimations and 3D reconstructions, achieving state-of-the-art results on challenging benchmarks ScanNet, SUN3D, RGBD, and the classical DTU dataset. our algorithm also out-performs all other algorithms in the setting of inexact camera poses. Our code is released at \url{https://github.com/zhenpeiyang/MVS2D}

For agents

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

get_harvested_code_for_paper("2104.13325")
get_code_for_paper("2104.13325")
have("2104.13325")

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

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

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

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

Connect an agent — have() is free.