mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
1 parent
49f4f76ea6
commit
50b9ee83a1
4 files changed
+181
-21
No files matched your search
@@ -2,14 +2,20 @@
|
||||
|
||||
## Downloading data
|
||||
|
||||
Download the original NeRF Blender dataset. We support the major datasets and allow users to create their own dataset, described in detail [here TODO].
|
||||
Download datasets provided by nerfstudio. We support the major datasets and allow users to create their own dataset, described in detail [here](./custom_dataset.md).
|
||||
|
||||
```
|
||||
ns-download-data --dataset=blender
|
||||
ns-download-data --dataset=nerfstudio --capture=poster
|
||||
```
|
||||
|
||||
Use `--help` to view all currently available datasets. The resulting script should download and unpack the dataset as follows:
|
||||
:::{admonition} Tip
|
||||
:class: info
|
||||
|
||||
Use `ns-download-data --help` to view all currently available datasets.
|
||||
:::
|
||||
|
||||
The resulting script should download and unpack the dataset as follows:
|
||||
|
||||
```
|
||||
|─ nerfstudio/
|
||||
@@ -25,7 +31,10 @@ Use `--help` to view all currently available datasets. The resulting script shou
|
||||
|
||||
## Training a model
|
||||
|
||||
To run with all the defaults, e.g. vanilla nerf method with the blender lego image
|
||||
See which models are available.
|
||||
```bash
|
||||
ns-train --help
|
||||
```
|
||||
|
||||
Run a vanilla nerf model.
|
||||
|
||||
@@ -39,28 +48,56 @@ Run a nerfacto model.
|
||||
ns-train nerfacto
|
||||
```
|
||||
|
||||
Run with nerfstudio data. You'll may have to change the ports, and be sure to forward the "websocket-port".
|
||||
|
||||
Run with nerfstudio data with our web-based viewer enabled.
|
||||
```
|
||||
ns-train nerfacto --vis viewer --viewer.zmq-port 8001 --viewer.websocket-port 8002 nerfstudio-data --pipeline.datamanager.dataparser.data-directory data/nerfstudio/poster --pipeline.datamanager.dataparser.downscale-factor 4
|
||||
```
|
||||
|
||||
:::{admonition} Warning
|
||||
:class: warning
|
||||
|
||||
* You may have to change the ports, and be sure to forward the "websocket-port".
|
||||
* All data configurations must go at the end. In this case, `nerfstudio-data` and all of its corresponding configurations come at the end after the model and viewer specification.
|
||||
:::
|
||||
|
||||
## Visualizing training runs
|
||||
|
||||
If you are using a fast NeRF variant (ie. Instant-NGP), we recommend using our viewer. See our [viewer docs](viewer_quickstart.md) for more details. The viewer will allow interactive visualization of training in realtime.
|
||||
If you are using a fast NeRF variant (ie. Nerfacto/Instant-NGP), we recommend using our viewer. See our [viewer docs](viewer_quickstart.md) for a tutorial on using the viewer. The viewer will allow interactive, real-time visualization of training.
|
||||
|
||||
Additionally, if you run everything with the default configuration, by default, we use [TensorBoard](https://www.tensorflow.org/tensorboard) to 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 `outputs/blender_lego/vanilla_nerf/<timestamp>/<events.tfevents>`.
|
||||
For slower methods where the viewer is not recommended, we default to [Wandb](https://wandb.ai/site) to log all training curves, test images, and other stats. We also support logging with [Tensorboard](https://www.tensorflow.org/tensorboard). We pre-specify default `--vis` options depending on the model.
|
||||
|
||||
:::{admonition} Attention
|
||||
:class: attention
|
||||
|
||||
- Currently we only support using a single viewer at a time.
|
||||
- To toggle between Wandb, Tensorboard, or our Web-based Viewer, you can specify `--vis VIS_OPTION`, where `VIS_OPTION` is one of {viewer,wandb,tensorboard}.
|
||||
:::
|
||||
|
||||
#### Rendering videos
|
||||
We also provide options to render out the scene of a trained model with a custom trajectory and save the output to a video.
|
||||
|
||||
```bash
|
||||
tensorboard --logdir outputs
|
||||
ns-render --load-config={PATH_TO_CONFIG} --traj=spiral --output-path=output.mp4
|
||||
```
|
||||
|
||||
## Rendering a Trajectory
|
||||
While we provide pre-specified trajectory options, `--traj={spiral, interp, filename}` we can also specify a custom trajectory if we specify `--traj=filename --camera-path-filename {PATH}`.
|
||||
|
||||
To evaluate the trained NeRF, we provide an evaluation script that allows you to do benchmarking (see our [benchmarking workflow](../developer_guides/benchmarking.md)) or to render out the scene with a custom trajectory and save the output to a video.
|
||||
:::{admonition} Tip
|
||||
:class: info
|
||||
After running the training, the config path is logged to the terminal under "[base_config.py:263] Saving config to:"
|
||||
:::
|
||||
|
||||
:::{admonition} See Also
|
||||
:class: seealso
|
||||
This quickstart allows you to preform everything in a headless manner.
|
||||
We also provide a web-based viewer that allows you to easily monitor training or render out custom trajectories.
|
||||
See our [viewer docs](viewer_quickstart.md) for more.
|
||||
:::
|
||||
|
||||
## Evaluating Runs
|
||||
Calculate the psnr of your trained model and save to a json file.
|
||||
```bash
|
||||
ns-render --load-config=outputs/blender_lego/instant_ngp/2022-07-07_230905/config.yml --traj=spiral --output-path=output.mp4
|
||||
ns-eval --load-config={PATH_TO_CONFIG} --output-path=output.json
|
||||
```
|
||||
|
||||
Please note, this quickstart allows you to preform everything in a headless manner. We also provide a web-based viewer that allows you to easily monitor training or render out trajectories. See our [viewer docs](viewer_quickstart.md) for more.
|
||||
We also provide a train and evaluation script that allows you to do benchmarking on the classical Blender dataset (see our [benchmarking workflow](../developer_guides/benchmarking.md)).
|
||||
Reference in new issue
Block a user