SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.14851 · NeurIPS · 2020

Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation

Kaihao Zhang, Hongdong Li, Yiran Zhong, Yuchao Dai, Jianyuan Wang, Pan Ji

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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, 0 violated it and 4 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2010.14851.json · badge: /api/ran/2010.14851.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
jytime/DICL-Flow canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
neu-vi/ezflow community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_color Ran
ran, honoured the contract we drafted
jytime/DICL-Flow/utils/flow_viz.py
pointer only (licence: MIT); the stored copy get_code serves, from tianfr/Semantic-Flow, is pointer only (licence: NOASSERTION) · get_code("abcbf43ad9fe6129")
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 tianfr/Semantic-Flow, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

create_logger Ran
ran; our contract draft was wrong, not the code
jytime/DICL-Flow/utils/log.py
code served (permissive licence) · get_code("c349bc6f8ed16220")
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 Logger. 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 logging
import tempfile
import os

# Create a temporary file for logging
temp_dir = tempfile.gettempdir()
log_file = os.path.join(temp_dir, "test_logger.log")

ARGS = {
    "log_file": log_file
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
flow_compute_color Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jytime/DICL-Flow/utils/flow_viz.py
code served (permissive licence) · get_code("215f62561b03c262")
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 int, shape (4, 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

# Create small test optical flow arrays
# u: horizontal flow component
# v: vertical flow component
u = np.random.randn(4, 3).astype(np.float32) * 5  # 4x3 array of flow values
v = np.random.randn(4, 3).astype(np.float32) * 5  # 4x3 array of flow values

ARGS = {
    "u": u,
    "v": v,
    "convert_to_bgr": False,
}
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 3, dtype family int, shape (4, 3, 3) — shape (4, 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
flow_to_color Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jytime/DICL-Flow/utils/flow_viz.py
code served (permissive licence) · get_code("d59fe7ab39463182")
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 int, shape (4, 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

# Create a small optical flow array with shape [H, W, 2]
# H=4, W=3 to keep it tiny and distinct
height, width = 4, 3
flow_uv = np.random.randn(height, width, 2).astype(np.float32) * 5

ARGS = {
    "flow_uv": flow_uv,
    "clip_flow": 10.0,
    "convert_to_bgr": False
}
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 3, dtype family int, shape (4, 3, 3) — shape (4, 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
get_default_model_cfg Ran
ran on a synthesized input
neu-vi/ezflow/ezflow/models/build.py
code served (permissive licence) · get_code("2d48be2529de8c80")
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 torch
import torch.nn as nn

# Mock the _ModelZooConfigs class
class _ModelZooConfigs:
    @staticmethod
    def query(model_name):
        # Return a path-like string for the config
        return f"mock_config_{model_name}.yaml"

# Mock the get_cfg function
def get_cfg(cfg_path):
    # Return a simple config dict based on the path
    return {
        "model_name": "mock_model",
        "num_layers": 2,
        "hidden_dim": 64,
        "cfg_path": cfg_path
    }

# Inject mocks into the module namespace where get_default_model_cfg would look for them
import sys
current_module = sys.modules[__name__]
current_module._ModelZooConfigs = _ModelZooConfigs
current_module.get_cfg = get_cfg

def get_default_model_cfg(model_name):
    cfg_path = _ModelZooConfigs.query(model_name)
    return get_cfg(cfg_path)

# Define arguments
ARGS = {
    "model_name": "resnet50"
}
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 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
random_select_points Ran
ran on a synthesized input
jytime/DICL-Flow/loss_functions.py
code served (permissive licence) · get_code("f0c289fcdf2bc013")
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 torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions for clarity
batch_size = 2
dim = 4

x = torch.randn(batch_size, dim)
y = torch.randn(batch_size, dim)
x_ = torch.randn(batch_size, dim)
y_ = torch.randn(batch_size, dim)

ARGS = {
    "x": x,
    "y": y,
    "x_": x_,
    "y_": y_,
    "samples": 1
}
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 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
readFlowKITTI Ran
ran; our contract draft was wrong, not the code
jytime/DICL-Flow/utils/frame_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from VQE-CPGA/CPGA, is pointer only (licence: NONE) · get_code("04de40832d91cecb")
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 VQE-CPGA/CPGA, 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, honoured the contract we drafted
jytime/DICL-Flow/utils/frame_utils.py
code served (permissive licence) · get_code("7c3fbc1f552de802")
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 (3, 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 minimal valid PFM file
# PFM format: header (PF or Pf), width height, scale, then binary float data

def create_test_pfm():
    """Create a minimal valid PFM file for testing"""
    with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.pfm') as f:
        temp_path = f.name
        
        # Write header for color image (PF)
        f.write(b'PF\n')
        
        # Write dimensions: width=4, height=3
        f.write(b'4 3\n')
        
        # Write scale (positive means big-endian)
        f.write(b'1.0\n')
        
        # Write binary float data: 4*3*3 = 36 floats for color image
        data = np.ones((3, 4, 3), dtype='>f')  # big-endian floats
        data.tofile(f)
    
    return temp_path

# Create the test file
test_file_path = create_test_pfm()

ARGS = {
    'file': test_file_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 ndarray, ndim 3, dtype family float, shape (3, 4, 3) — shape (3, 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
resize_flow Ran
ran on a synthesized input
jytime/DICL-Flow/utils/augmentor.py
code served (permissive licence) · get_code("f081ebfd3f0d4c82")
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 (2, 3, 2) 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 cv2
import numpy as np

# Create a sample optical flow array
# Flow has shape (height, width, 2) where the last dimension contains (u, v) components
src_height = 4
src_width = 6
flow = np.random.randn(src_height, src_width, 2).astype(np.float32)

# Define desired output dimensions
des_width = 3
des_height = 2

# Define the method
method = 'bilinear'

ARGS = {
    'flow': flow,
    'des_width': des_width,
    'des_height': des_height,
    'method': method
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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 (2, 3, 2) — shape (2, 3, 2) 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
split2list Ran
ran on a synthesized input
jytime/DICL-Flow/datasets.py
code served (permissive licence) · get_code("21e502a63eb0fcd2")
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 for the split file test case
temp_dir = tempfile.mkdtemp()
split_file = os.path.join(temp_dir, "split.txt")
with open(split_file, 'w') as f:
    f.write("1\n0\n1\n0\n1\n")

# Define test images (simple list of identifiers)
images = ["img1", "img2", "img3", "img4", "img5"]

ARGS = {
    "images": images,
    "split": 0.7,
    "default_split": 1.1,
    "order": False
}
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
readFlow Not yet run
unverified (harvested, no recorded run)
jytime/DICL-Flow/utils/frame_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from NVIDIA/flownet2-pytorch, is pointer only (licence: NOASSERTION) · get_code("1662ea0b62b0229c")
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 NVIDIA/flownet2-pytorch, and GitHub could not classify the licence of that repository (NOASSERTION). 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. No invocation recorded.

subspace_loss_batch Not yet run
unverified (harvested, no recorded run)
jytime/DICL-Flow/loss_functions.py
code served (permissive licence) · get_code("83a4a6b397d8c912")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 7 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 7 later) and 5 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
create_logger 8 other papers
5 dated earlier, 3 later
1712.00726 (2017-12)
Cascade R-CNN: Delving into High Quality Object Detection
1812.04244 (2018-12)
PointRCNN: 3D Object Proposal Generation and Detection from Point Cloud
1902.06326 (2019-02)
PIXOR: Real-time 3D Object Detection from Point Clouds
and 5 more not named here
readFlow 8 other papers
2 dated earlier, 6 later
1612.01925 (2016-12)
FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
2007.12622 (2020-07)
BMBC:Bilateral Motion Estimation with Bilateral Cost Volume for Video Interpolation
2104.13918 (2021-04)
High-Resolution Optical Flow from 1D Attention and Correlation
and 5 more not named here
readPFM 6 other papers
6 later
2104.13918 (2021-04)
High-Resolution Optical Flow from 1D Attention and Correlation
2109.15321 (2021-09)
Sensor-Guided Optical Flow
and 3 more not named here
compute_color 5 other papers
5 later
2104.00556 (2021-04)
Deep Two-View Structure-from-Motion Revisited
2104.13918 (2021-04)
High-Resolution Optical Flow from 1D Attention and Correlation
2111.13680 (2021-11)
GMFlow: Learning Optical Flow via Global Matching
and 2 more not named here
flow_to_color 5 other papers
1 dated earlier, 4 later
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
2104.00556 (2021-04)
Deep Two-View Structure-from-Motion Revisited
2104.13918 (2021-04)
High-Resolution Optical Flow from 1D Attention and Correlation
and 2 more not named here
readFlowKITTI 5 other papers
5 later
2104.13918 (2021-04)
High-Resolution Optical Flow from 1D Attention and Correlation
2109.15321 (2021-09)
Sensor-Guided Optical Flow
and 2 more not named here
flow_compute_color 3 other papers
3 later
2104.00556 (2021-04)
Deep Two-View Structure-from-Motion Revisited
2104.13918 (2021-04)
High-Resolution Optical Flow from 1D Attention and Correlation
2111.13680 (2021-11)
GMFlow: Learning Optical Flow via Global 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-23.

Repositories linked to this paper

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

Abstract

Learning matching costs has been shown to be critical to the success of the stateof-the-art deep stereo matching methods, in which 3D convolutions are applied on a 4D feature volume to learn a 3D cost volume. However, this mechanism has never been employed for the optical flow task. This is mainly due to the significantly increased search dimension in the case of optical flow computation, i.e., a straightforward extension would require dense 4D convolutions in order to process a 5D feature volume, which is computationally prohibitive. This paper proposes a novel solution that is able to bypass the requirement of building a 5D feature volume while still allowing the network to learn suitable matching costs from data. Our key innovation is to decouple the connection between 2D displacements and learn the matching costs at each 2D displacement hypothesis independently, i.e., displacement-invariant cost learning. Specifically, we apply the same 2D convolution-based matching net independently on each 2D displacement hypothesis to learn a 4D cost volume. Moreover, we propose a displacement-aware projection layer to scale the learned cost volume, which reconsiders the correlation between different displacement candidates and mitigates the multi-modal problem in the learned cost volume. The cost volume is then projected to optical flow estimation through a 2D soft-argmin layer. Extensive experiments show that our approach achieves state-of-the-art accuracy on various datasets, and outperforms all published optical flow methods on the Sintel benchmark. The code is available at https://github.com/jytime/DICL-Flow.

For agents

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

get_harvested_code_for_paper("2010.14851")
get_code_for_paper("2010.14851")
have("2010.14851")

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

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

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

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

Connect an agent — have() is free.