Magnetic Indoor Localization through CNN Regression and Rotation Invariance

arXiv cs.RO / 4/28/2026

📰 NewsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper proposes an infrastructure-free indoor localization method using CNN-based regression from magnetic field features, targeting GNSS-denied environments such as navigation and IoT.
  • It improves robustness to device orientation by replacing raw 3D magnetometer inputs (Mx, My, Mz) with rotation-invariant 2D features: the magnetic norm (Mn) and projection onto the gravity axis (Mg).
  • Experiments on the MagPie dataset show that raw 3D inputs degrade under both fixed and random rotations, while the (Mn, Mg) inputs preserve rotation-invariant accuracy and outperform 3D once rotation passes building-dependent thresholds.
  • The authors train a lightweight dilated 7-layer CNN (MagNetS/XL) to directly regress (x, y) positions, with MagNetXL matching or exceeding state-of-the-art accuracy and MagNetS achieving similar performance with about one-third the parameters for mobile deployment.
  • Overall, the results indicate that the gains from rotation invariance outweigh the dimensionality reduction, enabling accurate mapping/localization without orientation alignment or extra infrastructure.

Abstract

Indoor positioning is an essential technology for a wide range of applications in GNSS-denied environments, including indoor navigation and IoT systems. Combining convolutional neural networks (CNNs) and magnetic field-based features offers a low-cost, infrastructure-free solution for precise positioning. While magnetic fingerprints are a promising approach for indoor positioning, models trained on raw 3D magnetometer data are highly sensitive to device orientation. We address this by using two rotation invariant features derived from the 3D magnetic field: the norm (Mn) and the projection onto the gravity axis (Mg). We train a lightweight 7-layer dilated CNN (MagNetS/XL) on magnetic sequences to directly regress (x, y) positions. Using the MagPie dataset (three buildings, handheld trajectories), we systematically evaluate fixed and random rotations of test and/or train data. Raw 3D inputs (Mx, My , Mz) exhibit isotropic error increases under fixed 90{\deg} rotations and further degrade with growing random rotations. In contrast, 2D (Mn, Mg) inputs maintain rotation invariant accuracy and surpass the 3D inputs once rotation exceeds building-specific thresholds for three reference buildings: 0{\deg} for Loomis (large), 5{\deg} for Talbot (medium), and 6{\deg} for CSL (small). MagNetXL achieves or exceeds state-of-the-art accuracy on the MagPie dataset, and MagNetS delivers similar performance with roughly one third of the parameters, favoring mobile deployment. These results show that the robustness gained from rotation invariant inputs outweighs the loss of input dimensionality in realistic usage, allowing mapping and localization without orientation alignment or added infrastructure.