{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/global-matching-with-overlapping-attention","title":"Global Matching with Overlapping Attention for Optical Flow Estimation","arxiv_id":"2203.11335","date":"2022-03-21","proceeding":"CVPR 2022 1","authors":["Shiyu Zhao","Long Zhao","Zhixing Zhang","Enyu Zhou","Dimitris Metaxas"],"abstract":"Optical flow estimation is a fundamental task in computer vision. Recent direct-regression methods using deep neural networks achieve remarkable performance improvement. However, they do not explicitly capture long-term motion correspondences and thus cannot handle large motions effectively. In this paper, inspired by the traditional matching-optimization methods where matching is introduced to handle large displacements before energy-based optimizations, we introduce a simple but effective global matching step before the direct regression and develop a learning-based matching-optimization framework, namely GMFlowNet. In GMFlowNet, global matching is efficiently calculated by applying argmax on 4D cost volumes. Additionally, to improve the matching quality, we propose patch-based overlapping attention to extract large context features. Extensive experiments demonstrate that GMFlowNet outperforms RAFT, the most popular optimization-only method, by a large margin and achieves state-of-the-art performance on standard benchmarks. Thanks to the matching and overlapping attention, GMFlowNet obtains major improvements on the predictions for textureless regions and large motions. Our code is made publicly available at https://github.com/xiaofeng94/GMFlowNet","url_abs":"https://arxiv.org/abs/2203.11335v1","url_pdf":"https://arxiv.org/pdf/2203.11335v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"global-matching-with-overlapping-attention","repo_url":"https://github.com/xiaofeng94/gmflownet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"optical-flow-estimation","task_name":"Optical Flow Estimation"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/optical-flow-estimation-on-kitti-2015","task":"Optical Flow Estimation","dataset":"KITTI 2015","model":"GMFlowNet","rank_in_archive_order":6,"of":18,"metrics":{"Fl-all":"4.79","Fl-fg":"6.84"},"uses_additional_data":false},{"leaderboard":"/sota/optical-flow-estimation-on-kitti-2015-train","task":"Optical Flow Estimation","dataset":"KITTI 2015 (train)","model":"GMFlowNet","rank_in_archive_order":6,"of":19,"metrics":{"EPE":"4.24","F1-all":"15.4"},"uses_additional_data":false},{"leaderboard":"/sota/optical-flow-estimation-on-sintel-clean","task":"Optical Flow Estimation","dataset":"Sintel-clean","model":"GMFlowNet","rank_in_archive_order":9,"of":29,"metrics":{"Average End-Point Error":"1.390"},"uses_additional_data":false},{"leaderboard":"/sota/optical-flow-estimation-on-sintel-final","task":"Optical Flow Estimation","dataset":"Sintel-final","model":"GMFlowNet","rank_in_archive_order":8,"of":28,"metrics":{"Average End-Point Error":"2.648"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.11335","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.11335"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xiaofeng94/gmflownet","reach":null}],"summary":{"ran":5,"ran_fixture":1,"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"official":{"samples":14,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"609f6aa177f73bc1","entry":"BasicConvEncoder","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"609f6aa177f73bc1"}},{"code_sha256_prefix":"782c69df771932e7","entry":"BasicMotionEncoder","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"782c69df771932e7"}},{"code_sha256_prefix":"061bb91459aa0019","entry":"CorrBlock","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"061bb91459aa0019"}},{"code_sha256_prefix":"b20207e9c582c326","entry":"DropPath","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b20207e9c582c326"}},{"code_sha256_prefix":"ca7156b5b0317a60","entry":"MultiHeadAttention","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ca7156b5b0317a60"}},{"code_sha256_prefix":"0c29759c872834a2","entry":"window_partition","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0c29759c872834a2"}},{"code_sha256_prefix":"15f7f0358ef0fbda","entry":"window_reverse","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"15f7f0358ef0fbda"}},{"code_sha256_prefix":"8025ceaeea5ca5a2","entry":"BasicUpdateBlock","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8025ceaeea5ca5a2"}},{"code_sha256_prefix":"0ae44dff0ca3040c","entry":"GMFlowNetModel","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0ae44dff0ca3040c"}},{"code_sha256_prefix":"61d28a70c06c21d7","entry":"MixAxialPOLABlock","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61d28a70c06c21d7"}},{"code_sha256_prefix":"2a65e60045482a36","entry":"MixAxialPOLAUpdate","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a65e60045482a36"}},{"code_sha256_prefix":"a189f54d1c241ec9","entry":"NeighborWindowAttention","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a189f54d1c241ec9"}},{"code_sha256_prefix":"af3847d6a9584d02","entry":"POLATransBlock","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af3847d6a9584d02"}},{"code_sha256_prefix":"673740b96395b8cf","entry":"POLAUpdate","repo":"xiaofeng94/gmflownet","repo_kind":"official","path":"core/gmflownet_model.py","file_url":"https://github.com/xiaofeng94/gmflownet/blob/HEAD/core/gmflownet_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"673740b96395b8cf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}