BADGR: Bundle Adjustment Diffusion Conditioned by GRadients for Wide-Baseline Floor Plan Reconstruction

Yuguang Li, Ivaylo Boyadzhiev, Zixuan Liu, Linda G. Shapiro, Alex Colburn · OpenReview

Abstract

Reconstructing precise camera poses and floor plan layouts from wide-baseline RGB panoramas is a difficult and unsolved problem. We introduce BADGR, a novel diffusion model that jointly performs reconstruction and bundle adjustment (BA) to refine poses and layouts from a coarse state, using 1D floor boundary predictions from dozens of images of varying input densities. Unlike a guided diffusion model, BADGR is conditioned on dense per-entity outputs from a single-step Levenberg Marquardt (LM) optimizer and is trained to predict camera and wall positions while minimizing reprojection errors for view-consistency. The objective of layout generation from denoising diffusion process complements BA optimization by providing additional learned layout-structural constraints on top of the co-visible features across images. These constraints help BADGR to make plausible guesses on spatial relations which help constrain pose graph, such as wall adjacency, collinearity, and learn to mitigate errors from dense boundary observations with global contexts. BADGR trains exclusively on 2D floor plans, simplifying data acquisition, enabling robust augmentation, and supporting variety of input densities. Our experiments and analysis validate our method, which significantly outperforms the state-of-the-art pose and floor plan layout reconstruction with different input densities.

Introduction

Creating accurate 2D floor plans from 360° "virtual tour" images is a cornerstone of indoor scene understanding. However, traditional Structure from Motion (SfM) techniques often fail in "wide-baseline" scenarios—where cameras are placed far apart (e.g., one per room) with minimal visual overlap. In these cases, geometric optimization alone struggles to produce consistent layouts, often resulting in misaligned walls or disconnected rooms.

BADGR (Bundle Adjustment Diffusion Conditioned by GRadients) addresses this by combining the geometric precision of Bundle Adjustment (BA) with the generative power of diffusion models. By treating floor plan reconstruction as a denoising task conditioned on geometric gradients, BADGR produces view-consistent, architecturally plausible layouts even when data is extremely sparse.

Methodology

BADGR treats floor plan reconstruction as a joint optimization and generation problem. The framework consists of several key components:

1. Coarse Initialization and BA Layer

The process begins with a rough estimate of camera poses and wall positions. This state is passed to a differentiable optimization layer—implemented using the Theseus library—which performs a single step of the Levenberg-Marquardt (LM) algorithm. This layer calculates how walls and cameras should be adjusted to minimize the "reprojection error," which is the discrepancy between the 3D wall positions and their 2D projections in the image columns.

2. Gradient Conditioning

A key innovation of BADGR is its approach to conditioning. While "guided" diffusion typically applies gradients only during inference, BADGR is trained to be conditioned on the dense per-entity adjustments provided by the BA layer. This allows the model to learn the relationship between geometric errors and the necessary architectural corrections.

3. Transformer-Based Denoiser

The model employs a self-attention-based architecture to process geometric hints alongside the current noisy state of the floor plan. It utilizes specialized attention masks—Cross-Self-Attention (CSA), Global-Self-Attention (GSA), and Relative-Self-Attention (RSA)—to reason about the complex spatial relationships between different walls and cameras.

4. Architectural Constraints

To streamline the reconstruction, BADGR adopts the "Atlanta World" assumption, where walls are primarily oriented at 90° or 45° angles. This reduces the degrees of freedom, allowing the diffusion process to focus on wall translations and global consistency rather than complex, unconstrained rotations.

Experimental Setup

The authors evaluated BADGR using three primary datasets:

  • FloorPlan-60K: A new, large-scale dataset featuring over 68,000 floor plans with simulated panoramas, providing the volume of data required for robust diffusion training.
  • ZInD (Zillow Indoor Dataset): A real-world dataset containing professional 360° panoramas and human-annotated ground truth layouts.
  • RPLAN: A dataset of 2D schematic floor plans used to test the model's resilience to varying levels of synthetic noise.

Results and Discussion

BADGR demonstrates significant improvements over state-of-the-art baselines across multiple metrics:

  • Pose and Layout Accuracy: On the ZInD dataset, BADGR reduced camera translation errors to approximately 10-12 cm, nearly halving the error of previous methods (~20 cm). Visible wall errors were similarly reduced by 40-50%.
  • Robustness to Sparsity: The model remains stable in extreme baseline scenarios (as low as 0.6 images per room), where traditional optimization-only methods typically fail.
  • Geometric Intuition: By combining BA with diffusion, the model can "hallucinate" plausible wall positions in occluded areas, ensuring the final output is a closed, logical polygon rather than a collection of disconnected segments.

Limitations and Future Work

While BADGR represents a significant step forward, some challenges remain. The current model assumes a perfectly flat floor, which may not account for multi-level spaces or sunken rooms. Additionally, the system currently relies on a fixed number of room corners and wall orientations during the refinement process. Future work will focus on automating wall connectivity (room-to-wall assignment) and expanding the model to handle non-standard architectural features like curved walls.

Summary updated

BibTeX
@inproceedings{li2025badgr,
  author = {Yuguang Li and Ivaylo Boyadzhiev and Zixuan Liu and Linda G. Shapiro and Alex Colburn},
  title = {{BADGR: Bundle Adjustment Diffusion Conditioned by GRadients for Wide-Baseline Floor Plan Reconstruction}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  url = {https://openreview.net/forum?id=tRS2BmxCyU},
}
Figure