TL;DR
This paper introduces a novel end-to-end deep learning approach for estimating the relative pose (position and orientation) between two cameras. By leveraging image matching techniques as a pre-training task and introducing a new loss function that disentangles translation direction and scale, the method achieves state-of-the-art performance and better generalization across different scenes and datasets compared to previous end-to-end methods.
What Problem Does This Paper Address?
Estimating the relative pose between two cameras is a fundamental problem in computer vision with applications ranging from autonomous navigation to augmented reality. Traditional methods, like those based on SIFT features and RANSAC, are accurate but have limitations: they can only recover five of the six degrees of freedom (missing the distance between cameras), are sensitive to repetitive structures and lighting changes, and can be computationally expensive due to iterative RANSAC. While deep learning approaches have emerged to address these issues, they often struggle to match the accuracy of classical methods and generalize well to unseen environments. This paper aims to bridge this gap by developing an end-to-end deep learning system that is both accurate and robust across diverse scenarios.
Methods
The proposed method employs a three-module architecture inspired by classical pipelines:
- Feature Extraction: It utilizes the pre-trained LoFTR (Local Feature Transformer) architecture to extract semi-dense feature maps from each input image. LoFTR is chosen for its ability to capture rich feature representations, and its weights are kept frozen during training.
- Matching and Warping: Instead of "soft" matching, the paper uses "hard" matching. For each feature in the first image, it finds the most similar feature in the second image by maximizing dot product similarity. These matched features are then "warped" to align them, creating a feature map that encodes correspondences and their confidence.
- Pose Regression: A residual network followed by an MLP takes the warped feature map and regresses the relative pose. Crucially, the output is decomposed into three components: a quaternion for rotation, a vector for translation direction, and a scalar for translation scale.
A novel loss function is introduced to train the pose regression module. It comprises three terms: one for rotation error, one for translation direction error (using cosine similarity), and one for translation scale error (using an L1 loss). This disentanglement is key, as direction is primarily determined by point matches, while scale relies on scene priors.
Datasets
The paper trains and evaluates its method on several datasets:
- Indoor: 7Scenes, Scannet
- Outdoor: Cambridge Landmarks, Map-Free
The experiments include training and testing on the same dataset, cross-scene generalization (training on multiple scenes and testing on a held-out scene from the same dataset), and cross-dataset generalization (training on one dataset and testing on another).
Key Insights and Ideas
- Image Matching as Pre-training: Using a powerful image matching network like LoFTR as a backbone for relative pose regression is a novel and effective strategy, allowing the model to leverage rich, pre-learned feature representations.
- Disentangled Loss for Translation: Separating the translation direction and scale in the loss function is critical. This allows the model to learn these components more effectively, as they are influenced by different aspects of the image data (point correspondences for direction, scene priors for scale).
- Hard Matching Advantage: The paper empirically demonstrates that using "hard" matching and warping, as opposed to "soft" matching, leads to better performance.
- Generalization Power: The proposed method shows significant improvements in cross-scene and cross-dataset generalization, a common weakness in previous end-to-end RPR methods.
Key Results
- The method outperforms previous end-to-end relative pose regression methods on nearly all tested datasets and scenarios, including cross-scene and cross-dataset evaluations.
- It significantly closes the performance gap between end-to-end RPR methods and feature matching methods, while offering substantially faster inference times.
- For example, on the 7Scenes dataset, the method improves position prediction by approximately 8cm, position direction by 15°, and rotation by 1° on average compared to baselines.
- In cross-scene generalization on 7Scenes, it improves translation direction prediction by 27° over the second-best method.
Limitations and Future Work
- Warping Dependency: The method's performance relies on obtaining a reasonable warping of LoFTR features. This can be challenging in scenarios with wide baseline conditions or extreme viewing directions, as seen in the Map-Free dataset.
- Fixed Backbone: The LoFTR backbone is kept frozen during training. While this speeds up training, fine-tuning it might yield further improvements.
- Future Work: The authors plan to explore network architectures that further improve accuracy and address the limitations in handling wide baselines and sharp illumination changes. They also suggest investigating more advanced techniques for feature matching and pose regression.
Summary updated