---
title: Depth-Aware Floorplan Probabilistic Map
url: https://www.emergentmind.com/topics/depth-aware-floorplan-probabilistic-map-dafpm
type: topic
---

# Depth-Aware Floorplan Probabilistic Map

A Depth-Aware Floorplan Probabilistic Map (DAFPM) is a data structure and algorithmic framework central to the problem of visual-inertial localization within a 2D floorplan using depth information inferred from monocular images. DAFPM unifies geometric reasoning over spatial layouts with uncertainty-aware integration of monocular depth estimates, providing an explicit probabilistic map over possible camera poses relative to a known floorplan. This formulation enables robust camera localization in GPS-denied indoor environments, especially when only RGB imagery and floorplan data are available, and no custom sensor calibration or training is practical. DAFPM serves as the computational core in state-of-the-art systems such as UnLoc [2509.11301] and PALMS+ [2511.09724].

## 1. Problem Definition and Conceptual Foundations

DAFPM addresses the challenge of estimating the planar camera pose $s_t = [x_t, y_t, \varphi_t]^T \in \mathrm{SE}(2)$ from monocular RGB observations in the presence of a known 2D floorplan map $M$. The task is formalized as maintaining and updating a probability distribution, at each timestep, over the set of all feasible poses, informed by observed imagery, precomputed floorplan geometry, odometric or inertial data, and—critically—per-column monocular depth predictions together with their associated uncertainties.

A key requirement is the explicit modeling of depth measurement uncertainties, often due to the imperfect generalization of monocular depth estimation networks, scene ambiguities (e.g., glass, open doorways), or textureless surfaces. DAFPM employs probabilistic observation models that link the predicted depth and uncertainty to the latent floorplan geometry via ray-casting, facilitating both maximum a posteriori (MAP) pose extraction and principled uncertainty quantification.

## 2. Observation Model and Probabilistic Ray-Casting

In DAFPM-based approaches, monocular depth estimation outputs, typically in the form of depth images or per-column depth vectors $\hat{d}_t$ with uncertainties $\hat{b}_t$, are utilized to form likelihoods over candidate camera poses:

- **Ray-casting:** For a given candidate pose $s = [x, y, \varphi]^T$, a set of rays with fixed angular intervals relative to the yaw $\varphi$ are projected into the floorplan map $M$. For each ray $j$, the ray-casting function $r_j(s)$ computes the distance from $s$ to the first occupied cell (wall), yielding the floorplan-expected depth $d_j(s) = r_j(s)\cdot \cos\alpha_j$.
- **Depth likelihoods:** Each observed depth $\hat{d}_{tj}$ is associated with a scale uncertainty $\hat{b}_{tj}$. The probabilistic model assumes 
  $$
  p(\hat{d}_{tj}\mid s_t) = \mathrm{Laplace}(\hat{d}_{tj} ; \mu = d_j(s_t), b = \hat{b}_{tj}),
  $$
  with independence across rays. The resulting likelihood for all rays is
  $$
  p(o_t\mid s_t) = \prod_{j=1}^R \frac{1}{2\hat{b}_{tj}}\exp\left(-\frac{|\hat{d}_{tj} - d_j(s_t)|}{\hat{b}_{tj}}\right).
  $$
  This formulation naturally down-weights noisy or ambiguous depth measurements, enhancing localization stability [2509.11301]. The log-domain implementation addresses numerical stability for large $R$.

## 3. Generative and Filtering Models for Sequential Localization

DAFPM enables both stationary and sequential localization. In sequential settings, a generative model comprises:

1. **Transition (motion) model:** Incorporates odometric estimates and Gaussian motion noise, defined as
   $$
   s_t = s_{t-1} \oplus t_t + \omega_t,\quad \omega_t \sim \mathcal{N}(0, \Sigma),
   $$
   where $t_t$ denotes ego-motion from odometry or an external estimator.
2. **Observation model:** As above, encoding floorplan-consistent depth likelihoods.

The recursive Bayesian filter (histogram or grid filter) updates the belief over poses as
$$
\operatorname{Bel}_t(s) \propto \sum_{s'} p(s | s', t_t)\cdot p(o_t | s)\cdot \operatorname{Bel}_{t-1}(s').
$$
The pose space $\mathrm{SE}(2)$ is discretized into $(x_i, y_j, \varphi_k)$, maintaining a 3D probability volume. Efficient inference exploits separable convolutions for translation and rotation, coupled with element-wise observation likelihood updates [2509.11301].

For stationary observations or image sets, the posterior $p(x,y,\theta\mid\mathcal{I})$ is generated via a similar likelihood construction, optionally marginalizing scale uncertainty or smoothing over discrete orientation candidates [2511.09724].

## 4. Integration of Off-the-Shelf Depth Networks and Data Association

A principal advance in DAFPM-based systems is their decoupling from environment-specific depth training. Pretrained monocular depth models (e.g., Depth Anything V2, Depth Pro) extract features from each frame, which—by a masked attention mechanism and with gravity-aligned masking—produce per-column depth and uncertainty vectors. The network is trained (where necessary) by minimizing the negative log-likelihood of the Laplace observation model against ground-truth floorplan depths at known poses:
$$
\mathcal{L}_d = \sum_{i=1}^R \left[ \log\hat{b}_i + \frac{|\hat{d}_i - d_i(s^*)|}{\hat{b}_i} \right]
$$
[2509.11301]. In PALMS+, the Depth Pro model is used in an untrained, foundation paradigm, achieving scale alignment via global and cross-view optimization over per-image depth point clouds [2511.09724].

**Workflow summary in PALMS+:**
1. Pose-aligned, scale-corrected 3D point cloud is reconstructed from monocular depths, intrinsics, and camera poses.
2. Cloud is projected to the floorplane and discretized; geometric layout features are extracted (e.g., via Canny edge detection and Hough transforms).
3. A convolutional kernel (comprising rotated wall segment maps and “certainly empty spaces”) matches observed geometric features to floorplan template, yielding a 3D likelihood tensor over $(x, y, \theta)$.
4. Posterior is normalized and stored as a DAFPM for pose extraction and uncertainty visualization.

## 5. Posterior Representation, MAP Extraction, and Visualization

DAFPM is internally maintained as a multi-dimensional tensor indexed by spatial position and orientation: $[p(x_i, y_j, \theta_o \mid \mathcal{I})]$. MAP pose estimates are computed as
$$
(x^*, y^*, \theta^*) = \arg\max_{i,j,o} p(x_i, y_j, \theta_o \mid \mathcal{I}).
$$
Uncertainty quantification is supported via local covariance estimation or entropy calculations. The DAFPM structure naturally supports visualization as heatmaps (marginalized or non-marginalized over orientation) overlaid on the floorplan. Segment-angle histograms and kernel smoothing are employed to refine orientation discretization and improve numerical robustness [2511.09724].

**Implementation heuristics include:**
- Floorplan resolution of 0.05 m/px, kernel sizes of $\sim$100×100 px.
- Orientation candidate selection via segment-angle histograms and circular convolution.
- Depth artifact masking (e.g., windows) and resampling strategies to suppress spurious maxima.
- Fast convolution (FFT-based) for large-scale, real-time applications.

## 6. Applications and Empirical Performance

DAFPM-based methods have demonstrated substantial gains in localization performance on both synthetic and real-world datasets. On the LaMAR HGE dataset (22,500 m², FoV 48°, sequence length $T=100$), DAFPM in UnLoc achieved:
- SR@1m = 100% (with uncertainty modeling), vs 36.4% for F³Loc mono (custom-trained), and 100% for UnLoc without uncertainty;
- RMSE (succ.) reduced from 0.38 m (UnLoc w/o uncertainty) to 0.34 m (w/ DAFPM).

For short sequences ($T=15$), DAFPM delivered SR@1m = 20.0%, a 16.7× improvement over F³Loc mono [2509.11301]. Similar robustness and accuracy gains were observed for stationary and sequential localization in PALMS+, with empirical validation on Structured3D and campus buildings indicating superior accuracy and error resilience to prior methods, without bespoke training [2511.09724].

A plausible implication is that DAFPM's explicit uncertainty modeling and generic integration of monocular depth priors confer generalization to novel indoor environments—an advantage over systems reliant on scene-specific depth training.

## 7. Connections to Related Floorplan Localization Frameworks

DAFPM extends earlier floorplan localization paradigms by offering:
- *Principled probabilistic modeling* of depth uncertainty per observation;
- *Integration of off-the-shelf depth networks* without per-environment retraining, in contrast to methods requiring custom lidar or monocular refinement;
- *Efficient, scalable inference* via histogram filtering or particle filtering, with adaptation to both stationary and sequential scenarios.

DAFPM is distinct from purely keypoint or appearance-based matching, explicitly leveraging building geometry via spatial reasoning and uncertainty-aware fusion. Typical DAFPM deployment assumes access to accurate floorplan geometry, camera intrinsics, and synchronized pose estimates (as from ARKit or visual-inertial odometry), although future extensions may further relax these assumptions.

### Table: Summary of DAFPM Implementations in Leading Systems

| System       | Depth Backbone           | Sequential Tracking | Uncertainty Model | Pose Representation            |
|--------------|-------------------------|--------------------|-------------------|-------------------------------|
| UnLoc        | Depth Anything V2 (pretrained) | Histogram filter      | Laplace per-ray    | 3D grid over (x, y, $\varphi$)|
| PALMS+       | Depth Pro (foundation)   | Particle filter     | Scale search      | 3D tensor over (x, y, $\theta$)|

DAFPM thus establishes a robust foundation for infrastructure-free, vision-based localization in floorplan-constrained environments, with immediate applicability to mixed-reality, assistive navigation, and emergency robotics domains [2509.11301, 2511.09724].

Source: https://www.emergentmind.com/topics/depth-aware-floorplan-probabilistic-map-dafpm