SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.11587 · 2021

SRH-Net: Stacked Recurrent Hourglass Network for Stereo Matching

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 2 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.11587.json · badge: /api/ran/2105.11587.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
hongzhidu/SRHNet canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
convbn Ran
ran; our contract draft was wrong, not the code
hongzhidu/SRHNet/models/SHRNet.py
pointer only (licence: MIT); the stored copy get_code serves, from 3dcvdeveloper/bgnet, is pointer only (licence: NONE) · get_code("15ab3c76823aef7e")
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 3dcvdeveloper/bgnet, 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.

convbn_3d Ran
ran; our contract draft was wrong, not the code
hongzhidu/SRHNet/models/SHRNet.py
pointer only (licence: MIT); the stored copy get_code serves, from mickeykang16/temporaleventstereo, is pointer only (licence: NONE) · get_code("46674adf87c5459d")
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 mickeykang16/temporaleventstereo, 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.

load_data Ran
ran, honoured the contract we drafted
hongzhidu/SRHNet/evaluation.py
code served (permissive licence) · get_code("49a628e53f46ed75")
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, 32, 48) 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
from PIL import Image
import tempfile
import os

# Create temporary image files for testing
temp_dir = tempfile.mkdtemp()

# Create a simple left image (RGB)
left_array = np.random.randint(0, 256, (32, 48, 3), dtype=np.uint8)
left_image = Image.fromarray(left_array, mode='RGB')
left_path = os.path.join(temp_dir, 'left.png')
left_image.save(left_path)

# Create a simple right image (RGB)
right_array = np.random.randint(0, 256, (32, 48, 3), dtype=np.uint8)
right_image = Image.fromarray(right_array, mode='RGB')
right_path = os.path.join(temp_dir, 'right.png')
right_image.save(right_path)

ARGS = {
    'leftname': left_path,
    'rightname': right_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, 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, 32, 48) — shape (6, 32, 48) 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
readPFM Ran
ran; our contract draft was wrong, not the code
hongzhidu/SRHNet/evaluation.py
code served (permissive licence) · get_code("259c1efb59c8cc6f")
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) 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 struct
import numpy as np

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

# Create a simple PFM file (grayscale, Pf format)
width = 4
height = 3
channels = 1

# Write PFM header
with open(temp_file, 'wb') as f:
    # Magic number for grayscale
    f.write(b'Pf\n')
    # Width and height
    f.write(f'{width} {height}\n'.encode('latin-1'))
    # Endianness (negative = little endian)
    f.write(b'-1.0\n')
    
    # Write sample data (height * width * channels floats)
    samples = width * height * channels
    data = np.arange(samples, dtype=np.float32)
    buffer = struct.pack('<' + str(samples) + 'f', *data)
    f.write(buffer)

ARGS = {
    'file': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
readPFM Ran
ran; our contract draft was wrong, not the code
hongzhidu/SRHNet/dataloader/dataset.py
code served (permissive licence) · get_code("8bebef679adf02fe")
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 PFM file for testing
def create_test_pfm_file():
    # Create a temporary directory
    temp_dir = tempfile.gettempdir()
    temp_file = os.path.join(temp_dir, 'test_image.pfm')
    
    # Write a simple PFM file (grayscale, Pf format)
    with open(temp_file, 'wb') as f:
        # Header: magic number
        f.write(b'Pf\n')
        # Width and height
        f.write(b'4 3\n')
        # Scale factor (negative means little-endian)
        f.write(b'-1.0\n')
        # Image data: 4*3*1 = 12 floats in little-endian format
        import struct
        data = [float(i) for i in range(12)]
        for val in data:
            f.write(struct.pack('<f', val))
    
    return temp_file

pfm_file = create_test_pfm_file()

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
test_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hongzhidu/SRHNet/evaluation.py
code served (permissive licence) · get_code("a20b38ce75ecff0e")
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 numpy as np

torch.manual_seed(0)

# The function expects:
# - temp_data: a numpy array with shape (6, height, width) containing float32 values
# - crop_height: an integer for the target crop height
# - crop_width: an integer for the target crop width

# Create a temp_data array with 6 channels, height=10, width=12
temp_data = np.random.randn(6, 10, 12).astype('float32')

# Define crop dimensions
crop_height = 8
crop_width = 9

ARGS = {
    "temp_data": temp_data,
    "crop_height": crop_height,
    "crop_width": crop_width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
test_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hongzhidu/SRHNet/dataloader/dataset.py
code served (permissive licence) · get_code("c1f134ceee85415d")
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

# Construct valid arguments for test_transform
# The function expects:
# - temp_data: numpy array with shape (8, h, w) where h and w are height and width
# - crop_height: int for crop height
# - crop_width: int for crop width
# - left_right: bool (optional, defaults to False)

# Create a test case where the input is smaller than crop size
# Shape should be (8, height, width)
temp_data_small = np.random.randn(8, 3, 4).astype('float32')
crop_height_small = 5
crop_width_small = 6
left_right_flag = False

ARGS = {
    'temp_data': temp_data_small,
    'crop_height': crop_height_small,
    'crop_width': crop_width_small,
    'left_right': left_right_flag
}
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
train_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hongzhidu/SRHNet/dataloader/dataset.py
code served (permissive licence) · get_code("010a8bc4cac07920")
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 random

random.seed(0)
np.random.seed(0)

# Create a small sample temp_data array with shape (8, height, width)
# 8 channels: [0:3] left, [3:6] right, [6:7] target, [7:8] unused
temp_data = np.random.randn(8, 24, 32).astype('float32')

# Define crop dimensions
crop_height = 16
crop_width = 20

# Define other parameters
left_right = False
shift = 0

ARGS = {
    'temp_data': temp_data,
    'crop_height': crop_height,
    'crop_width': crop_width,
    'left_right': left_right,
    'shift': shift,
}
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
get_test_set Not yet run
unverified (harvested, no recorded run)
hongzhidu/SRHNet/dataloader/data.py
code served (permissive licence) · get_code("a9df3c5d6ab1be65")
How it ran

no invocation recorded.

get_training_set Not yet run
unverified (harvested, no recorded run)
hongzhidu/SRHNet/dataloader/data.py
code served (permissive licence) · get_code("0b702d8fe0367fe0")
How it ran

no invocation recorded.

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 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 2 later) and 4 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
convbn 13 other papers
6 dated earlier, 7 later
1803.08669 (2018-03)
Pyramid Stereo Matching Network
1806.01260 (2018-06)
Digging Into Self-Supervised Monocular Depth Estimation
1905.00538 (2019-05)
DPSNet: End-to-end Deep Plane Sweep Stereo
and 10 more not named here
convbn_3d 9 other papers
6 dated earlier, 3 later
1803.08669 (2018-03)
Pyramid Stereo Matching Network
1806.01260 (2018-06)
Digging Into Self-Supervised Monocular Depth Estimation
1905.00538 (2019-05)
DPSNet: End-to-end Deep Plane Sweep Stereo
and 6 more not named here
test_transform 3 other papers
3 dated earlier
1904.06587 (2019-04)
GA-Net: Guided Aggregation Net for End-to-end Stereo Matching
1911.13287 (2019-11)
Domain-invariant Stereo Matching Networks
2010.13501 (2020-10)
Hierarchical Neural Architecture Search for Deep Stereo Matching
readPFM 2 other papers
2 dated earlier
1904.06587 (2019-04)
GA-Net: Guided Aggregation Net for End-to-end Stereo Matching
2010.13501 (2020-10)
Hierarchical Neural Architecture Search for Deep Stereo Matching
load_data 1 other paper
1 dated earlier
1904.06587 (2019-04)
GA-Net: Guided Aggregation Net for End-to-end Stereo Matching

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

The cost aggregation strategy shows a crucial role in learning-based stereo matching tasks, where 3D convolutional filters obtain state of the art but require intensive computation resources, while 2D operations need less GPU memory but are sensitive to domain shift. In this paper, we decouple the 4D cubic cost volume used by 3D convolutional filters into sequential cost maps along the direction of disparity instead of dealing with it at once by exploiting a recurrent cost aggregation strategy. Furthermore, a novel recurrent module, Stacked Recurrent Hourglass (SRH), is proposed to process each cost map. Our hourglass network is constructed based on Gated Recurrent Units (GRUs) and down/upsampling layers, which provides GRUs larger receptive fields. Then two hourglass networks are stacked together, while multi-scale information is processed by skip connections to enhance the performance of the pipeline in textureless areas. The proposed architecture is implemented in an end-to-end pipeline and evaluated on public datasets, which reduces GPU memory consumption by up to 56.1\% compared with PSMNet using stacked hourglass 3D CNNs without the degradation of accuracy. Then, we further demonstrate the scalability of the proposed method on several high-resolution pairs, while previously learned approaches often fail due to the memory constraint. The code is released at \url{https://github.com/hongzhidu/SRHNet}.

For agents

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

get_harvested_code_for_paper("2105.11587")
get_code_for_paper("2105.11587")
have("2105.11587")

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

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

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

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

Connect an agent — have() is free.