Learning Sequence Descriptor Based on Spatio-Temporal Attention for Visual Place Recognition

Junqiao Zhao, Fenglin Zhang, Yingfeng Cai, Gengxuan Tian, Wenjie Mu, Chen Ye, Tiantian Feng

TL;DR

This paper introduces a novel sequence descriptor for Visual Place Recognition (VPR) that effectively captures spatio-temporal dynamics within a sequence of images. By employing a spatio-temporal attention mechanism, their method learns to focus on both spatial features within frames and their temporal evolution across frames, leading to more robust and discriminative place recognition, especially in challenging scenarios.

What Problem Does This Paper Address?

Visual Place Recognition (VPR) is crucial for tasks like loop detection in SLAM, where the goal is to identify if a robot has returned to a previously visited location. Traditional VPR methods often rely on single image descriptors, which are vulnerable to changes in viewpoint, lighting, and seasonal conditions. While sequence-based methods offer improvements, existing approaches either rely on computationally expensive sequence matching or sequence descriptors that merely aggregate frame features without truly understanding their temporal relationships. This lack of spatio-temporal discrimination limits their robustness in perceptually aliasing environments (where different locations might look similar). The paper addresses this gap by proposing a descriptor that explicitly models the interplay between spatial patterns within a frame and their persistence or change over time.

Methods

The core of the proposed method is a sequence descriptor that leverages a spatio-temporal attention mechanism. Here's a breakdown:

  • Feature Extraction: Each input frame is first processed by a Convolutional Neural Network (CNN) to extract feature maps. These maps are then split into patches, flattened, and projected into embeddings.
  • Spatial Attention: A Spatial Transformer Encoder is applied to these patch embeddings. This encoder uses self-attention to learn spatial feature patterns within each individual frame, incorporating positional information to understand the spatial layout.
  • Temporal Attention: A Temporal Transformer Encoder then takes these spatially-aware embeddings. Crucially, it uses a sliding window to focus on corresponding local regions across multiple frames. This allows it to learn how features persist or change over time. The paper highlights the importance of relative positional encoding here, arguing it better captures the dynamic relationships between features across frames compared to absolute positions.
  • Aggregation: The spatially and temporally fused embeddings are then combined and passed through a NetVLAD layer. NetVLAD is a well-established technique for aggregating local features into a global descriptor, which in this case represents the entire sequence.

Datasets

The authors evaluated their method on three established datasets:

  • Mapillary Street Level Sequences (MSLS): A large-scale dataset of street-level images from various cities, used for training and testing.
  • NordLand: A dataset capturing rail journeys across different seasons and weather conditions, used for training and testing.
  • Oxford RobotCar: A comprehensive dataset for autonomous driving research, featuring diverse driving conditions and times of day. The authors created two experimental sub-datasets from this.

No new benchmarks were introduced; the focus was on evaluating against existing methods on these standard datasets.

Key Insights and Ideas

  • Spatio-temporal fusion is key: The paper strongly suggests that simply aggregating frame features isn't enough. Explicitly modeling the interaction between spatial patterns within a frame and their temporal evolution across frames leads to significantly better descriptors.
  • Relative positional encoding matters for temporal dynamics: While absolute positional encoding helps with spatial layout, relative positional encoding is shown to be crucial for capturing the changing relationships between features over time in a sequence. This is because the relative positions of features are more invariant to camera motion than their absolute positions.
  • Sliding window for temporal focus: Using a sliding window in the temporal attention mechanism helps to control the temporal range and computational cost, allowing the model to focus on relevant temporal contexts without considering the entire sequence at once.
  • Spatial structure is dominant, but temporal adds robustness: Ablation studies indicated that spatial attention alone performed well, but the addition of temporal attention further improved performance, especially in handling dynamic objects and illumination changes.

Key Results

  • State-of-the-art performance: The proposed method consistently outperformed existing sequence-based VPR methods (SeqNet, SeqVLAD, NetVLAD) across all tested datasets, often by a significant margin (e.g., over 10% Recall@1 improvement on MSLS).
  • Robustness to challenging conditions: Qualitative results demonstrated the method's ability to handle variations in lighting (day-night), weather, dynamic objects (pedestrians, vehicles), and even road maintenance, where other methods failed.
  • Dimensionality reduction is effective: Reducing the descriptor dimensionality from 4096 to a smaller size (e.g., via PCA) did not significantly degrade performance, suggesting the learned features are highly discriminative.
  • Runtime considerations: While the proposed method is more complex than some baselines (like SeqNet, which leverages pre-computed descriptors), it directly extracts descriptors from raw sequences, offering an end-to-end solution. The runtime is higher than simpler methods but still within practical limits for many VPR applications.

Limitations and Future Work

  • Dataset size dependency: The paper notes that the model's performance can be sensitive to the size and distribution of the training data, with smaller training sets (like Oxford1) sometimes leading to subpar results.
  • Field of View (FOV) discrepancies: Large discrepancies in the field of view between query images and ground truth can lead to failures. The authors suggest that their approach, while incorporating temporal consistency, might still struggle when temporal descriptors lack sufficient temporal information due to extreme FOV differences.
  • Future work: The authors anticipate that their insights into spatio-temporal dynamics will pave the way for further improvements in VPR. They suggest exploring more advanced attention mechanisms and potentially integrating this approach into more complex SLAM systems.

Summary updated

BibTeX
@article{zhao2024learning,
  author = {Junqiao Zhao and Fenglin Zhang and Yingfeng Cai and Gengxuan Tian and Wenjie Mu and Chen Ye and Tiantian Feng},
  title = {{Learning Sequence Descriptor Based on Spatio-Temporal Attention for Visual Place Recognition}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2024},
  url = {https://openreview.net/forum?id=GLUscELPpO},
}
Figure