TL;DR
Researchers from the Weizmann Institute of Science have developed a new end-to-end deep learning method for relative camera pose regression that significantly improves accuracy and generalization. By leveraging pre-trained image matching features (LoFTR) and a novel loss function that separates translation direction from metric scale, their approach closes the performance gap between fast regression-based models and slower, classical geometric pipelines.
What Problem Does This Paper Address?
Determining the relative pose—the rotation and translation between two camera viewpoints—is a cornerstone of computer vision, essential for everything from autonomous drones to augmented reality.
Classical methods rely on matching individual points (like SIFT features) and solving geometric equations using RANSAC. While accurate, these methods are slow, struggle with repetitive textures, and crucially, cannot recover the absolute distance (scale) between cameras without extra information.
Recent "End-to-End Relative Pose Regression" (RPR) networks try to predict the pose directly from image pairs. While fast and capable of inferring scale from object sizes, they often fail to generalize to new environments and lack the precision of geometric methods. This paper aims to combine the best of both worlds: the speed and scale-awareness of deep learning with the geometric grounding of feature matching.
Methods
The authors propose a three-stage pipeline, as illustrated in their network architecture:
- Feature Extraction: Instead of training a feature extractor from scratch, they use a frozen LoFTR (Local Feature Transformer) backbone. LoFTR is pre-trained for image matching and uses self- and cross-attention to produce "semi-dense" feature maps that are aware of the context in both images.
- Matching and Warping: The model identifies corresponding points between the two images. It uses "hard matching" to warp the features from the second image to align with the grid of the first image. This creates a combined feature map of correspondences.
- Pose Regression: A residual network (ResNet) processes this warped map to predict three distinct components: a rotation quaternion ($\hat{q}$), a unit translation direction vector ($\hat{t}_{dir}$), and a scalar scale factor ($\hat{s}$).
A key innovation is the disentangled loss function. The authors argue that translation direction is a geometric property determined by point matches, while scale is a semantic property inferred from the size of known objects. By using a cosine similarity loss for direction and an $\ell_1$ loss for scale, they allow the network to learn these distinct tasks more effectively.
Datasets
The method was rigorously tested across several diverse benchmarks:
- 7Scenes: A standard indoor dataset for visual relocalization.
- ScanNet: A massive indoor dataset with wide baselines and texture-less regions.
- Cambridge Landmarks: An outdoor urban dataset used to test generalization from indoor training.
- Map-Free: A challenging outdoor benchmark with limited overlap and significant lighting changes between image pairs.
Key Insights and Ideas
- Matching as a Pre-training Task: The most significant "aha moment" is that relative pose regression is essentially a downstream task of image matching. By using a frozen, high-quality matching backbone like LoFTR, the regression head can focus on interpreting geometric correspondences rather than learning basic visual features.
- Geometric vs. Semantic Cues: Separating translation into direction and scale acknowledges that these two values come from different types of information in the image. This separation proved crucial for accuracy in their ablation studies.
- Hard vs. Soft Warping: While some previous works used "soft" attention-based warping, this paper finds that "hard" warping (picking the single best match) provides a clearer signal for the regression module to estimate precise motion.
Key Results
The proposed method, referred to as "Ours," consistently outperformed existing end-to-end RPR baselines like RelPoseNet and 8Point.
- Accuracy: On the 7Scenes dataset, the method improved position prediction by nearly 8cm and direction prediction by 15° compared to the best existing RPR methods.
- Generalization: In "cross-scene" tests (training on six scenes and testing on a seventh), the model maintained its lead, showing it learns general geometric principles rather than just memorizing specific rooms.
- Speed: The model is highly efficient, with an inference time of only 26ms on an Nvidia V100 GPU—significantly faster than feature-matching pipelines that require RANSAC and depth estimation (which can take over 100ms).
Limitations and Future Work
The primary limitation is the reliance on the warping module. If the initial feature matching fails—which often happens in cases of extremely wide baselines or zero overlap (as seen in some Map-Free samples)—the pose regression will also fail.
Additionally, because the LoFTR backbone is frozen, the model's performance is somewhat capped by the quality of the pre-trained features. The authors suggest that future work could explore more advanced network architectures or ways to fine-tune the backbone specifically for the regression task without losing its general matching capabilities.
Summary updated