SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper · CVPR · 2024

Adaptive Multi-Modal Cross-Entropy Loss for Stereo Matching

Peng Xu, Zhiyu Xiang, Tianyu Pu, Chengyu Qiao, Jingyun Fu

Open in the Atlas

Code that ran

10 of 13 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, 1 violated it and 4 have no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper.json · badge: /api/ran/Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper.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
xxxupeng/ADL canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
LaplaceDisp2Prob Ran
ran on a synthesized input
xxxupeng/ADL/losses/gt_distribution.py
code served (permissive licence) · get_code("2c1347bf92278229")
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 4, dtype family float, shape (2, 192, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Construct Gt tensor: shape (N, H, W)
# Using small dimensions: batch=2, height=4, width=3
Gt = torch.randn(2, 4, 3)

# Define ARGS dict with all parameters
ARGS = {
    'Gt': Gt,
    'maxdisp': 192,
    'm': 1,
    'n': 9
}
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 4, dtype family float, shape (2, 192, 4, 3) — shape (2, 192, 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
convbn Ran
ran; our contract draft was wrong, not the code
xxxupeng/ADL/backbones/PSMNet/submodule.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 Ran
ran; our contract draft was wrong, not the code
xxxupeng/ADL/backbones/GwcNet/submodule.py
pointer only (licence: MIT); the stored copy get_code serves, from lijia7/sddr, is pointer only (licence: NONE) · get_code("4589ab426bdcfbb8")
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 lijia7/sddr, 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
xxxupeng/ADL/backbones/GwcNet/submodule.py
pointer only (licence: MIT); the stored copy get_code serves, from lijia7/sddr, is pointer only (licence: NONE) · get_code("252c55c642e6a443")
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 lijia7/sddr, 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
xxxupeng/ADL/backbones/PSMNet/submodule.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.

disparity_regression Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xxxupeng/ADL/backbones/GwcNet/submodule.py
pointer only (licence: MIT); the stored copy get_code serves, from mickeykang16/Ev-Stereo3D, is pointer only (licence: NONE) · get_code("b667855f4bbc313f")
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/Ev-Stereo3D, 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.

main_process Ran
ran, violated the contract we drafted
xxxupeng/ADL/train_DDP.py
code served (permissive licence) · get_code("06fca4c705811abe")
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 bool, 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 torch
import argparse

class Args:
    def __init__(self):
        self.multiprocessing_distributed = False
        self.rank = 0
        self.ngpus_per_node = 1

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
pfm_imread Ran
ran on a synthesized input
xxxupeng/ADL/datasets/data_io.py
code served (permissive licence) · get_code("c35f13ea74c6be42")
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
temp_dir = tempfile.mkdtemp()
pfm_path = os.path.join(temp_dir, "test.pfm")

# Write a valid PFM file (color, 3x2 image, scale 1.0)
with open(pfm_path, 'wb') as f:
    # Header: PF for color
    f.write(b'PF\n')
    # Dimensions: width=3, height=2
    f.write(b'3 2\n')
    # Scale: 1.0 (positive = big endian)
    f.write(b'1.0\n')
    # Image data: 2 rows x 3 cols x 3 channels = 18 floats
    data = np.ones((2, 3, 3), dtype='>f')
    data.tofile(f)

ARGS = {
    'filename': pfm_path
}
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
random_int Ran
ran on a synthesized input
xxxupeng/ADL/train_DDP.py
code served (permissive licence) · get_code("f760d340a0133263")
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 int, ndim 0, dtype family int, 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 os
from datetime import datetime

def random_int(obj=None):
    return (id(obj) + os.getpid() + int(datetime.now().strftime('%Y%m%d%H%M%S%f'))) % 4294967295

# The function takes a single optional parameter 'obj' which can be any Python object
# It uses: id(obj), os.getpid(), and datetime.now()
# The obj parameter is used only for its id(), so any object works

ARGS = {
    "obj": None
}
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 int, ndim 0, dtype family int, 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_all_lines Ran
ran on a synthesized input
xxxupeng/ADL/datasets/data_io.py
code served (permissive licence) · get_code("e711a03e74028ed6")
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 list, ndim 1, 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 a temporary file with some test content
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt') as f:
    f.write("line one\n")
    f.write("line two\n")
    f.write("line three\n")
    temp_filename = f.name

ARGS = {
    "filename": temp_filename
}
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 list, ndim 1, dtype family float — a list 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
Adaptive_Multi_Modal_Cross_Entropy_Loss Not yet run
unverified (harvested, no recorded run)
xxxupeng/ADL/losses/gt_distribution.py
code served (permissive licence) · get_code("8955bfd339683511")
How it ran

no invocation recorded.

GwcNet_G Not yet run
unverified (harvested, no recorded run)
xxxupeng/ADL/backbones/GwcNet/gwcnet.py
code served (permissive licence) · get_code("2efbd7b1d1a41e8c")
How it ran

no invocation recorded.

GwcNet_GC Not yet run
unverified (harvested, no recorded run)
xxxupeng/ADL/backbones/GwcNet/gwcnet.py
code served (permissive licence) · get_code("eb1e61a330d39c30")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 5 later) and 3 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
10 dated earlier, 1 later, 2 same year, order not determinable
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
8 dated earlier, 1 same year, order not determinable
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
convbn 5 other papers
2 dated earlier, 1 later, 2 same year, order not determinable
2104.04314 (2021-04)
CFNet: Cascade and Fused Cost Volume for Robust Stereo Matching
2312.09243 (2023-12)
OccNeRF: Advancing 3D Occupancy Prediction in LiDAR-Free Environments
2403.07535 (2024-03)
Adaptive Fusion of Single-View and Multi-View Depth for Autonomous Driving
and 2 more not named here
convbn_3d 4 other papers
2 dated earlier, 1 later, 1 same year, order not determinable
2104.04314 (2021-04)
CFNet: Cascade and Fused Cost Volume for Robust Stereo Matching
2312.09243 (2023-12)
OccNeRF: Advancing 3D Occupancy Prediction in LiDAR-Free Environments
2409.17880 (2024-09)
Self-Distilled Depth Refinement with Noisy Poisson Fusion
and 1 more not named here
pfm_imread 4 other papers
4 dated earlier
1806.01260 (2018-06)
Digging Into Self-Supervised Monocular Depth Estimation
1912.06378 (2019-12)
Cascade Cost Volume for High-Resolution Multi-View Stereo and Stereo Matching
2104.04314 (2021-04)
CFNet: Cascade and Fused Cost Volume for Robust Stereo Matching
and 1 more not named here
read_all_lines 4 other papers
4 dated earlier
1806.01260 (2018-06)
Digging Into Self-Supervised Monocular Depth Estimation
1912.06378 (2019-12)
Cascade Cost Volume for High-Resolution Multi-View Stereo and Stereo Matching
2104.04314 (2021-04)
CFNet: Cascade and Fused Cost Volume for Robust Stereo Matching
and 1 more not named here
disparity_regression 3 other papers
2 dated earlier, 1 later
2104.04314 (2021-04)
CFNet: Cascade and Fused Cost Volume for Robust Stereo Matching
2209.12699 (2022-09)
Accurate and Efficient Stereo Matching via Attention Concatenation Volume
2508.02288 (2025-08)
Unleashing the Temporal Potential of Stereo Event Cameras for Continuous-Time 3D Object Detection
main_process 3 other papers
2 dated earlier, 1 later
2007.12140 (2020-07)
HITNet: Hierarchical Iterative Tile Refinement Network for Real-time Stereo Matching
2301.02379 (2023-01)
CodeTalker: Speech-Driven 3D Facial Animation with Discrete Motion Prior
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
GwcNet_G 1 other paper
1 dated earlier
1903.04025 (2019-03)
Group-wise Correlation Stereo Network
GwcNet_GC 1 other paper
1 dated earlier
1903.04025 (2019-03)
Group-wise Correlation Stereo Network

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Despite the great success of deep learning in stereo matching, recovering accurate disparity maps is still challenging. Currently, L1 and cross-entropy are the two most widely used losses for stereo network training. Compared with the former, the latter usually performs better thanks to its probability modeling and direct supervision to the cost volume. However, how to accurately model the stereo ground-truth for cross-entropy loss remains largely underexplored. Existing works simply assume that the groundtruth distributions are uni-modal, which ignores the fact that most of the edge pixels can be multi-modal. In this paper, a novel adaptive multi-modal cross-entropy loss (ADL) is proposed to guide the networks to learn different distribution patterns for each pixel. Moreover, we optimize the disparity estimator to further alleviate the bleeding or misalignment artifacts in inference. Extensive experimental results show that our method is generic and can help classic stereo networks regain state-of-the-art performance. In particular, GANet with our method ranks 1 st on both the KITTI 2015 and 2012 benchmarks among the published methods. Meanwhile, excellent synthetic-to-realistic generalization performance can be achieved by simply replacing the traditional loss with ours. Code is available at https://github.com/xxxupeng/ADL.

For agents

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

get_harvested_code_for_paper("Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper")
get_code_for_paper("Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper")
have("Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper")

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

curl https://syntology.ai/api/ran/Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper.json

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

[![Syntology run record](https://syntology.ai/api/ran/Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper.svg)](https://syntology.ai/paper/Xu_Adaptive_Multi-Modal_Cross-Entropy_Loss_for_Stereo_Matching_CVPR_2024_paper)

Connect an agent — have() is free.