Table of Contents
Fetching ...

MambaLoc: Efficient Camera Localisation via State Space Model

Jialu Wang, Kaichen Zhou, Andrew Markham, Niki Trigoni

TL;DR

This work targets reliable, data-efficient 6-DoF camera localization for IoT and edge-cloud systems where training costs and data sparsity hinder performance. It introduces MambaLoc, a dual-branch localization backbone built on a selective State Space Model (Mamba) and complemented by a Global Information Selector (GIS) that implicitly captures long-range context with linear-time efficiency. A hybrid knowledge-distillation approach enables deployment on resource-constrained terminal devices, yielding substantial model-size reductions while preserving or improving pose accuracy. Extensive experiments on indoor (7Scenes) and outdoor (Cambridge) benchmarks demonstrate fast, single-phase training, strong robustness to sparse data, and effective generalization of GIS across existing localization models, underscoring practical applicability for edge-enabled localization and AR/IOT scenarios.

Abstract

Location information is pivotal for the automation and intelligence of terminal devices and edge-cloud IoT systems, such as autonomous vehicles and augmented reality. However, achieving reliable positioning across diverse IoT applications remains challenging due to significant training costs and the necessity of densely collected data. To tackle these issues, we have innovatively applied the selective state space (SSM) model to visual localization, introducing a new model named MambaLoc. The proposed model demonstrates exceptional training efficiency by capitalizing on the SSM model's strengths in efficient feature extraction, rapid computation, and memory optimization, and it further ensures robustness in sparse data environments due to its parameter sparsity. Additionally, we propose the Global Information Selector (GIS), which leverages selective SSM to implicitly achieve the efficient global feature extraction capabilities of Non-local Neural Networks. This design leverages the computational efficiency of the SSM model alongside the Non-local Neural Networks' capacity to capture long-range dependencies with minimal layers. Consequently, the GIS enables effective global information capture while significantly accelerating convergence. Our extensive experimental validation using public indoor and outdoor datasets first demonstrates our model's effectiveness, followed by evidence of its versatility with various existing localization models. Our code and models are publicly available to support further research and development in this area.

MambaLoc: Efficient Camera Localisation via State Space Model

TL;DR

This work targets reliable, data-efficient 6-DoF camera localization for IoT and edge-cloud systems where training costs and data sparsity hinder performance. It introduces MambaLoc, a dual-branch localization backbone built on a selective State Space Model (Mamba) and complemented by a Global Information Selector (GIS) that implicitly captures long-range context with linear-time efficiency. A hybrid knowledge-distillation approach enables deployment on resource-constrained terminal devices, yielding substantial model-size reductions while preserving or improving pose accuracy. Extensive experiments on indoor (7Scenes) and outdoor (Cambridge) benchmarks demonstrate fast, single-phase training, strong robustness to sparse data, and effective generalization of GIS across existing localization models, underscoring practical applicability for edge-enabled localization and AR/IOT scenarios.

Abstract

Location information is pivotal for the automation and intelligence of terminal devices and edge-cloud IoT systems, such as autonomous vehicles and augmented reality. However, achieving reliable positioning across diverse IoT applications remains challenging due to significant training costs and the necessity of densely collected data. To tackle these issues, we have innovatively applied the selective state space (SSM) model to visual localization, introducing a new model named MambaLoc. The proposed model demonstrates exceptional training efficiency by capitalizing on the SSM model's strengths in efficient feature extraction, rapid computation, and memory optimization, and it further ensures robustness in sparse data environments due to its parameter sparsity. Additionally, we propose the Global Information Selector (GIS), which leverages selective SSM to implicitly achieve the efficient global feature extraction capabilities of Non-local Neural Networks. This design leverages the computational efficiency of the SSM model alongside the Non-local Neural Networks' capacity to capture long-range dependencies with minimal layers. Consequently, the GIS enables effective global information capture while significantly accelerating convergence. Our extensive experimental validation using public indoor and outdoor datasets first demonstrates our model's effectiveness, followed by evidence of its versatility with various existing localization models. Our code and models are publicly available to support further research and development in this area.
Paper Structure (20 sections, 13 equations, 6 figures, 10 tables, 1 algorithm)

This paper contains 20 sections, 13 equations, 6 figures, 10 tables, 1 algorithm.

Figures (6)

  • Figure 1: Proposed Bidirectional Global Information Selector (GIS) (right): The GIS starts by concatenating the visual encoder's output, $G_{in}$, with its flipped version, $G_{flip}$. This combined input, $G_{concat}$, is then processed by a bidirectional single-layer Mamba Module, which selectively compresses it using a hardware-aware algorithm. Architecture of MambaLoc (left): MambaLoc consists of a shared CNN backbone and two distinct branches designed to independently regress the camera's position and orientation. Each branch includes a dedicated Transformer-Encoder, a Global Information Selector (GIS), and an MLP head.
  • Figure 2: Camera Localization Results on the 7-Scenes dataset glocker2013real. Each subfigure contains a 3D plot at the top, illustrating the camera trajectories (green for ground truth, red for predicted), and a color bar at the bottom representing the rotation error for all frames. Refer to Table \ref{['tab:Edge_Device_7scenes_main_table']} for a quantitative comparison.
  • Figure 3: Camera Localization Results on the Cambridge Landmark dataset kendall2015posenet. The black line represents the ground truth trajectory, with the star marking the first frame, while the red lines depict the predicted camera poses. Each figure's caption indicates the mean translation error (m) and mean rotation error (°). Refer to Table \ref{['tab:Edge_Device_Cambridge']} for a quantitative comparison.
  • Figure 4: Real-Time Inference Demonstration of MambaLoc Deployed on PC
  • Figure 5: Principal Component Analysis (PCA) to visualize the feature extraction performance by plotting the translation and rotation feature maps of TransPoseNet shavit2024learning with and without GIS on the 7Scenes Dataset glocker2013real.
  • ...and 1 more figures