SceneCode: Monocular Dense Semantic Reconstruction Using Learned Encoded Scene Representations.

Shuaifeng Zhi, Michael Bloesch, Stefan Leutenegger, Andrew J. Davison

Abstract

SceneCode introduces a compact, learnable representation for 3D semantic mapping that moves beyond noisy, pixel-by-pixel label fusion. By encoding both geometry and semantics into low-dimensional latent codes conditioned on images, the system can jointly optimize camera poses, 3D structure, and object labels to produce smooth, spatially consistent reconstructions from a single moving camera.

Introduction

Building a 3D map that includes semantics—identifying clusters of pixels as specific objects like "chairs" or "walls"—is a fundamental challenge in robotics. Most current systems treat semantic labels as independent data points for every pixel or voxel, leading to two major issues:

  1. Incoherence: Fused maps often suffer from "salt and pepper" noise because the system lacks an underlying understanding of object structure.
  2. Efficiency: Storing independent labels for every point in a dense 3D scene is computationally expensive and scales poorly.

SceneCode addresses these by treating semantics like geometry: a structured entity where neighboring parts are correlated. The result is a representation that is both compact and optimizable in real-time.

Methodology

The core of SceneCode is a Multitask Conditional Variational Auto-Encoder (CVAE).

  • Latent Encoding: Instead of a high-resolution grid of labels, the scene is represented by low-dimensional "codes" (e.g., a 32-dimensional vector). Separate codes represent depth ($c_d$) and semantics ($c_s$).
  • Conditioning: These codes are conditioned on the original RGB image. A ResNet-50 backbone extracts image features, which are combined with the latent codes to reconstruct full-resolution depth and semantic maps.
  • Linear Generative Model: The decoder is designed to be linear with respect to the latent code. While the image-to-scene relationship is non-linear, the code-to-prediction relationship is linear, allowing for fast optimization using techniques like Gauss-Newton.
The SceneCode architecture utilizes a multitask CVAE with a ResNet-50 backbone to generate depth and semantic maps from latent codes.

Key Insights

  • Semantics as a Geometric Constraint: In SceneCode, semantics are part of the optimization loop. The system can use semantic consistency (e.g., aligning "wall" pixels across frames) to improve camera pose and geometry estimates.
  • Spatial Correlation: Because the decoder is trained on real-world data, it possesses a prior on object shapes. Optimizing a single latent code updates the entire predicted object coherently, preventing isolated classification errors.
  • The "Zero-Code" Prior: The system utilizes a standard Gaussian prior (assuming a "zero-code" is the most likely starting point), which acts as a powerful regularizer to keep reconstructions realistic even with noisy input data.

Datasets and Evaluation

The authors evaluated SceneCode across three major indoor datasets to test robustness and accuracy:

  • NYUv2: 1,449 real-world indoor scenes with depth and semantic annotations.
  • Stanford 2D-3D-Semantic: Approximately 70,000 images used for large-scale testing.
  • SceneNet RGB-D: 5 million synthetic images providing perfect ground truth for rigorous quantitative comparison.

Results

SceneCode demonstrates significant improvements in both fusion quality and visual consistency. On the SceneNet RGB-D dataset, the code-based fusion achieved a mean Intersection over Union (mIoU) of 44.2% with 4 views, significantly outperforming standard label averaging (~42%).

Qualitative results across NYUv2, SceneNet RGB-D, and Stanford 2D-3D datasets demonstrate the system's ability to produce consistent depth and semantic labels.

Qualitatively, the maps are noticeably smoother. Ambiguous regions seen from sharp angles are successfully "fixed" as the system incorporates information from multiple viewpoints via the latent code. The authors identified a 32-dimension code size as the optimal balance between reconstruction quality and computational efficiency.

Limitations and Future Work

While SceneCode advances dense semantic reconstruction, current limitations include its reliance on a sliding window of keyframes rather than a global map. Future work aims to integrate semantic information directly into the "front-end" tracking to improve camera stability in challenging environments and to move toward explicit object-level instance reasoning.

Summary updated

BibTeX
@inproceedings{zhi2019scenecode,
  author = {Shuaifeng Zhi and Michael Bloesch and Stefan Leutenegger and Andrew J. Davison},
  title = {{SceneCode: Monocular Dense Semantic Reconstruction Using Learned Encoded Scene Representations.}},
  booktitle = {CVPR},
  year = {2019},
  url = {https://openreview.net/forum?id=S7ZdEmldTH},
}
Figure