Skip to main content

Test Status Viewer build Status Documentation Status Documentation Status PyPI version

nerfstudio

The all-in-one repo for NeRFs

documentation viewer

Philosophy

All-in-one repository for state-of-the-art NeRFs.

nerfstudio provides a simple API that allows for a seamless and simplified end-to-end process of creating, training, and visualizing NeRFs. The library supports a more interpretable implementation of NeRFs by modularizing each component. With more modular NeRFs, not only does your code become far more user-friendly, but using this framework also makes it easier for the community to build upon your implementation.

It’s as simple as plug and play with nerfstudio!

Ontop of our API, we are commited to providing learning resources to help you understand the basics of (if you're just getting start), and keep up-to-date with (if you're a seasoned veteran) all things NeRF. As researchers, we know just how hard it is to get onboarded with this next-gen technology. So we're here to help with tutorials, documentation, and more!

Finally, have feature requests? Want to add your brand-spankin'-new NeRF model? Have a new dataset? We welcome any and all contributions!

We hope nerfstudio enables you to build faster :hammer: learn together :books: and contribute to our NeRF community :sparkling_heart:.

Quickstart

The quickstart will help you get started with the default vanilla nerf trained on the classic blender lego scene. For more complex changes (e.g. running with your own data/ setting up a new NeRF graph, please refer to our references.

1. Installation: Setup the environment

This repository is tested with CUDA 11.3. Make sure to install Conda before preceding.

Create the python environment

conda create --name nerfstudio python=3.8.13
conda activate nerfstudio
python -m pip install --upgrade pip

Clone the repo

git clone git@github.com:plenoptix/nerfstudio.git

Install dependencies and nerfstudio as a library

cd nerfstudio
pip install -e .

Install tiny-cuda-nn (tcnn) to run instant_ngp

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

Install tab completion for nerfstudio (bash & zsh)

nf-install-cli

Run the test cases

pytest tests

2. Getting the data

Download the original NeRF Blender dataset. We support the major datasets and allow users to create their own dataset, described in detail here.

python scripts/downloads/download_data.py --dataset=blender

Use --help to view all currently available datasets. The resulting script should download and unpack the dataset as follows:

|─ nerfstudio/
   ├─ data/
   |  ├─ blender/
   |     ├─ fern/
   |     ├─ lego/
         ...
      |- <dataset_format>/
         |- <scene>
         ...

3. Training a model

To run with all the defaults, e.g. vanilla nerf method with the blender lego image

# To see what models are available.
python scripts/train.py --help

# Run a vanilla nerf model.
python scripts/train.py vanilla_nerf

# Run a faster version with instant ngp using tcnn (without the viewer).
python scripts/train.py instant_ngp

3.x Training a model with the viewer

Make sure to forward a port for the websocket to localhost. The default port is 7007, which you should be expose to localhost:7007.

# with the default port
python scripts/train.py instant_ngp --viewer.enable

# with a specified websocket port
python scripts/train.py instant_ngp --viewer.enable --viewer.websocket-port=7008

# with the viewer bridge server as a separate process
# in one terminal, start the bridge server:
viewer-bridge-server # or equivalently, python scripts/run_viewer_bridge_server.py
# in another terminal, start training:
python scripts/train.py instant_ngp --viewer.enable --viewer.no-launch-bridge-server

4. Visualizing training runs

We support multiple methods to visualize training, the default configuration uses Tensorboard. More information on logging can be found here.

Real-time Viewer

We have developed our own Real-time web viewer, more information can be found here. This viewer runs during training and is designed to work with models that have fast rendering pipelines.

To turn on the viewer, simply add the flag --viewer.enable.

Tensorboard

If you run everything with the default configuration we log all training curves, test images, and other stats. Once the job is launched, you will be able to track training by launching the tensorboard in your base experiment directory (Default: outputs/).

tensorboard --logdir outputs/
Weights & Biases

We support logging to weights and biases. To enable wandb logging, add the flag --logging.writer.1.enable.

5. Rendering a trajectories during inference

python scripts/eval.py render-trajectory --load-config=outputs/blender_lego/instant_ngp/2022-07-07_230905/config.yml--traj=spiral --output-path=output.mp4

6. In-depth guide

For a more in-depth tutorial on how to modify/implement your own NeRF Graph, please see our walk-through.

Learn More

Section Description
Documentation Full API documentation and tutorials
Interactive Guides Go-to spot for learning how NeRFs and each of its modules work.
Quick tour Example script on how to navigate Nerfactory from install, train, to test.
Creating pipelines Learn how to easily build new neural rendering pipelines by using and/or implementing new modules.
Creating datsets Have a new dataset? Learn how to use it with Nerfactory.
Mobile Capture to NerF Step-by-step tutorial on how to create beautiful renders with just your phone.
Contributing Walk-through for how you can start contributing now.
Slack Join our community to discuss more. We would love to hear from you!

Supported Features

We provide the following support strucutures to make life easier for getting started with NeRFs. For a full description, please refer to our features page.

If you are looking for a feature that is not currently supported, please do not hesitate to contact the Plenoptix team!

  • :mag_right: Web-based visualizer that allows you to:
    • Visualize training in real-time + interact with the scene
    • Create and render out scenes with custom camera trajectories
    • View different output types
    • And more!
  • :pencil2: Support for multiple logging interfaces (Tensorboard, Wandb), code profiling, and other built-in debugging tools
  • :chart_with_upwards_trend: Easy-to-use benchmarking scripts on the Blender dataset
  • :iphone: Full pipeline support (w/ Colmap or Record3D) for going from a video on your phone to a full 3D render. Follow our step-by-step tutorial. (TODO: walk-through page on end-to-end pipeline from capture -> render)

See what's possible

TODO: insert some gallery stuff here (gifs/pretty pictures w/ visualizer) TODO: For more see gallery

Release files for nerfstudio 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nerfstudio 0.0.1
File Size Uploaded
nerfstudio-0.0.1.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nerfstudio 0.0.1
File Interpreter ABI Platform
nerfstudio-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.0 kB

Release files / nerfstudio-0.0.1.tar.gz

Download URL nerfstudio-0.0.1.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9c533a980417d087f655275e833caa486d0b55364c7444181f5c64eafa607a88
BLAKE2b-256 checksum
How to use checksums
f5136870419c103c0903b08ffd190c32c4ce2927c9d6f0e8cc522c7a5e5a8385
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.12

Release files / nerfstudio-0.0.1-py3-none-any.whl

Download URL nerfstudio-0.0.1-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
575a113f158f47517e1f7f4603a5d39b57cd2a48cb57289ec6a0fce00323b31d
BLAKE2b-256 checksum
How to use checksums
5a83313b27527ed1a8b4be96bd8b73eaa36a71eeb54894b90d790a0bae0d244e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.12

Release history Release notifications | RSS feed

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page