SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.13918 · ICCV · 2021

High-Resolution Optical Flow from 1D Attention and Correlation

Jianfei Cai, Xin Tong, Jiaolong Yang, Haofei Xu, Juyong Zhang

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 2 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/2104.13918.json · badge: /api/ran/2104.13918.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
haofeixu/flow1d canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_color Ran
ran, honoured the contract we drafted
haofeixu/flow1d/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.

flow_compute_color Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
haofeixu/flow1d/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)
haofeixu/flow1d/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
int_list Ran
ran, honoured the contract we drafted
haofeixu/flow1d/utils/misc.py
code served (permissive licence) · get_code("76f433ffb0eb1150")
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 int; 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

def int_list(s):
    """Convert string to int list"""
    return [int(x) for x in s.split(',')]

ARGS = {
    "s": "1,2,3,4,5"
}
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 list, ndim 1, dtype family int — 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
readFlowKITTI Ran
ran; our contract draft was wrong, not the code
haofeixu/flow1d/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
haofeixu/flow1d/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
read_text_lines Ran
ran; our contract draft was wrong, not the code
haofeixu/flow1d/utils/misc.py
code served (permissive licence) · get_code("78088e741a0c4b80")
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 text file with some content
temp_dir = tempfile.mkdtemp()
filepath = os.path.join(temp_dir, "test.txt")

with open(filepath, 'w') as f:
    f.write("line 1\n")
    f.write("line 2  \n")
    f.write("line 3\n")

ARGS = {
    "filepath": filepath
}
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
criterion Not yet run
unverified (harvested, no recorded run)
haofeixu/flow1d/loss.py
code served (permissive licence) · get_code("a9cf5d488feb28b4")
How it ran

no invocation recorded.

readFlow Not yet run
unverified (harvested, no recorded run)
haofeixu/flow1d/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.

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, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 3 the same month, 8 later) and 1 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
readFlow 8 other papers
3 dated earlier, 5 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
2010.14851 (2020-10)
Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation
and 5 more not named here
readPFM 6 other papers
1 dated earlier, 5 later
2010.14851 (2020-10)
Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation
2109.15321 (2021-09)
Sensor-Guided Optical Flow
and 3 more not named here
compute_color 5 other papers
1 dated earlier, 1 the same month, 3 later
2010.14851 (2020-10)
Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation
2104.00556 (2021-04)
Deep Two-View Structure-from-Motion Revisited
2111.13680 (2021-11)
GMFlow: Learning Optical Flow via Global Matching
and 2 more not named here
flow_to_color 5 other papers
2 dated earlier, 1 the same month, 2 later
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
2010.14851 (2020-10)
Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation
2104.00556 (2021-04)
Deep Two-View Structure-from-Motion Revisited
and 2 more not named here
readFlowKITTI 5 other papers
1 dated earlier, 4 later
2010.14851 (2020-10)
Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation
2109.15321 (2021-09)
Sensor-Guided Optical Flow
and 2 more not named here
flow_compute_color 3 other papers
1 dated earlier, 1 the same month, 1 later
2010.14851 (2020-10)
Displacement-Invariant Matching Cost Learning for Accurate Optical Flow Estimation
2104.00556 (2021-04)
Deep Two-View Structure-from-Motion Revisited
2111.13680 (2021-11)
GMFlow: Learning Optical Flow via Global Matching
read_text_lines 2 other papers
2 later
2308.09383 (2023-08)
Label-Free Event-based Object Recognition via Joint Learning with Image Reconstruction from Events
2312.02145 (2023-12)
Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation
int_list 1 other paper
1 later
2312.02145 (2023-12)
Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation

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

Optical flow is inherently a 2D search problem, and thus the computational complexity grows quadratically with respect to the search window, making large displacements matching infeasible for high-resolution images. In this paper, we take inspiration from Transformers and propose a new method for high-resolution optical flow estimation with significantly less computation. Specifically, a 1D attention operation is first applied in the vertical direction of the target image, and then a simple 1D correlation in the horizontal direction of the attended image is able to achieve 2D correspondence modeling effect. The directions of attention and correlation can also be exchanged, resulting in two 3D cost volumes that are concatenated for optical flow estimation. The novel 1D formulation empowers our method to scale to very high-resolution input images while maintaining competitive performance. Extensive experiments on Sintel, KITTI and real-world 4K (2160 × 3840) resolution images demonstrated the effectiveness and superiority of our proposed method. Code and models are available at https://github.com/haofeixu/flow1d.

For agents

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

get_harvested_code_for_paper("2104.13918")
get_code_for_paper("2104.13918")
have("2104.13918")

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

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

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

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

Connect an agent — have() is free.