Papers › LoFTR: Detector-Free Local Feature Matching with Transformers

LoFTR: Detector-Free Local Feature Matching with Transformers

1 Apr 2021CVPR 2021 1arXiv:2104.00680archive 2025-07-28

Jiaming Sun, Zehong Shen, Yuang Wang, Hujun Bao, Xiaowei Zhou

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.

PaperPDFConference PDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 16 code samples harvested from 2 repositories linked to this paper: 14 ran (of which 6 constructed an object rather than computing a result; 11 with no instrument failure: 2 honoured, 0 violated, 9 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 4 samples from 1 repository, 4 ran (2 with no instrument failure; 2 where Syntology's instrument failed); community (archive-listed): 12 samples from 1 repository, 10 ran (9 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 14 samples that ran has no recorded date.

zju3dv/LoFTR officialmentioned on GitHubpytorchApache-2.0Syntology: 4 samples, 4 ran (2 instrument-failed) · 0 unverified report
fabio-sim/DeDoDe-ONNX-TensorRT mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to DeDoDe: Detect, Don't Describe -- Describe, Don't Detect for Local Feature Matching (arXiv:2308.08479; that paper's own run record: 7 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report
kolkir/coarse_loftr_trt mentioned on GitHubpytorchSyntology: 12 samples, 10 ran (1 instrument-failed) · 2 unverified report
kornia/kornia pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer (arXiv:2110.02178; that paper's own run record: 53 ran (of which 31 constructed an object rather than computing a result; 44 with no instrument failure: 1 honoured, 0 violated, 43 with no contract checked; 9 where Syntology's instrument failed) · 15 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

16 samples harvested: 14 ran (of which 6 constructed an object rather than computing a result; 11 with no instrument failure: 2 honoured, 0 violated, 9 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
3ran · our draft was wrong
9ran
2unverified

Licence: 3 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. For 3 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 3 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

zju3dv/LoFTR official repository 4 samples, 4 ran (2 instrument-failed) · 0 unverified
compute_max_candidates in 6 papers src/loftr/utils/coarse_matching.py ran · honoured contract fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 67a8b79fd250e22b · report fixture: signature p_m0:Tensor/3/float, p_m1:Tensor/3/float · returned Tensor · level recorded 2026-09-22
conv3x3 in 1,376 papers src/loftr/backbone/resnet_fpn.py ran · our draft was wrong Apache-2.0 (permissive) here; the stored copy is pointer only · fac5364e2f53c6db · report fixture: signature in_planes:int/0/int, out_planes:int/0/int, stride:int/0/int · returned Conv2d · level recorded, date not recorded
lower_config in 5 papers src/loftr/utils/cvpr_ds_config.py ran · our draft was wrong Apache-2.0 (permissive) here; the stored copy is pointer only · 616a327f53231192 · report fixture: signature yacs_cfg:dict/0/? · returned dict · level recorded 2026-09-22
warp_kpts src/loftr/utils/geometry.py ran Apache-2.0 (permissive) · b8ae61b5c67462ca · report fixture: signature kpts0:Tensor/3/float, depth0:Tensor/3/float, depth1:Tensor/3/float, T_0to1:Tensor/3/float, K0:Tensor/3/float, K1:Tensor/3/float · returned tuple · level recorded 2026-09-24
kolkir/coarse_loftr_trt community (archive-listed) 12 samples, 10 ran (1 instrument-failed) · 2 unverified
BasicBlock in 126 papers
census: 6 implementations from 6 papers, 5 distinct outputs on one shared input
loftr/loftr.py ran · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) · ffe49e7d531de639 · report fixture: returned BasicBlock · level recorded 2026-09-22
CoarseMatching loftr/loftr.py ran fingerprinted Apache-2.0 (permissive) · 0147cf74f675fd9a · report fixture: signature feat_c0:Tensor/3/float, feat_c1:Tensor/3/float · returned tuple · level recorded 2026-09-24
LinearAttention in 20 papers loftr/loftr.py ran Apache-2.0 (permissive) · 48e8896da53462be · report fixture: signature queries:Tensor/4/float, keys:Tensor/4/float, values:Tensor/4/float · returned Tensor · level recorded 2026-09-24
LoFTREncoderLayer loftr/loftr.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 429b87e94184da3a · report fixture: returned LoFTREncoderLayer · level recorded 2026-09-22
LocalFeatureTransformer loftr/loftr.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 95375972575e25d1 · report fixture: returned LocalFeatureTransformer · level recorded 2026-09-22
PositionEncodingSine loftr/loftr.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 26afd24b657e30c6 · report fixture: returned PositionEncodingSine · level recorded 2026-09-22
ResNetFPN_16_4 loftr/loftr.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · fbee5e0296e8b699 · report fixture: returned ResNetFPN_16_4 · level recorded 2026-09-22
ResNetFPN_8_2 loftr/loftr.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 73c2839d74b21b14 · report fixture: returned ResNetFPN_8_2 · level recorded 2026-09-22
conv1x1 in 691 papers loftr/loftr.py ran · our draft was wrong Apache-2.0 (permissive) · 8ba161d133fcc70b · report fixture: signature in_planes:int/0/int, out_planes:int/0/int, stride:int/0/int · returned Conv2d · level recorded 2026-09-22
elu_feature_map in 14 papers loftr/loftr.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · 0d5505bd782b4a89 · report fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22
LoFTR loftr/loftr.py unverified Apache-2.0 (permissive) · 83ecec9f333726dc · report
build_backbone in 29 papers loftr/loftr.py unverified Apache-2.0 (permissive) · 7031281c61f439e7 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for LoFTR (graph method: LoFTR). 13 bricks; individually on a fixture: 11 ran (of which 6 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 0 violated, 8 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

  1. LoFTR entry · level 0 · unverified · 83ecec9f333726dc
  2. CoarseMatching helper · level 1 · ran · 0147cf74f675fd9a
  3. LocalFeatureTransformer helper · level 1 · ran · 95375972575e25d1
  4. PositionEncodingSine helper · level 1 · ran · 26afd24b657e30c6
  5. build_backbone helper · level 0 · unverified · 7031281c61f439e7
  6. LoFTREncoderLayer helper · level 1 · ran · 429b87e94184da3a
  7. ResNetFPN_16_4 helper · level 1 · ran · fbee5e0296e8b699
  8. ResNetFPN_8_2 helper · level 1 · ran · 73c2839d74b21b14
  9. LinearAttention helper · level 1 · ran · 48e8896da53462be
  10. BasicBlock helper · level 1 · ran · ffe49e7d531de639
  11. conv1x1 helper · level 1 · ran · our draft was wrong · 8ba161d133fcc70b
  12. conv3x3 helper · level 1 · ran · our draft was wrong · fac5364e2f53c6db
  13. elu_feature_map helper · level 1 · ran · honoured contract · 0d5505bd782b4a89

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2104.00680") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Camera Pose EstimationImage MatchingPose EstimationVisual Localization

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Matching ZEB LoFTR Mean AUC@5° 33.1 #7 of 10 Archive leaderboard report
Pose Estimation InLoc LoFTR DUC1-Acc@0.25m,10° 47.5 #6 of 6 Archive leaderboard report
Pose Estimation InLoc LoFTR DUC1-Acc@0.5m,10° 72.2 #6 of 6 Archive leaderboard report
Pose Estimation InLoc LoFTR DUC1-Acc@1.0m,10° 84.8 #6 of 6 Archive leaderboard report
Pose Estimation InLoc LoFTR DUC2-Acc@0.25m,10° 54.2 #6 of 6 Archive leaderboard report
Pose Estimation InLoc LoFTR DUC2-Acc@0.5m,10° 74.8 #6 of 6 Archive leaderboard report
Pose Estimation InLoc LoFTR DUC2-Acc@1.0m,10° 82.5 #6 of 6 Archive leaderboard report
Visual Localization Aachen Day-Night v1.1 Benchmark LoFTR Acc@0.25m, 2° 78.5 #2 of 7 Archive leaderboard report
Visual Localization Aachen Day-Night v1.1 Benchmark LoFTR Acc@0.5m, 5° 90.6 #2 of 7 Archive leaderboard report
Visual Localization Aachen Day-Night v1.1 Benchmark LoFTR Acc@5m, 10° 99.0 #2 of 7 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections