Read-only mirror of https://github.com/ethz-asl/NeuS2 — ETHZ ASL. Issues & pull requests at the source.
  • Cuda 64.5%
  • C++ 13.3%
  • Python 10.2%
  • Objective-C 9.5%
  • CMake 1.4%
  • Other 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-10-16 13:52:00 +02:00
.github/workflows init 2023-08-15 21:25:26 +08:00
cmake init 2023-08-15 21:25:26 +08:00
configs/nerf move m_sdf_bias to hyperparameters, remove useless info in configs 2023-08-28 15:57:48 +08:00
dataset_scripts Remove legacy adapt_dataset_scale.py script 2023-10-16 13:52:00 +02:00
dependencies update to latest neus2_tcnn 2023-09-01 04:53:05 +00:00
docs/assets_readme init 2023-08-15 21:25:26 +08:00
include/neural-graphics-primitives Allow specifying path to SDF-weight folder 2023-09-18 15:41:45 +02:00
pc_eval_scripts Add script to find best rescaling factor according to Chamfer distance 2023-09-12 15:50:05 +02:00
scripts Restructure scripts as a module 2023-09-11 15:20:38 +02:00
src Allow specifying path to SDF-weight folder 2023-09-18 15:41:45 +02:00
tools Minor: Style format 2023-09-11 15:14:26 +02:00
utils init 2023-08-15 21:25:26 +08:00
.editorconfig init 2023-08-15 21:25:26 +08:00
.gitignore fix bugs for m_predict_global_movement==False, update readme and remove useless codes 2023-08-17 07:44:47 +00:00
.gitmodules init 2023-08-15 21:25:26 +08:00
AnacondaBat.bat init 2023-08-15 21:25:26 +08:00
CMakeLists.txt init 2023-08-15 21:25:26 +08:00
DATA_CONVENTION.md Create DATA_CONVENTION.md 2023-08-31 19:39:56 -04:00
LICENSE.txt Update LICENSE.txt 2023-08-17 16:37:11 -04:00
README.md Update dependencies 2023-09-12 16:25:19 +02:00
requirements.txt Update dependencies 2023-09-12 16:25:19 +02:00

NeuS2: Fast Learning of Neural Implicit Surfaces for Multi-view Reconstruction

[Project] [Paper]


Yiming Wang*, Qin Han*, Marc Habermann, Kostas Daniilidis, Christian Theobalt, Lingjie Liu

ICCV 2023

NeuS2 is a method for fast neural surface reconstruction, which achieves two orders of magnitude improvement in terms of acceleration without compromising reconstruction quality, compared to NeuS. To accelerate the training process, we integrate multi-resolution hash encodings into a neural surface representation and implement our whole algorithm in CUDA. In addition, we extend our method for reconstructing dynamic scenes with an incremental training strategy.

This project is an extension of Instant-NGP enabling it to model neural surface representation and dynmaic scenes. We extended:

  • dependencies/neus2_TCNN
    • add second-order derivative backpropagation computation for MLP;
    • add progressive training for Grid Encoding.
  • neural-graphics-primitives
    • extend NeRF mode for NeuS;
    • add support for dynamic scenes.

Updates

  • [08/30/2023] Released NeuS2++ (See neuspp branch). Now you can reconstruct unmasked/unbounded scenes in seconds!

  • [08/15/2023] Released official codes!

Table Of Contents

Synthetic Scene surface reconstruction in 5 minutes
Input: multi-view images with mask
Output: freeview synthesis, mesh
Synthetic Scene surface reconstruction in 5 minutes
Comparison between NeuS (8h), Instant-NGP (5min) and NeuS2 (5min)
Download dataset from Google Drive
Dynamic Scene surface reconstruction in 20s per frame
Input: a sequence of multi-view images with mask
Output: novel view synthesis, mesh
Long sequence surface reconstruction with 2000 frames
Input: a sequence of multi-view images with mask
NeuS2 can handle long sequences input with large movements

Installation

Please first see Instant-NGP for original requirements and compilation instructions. NeuS2 follows the installing steps of Instant-NGP.

Clone this repository and all its submodules using the following command:

git clone --recursive https://github.com/19reborn/NeuS2
cd NeuS2

Then use CMake to build the project:

cmake . -B build
cmake --build build --config RelWithDebInfo -j 

For python usage, first install dependencies with conda and pip:

conda create -n neus2 python=3.9
conda activate neus2

Then install pytorch, pytorch3d and chamferdist:

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

pip install -r requirements.txt

If you meet problems of compiling, you may find solutions here.

Training

Static Scene

You can specify a static scene by setting --scene to a .json file containing data descriptions.

The DTU Scan24 scene can be downloaded from Google Drive:

./build/testbed --scene ${data_path}/transform.json

Or, you can run the experiment in an automated fashion through python bindings:

python scripts/run.py --scene ${data_path}/transform.json --name ${your_experiment_name} --network ${config_name} --n_steps ${training_steps}

For training on DTU dataset, config_name can be dtu.json and training_steps can be 15000.

Also, you can use scripts/run_dynamic.py as:

python scripts/run_dynamic.py --scene ${data_path}/transform.json --name ${your_experiment_name} --network ${config_name}

, where the number of training iterations is specified in the config.

The outputs and logs of the experiment can be found at output/${your_experiment_name}/.

Dynamic Scene

To specify a dynamic scene, you should set --scene to a directory containing .json files that describe training frames.

./build/testbed --scene ${data_dirname}

Or, run scripts/run_dynamic.py using python:

python scripts/run_dynamic.py --scene ${data_dirname} --name ${your_experiment_name} --network ${config_name}

There are some hyperparameters of the network configuration, such as configs/nerf/base.json, to control the dynamic training process:

  • first_frame_max_training_step: determine the number of training iterations for the first frame, default 2000.
  • next_frame_max_training_step: determine the number of training iterations for subsequent frames, default 1300, including global transformation prediction.
  • predict_global_movement: set true if use global transformation prediction.
  • predict_global_movement_training_step: determine the number of training iterations for global transformation prediction, default 300. Only valid when predict_global_movement is true.

Also, we provide scripts to reconstruct dynamic scenes by reconstructing static scene frame by frame.

python scripts/run_per_frame.py --base_dir ${data_dirname} --output_dir ${output_path} --config ${config_name}

Dynamic scene examples can be downloaded from Google Drive.

Data

  • Static scene example, link.
  • Dynamic scene example, link.
  • Pretrained model and configuration files for DTU, link.

Data Convention

NeuS2 supports the data format provided by Instant-NGP. Also, you can use NeuS2's data format (with from_na=true), see data convention.

We also provide a data conversion from NeuS to our data convention, which can be found in tools/data_format_from_neus.py.

Acknowledgements & Citation

@inproceedings{neus2,
    title={NeuS2: Fast Learning of Neural Implicit Surfaces for Multi-view Reconstruction}, 
    author={Wang, Yiming and Han, Qin and Habermann, Marc and Daniilidis, Kostas and Theobalt, Christian and Liu, Lingjie},
    year={2023},
    booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)}
}
@article{mueller2022instant,
    author = {Thomas M\"uller and Alex Evans and Christoph Schied and Alexander Keller},
    title = {Instant Neural Graphics Primitives with a Multiresolution Hash Encoding},
    journal = {ACM Trans. Graph.},
    issue_date = {July 2022},
    volume = {41},
    number = {4},
    month = jul,
    year = {2022},
    pages = {102:1--102:15},
    articleno = {102},
    numpages = {15},
    url = {https://doi.org/10.1145/3528223.3530127},
    doi = {10.1145/3528223.3530127},
    publisher = {ACM},
    address = {New York, NY, USA},
}
@inproceedings{wang2021neus,
	title={NeuS: Learning Neural Implicit Surfaces by Volume Rendering for Multi-view Reconstruction},
	author={Wang, Peng and Liu, Lingjie and Liu, Yuan and Theobalt, Christian and Komura, Taku and Wang, Wenping},
	booktitle={Proc. Advances in Neural Information Processing Systems (NeurIPS)},
	volume={34},
	pages={27171--27183},
	year={2021}
}