Skip to content

[ICLR 2023 & TPAMI 2025] S-NeRF: Neural Radiance Fields for Street Views

License

Notifications You must be signed in to change notification settings

fudan-zvg/S-NeRF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

S-NeRF: Neural Radiance Fields for Street Views

S-NeRF: Neural Radiance Fields for Street Views,
Ziyang Xie, Junge Zhang, Wenye Li, Feihu Zhang, Li Zhang
ICLR 2023

S-NeRF++: Autonomous Driving Simulation via Neural Reconstruction and Generation,
Yurui Chen, Junge Zhang, Ziyang Xie, Wenye Li, Feihu Zhang, Jiachen Lu, Li Zhang
TPAMI 2025

demo

We introduce S-NeRF, a robust system to synthesizing large unbounded street views for autonomous driving using Neural Radiance Fields (NeRFs). This project aims to enhance the realism and accuracy of street view synthesis and improve the robustness of NeRFs for real-world applications. (e.g. autonomous driving simulation, robotics, and augmented reality)

πŸš€ News

[8/06/24] We released the code for S-NeRF++: Autonomous Driving Simulation via Neural Reconstruction and Generation. A comprehensive driving simulation system based on neural reconstruction.

✨ Key Features

  • Large-scale Street View Synthesis: S-NeRF is able to synthesize large-scale street views with high fidelity and accuracy.

  • Improved Realism and Accuracy: S-NeRF significantly improves the realism and accuracy of specular reflections and street view synthesis.

  • Robust Geometry and Reprojection: By utilizing noisy and sparse LiDAR points, S-NeRF learns a robust geometry and reprojection based confidence to address the depth outliers.

  • Foreground Moving Vehicles: S-NeRF extends its capabilities for reconstructing moving vehicles, a task that is impracticable for conventional NeRFs.

πŸ‘€ Model Pipline Overview

Model

TODOs

  • Env Installation
  • Pose Preparation Scripts
  • Depth & Flow Preparation Scripts
  • Code for training and testing
  • Foreground Vehicle Reconstruction Foreground-branch

πŸ”§ Installation

Create a conda environment:

conda create -n S-NeRF python=3.8 
conda activate S-NeRF

Install predependents:

pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable"

Install the required packages:

pip install -r requiremnets.txt

πŸ“‚ Data Preparation

  1. Prepare Dataset according to the following file tree
s-nerf/data/
β”œβ”€β”€ nuScenes/
β”‚   β”œβ”€β”€ mini/
β”‚   └── trainval/
└── waymo/
└── scenes/
  1. Put scene name and its token in scene_dict.json
{
    "scene-0916": "325cef682f064c55a255f2625c533b75",
    ...
}
  1. Prepare the poses, images and depth in S-NeRF format
  • nuScenes
python scripts/nuscenes_preprocess.py 
       --version [v1.0-mini / v1.0-trainval] \
       --dataroot ./data/<YOUR DATASET ROOT> \
  • Waymo
python scripts/waymo_preprocess.py
  1. Prepare the depth data
    Put the first smaple token of the scene in ./data/depth/sample_tokens.txt
    Then follow the Depth Preparation Instruction

πŸš€ Train S-NeRF

cd s-nerf
python train.py --config [CONFIG FILE]

For the foreground vehicle reconstruction, please refer to branch foreground.

πŸ”„ Introducing S-NeRF++

πŸ› οΈ Pipeline

Get started

Environment

# Clone the repo.
git clone https://github.com/fudan-zvg/S-NeRF.git
cd S-NeRF/s-nerf++

# Make a conda environment.
conda create --name snerfpp python=3.9
conda activate snerfpp 

# Install requirements.
pip install -r requirements.txt

git clone https://github.com/NVlabs/nvdiffrast
pip install ./nvdiffrast

git clone https://github.com/ashawkey/raytracing
pip install ./raytracing

pip install torch_scatter ./zipnerf/gridencoder

# install kaolin, adapt the CUDA version to yourself, default cu117
pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.0.1_cu117.html

Download our Fusion adaption model

The pretrained relighting and inpainting models can be downloaded here. Put the inpaint directory in the main directory ./

Download our Foreground asset bank

Some of the reconstructed or generated foreground assets can be downloaded here here. Put the TEXTure_ckpt directory in the main directory ./

Background Training

The NeRF training and data process are to be released.
A processed waymo scene dataset and its trained checkpoint can be downloaded here. Put the dataset in the ./ and ckpt in ./zipnerf/

Simulating

You can run the following code to start simulation based on trained NeRF ckpts (background scenes) and foreground assets.

# Two cars will be randomly inserted into each scene. Simulate 10 images for each scene
python config_run.py --config configs/car.yaml --n_image 10 --gpu 0

You will find the simulation data in ./annotation directory as follows:

annotation
└── <sequence_id>
    └── <run timestamps>
        β”œβ”€β”€ bbox
        β”‚   └── frame_id.txt
        β”œβ”€β”€ depth
        β”‚   └── frame_id.png
        β”œβ”€β”€ image
        β”‚   └── frame_id.png
        │── semantic
        β”‚   └── frame_id.png
        │── vis
        β”‚   └── frame_id.png
        β”œβ”€β”€ bev_results.npy
        β”œβ”€β”€ intrinsic.npy
        └── target_poses.npy 

Our bbox format is following kitti-format Waymo dataset. The camera parameters of each frame are saved in intrinsic.npy and target_poses.npy. The semantic labels are following Cityscape 19 classes.

TODOs

  • Data preparation
  • Nuscenes pipeline
  • Foreground generation

🎞️ Some simulation results on Waymo


πŸ“ Bibtex

If you find this work useful, please cite:

@inproceedings{xie2023snerf,
author = {Xie, Ziyang and Zhang, Junge and Li, Wenye and Zhang, Feihu and Zhang, Li},
title = {S-NeRF: Neural Radiance Fields for Street Views},
booktitle = {International Conference on Learning Representations (ICLR)},
year = {2023}
}
@article{chen2025snerf,
title={S-NeRF++: Autonomous Driving Simulation via Neural Reconstruction and Generation},
author={Chen, Yurui and Zhang, Junge and Xie, Ziyang and Li, Wenye and Zhang, Feihu and Lu, Jiachen and Zhang, Li},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI)},
year={2025}
}

About

[ICLR 2023 & TPAMI 2025] S-NeRF: Neural Radiance Fields for Street Views

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages