HGSLoc: 3DGS-Based Heuristic Camera Pose Refinement

Zhongyan Niu, Zhen Tan, Jinpu Zhang, Xueliang Yang, Dewen Hu

TL;DR

HGSLoc is a lightweight, plug-and-play framework that refines coarse camera pose estimates by pairing 3D Gaussian Splatting (3DGS) with a heuristic graph-search strategy. By replacing slow neural network optimization with fast explicit geometric rendering and a simple pixel-level difference metric, it achieves state-of-the-art localization accuracy and exceptional robustness against noise.

What Problem Does This Paper Address?

Visual localization—the task of determining a camera's exact position and orientation within a known environment—is a cornerstone of augmented reality (AR), robotics, and autonomous driving. Current approaches typically fall into two categories: Absolute Pose Regression (APR), which is fast but struggles to generalize to new environments, and Scene Coordinate Regression (SCR), which is highly accurate but computationally expensive.

Recently, researchers have turned to Neural Radiance Fields (NeRFs) to refine rough pose estimates by comparing rendered views to a query image. However, NeRF's pixel-wise neural network inference is incredibly slow. While 3D Gaussian Splatting (3DGS) offers a faster alternative for 3D reconstruction, existing 3DGS-based localization methods rely on inefficient grid searches or complex joint optimizations that easily break down when the initial pose estimate is highly noisy.

Methods

HGSLoc introduces a novel paradigm by decoupling scene reconstruction from pose optimization using a classic AI approach: heuristic graph search.

  1. Explicit Geometric Map: The scene is pre-reconstructed using 3D Gaussian Splatting (3DGS). Because 3DGS represents scenes using explicit Gaussian distributions rather than continuous neural functions, it leverages CUDA acceleration to render high-fidelity views at blazing-fast speeds.
  2. Heuristic Graph Search: Instead of using gradient descent (which can get stuck in local minima) or brute-force grid search, the authors treat pose refinement as a path-finding problem (similar to A* search). Camera poses are treated as nodes in a search space, and transitions (small step-level variations in rotation and translation) act as edges.
  3. Simple and Fast Heuristic Function: To guide the search toward the true pose, the algorithm uses an evaluation function $f(n) = g(n) + h(n)$. Here, $g(n)$ is the actual step cost, and $h(n)$ is the heuristic function—calculated simply as the sum of absolute pixel-by-pixel differences between the query image and the rendered image from the candidate pose.
Overview of the HGSLoc framework

Datasets

The authors evaluated HGSLoc across two challenging public benchmarks:

  • 7Scenes: A standard indoor dataset used to evaluate how well HGSLoc refines baseline predictions from popular APR (Marepo) and SCR (ACE) methods.
  • Deep Blending: A dataset containing complex indoor ("Playroom", "DrJohnson") and outdoor ("Boats", "NightSnow") scenes, ideal for testing performance under severe noise conditions.

Key Insights and Ideas

  • Pixel-Level Differences Beat Complex Metrics: Surprisingly, the authors found that using the raw sum of pixel-by-pixel differences as a heuristic function outperformed more sophisticated structural metrics like Peak Signal-to-Noise Ratio (PSNR) or Structural Similarity Index (SSIM). The simpler metric provided a cleaner, more monotonic gradient to guide the graph search.
  • Decoupling is More Robust Than Joint Optimization: Traditional synthesis-based localization methods try to optimize the scene representation and camera pose simultaneously. HGSLoc proves that freezing a high-quality 3DGS map and focusing purely on heuristic pose search is far more robust when the initial pose estimate is heavily corrupted by noise.
  • True Plug-and-Play Flexibility: Because HGSLoc operates entirely as a post-processing refinement step, it can take a rough estimate from any upstream pose estimator (whether it's an end-to-end deep network or a traditional Structure-from-Motion pipeline) and immediately boost its accuracy.
HGSLoc alignment before and after refinement

Key Results

  • State-of-the-Art Accuracy: On the 7Scenes dataset, combining HGSLoc with the ACE baseline reduced the average translation/rotation error to 1.0 cm / 0.29°, outperforming NeRFMatch (2.8 cm / 0.73°) while requiring no complex neural network optimization during inference.
  • Substantial Baseline Boosts: HGSLoc increased the percentage of highly accurate predictions (error within 1cm/1°) for the ACE baseline from 53.7% to 59.2%, and dramatically improved the Marepo APR baseline from 6.2% to 25.8%.
  • Strong Noise Resistance: When severe artificial noise was injected into the initial poses of the Deep Blending dataset, HGSLoc consistently recovered accurate poses, significantly outperforming alternative joint optimization strategies.

Limitations and Future Work

Despite its efficiency gains over NeRF, HGSLoc still faces a computational bottleneck: the heuristic search typically requires expanding 300–400 nodes per query image, executing multiple Gaussian renderings for each expansion. This constraint currently limits its use in strict, real-time mobile applications.

Additionally, the method's accuracy depends on the quality of the underlying 3DGS map; it yielded suboptimal results on datasets with limited viewpoint coverage (such as Cambridge Landmarks), where gaps in the 3D reconstruction led to misleading heuristic costs. The authors note that future work will focus on optimizing pose representations to reduce the number of renderings required per node expansion.

Summary updated

BibTeX
@inproceedings{niu2025hgsloc,
  author = {Zhongyan Niu and Zhen Tan and Jinpu Zhang and Xueliang Yang and Dewen Hu},
  title = {{HGSLoc: 3DGS-Based Heuristic Camera Pose Refinement}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2025},
  doi = {10.1109/icra55743.2025.11127431},
}
Figure