Repository navigation
Use FlexGlue for keyframing, tracking and loop closure - #57
Merged
Merged
Conversation
Zador-Pataki
marked this pull request as ready for review
November 4, 2026 01:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Use FlexGlue for sparse keyframe queries and RoMaV2 refinement for accurate tracking and loop-closure matches. Nearby video frames typically require less reasoning to match, so we exploit FlexGlue’s configurable depth to use fewer transformer layers for sequential matching while retaining the full model for loop closures. Early rejection saves runtime by rejecting unsuitable pairs before matching finishes, while pair rejection protects against visual aliasing.
Changes
matcher.name.Known regression and follow-up
In some scenarios that are impossible to match, RoMaV2 hallucinates matches while FlexGlue produces very few noisy matches. FlexGlue's pair-rejection head flags these cases, but adjacent keyframe pairs are currently protected from rejection.
FlexGlue largely ignores the unmatchable frame, while local loop closures constrain the frames before and after it. This often gives better trajectory accuracy than RoMaV2, but the unsupported frame can float away and contribute an evaluation outlier. We could use the doppelganger head to reject the pair, then filter the unsupported frame or constrain it with a temporal smoothness prior.
Runtime
RTX 4090, three 129-frame ETH3D clips; two measured repeats after warm-up. Both use the same tracking timeline and LC pairs. Coarse inputs: FlexGlue 512 px, RoMa 560 px; refinement: 1200 px.
Benchmark results: RoMaV2 and FlexGlue
Both methods use LC-only feature retention and deduplication, with loop-closure weight 1×.
ETH3D monocular · 55 scenes · Pose AUC
EuRoC monocular · 11 scenes · Pose AUC
CroCoDL · 64 scenes · W-AUC at 5%
LaMAR 300 · 50 scenes · W-AUC at 5%
LaMAR older selection · 53 evaluated trajectories · W-AUC at 5%
These results do not cover the current
completetestset (128 recordings).Spires rectified monocular · 10 scenes · W-AUC at 5%
Hilti forward monocular · 30 scenes · W-AUC at 5%
Hilti three-view · 30 scenes · W-AUC at 5%
Spires three-camera rig · 13 scenes · W-AUC at 5%