NeSF: Neural Semantic Fields for Generalizable Semantic Segmentation of 3D Scenes

Suhani Vora, Noha Radwan, Klaus Greff, Henning Meyer, Kyle Genova, Mehdi S. M. Sajjadi, Etienne Pot, Andrea Tagliasacchi, Daniel Duckworth

Abstract

We present NeSF, a method for producing 3D semantic fields from posed RGB images alone. In place of classical 3D representations, our method builds on recent work in neural fields wherein 3D structure is captured by point-wise functions. We leverage this methodology to recover 3D density fields upon which we then train a 3D semantic segmentation model supervised by posed 2D semantic maps. Despite being trained on 2D signals alone, our method is able to generate 3D-consistent semantic maps from novel camera poses and can be queried at arbitrary 3D points. Notably, NeSF is compatible with any method producing a density field. Our empirical analysis demonstrates comparable quality to competitive 2D and 3D semantic segmentation baselines on complex, realistically-rendered scenes and significantly outperforms a comparable neural radiance field-based method on a series of tasks requiring 3D reasoning. Our method is the first to learn semantics by recognizing patterns in the geometry stored within a 3D neural field representation. NeSF is trained using purely 2D signals and requires as few as one labeled image per-scene at train time. No semantic input is required for inference on novel scenes.

TL;DR

NeSF (Neural Semantic Fields) is a novel framework that produces dense 3D semantic segmentations of scenes using only 2D images and their camera poses. By training a 3D neural network to "read" the geometry hidden within a NeRF’s density field, NeSF achieves impressive generalization to novel scenes and remains robust to changes in color or texture that typically trip up 2D-based models.

The NeSF pipeline: from posed RGB images to a dense 3D semantic field via an intermediate density representation.

What Problem Does This Paper Address?

High-level 3D scene understanding—knowing not just where things are, but what they are—is a cornerstone of robotics and AR. However, getting there is difficult. 3D sensors like LiDAR are expensive, and 3D semantic labels (annotating every point in a volume) are notoriously hard to produce.

Most researchers take a shortcut by using 2D semantic segmentation on images and "projecting" those labels into 3D. While efficient, these methods often ignore the underlying 3D structure and over-rely on visual textures. If a model learns that "chairs are usually red" in one dataset, it might fail to recognize a blue chair in another. The authors of NeSF aim to bridge this gap by learning semantics directly from 3D geometry (shape) recovered from standard 2D photos, without requiring any 3D ground-truth labels for training.

Methods

NeSF builds upon the success of Neural Radiance Fields (NeRF). The pipeline consists of two distinct stages:

  1. Geometry Recovery: For a given scene, the authors first train a standard NeRF to represent the scene as a continuous field of volumetric density ($\sigma$) and color. Crucially, for the semantic task, they discard the color information and focus solely on the density field, which acts as a proxy for the scene's 3D geometry.
  2. Semantic Reasoning:
    • Density Grid Extraction: They sample the continuous density field onto a discrete 3D grid.
  3. 3D UNet: This grid is passed through a 3D Convolutional Neural Network (a 3D UNet). This is the "spatial reasoning" engine; it looks at local neighborhoods of density to recognize shapes (e.g., "this vertical cylinder attached to a flat plane is likely a table leg").
  4. MLP Decoder: The features from the UNet are decoded into a probability distribution over semantic classes.
  5. 2D Supervision: To train the network, they use volumetric rendering (the same math NeRF uses for color) to project the 3D semantic field back into 2D "semantic maps." They then compare these to ground-truth 2D labels.
The detailed NeSF architecture, illustrating the transition from implicit density fields to explicit grids for 3D spatial reasoning.

The "magic" here is that the 3D UNet and MLP weights are shared across all scenes. This allows the model to learn generalizable features of 3D objects rather than just memorizing a single scene.

Datasets

The authors found that existing real-world datasets (like ScanNet) were often too blurry or sparsely captured for high-quality NeRF reconstruction. Consequently, they introduced three new synthetic benchmarks using the Kubric engine:

  • KLEVR: A simple testbed with basic geometric primitives (cubes, spheres) on a flat plane.
  • ToyBox5 & ToyBox13: More complex and realistic scenes mimicking children’s playrooms, featuring 5 and 13 categories of ShapeNet objects (chairs, lamps, vehicles, etc.) with realistic lighting and materials.

In total, these datasets comprise over 1,000 scenes and 3 million rendered frames.

Key Insights and Ideas

  • Geometry over Appearance: By feeding only density (and not color) into the semantic model, NeSF is forced to learn what an object is based on its shape. This makes the model "orthogonal" to traditional 2D segmenters that rely heavily on texture.
  • Implicit-to-Explicit-to-Implicit: The method cleverly moves between representations. It starts with an implicit NeRF field, discretizes it into an explicit grid for efficient 3D convolution, and then uses trilinear interpolation to query the field at any implicit continuous 3D point.
  • Label Efficiency: NeSF can generalize to a new scene after seeing as few as one labeled 2D image of that scene during training. At test time, it requires zero semantic labels to segment a brand-new scene; it only needs the RGB images to reconstruct the density field.

Key Results

  • Robustness to "Domain Shift": In experiments where the colors or textures of objects were changed between training and testing (e.g., training on monochrome objects but testing on colored ones), NeSF maintained high accuracy (92.3% mIoU), while appearance-heavy baselines like Semantic-NeRF saw their performance crater (dropping to ~37%).
  • 3D Consistency: Because NeSF predicts a single 3D field, its 2D projections are perfectly consistent across different camera views. Traditional 2D models often produce "flickering" labels where an object's class changes slightly as the camera moves.
  • Competitive Performance: On the complex ToyBox datasets, NeSF achieved 3D mIoU scores (up to 89.6%) that were competitive with—and sometimes better than—baselines that had access to much more information.

Limitations and Future Work

  • Discretization Artifacts: Using a $64^3$ grid limits the model's ability to capture very fine details or thin structures (like the thin neck of a lamp), which can lead to "smeared" labels.
  • NeRF "Floaters": NeRFs often produce small artifacts or "clouds" of density in empty space. NeSF sometimes mistakenly assigns these floaters to the "background" or "vessel" classes, which can obscure foreground objects in 2D renders.
  • Computational Cost: The requirement to train a NeRF per scene before performing semantic inference is computationally expensive, though the authors note that recent "Fast NeRF" variants could mitigate this.
  • Scaling to Large Scenes: The current grid-based approach would struggle with memory if applied to massive, city-scale environments. Future work might involve using sparse voxels or octrees.

Summary updated

BibTeX
@article{vora2022nesf,
  author = {Suhani Vora and Noha Radwan and Klaus Greff and Henning Meyer and Kyle Genova and Mehdi S. M. Sajjadi and Etienne Pot and Andrea Tagliasacchi and Daniel Duckworth},
  title = {{NeSF: Neural Semantic Fields for Generalizable Semantic Segmentation of 3D Scenes}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=ggPhsYCsm9},
}
Figure