- Notifications
You must be signed in to change notification settings - Fork400
Official implementation of "Neuralangelo: High-Fidelity Neural Surface Reconstruction" (CVPR 2023)
License
NVlabs/neuralangelo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is the official implementation ofNeuralangelo: High-Fidelity Neural Surface Reconstruction.
Zhaoshuo Li,Thomas Müller,Alex Evans,Russell H. Taylor,Mathias Unberath,Ming-Yu Liu,Chen-Hsuan Lin
IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2023
The code is built upon the Imaginaire library from the Deep Imagination Research Group at NVIDIA.
For business inquiries, please submit theNVIDIA research licensing form.
We offer two ways to setup the environment:
We provide prebuilt Docker images, where
docker.io/chenhsuanlin/colmap:3.8is for running COLMAP and the data preprocessing scripts. This includes the prebuilt COLMAP library (CUDA-supported).docker.io/chenhsuanlin/neuralangelo:23.04-py3is for running the main Neuralangelo pipeline.
The corresponding Dockerfiles can be found in the
dockerdirectory.The conda environment for Neuralangelo. Install the dependencies and activate the environment
neuralangelowithconda env create --file neuralangelo.yamlconda activate neuralangelo
For COLMAP, alternative installation options are also available on theCOLMAP website.
Please refer toData Preparation for step-by-step instructions.
We assume known camera poses for each extracted frame from the video.The code uses the same json format asInstant NGP.
EXPERIMENT=toy_exampleGROUP=example_groupNAME=example_nameCONFIG=projects/neuralangelo/configs/custom/${EXPERIMENT}.yamlGPUS=1# use >1 for multi-GPU training!torchrun --nproc_per_node=${GPUS} train.py \ --logdir=logs/${GROUP}/${NAME} \ --config=${CONFIG} \ --show_pbar
Some useful notes:
- This codebase supports logging withWeights & Biases. You should have a W&B account for this.
- Add
--wandbto the command line argument to enable W&B logging. - Add
--wandb_nameto specify the W&B project name. - More detailed control can be found in the
init_wandb()function inimaginaire/trainers/base.py.
- Add
- Configs can be overridden through the command line (e.g.
--optim.params.lr=1e-2). - Set
--checkpoint={CHECKPOINT_PATH}to initialize with a certain checkpoint; set--resumeto resume training. - If appearance embeddings are enabled, make sure
data.num_imagesis set to the number of training images.
Use the following command to run isosurface mesh extraction:
CHECKPOINT=logs/${GROUP}/${NAME}/xxx.ptOUTPUT_MESH=xxx.plyCONFIG=logs/${GROUP}/${NAME}/config.yamlRESOLUTION=2048BLOCK_RES=128GPUS=1# use >1 for multi-GPU mesh extractiontorchrun --nproc_per_node=${GPUS} projects/neuralangelo/scripts/extract_mesh.py \ --config=${CONFIG} \ --checkpoint=${CHECKPOINT} \ --output_file=${OUTPUT_MESH} \ --resolution=${RESOLUTION} \ --block_res=${BLOCK_RES}
Some useful notes:
- Add
--texturedto extract meshes with textures. - Add
--keep_lccto remove noises. May also remove thin structures. - Lower
BLOCK_RESto reduce GPU memory usage. - Lower
RESOLUTIONto reduce mesh size.
Q: CUDA out of memory. How do I decrease the memory footprint?
A: Neuralangelo requires at least 24GB GPU memory with our default configuration. If you run out of memory, consider adjusting the following hyperparameters undermodel.object.sdf.encoding.hashgrid(with suggested values):GPU VRAM Hyperparameter 8GB dict_size=20,dim=412GB dict_size=21,dim=416GB dict_size=21,dim=8Please note that the above hyperparameter adjustment may sacrifice the reconstruction quality.
If Neuralangelo runs fine during training but CUDA out of memory during evaluation, consider adjusting the evaluation parameters under
data.val, including setting smallerimage_size(e.g., maximum resolution 200x200), and settingbatch_size=1,subset=1.Q: The reconstruction of my custom dataset is bad. What can I do?
A: It is worth looking into the following:- The camera poses recovered by COLMAP may be off. We have implemented tools (usingBlender orJupyter notebook) to inspect the COLMAP results.
- The computed bounding regions may be off and/or too small/large. Please refer todata preprocessing on how to adjust the bounding regions manually.
- The video capture sequence may contain significant motion blur or out-of-focus frames. Higher shutter speed (reducing motion blur) and smaller aperture (increasing focus range) are very helpful.
If you find our code useful for your research, please cite
@inproceedings{li2023neuralangelo, title={Neuralangelo: High-Fidelity Neural Surface Reconstruction}, author={Li, Zhaoshuo and M\"uller, Thomas and Evans, Alex and Taylor, Russell H and Unberath, Mathias and Liu, Ming-Yu and Lin, Chen-Hsuan}, booktitle={IEEE Conference on Computer Vision and Pattern Recognition ({CVPR})}, year={2023}}About
Official implementation of "Neuralangelo: High-Fidelity Neural Surface Reconstruction" (CVPR 2023)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
