Flat2Layout: Flat Representation for Estimating Layout of General Room Types

Chi-Wei Hsiao, Cheng Sun, Min Sun, Hwann-Tzong ChenarXiv 2019

Abstract

This paper proposes a new approach, Flat2Layout, for estimating general indoor room layout from a single-view RGB image. While existing methods are often limited to box-shaped room topologies, the proposed flat representation encodes layout information into 1D row vectors. These vectors serve as training targets for a deep ResNet-based model, followed by a dynamic programming-based post-processing step to decode the final 3D room layout. Flat2Layout achieves state-of-the-art performance on standard benchmarks and demonstrates robust performance on a newly constructed benchmark for general layout topologies. This approach has significant implications for Scene Modeling, Robotics, and Augmented Reality.

Introduction

Estimating the 3D layout of a room from a single RGB image is a foundational task for robotics and augmented reality. Traditionally, researchers have simplified this problem by assuming every room is a "box"—consisting of a floor, a ceiling, and at most three visible walls. This "Manhattan World" assumption, while useful for many standard living spaces, fails in more complex environments like L-shaped kitchens, hallways with alcoves, or modern open-plan spaces.

A standard box-shaped room layout typical of existing benchmarks.

Existing deep learning methods often rely on predicting 2D pixel-wise segmentation maps or edge maps, which are computationally expensive and difficult to decode into coherent 3D structures when the room doesn't fit the standard box template. Furthermore, many methods depend heavily on the accurate extraction of vanishing points, which can be easily thrown off by misleading textures. Flat2Layout addresses these limitations by introducing a more flexible and efficient 1D representation.

Methodology

The Flat2Layout pipeline shifts the problem from 2D image space to an efficient 1D "flat" representation through four key stages:

  1. Pre-processing (Rectification): The system detects the vertical vanishing point and applies a homography to rectify the image. This ensures all wall-wall boundaries are perfectly parallel to the image's Y-axis, simplifying the geometric estimation.
  2. The Flat Representation: Instead of a 2D map, the model predicts three 1D row vectors: $y_{ceil}$ (the vertical position of the ceiling-wall boundary), $y_{floor}$ (the vertical position of the floor-wall boundary), and $p_{wall}$ (the probability that a column contains a vertical wall-wall corner). Two additional classifiers ($p_{ceil}, p_{floor}$) determine if the ceiling or floor is visible in the frame.
  3. Network Architecture: The model utilizes a ResNet-50 backbone with a U-Net-style contracting-expanding structure to capture both high-level global context and low-level local features.
  4. Post-processing via Dynamic Programming: To turn these 1D predictions into a 3D layout, a dynamic programming (DP) algorithm finds the optimal sequence of corners that minimizes the distance to predicted boundaries, ensuring the final reconstruction is globally consistent.

Experiments and Results

The authors evaluated Flat2Layout on two classic benchmarks (LSUN and Hedau) and a new General Layout Topology Benchmark constructed from panoramic images.

  • Hedau Dataset: Achieved a 5.01% Pixel Error (PE), a significant improvement over the previous state-of-the-art of 8.36%.
  • LSUN Dataset: Achieved a 4.92% Corner Error (CE) and 6.68% PE, outperforming all existing methods.
  • General Topology: On the new benchmark, the model successfully reconstructed complex rooms with up to six visible wall-wall boundaries. While performance naturally dips as complexity increases, fine-tuning on general data brought the corner error down to 5.31% for these complex scenes.
A complex room layout with a spiral staircase, demonstrating the model's ability to handle general topologies beyond simple box shapes.

The entire pipeline runs in approximately 500ms per frame, making it viable for near-real-time applications.

Conclusion

Flat2Layout represents a significant step forward in indoor scene understanding by breaking the "box-room" constraint. By reducing the target from a 2D grid to 1D vectors, the model becomes more efficient and easier to train. While the current dynamic programming step could be further optimized for speed, the approach's ability to handle general topologies makes it highly applicable for real-world scenarios in autonomous navigation and spatial computing.

Summary updated

BibTeX
@misc{hsiao2019flat,
  author = {Chi-Wei Hsiao and Cheng Sun and Min Sun and Hwann-Tzong Chen},
  title = {{Flat2Layout: Flat Representation for Estimating Layout of General Room Types}},
  year = {2019},
  eprint = {1905.12571},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.12571},
}
Figure