nerfbaselines

nerfbaselines [OPTIONS] COMMAND [ARGS]...

download-dataset

Download a dataset either to a specified directory or to the default dataset directory. The dataset must have format external://{dataset}/{scene}, where {dataset} is one of the registered datasets and {scene} is the scene id supported by the dataset.

nerfbaselines download-dataset [OPTIONS] DATASET

Options

-o, --output <output>

Output directory to download the dataset to. If not provided, the dataset will be downloaded to the default dataset directory (/home/runner/.cache/nerfbaselines).

Arguments

DATASET

Required argument

evaluate

Evaluate predictions (e.g., obtained by running nerfbaselines render) against the ground truth. The predictions are evaluated using the correct evaluation protocol and the results are saved in the specified JSON output file. The predictions can be provided as a directory or a tar.gz/zip file.

nerfbaselines evaluate [OPTIONS] PREDICTIONS

Options

-o, --output <output>

Required Path to the output JSON file to save the evaluation results.

Arguments

PREDICTIONS

Required argument

export-demo

Export a demo from a trained model. The interactive demo will be a website (index.html) that can be opened in the browser. Only some methods support this feature.

nerfbaselines export-demo [OPTIONS]

Options

--checkpoint <checkpoint>

Path to the checkpoint directory. It can also be a remote path (starting with http(s)://) or be a path inside a zip file.

-o, --output <output>

Required Output directory for the demo.

--data <data>

A path to the dataset to load which matches the dataset used to train the model. The dataset can be either an external dataset (e.g., a path starting with external://{dataset}/{scene}) or a local path to a dataset. If the dataset is an external dataset, the dataset will be downloaded and cached locally. If the dataset is a local path, the dataset will be loaded directly from the specified path. While only some methods require the dataset, it is recommended to always specify it as it can improve viewing experience.

--train-embedding <train_embedding>

Select the train embedding index to use for the demo (if the method supports appearance modelling.

--set <options>

Set a parameter for demo export. The argument should be in the form of –set key=value and can be used multiple times to set multiple parameters. The parameters are specific to each method.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

export-mesh

Export a mesh from a trained model. This usually involves rendering all training cameras and fusing the depth maps and normals into a mesh. The mesh will be saved in the specified output directory, usually as mesh.ply file, but different methods can export other files or file formats. Note, only some methods support this feature.

nerfbaselines export-mesh [OPTIONS]

Options

--checkpoint <checkpoint>

Path to the checkpoint directory. It can also be a remote path (starting with http(s)://) or be a path inside a zip file.

-o, --output <output>

Required Path to a directory to save the mesh (usually as a mesh.ply file).

-v, --verbose

Enable verbose logging

--data <data>

A path to the dataset to load which matches the dataset used to train the model. The dataset can be either an external dataset (e.g., a path starting with external://{dataset}/{scene}) or a local path to a dataset. If the dataset is an external dataset, the dataset will be downloaded and cached locally. If the dataset is a local path, the dataset will be loaded directly from the specified path. While required for most, some methods do not require the dataset to export a mesh (e.g. colmap).

--set <options>

Set a parameter for mesh export. The argument should be in the form of –set key=value and can be used multiple times to set multiple parameters. The parameters will override the parameters stored in the checkpoint. The parameters are specific to each method.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

fix-checkpoint

Fix a checkpoint created from either an older nerfbaselines version or a checkpoint created directly by using the authors’ code. This command will update the checkpoint to the latest format and save it to a new directory.

nerfbaselines fix-checkpoint [OPTIONS]

Options

--checkpoint <checkpoint>

Required Path to the current checkpoint directory.

--data <data>

Required A path to the dataset the model was trained on. The dataset can be either an external dataset (e.g., a path starting with external://{dataset}/{scene}) or a local path to a dataset. If the dataset is an external dataset, the dataset will be downloaded and cached locally. If the dataset is a local path, the dataset will be loaded directly from the specified path.

--method <method_name>

Method to use. If not provided, the method name will be read from the checkpoint (if nb-info.json file is present).

--new-checkpoint <new_checkpoint>

Required Path to save the new checkpoint

--set <config_overrides>

Override parameters used when training the original checkpoint. The argument should be in the form of –set key=value. This argument can be used multiple times to override multiple parameters. And it is specific to each method.

--presets <presets>

A comma-separated list of presets used when training the original checkpoint.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

fix-output-artifact

nerfbaselines fix-output-artifact [OPTIONS]

Options

--input <input>

Required

--data <data>
--method <method_name>
--rebuild-checkpoint
--rerun-evaluation
--rerun-render
--output <new_artifact>

Path to save the new output artifact

--force
--inplace
--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

generate-dataset-results

nerfbaselines generate-dataset-results [OPTIONS]

Options

--results <results>
--dataset <dataset>
--output-type <output_type>
Options:

markdown | json

Options:

paper | website | results | none

--output <output>

install

Install either a pre-defined method or a custom method from a spec file. If installing from spec (–spec argument) - a python file with a register() call - the registered objects will be added to local registry. If installing a method (–method argument) the backend implementation for the method will be pre-installed. This also applies when specifying both –spec and –backend arguments.

nerfbaselines install [OPTIONS]

Options

--method <method>

Method to install.

Options:

mip-splatting | 3dgs-mcmc | nerfonthego | colmap | nerf | zipnerf | tetra-nerf | scaffold-gs | mipnerf360 | instant-ngp | gaussian-splatting-wild | wild-gaussians | nerfacto | camp | gsplat | kplanes | tensorf | seathru-nerf | gaussian-splatting | gaussian-opacity-fields | 2d-gaussian-splatting | nerfw-reimpl

--spec <spec>

Path to a spec file (a Python file with register() calls) to install.

--force

Overwrite existing specs. Only applies when –spec is provided.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

render

Render images from a trained model for all cameras in the dataset. The images will be saved in the specified output directory. The correct evaluation protocol will be used to render the images. E.g., for Photo Tourism, appearance embeddings will be optimized before the images are rendered.

nerfbaselines render [OPTIONS]

Options

--checkpoint <checkpoint>

Required Path to the checkpoint directory. It can also be a remote path (starting with http(s)://) or be a path inside a zip file.

--data <data>

Required A path to the dataset to render the cameras from. The dataset can be either an external dataset (e.g., a path starting with external://{dataset}/{scene}) or a local path to a dataset. If the dataset is an external dataset, the dataset will be downloaded and cached locally. If the dataset is a local path, the dataset will be loaded directly from the specified path.

--output <output>

Output directory or tar.gz/zip file.

--split <split>

Dataset split to render.

Default:

'test'

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

render-trajectory

Render images from a trained model for a trajectory. The trajectory should be a JSON file obtained from the viewer (nerfbaselines viewer). The output can be a video or a directory with images. Furthermore, one or multiple outputs can be rendered (e.g., color, depth, accumulation).If multiple outputs are specified, the –output argument should contain a placeholder {output} which will be replaced with the output name and multiple files will be generated (unless the output is a directory or an archive, where all outputs can be placed to a single archive).

nerfbaselines render-trajectory [OPTIONS]

Options

--checkpoint <checkpoint>

Required Path to the checkpoint directory. It can also be a remote path (starting with http(s)://) or be a path inside a zip file.

--trajectory <trajectory>

Required Path to the trajectory JSON file.

--output <output>

Output a mp4/directory/tar.gz file. Use ‘{output}’ as a placeholder for output name.

--resolution <resolution>

Override the resolution of the output. Use ‘widthxheight’ format (e.g., 1920x1080). If one of the dimensions is negative, the aspect ratio will be preserved and the dimension will be rounded to the nearest multiple of the absolute value of the dimension.

--output-names <output_names>

Comma separated list of output types (e.g. color,depth,accumulation). See the method’s get_info()[‘supported_outputs’] for supported outputs.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

shell

Run a shell command in the backend environment. This command is useful for debugging and running custom commands in the backend environment.

nerfbaselines shell [OPTIONS] [COMMAND]...

Options

--method <method>

Required Method to use.

Options:

mip-splatting | 3dgs-mcmc | nerfonthego | colmap | nerf | zipnerf | tetra-nerf | scaffold-gs | mipnerf360 | instant-ngp | gaussian-splatting-wild | wild-gaussians | nerfacto | camp | gsplat | kplanes | tensorf | seathru-nerf | gaussian-splatting | gaussian-opacity-fields | 2d-gaussian-splatting | nerfw-reimpl

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Arguments

COMMAND

Optional argument(s)

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

test-method

nerfbaselines test-method [OPTIONS]

Options

--method <method_name>

Required Method to use

Options:

2d-gaussian-splatting | 3dgs-mcmc | camp | colmap | gaussian-opacity-fields | gaussian-splatting | gaussian-splatting-wild | gsplat | instant-ngp | kplanes | mip-splatting | mipnerf360 | nerf | nerfacto | nerfonthego | nerfw-reimpl | scaffold-gs | seathru-nerf | tensorf | tetra-nerf | wild-gaussians | zipnerf

--data <dataset>

Required

-v, --verbose
--full

Run the full method training

--steps <steps>

Number of steps to run (for initial tests, not –full)

--presets <presets>

Apply a comma-separated list of preset to the method. If no –presets is supplied, or if a special @auto preset is present, the method’s default presets are applied (based on the dataset metadata).

--set <config_overrides>

Override a parameter in the method.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

train

Train a model of a specified method on a dataset. The method is specified by the –method argument, and the dataset is specified by the –data argument. The training will periodically save checkpoints, evaluate the intermediate model on a few images, and evaluate the final model on all images. The training progress will be logged to the console and optionally to TensorBoard, Weights & Biases, or another supported logger. The final model and predictions can be saved as an output artifact which can be uploaded to the web benchmark. The training can be resumed from a checkpoint by specifying the –checkpoint argument. The method’s parameters can be overridden using the –set argument, and the method’s presets can be applied using the –presets argument. The –set and –presets arguments can be used multiple times to apply multiple overrides and presets and are specific to each method.

nerfbaselines train [OPTIONS]

Options

--method <method_name>

Required Method to use

Options:

2d-gaussian-splatting | 3dgs-mcmc | camp | colmap | gaussian-opacity-fields | gaussian-splatting | gaussian-splatting-wild | gsplat | instant-ngp | kplanes | mip-splatting | mipnerf360 | nerf | nerfacto | nerfonthego | nerfw-reimpl | scaffold-gs | seathru-nerf | tensorf | tetra-nerf | wild-gaussians | zipnerf

--checkpoint <checkpoint>

Path to a checkpoint to resume training from.

--data <data>

Required A path to the dataset to train on. The dataset can be either an external dataset (e.g., a path starting with external://{dataset}/{scene}) or a local path to a dataset. If the dataset is an external dataset, the dataset will be downloaded and cached locally. If the dataset is a local path, the dataset will be loaded directly from the specified path.

--output <output>

Output directory to save the training results

Default:

'.'

--logger <logger>

Logger to use.

Default:

'tensorboard'

Options:

none | wandb | tensorboard | wandb,tensorboard

--save-iters <save_iters>

When to save the model

Default:

-1

--eval-few-iters <eval_few_iters>

When to evaluate on few images

Default:

2000::2000

--eval-all-iters <eval_all_iters>

When to evaluate all images

Default:

-1

--disable-output-artifact

Disable producing output artifact containing final model and predictions.

--force-output-artifact

Force producing output artifact containing final model and predictions.

--set <config_overrides>

Override a parameter in the method. The argument should be in the form of –set key=value. This argument can be used multiple times to override multiple parameters. And it is specific to each method.

--presets <presets>

Apply a comma-separated list of preset to the method. If no –presets is supplied, or if a special @auto preset is present (default if no presets are specified), the method’s default presets are applied (based on the dataset metadata).

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

viewer

Start the viewer. If a checkpoint is provided, the viewer will load the model. If a data path is provided, the viewer will load the dataset. Note that even then the checkpoint is provided, providing the –data argument is still recommended as it will improve viewing experience.

nerfbaselines viewer [OPTIONS]

Options

--checkpoint <checkpoint>

Path to the checkpoint directory. It can also be a remote path (starting with http(s)://) or be a path inside a zip file.

--data <data>

A path to the dataset to load in the viewer. The dataset can be either an external dataset (e.g., a path starting with external://{dataset}/{scene}) or a local path to a dataset. If the dataset is an external dataset, the dataset will be downloaded and cached locally. If the dataset is a local path, the dataset will be loaded directly from the specified path.

--port <port>

Port to run the viewer on. Defaults to 6006.

--backend <backend_name>

The backend to use. If not specified, a supported installed backend is selected automatically. Note, the backend can be specified via the NERFBASELINES_BACKEND environment variable.

Options:

conda | docker | apptainer | python

Environment variables

NERFBASELINES_BACKEND

Provide a default for --backend

web

nerfbaselines web [OPTIONS] COMMAND [ARGS]...

build

Build the web benchmark static website.

nerfbaselines web build [OPTIONS]

Options

--data <data_path>

Path to data directory. If not provided, data is generated from the NerfBaselines repository.

--output <output>

Required Output directory.

--datasets <datasets>

List of comma separated dataset ids to include.

--base-path <base_path>

Base path for the website.

--docs <include_docs>

Whether to include the documentation page for all versions, the latest, or none.

Default:

'none'

Options:

all | latest | none

dev

Start a development server for the web benchmark. Any changes to the source code will be automatically reloaded.

nerfbaselines web dev [OPTIONS]

Options

--data <data_path>

Path to data directory. If not provided, data is generated from the NerfBaselines repository.

--datasets <datasets>

List of comma separated dataset ids to include.

--docs <include_docs>

Whether to include the documentation page for all versions, the latest, or none.

Default:

'none'

Options:

all | latest | none