{"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/loftr-detector-free-local-feature-matching","title":"LoFTR: Detector-Free Local Feature Matching with Transformers","arxiv_id":"2104.00680","date":"2021-04-01","proceeding":"CVPR 2021 1","authors":["Jiaming Sun","Zehong Shen","Yuang Wang","Hujun Bao","Xiaowei Zhou"],"abstract":"We present a novel method for local image feature matching. Instead of performing image feature detection, description, and matching sequentially, we propose to first establish pixel-wise dense matches at a coarse level and later refine the good matches at a fine level. In contrast to dense methods that use a cost volume to search correspondences, we use self and cross attention layers in Transformer to obtain feature descriptors that are conditioned on both images. The global receptive field provided by Transformer enables our method to produce dense matches in low-texture areas, where feature detectors usually struggle to produce repeatable interest points. The experiments on indoor and outdoor datasets show that LoFTR outperforms state-of-the-art methods by a large margin. LoFTR also ranks first on two public benchmarks of visual localization among the published methods.","url_abs":"https://arxiv.org/abs/2104.00680v1","url_pdf":"https://arxiv.org/pdf/2104.00680v1.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":"loftr-detector-free-local-feature-matching","repo_url":"https://github.com/zju3dv/LoFTR","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"loftr-detector-free-local-feature-matching","repo_url":"https://github.com/fabio-sim/DeDoDe-ONNX-TensorRT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"loftr-detector-free-local-feature-matching","repo_url":"https://github.com/kolkir/coarse_loftr_trt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"loftr-detector-free-local-feature-matching","repo_url":"https://github.com/kornia/kornia","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"camera-pose-estimation","task_name":"Camera Pose Estimation"},{"task_slug":"image-matching","task_name":"Image Matching"},{"task_slug":"pose-estimation","task_name":"Pose Estimation"},{"task_slug":"visual-localization","task_name":"Visual Localization"}],"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/image-matching-on-zeb","task":"Image Matching","dataset":"ZEB","model":"LoFTR","rank_in_archive_order":7,"of":10,"metrics":{"Mean AUC@5°":"33.1"},"uses_additional_data":false},{"leaderboard":"/sota/pose-estimation-on-inloc","task":"Pose Estimation","dataset":"InLoc","model":"LoFTR","rank_in_archive_order":6,"of":6,"metrics":{"DUC1-Acc@0.25m,10°":"47.5","DUC1-Acc@0.5m,10°":"72.2","DUC1-Acc@1.0m,10°":"84.8","DUC2-Acc@0.25m,10°":"54.2","DUC2-Acc@0.5m,10°":"74.8","DUC2-Acc@1.0m,10°":"82.5"},"uses_additional_data":false},{"leaderboard":"/sota/visual-localization-on-aachen-day-night-v1-1","task":"Visual Localization","dataset":"Aachen Day-Night v1.1 Benchmark","model":"LoFTR","rank_in_archive_order":2,"of":7,"metrics":{"Acc@0.25m, 2°":"78.5","Acc@0.5m, 5°":"90.6","Acc@5m, 10°":"99.0"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2104.00680","atlas_url":"https://app.syntology.ai/?focus=2104.00680","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.00680"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/kornia/kornia","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fabio-sim/DeDoDe-ONNX-TensorRT","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kolkir/coarse_loftr_trt","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zju3dv/LoFTR","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":9,"ran_honours":2,"ran_draft_wrong":3,"unverified":2},"by_repo_kind":{"official":{"samples":4,"ran":4,"repositories":1},"listed":{"samples":12,"ran":10,"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":"ffe49e7d531de639","entry":"BasicBlock","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ffe49e7d531de639"}},{"code_sha256_prefix":"0147cf74f675fd9a","entry":"CoarseMatching","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0147cf74f675fd9a"}},{"code_sha256_prefix":"48e8896da53462be","entry":"LinearAttention","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"48e8896da53462be"}},{"code_sha256_prefix":"429b87e94184da3a","entry":"LoFTREncoderLayer","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"429b87e94184da3a"}},{"code_sha256_prefix":"95375972575e25d1","entry":"LocalFeatureTransformer","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"95375972575e25d1"}},{"code_sha256_prefix":"26afd24b657e30c6","entry":"PositionEncodingSine","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"26afd24b657e30c6"}},{"code_sha256_prefix":"fbee5e0296e8b699","entry":"ResNetFPN_16_4","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fbee5e0296e8b699"}},{"code_sha256_prefix":"73c2839d74b21b14","entry":"ResNetFPN_8_2","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"73c2839d74b21b14"}},{"code_sha256_prefix":"67a8b79fd250e22b","entry":"compute_max_candidates","repo":"zju3dv/LoFTR","repo_kind":"official","path":"src/loftr/utils/coarse_matching.py","file_url":"https://github.com/zju3dv/LoFTR/blob/HEAD/src/loftr/utils/coarse_matching.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"67a8b79fd250e22b"}},{"code_sha256_prefix":"8ba161d133fcc70b","entry":"conv1x1","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8ba161d133fcc70b"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"zju3dv/LoFTR","repo_kind":"official","path":"src/loftr/backbone/resnet_fpn.py","file_url":"https://github.com/zju3dv/LoFTR/blob/HEAD/src/loftr/backbone/resnet_fpn.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"0d5505bd782b4a89","entry":"elu_feature_map","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0d5505bd782b4a89"}},{"code_sha256_prefix":"616a327f53231192","entry":"lower_config","repo":"zju3dv/LoFTR","repo_kind":"official","path":"src/loftr/utils/cvpr_ds_config.py","file_url":"https://github.com/zju3dv/LoFTR/blob/HEAD/src/loftr/utils/cvpr_ds_config.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"616a327f53231192"}},{"code_sha256_prefix":"b8ae61b5c67462ca","entry":"warp_kpts","repo":"zju3dv/LoFTR","repo_kind":"official","path":"src/loftr/utils/geometry.py","file_url":"https://github.com/zju3dv/LoFTR/blob/HEAD/src/loftr/utils/geometry.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b8ae61b5c67462ca"}},{"code_sha256_prefix":"83ecec9f333726dc","entry":"LoFTR","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","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":"83ecec9f333726dc"}},{"code_sha256_prefix":"7031281c61f439e7","entry":"build_backbone","repo":"kolkir/coarse_loftr_trt","repo_kind":"listed","path":"loftr/loftr.py","file_url":"https://github.com/kolkir/coarse_loftr_trt/blob/HEAD/loftr/loftr.py","link_basis":"first_harvest_node","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":"7031281c61f439e7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}