OR-NeRF: Object Removing from 3D Scenes Guided by Multiview Segmentation with Neural Radiance Fields

Youtan Yin, Zhoujie Fu, Fan Yang, Guosheng Lin

TL;DR

OR-NeRF is a novel pipeline for removing objects from 3D scenes using only a single-view point or text prompt. By leveraging 3D geometric priors to propagate masks across views and employing depth-supervised Neural Radiance Fields (NeRF), it achieves higher-quality object removal and significantly faster processing times than previous state-of-the-art methods.

What Problem Does This Paper Address?

Editing 3D scenes—specifically removing unwanted objects—is a complex task. While it's easy for a human to point at a "statue" and say "remove this," translating that intent into a consistent 3D reconstruction is difficult.

Existing methods face three main hurdles:

  1. Labeling Burden: Manually masking an object in dozens of different camera views is impractical.
  2. Consistency: The "hole" left behind must be filled in a way that looks plausible and remains consistent as the camera moves.
  3. Efficiency: Previous pipelines, like SPIn-NeRF, often require training auxiliary networks just to refine masks, leading to slow iteration cycles.

Methods

The OR-NeRF pipeline streamlines the removal process into two main stages: multiview segmentation and scene reconstruction.

1. Multiview Segmentation via Geometry

Instead of training a model to understand the scene's semantics, OR-NeRF uses a geometric shortcut.

  • Point Propagation: The user provides a point prompt on a single view. The system finds the corresponding 3D point in a sparse point cloud (generated via COLMAP) and re-projects that 3D point onto all other 2D camera views.
  • SAM Integration: These projected points serve as prompts for the Segment-Anything Model (SAM), which generates high-quality masks for every view almost instantly.
  • Text-to-Point: For text prompts (e.g., "remove the chair"), the system uses Grounded-SAM on the initial view to generate a mask, samples points from it, and then follows the propagation logic above.
Fig. 1. An overview of our OR-NeRF’s framework. We start with sparse images and either points or text prompts. If a text prompt is used, we convert it into a points prompt by sampling points from the initial mask estimated using Grounded-SAM (Sec IV-A2). Next, we propagate the points annotations to all views by projecting them from 2D to 3D point cloud and back to 2D (Sec IV-A1). We utilize SAM to predict masks using these point annotations. LaMa is used to obtain color and depth priors. Finally, the scene after removal is reconstructed using Neural Radiance Fields supervised by color (Eq (3)), depth (Eq (5)), and perceptual (Eq (6)) cues simultaneously (Sec IV-B).

2. Reconstruction with TensoRF

Once masks are ready, the 2D inpainting model LaMa provides color and depth priors for the "hidden" areas. The final 3D scene is reconstructed using TensoRF as the backbone. To ensure the result isn't blurry or geometrically warped, the authors use a combination of:

  • Color Loss: Standard NeRF reconstruction loss.
  • Full-Depth Supervision: Supervising the depth of the entire image (not just the mask) to maintain global geometric consistency.
  • Perceptual Loss (LPIPS): Applied specifically to the masked area to ensure the inpainted texture looks natural and matches the surrounding style.

Datasets

The authors evaluated their method on 20 different scenes:

  • SPIn-NeRF Dataset: Used for quantitative evaluation because it includes human-annotated masks and ground-truth captures of the scenes after the objects were physically removed.
  • General NeRF Datasets: Including NeRF LLFF, IBRNet, and LLFF real-world data to test the method's flexibility across diverse environments.

Key Insights and Ideas

  • Geometry Trumps Training: A major "aha moment" is that simple 3D-to-2D projection is more efficient and often more accurate for mask propagation than training a dedicated Semantic NeRF. As shown in Figure 2, this reduces a multi-step training process into a single geometric step.
  • The Necessity of Global Depth: The authors found that supervising depth only in the masked area leads to geometric inconsistency. Supervising the whole image is "irreplaceable" for a stable 3D result.
  • SAM as a Zero-Shot Powerhouse: By using SAM, the pipeline avoids the need for scene-specific segmentation training, allowing it to handle intricate details like chair legs that previous methods struggled with.
Fig. 2. Comparison of mask generation between SPIn-NeRF [10] (first row) and ours (second row). Our method generates masks rapidly and precisely for all views in a single step, supporting points, and text input. In contrast, SPIn-NeRF exhibits slower speed, lower accuracy, and limited support for points prompt only, requiring three steps, including network training.

Key Results

  • Speed: OR-NeRF generates masks at approximately 2 frames per second on an RTX 3090. In contrast, SPIn-NeRF requires minutes of processing and network training for the same task.
  • Segmentation Accuracy: OR-NeRF achieved a mean IoU of 95.42%, outperforming SPIn-NeRF’s 91.66%.
  • Visual Quality: Qualitatively, OR-NeRF produces much sharper details in the removed regions. Quantitatively, it showed superior FID (Frechet Inception Distance) and LPIPS scores, indicating that the generated images are more perceptually similar to real scenes.
Visual comparison of rendering quality

Limitations and Future Work

  • Inpainting Dependency: The final quality is heavily capped by the 2D inpainter (LaMa). If the inpainter produces a flawed 2D texture, the 3D reconstruction will inherit those flaws.
  • Sparse Cloud Reliance: The point propagation relies on a successful COLMAP reconstruction. If the scene is too featureless for COLMAP to build a sparse cloud, the propagation will fail.
  • Future Directions: The authors suggest that integrating more robust 2D diffusion-based inpainting models could further improve the plausibility of the removed areas.

Summary updated

BibTeX
@misc{yin2023or,
  author = {Youtan Yin and Zhoujie Fu and Fan Yang and Guosheng Lin},
  title = {{OR-NeRF: Object Removing from 3D Scenes Guided by Multiview Segmentation with Neural Radiance Fields}},
  year = {2023},
  eprint = {2305.10503},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.10503},
}
Figure