Papers › GMFlow: Learning Optical Flow via Global Matching

GMFlow: Learning Optical Flow via Global Matching

26 Nov 2021CVPR 2022 1arXiv:2111.13680archive 2025-07-28

Haofei Xu, Jing Zhang, Jianfei Cai, Hamid Rezatofighi, DaCheng Tao

Learning-based optical flow estimation has been dominated with the pipeline of cost volume with convolutions for flow regression, which is inherently limited to local correlations and thus is hard to address the long-standing challenge of large displacements. To alleviate this, the state-of-the-art framework RAFT gradually improves its prediction quality by using a large number of iterative refinements, achieving remarkable performance but introducing linearly increasing inference time. To enable both high accuracy and efficiency, we completely revamp the dominant flow regression pipeline by reformulating optical flow as a global matching problem, which identifies the correspondences by directly comparing feature similarities. Specifically, we propose a GMFlow framework, which consists of three main components: a customized Transformer for feature enhancement, a correlation and softmax layer for global feature matching, and a self-attention layer for flow propagation. We further introduce a refinement step that reuses GMFlow at higher feature resolution for residual flow prediction. Our new framework outperforms 31-refinements RAFT on the challenging Sintel benchmark, while using only one refinement and running faster, suggesting a new paradigm for accurate and efficient optical flow estimation. Code is available at https://github.com/haofeixu/gmflow.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2111.13680")

Code

Syntology Ran 3 of 19 code samples harvested from 2 repositories linked to this paper; 16 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 3 ran; community (archive-listed): 4 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

haofeixu/gmflow officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
autonomousvision/unimatch mentioned on GitHubpytorchMIT report
hpcforge/gmflow mentioned on GitHubpytorchnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-ready report
raymondwang987/nvds mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 3 ran; 0 honoured the contract we drafted; 16 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
2ran
16unverified

Licence: 0 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_color haofeixu/gmflow/utils/flow_viz.py official repository ran Apache-2.0 (permissive) · abcbf43ad9fe6129 · report
generate_window_grid haofeixu/gmflow/gmflow/geometry.py official repository ran Apache-2.0 (permissive) · 0823d84f9697f2a7 · report
single_head_full_attention haofeixu/gmflow/gmflow/transformer.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 52b500940a8025a3 · report
coords_grid haofeixu/gmflow/gmflow/geometry.py official repository unverified Apache-2.0 (permissive) · 134980aa63271fbb · report
flow_compute_color haofeixu/gmflow/utils/flow_viz.py official repository unverified Apache-2.0 (permissive) · 215f62561b03c262 · report
flow_loss_func haofeixu/gmflow/loss.py official repository unverified Apache-2.0 (permissive) · 715a9e324491547b · report
flow_to_color haofeixu/gmflow/utils/flow_viz.py official repository unverified Apache-2.0 (permissive) · d59fe7ab39463182 · report
generate_shift_window_attn_mask haofeixu/gmflow/gmflow/transformer.py official repository unverified Apache-2.0 (permissive) · a69f1d64c1b71d23 · report
global_correlation_softmax haofeixu/gmflow/gmflow/matching.py official repository unverified Apache-2.0 (permissive) · d5a86279192fe3ae · report
local_correlation_softmax haofeixu/gmflow/gmflow/matching.py official repository unverified Apache-2.0 (permissive) · d9223ffb6230f989 · report
merge_splits haofeixu/gmflow/gmflow/utils.py official repository unverified Apache-2.0 (permissive) · 6dc05be22af3598b · report
normalize_coords haofeixu/gmflow/gmflow/geometry.py official repository unverified Apache-2.0 (permissive) · 8d0dd2c61c5c3d89 · report
normalize_img haofeixu/gmflow/gmflow/utils.py official repository unverified Apache-2.0 (permissive) · b1ba789ed7470207 · report
single_head_split_window_attention haofeixu/gmflow/gmflow/transformer.py official repository unverified Apache-2.0 (permissive) · 9a948b3b755e6516 · report
split_feature haofeixu/gmflow/gmflow/utils.py official repository unverified Apache-2.0 (permissive) · 4df5b1dd5d60d6cb · report
compute_errors raymondwang987/nvds/infer_NVDS_dpt_bi.py community (archive-listed) unverified MIT (permissive) · b6528bfa48fa18a0 · report
compute_scale_and_shift raymondwang987/nvds/infer_NVDS_dpt_bi.py community (archive-listed) unverified MIT (permissive) · d3e701ed2a0c860a · report
normalize_prediction_robust raymondwang987/nvds/infer_NVDS_dpt_bi.py community (archive-listed) unverified MIT (permissive) · 959c2141efd7f746 · report
normalize_prediction_test raymondwang987/nvds/smooth_loss.py community (archive-listed) unverified MIT (permissive) · 7e90a3df0831de3d · report

Tasks

Optical Flow Estimationregression

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Optical Flow Estimation Spring GMFlow 1px total 10.355 #9 of 11 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections