EffLoc: Lightweight Vision Transformer for Efficient 6-DOF Camera Relocalization

Zhendong Xiao, Changhao Chen, Shan Yang, Wu Wei

EffLoc is a novel, lightweight Vision Transformer (ViT) architecture designed for 6-DOF camera relocalization. It achieves state-of-the-art accuracy with a fraction of the computational cost of previous models. By introducing Sequential Group Attention (SGA), the researchers reduced FLOPs by 86.8% and memory usage by 49.7% compared to models like AtLoc, making high-precision localization feasible for resource-constrained platforms like drones and AR glasses.

The Challenge of Mobile Relocalization

Camera relocalization—determining a camera's exact 3D position and orientation from a single image—is fundamental to autonomous driving and robotics. Traditionally, this required complex geometric matching (SLAM/SfM), which is computationally expensive and map-dependent. While Convolutional Neural Networks (CNNs) offered end-to-end alternatives, they often struggled with global context. Vision Transformers (ViTs) solved the context problem but introduced massive memory and compute requirements. EffLoc bridges this gap by providing global reasoning with the efficiency of a mobile-first model.

Architectural Innovations

EffLoc introduces several key modifications to the standard Transformer architecture to optimize it for regression tasks like pose estimation:

The EffLoc architecture featuring Sequential Group Attention (SGA) and Sequential Group Heads (SGH).
  • Overlap Patch Embedding (OPE): Unlike standard ViTs that use non-overlapping patches, EffLoc uses overlapping regions to capture fine-grained local details and spatial sensitivity, which is critical for precise localization.
  • Sequential Group Attention (SGA): This core innovation splits features into subsets. Instead of performing expensive Multi-Head Self-Attention on the entire feature set, each head processes a different subset, diversifying features and reducing redundancy.
  • Sequential Group Heads (SGH): Rather than parallel processing, SGH iteratively refines representations by adding the output of one head to the input of the next.
  • QKV Ratio Reconfiguration: The researchers found that the impact of "Query" and "Key" components diminishes in the final stages of pose estimation. Reconfiguring these ratios in the third block yielded massive savings in FLOPs and memory.

Experimental Results

The model was evaluated on the Oxford RobotCar dataset, a challenging benchmark featuring over 100 iterations of a 10km route captured over a full year across diverse weather and traffic conditions.

Efficiency performance comparison showing EffLoc's superior balance of total parameters and FLOPs compared to baselines.

EffLoc significantly outperforms deep learning baselines like PoseNet+, MapNet, and AtLoc:

  • Efficiency: Compared to AtLoc, EffLoc achieves an 86.8% reduction in FLOPs and a 49.7% reduction in memory usage.
  • Accuracy: On the 10km "FULL1" sequence, EffLoc reduced mean position error to 27.23m, a stark improvement over PoseNet+ (125.6m) and MapNet (41.2m).
  • Convergence: The model converges roughly 32.9% faster than AtLoc, significantly reducing training overhead.

Key Insights and Future Work

Saliency map analysis revealed that EffLoc naturally learns to ignore dynamic noise like pedestrians or road surfaces. Instead, it focuses on "geometrically resilient" features such as distant skylines and tree edges, which are more reliable landmarks for long-term localization.

While EffLoc excels in large-scale outdoor scenes, future work will focus on enhancing robustness in "messy" scenarios involving heavy occlusions or rapid lighting shifts, potentially through multi-camera setups or improved temporal modeling.

Summary updated

BibTeX
@inproceedings{xiao2024effloc,
  author = {Zhendong Xiao and Changhao Chen and Shan Yang and Wu Wei},
  title = {{EffLoc: Lightweight Vision Transformer for Efficient 6-DOF Camera Relocalization}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2024},
  doi = {10.1109/icra57147.2024.10611622},
}
Figure