GMFlow
An optical flow model that matches features globally between two frames.
Depth estimation · 675 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Depth estimation
- Parameters
- 4.7M
- Operations
- 675
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2022
- Cited by
- 437 (as of 27 October 2026)
- Authors
- Haofei Xu, Jing Zhang, Jianfei Cai and others
- Source
- GitHub: haofeixu/gmflow
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16904
- Graph hash
- b94b3cc37dcb009c8c3735533fa335903d304dfbb8830af314de194564cd5ba6
- Skeleton hash
- fe99c90615fd66d1b807f65edf0358f98d61fbad93686aa5efae44638c279010
- Architecture hash
- f2d3f3f0c118f66b97bf1997e29bfcf0553caaba95a9ca284c901b1f132c6190
- Diagram SHA-256
- 402e31cd8fc725ac85bdf61d33b952ae421129baacaba7963f9bdd5e1c387875
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
GMFlow estimates optical flow by treating it as a global matching problem, in which correspondences are found by directly comparing feature similarities. The paper sets this against the dominant pipeline of a cost volume with convolutions for flow regression, which it describes as limited to local correlations and so weak on large displacements. It also points to RAFT, whose large number of iterative refinements makes inference time grow linearly.
The framework has 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. A refinement step reuses GMFlow at higher feature resolution to predict residual flow, and the basic GMFlow model runs without it.
The paper reports that, with one refinement, GMFlow outperforms RAFT with 31 refinements on the Sintel benchmark while running faster. The code release notes that GMFlow computes backward flow without forwarding the network twice. The authors later extended GMFlow to stereo and depth tasks in the unimatch code.
Key idea. The paper reformulates optical flow as a global matching problem that finds correspondences by directly comparing feature similarities.
- GMFlow
- optical flow
- optical flow estimation
- global matching
- Learning Optical Flow via Global Matching
- flow estimation
- global matching flow
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{xu2022gmflowlearningopticalflow,
title={GMFlow: Learning Optical Flow via Global Matching},
author={Haofei Xu and Jing Zhang and Jianfei Cai and Hamid Rezatofighi and Dacheng Tao},
year={2022},
eprint={2111.13680},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2111.13680},
}