Introduction
Reconstructing clean, vectorized 2D floorplans from messy 3D point clouds is a cornerstone task for applications in robotics, augmented reality, and interior design. Traditionally, this process has been fragmented into multi-stage pipelines that either predict room masks and "snap" them into polygons (top-down) or detect individual corners and edges to assemble them into a graph (bottom-up). These approaches often rely on hand-crafted heuristics or non-differentiable optimization steps, which can lead to failure if any single stage—like corner detection—underperforms.
The RoomFormer Architecture
To address these limitations, RoomFormer introduces a single-stage, Transformer-based architecture that treats floorplan reconstruction as a set-prediction task. Instead of the traditional "detect-then-assemble" paradigm, RoomFormer utilizes a unique "two-level query" system to directly predict rooms as ordered sequences of vertices.
Methodology
The process begins by projecting a 3D point cloud onto the gravity axis to generate a 2D density map. This map serves as the input for a CNN backbone that extracts spatial features, which are then processed by a Transformer encoder to capture global context.
The core innovation lies in the Two-Level Query system within the Transformer decoder:
- Room-level queries ($M$): Each query identifies a potential room within the layout.
- Corner-level queries ($N$): For every room query, a sub-sequence of queries identifies the vertices (corners) of that specific room in their correct order.
By using self-attention across all queries, the model enables "global structural reasoning." For instance, a corner query for a kitchen can interact with a query for an adjacent living room, allowing the model to learn that shared walls should have perfectly aligned vertices. This implicit connectivity eliminates the need for separate edge detectors or complex post-processing.
Training and Loss Functions
Training RoomFormer requires a specialized bipartite matching strategy to align predicted polygons with ground-truth data at both the room and vertex levels. The model is supervised using a combination of vertex classification, coordinate regression, and a differentiable rasterizer that applies a Dice loss to ensure the final polygon shapes match the ground truth.
Performance and Results
RoomFormer was evaluated on two major benchmarks: Structured3D (synthetic) and SceneCAD (real-world scans).
- Accuracy: On Structured3D, RoomFormer achieved a state-of-the-art room F1 score of 97.3%, outperforming previous methods like HEAT (95.4%).
- Efficiency: The model is exceptionally fast, with an inference time of just 0.01 seconds per floorplan—up to 10x faster than its nearest competitor and orders of magnitude faster than optimization-based methods like MonteFloor.
- Generalization: In cross-dataset tests, RoomFormer maintained high performance (74.0 IoU) when moving from synthetic to real-world data, demonstrating its ability to learn the underlying logic of architectural layouts rather than just memorizing dataset-specific noise.
Conclusion and Future Directions
RoomFormer represents a significant shift toward end-to-end trainable models for floorplan reconstruction. By replacing multi-stage heuristics with a unified Transformer architecture, it achieves superior accuracy and speed. While currently limited by fixed query counts ($M=20$ rooms, $N=40$ vertices), future work could extend this framework to full 3D reconstruction—including ceiling heights and slopes—or integrate more complex semantic elements like furniture layouts directly into the query system.
Summary updated