{"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/flowformer-a-transformer-architecture-for","title":"FlowFormer: A Transformer Architecture for Optical Flow","arxiv_id":"2203.16194","date":"2022-03-30","proceeding":null,"authors":["Zhaoyang Huang","Xiaoyu Shi","Chao Zhang","Qiang Wang","Ka Chun Cheung","Hongwei Qin","Jifeng Dai","Hongsheng Li"],"abstract":"We introduce optical Flow transFormer, dubbed as FlowFormer, a transformer-based neural network architecture for learning optical flow. FlowFormer tokenizes the 4D cost volume built from an image pair, encodes the cost tokens into a cost memory with alternate-group transformer (AGT) layers in a novel latent space, and decodes the cost memory via a recurrent transformer decoder with dynamic positional cost queries. On the Sintel benchmark, FlowFormer achieves 1.159 and 2.088 average end-point-error (AEPE) on the clean and final pass, a 16.5% and 15.5% error reduction from the best published result (1.388 and 2.47). Besides, FlowFormer also achieves strong generalization performance. Without being trained on Sintel, FlowFormer achieves 1.01 AEPE on the clean pass of Sintel training set, outperforming the best published result (1.29) by 21.7%.","url_abs":"https://arxiv.org/abs/2203.16194v4","url_pdf":"https://arxiv.org/pdf/2203.16194v4.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":"flowformer-a-transformer-architecture-for","repo_url":"https://github.com/drinkingcoder/FlowFormer-Official","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"optical-flow-estimation","task_name":"Optical Flow Estimation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/optical-flow-estimation-on-kitti-2015-train","task":"Optical Flow Estimation","dataset":"KITTI 2015 (train)","model":"FlowFormer","rank_in_archive_order":5,"of":19,"metrics":{"EPE":"4.09","F1-all":"14.7"},"uses_additional_data":false},{"leaderboard":"/sota/optical-flow-estimation-on-sintel-clean","task":"Optical Flow Estimation","dataset":"Sintel-clean","model":"FlowFormer","rank_in_archive_order":5,"of":29,"metrics":{"Average End-Point Error":"1.16"},"uses_additional_data":false},{"leaderboard":"/sota/optical-flow-estimation-on-spring","task":"Optical Flow Estimation","dataset":"Spring","model":"FlowFormer","rank_in_archive_order":5,"of":11,"metrics":{"1px total":"6.510"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.16194","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.16194"}},"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/drinkingcoder/FlowFormer-Official","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":1,"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":"f6b944f50d3f15ae","entry":"count_parameters","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"train_FlowFormer.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/train_FlowFormer.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6b944f50d3f15ae"}},{"code_sha256_prefix":"974833a610a2e3c3","entry":"ExpPositionEmbeddingSine","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"core/FlowFormer/LatentCostFormer/attention.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/core/FlowFormer/LatentCostFormer/attention.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"974833a610a2e3c3"}},{"code_sha256_prefix":"b03081b8fae36b41","entry":"LinearPositionEmbeddingSine","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"core/FlowFormer/LatentCostFormer/attention.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/core/FlowFormer/LatentCostFormer/attention.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b03081b8fae36b41"}},{"code_sha256_prefix":"3821d374408cdb44","entry":"compute_grid_indices","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"evaluate_FlowFormer_tile.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/evaluate_FlowFormer_tile.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3821d374408cdb44"}},{"code_sha256_prefix":"1f729ed0436e991f","entry":"compute_weight","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"evaluate_FlowFormer_tile.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/evaluate_FlowFormer_tile.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1f729ed0436e991f"}},{"code_sha256_prefix":"1d30378120dbdf54","entry":"nerf_encoding","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"core/FlowFormer/common.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/core/FlowFormer/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1d30378120dbdf54"}},{"code_sha256_prefix":"64abef14ae987a2a","entry":"validate_chairs","repo":"drinkingcoder/FlowFormer-Official","repo_kind":"official","path":"evaluate_FlowFormer.py","file_url":"https://github.com/drinkingcoder/FlowFormer-Official/blob/HEAD/evaluate_FlowFormer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"64abef14ae987a2a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}