FreeLoc: Online Floorplan Localization via Diffusion-Aided Pose Refinement

Haocheng Peng, Boyang Zhou, Jiarui Hu, Xiyue Guo, Ziyang Zhang, Boming Zhao, Yifan Gao, Xiao Li, Hujun Bao, Zhaopeng CuiarXiv 2026

TL;DR

FreeLoc is a novel framework for indoor localization that enables robots to find their position using only a 2D floorplan and RGB images, completely eliminating the need for time-consuming, scene-specific offline databases. By combining efficient online ray-querying with a diffusion-based pose refinement module, it achieves state-of-the-art accuracy in real-time, even in new, unseen environments.

What Problem Does This Paper Address?

Indoor localization is a fundamental hurdle for mobile robots. While GPS works outdoors, robots inside buildings must rely on maps. Traditional methods often use dense 3D models or image databases, which are expensive to build and maintain. Floorplans are a great alternative—they are lightweight and widely available—but current high-performing floorplan-based methods have a major drawback: they require an "offline" stage.

Before a robot can start, these systems must pre-calculate millions of virtual "views" (ray-casts) from every possible location on the floorplan to build a searchable database. This ties the system's accuracy to how densely you sample the space and forces a massive storage and computation overhead every time you enter a new building. FreeLoc aims to break this "database dependency" by treating the floorplan as a live, queryable geometric map that can be used immediately upon arrival.

Methods

FreeLoc employs a "coarse-to-fine" strategy that mimics how humans localize: first finding a general area, then refining the position based on local details.

  1. Online Coarse Retrieval: Instead of searching a pre-built database, FreeLoc samples a sparse set of candidate poses across the floorplan. It uses a custom, GPU-accelerated ray kernel to analytically intersect rays with the floorplan's line segments on the fly. This allows the system to quickly identify the top-K "anchors" that best match the geometry seen in the robot's RGB image (after converting the image to a geometric ray representation).
  2. Diffusion-Aided Pose Refinement: Coarse anchors are limited by the sampling resolution. To achieve continuous, high-precision poses, FreeLoc introduces a conditional diffusion model. It treats pose refinement as an iterative denoising process. A Ray Discrepancy Encoder (RDE) compares the predicted rays from the image against the queried rays from the floorplan, feeding this geometric "mismatch" into the diffusion model to progressively nudge the anchor toward the true location.
  3. Sequential Localization: For robots moving through a scene, FreeLoc integrates these single-frame estimates into a histogram filter. Crucially, it constructs the observation likelihoods online by interpolating between the coarse samples and the refined hypotheses, enabling temporal fusion without ever needing a dense offline likelihood map.
Overview of the FreeLoc pipeline, showing the transition from RGB observation to final pose estimate via online querying and diffusion refinement.

Datasets

The authors evaluated FreeLoc on three distinct datasets:

  • Gibson: A large-scale dataset of indoor environments. The authors used both single-frame sequences (Gibson(f)) and long trajectories (Gibson(t)).
  • Structured3D: A dataset containing over 3,000 furnished indoor environments with perspective images.
  • Real-world HGE Building: A subset of the LaMAR dataset featuring a complex 130m x 130m indoor scene captured with a handheld iPhone to test practical deployability.

Key Insights and Ideas

  • Floorplans as Interfaces, Not Databases: By moving ray-casting to a real-time GPU kernel, the authors prove that the "offline preprocessing" bottleneck is unnecessary.
  • Diffusion as Optimization: One-shot neural network regression often struggles with the non-linearities of pose space. Formulating refinement as a diffusion process allows the model to "search" locally and iteratively correct errors, much like traditional geometric optimization (like ICP) but with the robustness of learned features.
  • Bridging the Gap to Filtering: The ability to construct likelihoods online from sparse samples is the "secret sauce" that allows FreeLoc to perform sequential tracking (which is much more stable than single-frame localization) without the storage costs of traditional filters.

Key Results

FreeLoc sets a new bar for floorplan-based localization:

  • Accuracy: On the Gibson dataset, it improved single-frame recall by 4.7–8.7 percentage points over the previous state-of-the-art (F³Loc).
  • Robustness: In sequential tracking, FreeLoc achieved a 100% success rate on Gibson(t), whereas the strongest baseline reached only 86.5%.
  • Efficiency: While the baseline F³Loc requires 1.48 hours of preprocessing for a single small scene, FreeLoc requires zero preprocessing. Despite this, it still runs at a respectable 15 Hz (including online sampling) on a modern GPU.
  • Real-World Success: In the large-scale HGE building, FreeLoc demonstrated stable long-term tracking where non-depth-based methods failed completely.
Figure 2: Overview of FreeLoc. We retrieve top-K coarse anchors by matching image-side rays with online queried floorplan rays, then refine and re-score them for the final estimate. For sequential localization, coarse and refined candidates construct online likelihoods for temporal fusion.

Limitations and Future Work

The authors identify a few key areas for improvement:

  • Depth Sensitivity: The system relies on a monocular depth estimator to turn images into rays. This makes it sensitive to camera intrinsics and field-of-view; performance drops if the depth estimation is inaccurate.
  • Search Space Scaling: While efficient, the current uniform sampling strategy might struggle with extremely large floorplans (e.g., massive airports or malls). The authors suggest that future work could involve hierarchical querying to maintain real-time speeds in these scenarios.
  • Semantic Cues: Currently, FreeLoc uses only geometry. Integrating semantic information (like recognizing a "kitchen" vs. a "hallway") could further resolve ambiguities in repetitive layouts.

Summary updated

BibTeX
@misc{peng2026freeloc,
  author = {Haocheng Peng and Boyang Zhou and Jiarui Hu and Xiyue Guo and Ziyang Zhang and Boming Zhao and Yifan Gao and Xiao Li and Hujun Bao and Zhaopeng Cui},
  title = {{FreeLoc: Online Floorplan Localization via Diffusion-Aided Pose Refinement}},
  year = {2026},
  eprint = {2610.05011},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.05011},
}
Figure