{"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/craft-cross-attentional-flow-transformer-for","title":"CRAFT: Cross-Attentional Flow Transformer for Robust Optical Flow","arxiv_id":"2203.16896","date":"2022-03-31","proceeding":"CVPR 2022 1","authors":["Xiuchao Sui","Shaohua Li","Xue Geng","Yan Wu","Xinxing Xu","Yong liu","Rick Goh","Hongyuan Zhu"],"abstract":"Optical flow estimation aims to find the 2D motion field by identifying corresponding pixels between two images. Despite the tremendous progress of deep learning-based optical flow methods, it remains a challenge to accurately estimate large displacements with motion blur. This is mainly because the correlation volume, the basis of pixel matching, is computed as the dot product of the convolutional features of the two images. The locality of convolutional features makes the computed correlations susceptible to various noises. On large displacements with motion blur, noisy correlations could cause severe errors in the estimated flow. To overcome this challenge, we propose a new architecture \"CRoss-Attentional Flow Transformer\" (CRAFT), aiming to revitalize the correlation volume computation. In CRAFT, a Semantic Smoothing Transformer layer transforms the features of one frame, making them more global and semantically stable. In addition, the dot-product correlations are replaced with transformer Cross-Frame Attention. This layer filters out feature noises through the Query and Key projections, and computes more accurate correlations. On Sintel (Final) and KITTI (foreground) benchmarks, CRAFT has achieved new state-of-the-art performance. Moreover, to test the robustness of different models on large motions, we designed an image shifting attack that shifts input images to generate large artificial motions. Under this attack, CRAFT performs much more robustly than two representative methods, RAFT and GMA. The code of CRAFT is is available at https://github.com/askerlee/craft.","url_abs":"https://arxiv.org/abs/2203.16896v1","url_pdf":"https://arxiv.org/pdf/2203.16896v1.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":"craft-cross-attentional-flow-transformer-for","repo_url":"https://github.com/askerlee/craft","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"optical-flow-estimation","task_name":"Optical Flow Estimation"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/optical-flow-estimation-on-kitti-2015-train","task":"Optical Flow Estimation","dataset":"KITTI 2015 (train)","model":"CRAFT","rank_in_archive_order":11,"of":19,"metrics":{"EPE":"4.88","F1-all":"17.5"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.16896","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.16896"}},"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":"deterministic:regex_extraction","url":"https://github.com/askerlee/craft","reach":null}],"summary":{"ran":7,"unverified":5},"by_repo_kind":{"official":{"samples":12,"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":12,"samples":[{"code_sha256_prefix":"691dde70dfd8362b","entry":"DropPath","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"691dde70dfd8362b"}},{"code_sha256_prefix":"58bd3d89ab15564c","entry":"LearnedSoftAggregate","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"58bd3d89ab15564c"}},{"code_sha256_prefix":"e9781e1438fd9ef6","entry":"MMPrivateOutput","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"e9781e1438fd9ef6"}},{"code_sha256_prefix":"780e4d018a742516","entry":"MMSharedMid","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"780e4d018a742516"}},{"code_sha256_prefix":"dfa223728f6e6fa3","entry":"MMSharedOutput","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"dfa223728f6e6fa3"}},{"code_sha256_prefix":"60dec862276fd2c3","entry":"MultiHeadFeatTrans","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"60dec862276fd2c3"}},{"code_sha256_prefix":"e813ff65ee2974d5","entry":"SETransInitWeights","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"e813ff65ee2974d5"}},{"code_sha256_prefix":"8eb6a5653d8e8863","entry":"CrossAttFeatTrans","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"8eb6a5653d8e8863"}},{"code_sha256_prefix":"a23df79019522512","entry":"ExpandedFeatTrans","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"a23df79019522512"}},{"code_sha256_prefix":"e4410a16a01a438e","entry":"add_identity_bias","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"e4410a16a01a438e"}},{"code_sha256_prefix":"676c5306dc4097fe","entry":"print0","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"676c5306dc4097fe"}},{"code_sha256_prefix":"09d8fd1a68ef4715","entry":"tie_qk","repo":"askerlee/craft","repo_kind":"official","path":"core/setrans.py","file_url":"https://github.com/askerlee/craft/blob/HEAD/core/setrans.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"WTFPL","inline_ok":false,"mcp_get_code":{"code_sha256":"09d8fd1a68ef4715"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}