Abstract
Visual odometry networks commonly use pretrained optical flow networks in order to derive the ego-motion between consecutive frames. The features extracted by these networks represent the motion of all the pixels between frames. However, due to the existence of dynamic objects and texture-less surfaces in the scene, the motion information for every image region might not be reliable for inferring odometry due to the ineffectiveness of dynamic objects in derivation of the incremental changes in position. Recent works in this area lack attention mechanisms in their structures to facilitate dynamic reweighing of the feature maps for extracting more refined egomotion information. In this paper, we explore the effectiveness of self-attention in visual odometry. We report qualitative and quantitative results against the SOTA methods. Furthermore, saliency-based studies alongside specially designed experiments are utilized to investigate the effect of self-attention on VO. Our experiments show that using self-attention allows for the extraction of better features while achieving a better odometry performance compared to networks that lack such structures.
Introduction
Visual Odometry (VO) is a foundational technology for autonomous driving and robotics, estimating a camera's incremental movement (ego-motion) by analyzing image sequences. Traditional VO relies on hand-crafted geometric features, which often fail in low-texture environments or changing light. While deep learning approaches using Convolutional Neural Networks (CNNs) have improved robustness, they suffer from a "locality" problem, processing small regions at a time. This makes it difficult for the network to distinguish between stationary background features and distracting dynamic objects, such as moving cars, which can lead to significant motion estimation errors.
Methodology
The proposed architecture, Attention-based Visual Odometry (AVO), introduces a self-attention mechanism to provide the global context necessary for accurate ego-motion estimation.
The system consists of three main stages:
- Encoder (CNN): A modified FlowNet2S architecture extracts visual features from pairs of consecutive RGB images.
- Self-Attention Block (SABlock): Positioned after the CNN, this block uses Query, Key, and Value matrices to allow every pixel in the feature map to "attend" to every other pixel. This enables the network to compare foreground motion against static background structures.
- Temporal Model (LSTM): The refined features are passed through a two-layer Long Short-Term Memory (LSTM) network to track motion over time.
The model is trained using a Lie algebra-based loss function, which represents 3D rotations and translations more effectively than standard Euclidean coordinates.
Experimental Results
The researchers evaluated AVO using the KITTI odometry dataset. AVO achieved a significant 32.4% improvement in translation accuracy over the previous state-of-the-art (DeepVO), reducing average translation error from 14.50% to 10.95%. Rotation error was also reduced to 0.038 deg/m.
Qualitative analysis via saliency maps confirms that the self-attention mechanism facilitates "dynamic rejection." As shown in the figure above, while older models like DeepVO focus on moving vehicles, AVO shifts its focus to reliable, stationary features like the road and buildings. Additionally, AVO demonstrated superior implicit scale estimation, maintaining a more consistent scale compared to classical monocular methods.
Conclusion
By integrating a Self-Attention Block into a CNN-LSTM architecture, this work demonstrates that providing global context allows neural networks to ignore dynamic noise and extract more reliable features for visual odometry. Future work may involve integrating semantic segmentation masks or more complex attention mechanisms to further refine motion estimation in challenging environments.
Summary updated