[docs] model to method naming (#652)
* renamed model to methods * name change
No files matched your search
@@ -5,7 +5,7 @@ and modify all parameters from a typed CLI supported by [dcargs](https://pypi.or
|
|||||||
|
|
||||||
### Base components
|
### Base components
|
||||||
|
|
||||||
All basic, reusable config components can be found in `nerfstudio/configs/base_config.py`. The `Config` class at the bottom of the file is the upper-most config level and stores all of the sub-configs needed to get started with training.
|
All basic, reusable config components can be found in `nerfstudio/configs/base_config.py`. The `Config` class at the bottom of the file is the upper-most config level and stores all of the sub-configs needed to get started with training.
|
||||||
|
|
||||||
You can browse this file and read the attribute annotations to see what configs are available and what each specifies.
|
You can browse this file and read the attribute annotations to see what configs are available and what each specifies.
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ Let's say you want to create a new model called Nerfacto. You can create a new `
|
|||||||
:class: info
|
:class: info
|
||||||
|
|
||||||
You can then enable type/auto complete on the config passed into the `NerfactoModel` by specifying the config type below the class definition.
|
You can then enable type/auto complete on the config passed into the `NerfactoModel` by specifying the config type below the class definition.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```python
|
```python
|
||||||
"""nerfstudio/models/nerfacto.py"""
|
"""nerfstudio/models/nerfacto.py"""
|
||||||
@@ -48,18 +48,18 @@ The same logic applies to all other custom configs you want to create. For more
|
|||||||
:class: seealso
|
:class: seealso
|
||||||
|
|
||||||
For how to create the actual data and model classes that follow the configs, please refer to [pipeline overview](pipelines/index.rst).
|
For how to create the actual data and model classes that follow the configs, please refer to [pipeline overview](pipelines/index.rst).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Updating model configs
|
### Updating method configs
|
||||||
|
|
||||||
If you are interested in creating a new model config, you will have to modify the `nerfstudio/configs/model_configs.py` file. This is where all of the configs for implemented models are housed. You can browse this file to see how we construct various existing models by modifying the `Config` class and specifying new or modified default components.
|
If you are interested in creating a new model config, you will have to modify the `nerfstudio/configs/method_configs.py` file. This is where all of the configs for implemented models are housed. You can browse this file to see how we construct various existing models by modifying the `Config` class and specifying new or modified default components.
|
||||||
|
|
||||||
For instance, say we created a brand new model called Nerfacto that has an associated `NerfactoModelConfig`, we can specify the following new Config by overriding the pipeline and optimizers attributes appropriately.
|
For instance, say we created a brand new model called Nerfacto that has an associated `NerfactoModelConfig`, we can specify the following new Config by overriding the pipeline and optimizers attributes appropriately.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
"""nerfstudio/configs/model_configs.py"""
|
"""nerfstudio/configs/method_configs.py"""
|
||||||
|
|
||||||
model_configs["nerfacto"] = Config(
|
method_configs["nerfacto"] = Config(
|
||||||
method_name="nerfacto",
|
method_name="nerfacto",
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
model=NerfactoModelConfig(eval_num_rays_per_chunk=1 << 14),
|
model=NerfactoModelConfig(eval_num_rays_per_chunk=1 << 14),
|
||||||
@@ -77,39 +77,44 @@ model_configs["nerfacto"] = Config(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
After placing your new `Config` class into the `model_configs` dictionary, you can provide a description for the model by updating the `descriptions` dictionary at the top of the file.
|
After placing your new `Config` class into the `method_configs` dictionary, you can provide a description for the model by updating the `descriptions` dictionary at the top of the file.
|
||||||
|
|
||||||
|
|
||||||
### Modifying from CLI
|
### Modifying from CLI
|
||||||
|
|
||||||
Often times, you just want to play with the parameters of an existing model without having to specify a new one. You can easily do so via CLI. Below, we showcase some useful CLI commands.
|
Often times, you just want to play with the parameters of an existing model without having to specify a new one. You can easily do so via CLI. Below, we showcase some useful CLI commands.
|
||||||
|
|
||||||
- List out all existing models
|
- List out all existing models
|
||||||
```bash
|
|
||||||
ns-train --help
|
|
||||||
```
|
|
||||||
|
|
||||||
- List out all exist configurable parameters for `{MODEL_NAME}`
|
```bash
|
||||||
```bash
|
ns-train --help
|
||||||
ns-train {MODEL_NAME} --help
|
```
|
||||||
```
|
|
||||||
|
- List out all exist configurable parameters for `{METHOD_NAME}`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ns-train {METHOD_NAME} --help
|
||||||
|
```
|
||||||
|
|
||||||
- Change the train/eval dataset
|
- Change the train/eval dataset
|
||||||
```bash
|
|
||||||
ns-train {MODEL_NAME} --data DATA_PATH
|
```bash
|
||||||
```
|
ns-train {METHOD_NAME} --data DATA_PATH
|
||||||
|
```
|
||||||
|
|
||||||
- Enable the viewer
|
- Enable the viewer
|
||||||
```bash
|
|
||||||
ns-train {MODEL_NAME} --vis viewer
|
```bash
|
||||||
```
|
ns-train {METHOD_NAME} --vis viewer
|
||||||
|
```
|
||||||
|
|
||||||
- See what options are available for the specified dataparser (e.g. blender-data)
|
- See what options are available for the specified dataparser (e.g. blender-data)
|
||||||
```bash
|
|
||||||
ns-train {MODEL_NAME} {DATA_PARSER} --help
|
```bash
|
||||||
```
|
ns-train {METHOD_NAME} {DATA_PARSER} --help
|
||||||
|
```
|
||||||
|
|
||||||
- Run with changed dataparser attributes and viewer on
|
- Run with changed dataparser attributes and viewer on
|
||||||
```bash
|
```bash
|
||||||
# NOTE: the dataparser and associated configurations go at the end of the command
|
# NOTE: the dataparser and associated configurations go at the end of the command
|
||||||
ns-train {MODEL_NAME} --vis viewer {DATA_PARSER} --scale-factor 0.5
|
ns-train {METHOD_NAME} --vis viewer {DATA_PARSER} --scale-factor 0.5
|
||||||
```
|
```
|
||||||
@@ -34,11 +34,11 @@ In the following sections, we describe the Pipeline components and look at their
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
dataparsers.md
|
dataparsers
|
||||||
datamanagers.md
|
datamanagers
|
||||||
models.md
|
models
|
||||||
fields.md
|
fields
|
||||||
pipelines.md
|
pipelines
|
||||||
|
|
||||||
Implementing NeRF Papers
|
Implementing NeRF Papers
|
||||||
|
|
||||||
@@ -47,4 +47,4 @@ Let's say you want to create a custom Pipeline that has a custom DataManager and
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
creating_new_methods.ipynb
|
creating_new_methods
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
## What is a Model?
|
## What is a Model?
|
||||||
|
|
||||||
A Model is probably what you think of when you think of a NeRF paper. Often the phrases "Model" and "Method" are used interchangeably and for this reason, our [implemented models](/nerfology/models/index) are actually methods. However, most of the implementations details of a method happen in the model code, as you'll see in this section.
|
A Model is probably what you think of when you think of a NeRF paper. Often the phrases "Model" and "Method" are used interchangeably and for this reason, our implemented [Methods](/nerfology/methods/index) typically only change the model code.
|
||||||
|
|
||||||
A model, at a high level, takes in regions of space described by RayBundle objects, samples points along these rays, and returns rendered values for each ray. So, let's take a look at what it takes to create your own model!
|
A model, at a high level, takes in regions of space described by RayBundle objects, samples points along these rays, and returns rendered values for each ray. So, let's take a look at what it takes to create your own model!
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,8 @@ Contributing<reference/contributing>
|
|||||||
:hidden:
|
:hidden:
|
||||||
:caption: NeRFology
|
:caption: NeRFology
|
||||||
|
|
||||||
nerfology/models/index
|
nerfology/methods/index
|
||||||
nerfology/model_components/index
|
nerfology/model_components/index
|
||||||
nerfology/dataloader_components/index
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```{toctree}
|
```{toctree}
|
||||||
@@ -78,9 +77,9 @@ This documentation is organized into 3 parts:
|
|||||||
- **🤓 Developer Guides**: describes all of the components and additional support we provide to help you construct, train, and debug your NeRFs. Learn how to set up a model pipeline, use the viewer, create a custom config, and more.
|
- **🤓 Developer Guides**: describes all of the components and additional support we provide to help you construct, train, and debug your NeRFs. Learn how to set up a model pipeline, use the viewer, create a custom config, and more.
|
||||||
- **📚 Reference**: describes each class and function. Develop a better understanding of the core of our technology and terminology. This section includes descriptions of each module and component in the codebase.
|
- **📚 Reference**: describes each class and function. Develop a better understanding of the core of our technology and terminology. This section includes descriptions of each module and component in the codebase.
|
||||||
|
|
||||||
## Supported Models
|
## Supported Methods
|
||||||
|
|
||||||
- **Nerfacto**: our defacto NeRF model combines modules focused on quality with modules focused on faster rendering. Nerfstudio easily lets us experiment with the best of both worlds!
|
- [**Nerfacto**](https://github.com/nerfstudio-project/nerfstudio/blob/master/nerfstudio/models/nerfacto.py): our defacto NeRF method combines modules focused on quality with modules focused on faster rendering. Nerfstudio easily lets us experiment with the best of both worlds!
|
||||||
- [NeRF](https://www.matthewtancik.com/nerf): Representing Scenes as Neural Radiance Fields for View Synthesis
|
- [NeRF](https://www.matthewtancik.com/nerf): Representing Scenes as Neural Radiance Fields for View Synthesis
|
||||||
- [Instant NGP](https://nvlabs.github.io/instant-ngp/): Instant Neural Graphics Primitives with a Multiresolution Hash Encoding
|
- [Instant NGP](https://nvlabs.github.io/instant-ngp/): Instant Neural Graphics Primitives with a Multiresolution Hash Encoding
|
||||||
- [Mipnerf-360](https://jonbarron.info/mipnerf360/): Unbounded Anti-Aliased Neural Radiance Fields
|
- [Mipnerf-360](https://jonbarron.info/mipnerf360/): Unbounded Anti-Aliased Neural Radiance Fields
|
||||||
@@ -91,7 +90,7 @@ This documentation is organized into 3 parts:
|
|||||||
|
|
||||||
We'll be constantly growing this list! So make sure to check back in to see our updates.
|
We'll be constantly growing this list! So make sure to check back in to see our updates.
|
||||||
|
|
||||||
**Eager to contribute?** We'd love to see you use nerfstudio in implementing new (or even existing) models! Feel free to contact us directly or view our [Contributor's Guide](reference/contributing) to see how you can get your model on this list!
|
**Eager to contribute?** We'd love to see you use nerfstudio in implementing new (or even existing) methods! Feel free to contact us directly or view our [Contributor's Guide](reference/contributing) to see how you can get your model on this list!
|
||||||
|
|
||||||
## Quicklinks
|
## Quicklinks
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"cell_type": "markdown",
|
|
||||||
"metadata": {},
|
|
||||||
"source": [
|
|
||||||
"# Incrementally Add Cameras"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"kernelspec": {
|
|
||||||
"display_name": "Python 3.8.13 ('nerfactory')",
|
|
||||||
"language": "python",
|
|
||||||
"name": "python3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"codemirror_mode": {
|
|
||||||
"name": "ipython",
|
|
||||||
"version": 3
|
|
||||||
},
|
|
||||||
"file_extension": ".py",
|
|
||||||
"mimetype": "text/x-python",
|
|
||||||
"name": "python",
|
|
||||||
"nbconvert_exporter": "python",
|
|
||||||
"pygments_lexer": "ipython3",
|
|
||||||
"version": "3.8.13"
|
|
||||||
},
|
|
||||||
"orig_nbformat": 4,
|
|
||||||
"vscode": {
|
|
||||||
"interpreter": {
|
|
||||||
"hash": "e691f033e0f2f1b9c0a11e7e81375a1e27aec87a71fd1b1eaa545f7a5e61b3f6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 2
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Dataloader Components
|
|
||||||
|
|
||||||
Here we show how flexible our Dataloader can be with a series of dataloading guides.
|
|
||||||
|
|
||||||
```{toctree}
|
|
||||||
:maxdepth: 1
|
|
||||||
Pixel Sampling Stategies<pixel_sampling_strategies.ipynb>
|
|
||||||
Incrementally Add Cameras<incrementally_add_cameras.ipynb>
|
|
||||||
```
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"cell_type": "markdown",
|
|
||||||
"metadata": {},
|
|
||||||
"source": [
|
|
||||||
"# Pixel Sampling Strategies"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"metadata": {
|
|
||||||
"kernelspec": {
|
|
||||||
"display_name": "Python 3.8.13 ('nerfactory')",
|
|
||||||
"language": "python",
|
|
||||||
"name": "python3"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"name": "python",
|
|
||||||
"version": "3.8.13"
|
|
||||||
},
|
|
||||||
"orig_nbformat": 4,
|
|
||||||
"vscode": {
|
|
||||||
"interpreter": {
|
|
||||||
"hash": "e691f033e0f2f1b9c0a11e7e81375a1e27aec87a71fd1b1eaa545f7a5e61b3f6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 2
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,30 @@
|
|||||||
|
# Methods
|
||||||
|
|
||||||
|
We provide a set of pre implemented nerfstudio methods. One of the goals of nerfstudio is to modularize the various NeRF techniques as much as possible. As a result, many of the techniques from these pre-implemented methods can be mixed.
|
||||||
|
|
||||||
|
## Running a method
|
||||||
|
|
||||||
|
It's easy!
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ns-train METHOD_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
To list the available methods run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ns-train --help
|
||||||
|
```
|
||||||
|
|
||||||
|
## Guides
|
||||||
|
|
||||||
|
In addition to their implementations, we have provided guides that walk through each of these method.
|
||||||
|
|
||||||
|
```{toctree}
|
||||||
|
:maxdepth: 1
|
||||||
|
NeRF<nerf.md>
|
||||||
|
Mip-NeRF<mipnerf.md>
|
||||||
|
Nerfacto<nerfacto.md>
|
||||||
|
Instant-NGP<instant_ngp.md>
|
||||||
|
Semantic NeRF-W<semantic_nerfw.md>
|
||||||
|
```
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Nerfacto
|
||||||
|
|
||||||
|
<h4>Our *defacto* method.</h4>
|
||||||
|
|
||||||
|
### Running the Method
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ns-train nerfacto --help
|
||||||
|
```
|
||||||
|
|
||||||
|
## Method
|
||||||
|
|
||||||
|
### Overview
|
||||||
|
|
||||||
|
```{admonition} Note
|
||||||
|
This guide is coming soon. This is our flagship method that we encourage creators to use when making videos. It uses techniques from [Mip-NeRF 360](https://jonbarron.info/mipnerf360/) and [Instant-NGP](https://nvlabs.github.io/instant-ngp/).
|
||||||
|
```
|
||||||
|
|
||||||
|
Most of the code for this method takes place in the `NerfactoModel` class.
|
||||||
|
|
||||||
|
```{button-link} https://www.matthewtancik.com/nerf
|
||||||
|
:color: primary
|
||||||
|
:outline:
|
||||||
|
See the code!
|
||||||
|
```
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# Models
|
|
||||||
|
|
||||||
We provide a set of pre implemented nerfstudio models. One of the goals of nerfstudio is to modularize the various NeRF techniques as much as possible. As a result, many of the techniques from these pre-implemented models can be mixed.
|
|
||||||
|
|
||||||
## Running a model
|
|
||||||
|
|
||||||
It's easy!
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ns-train MODEL_NAME
|
|
||||||
```
|
|
||||||
|
|
||||||
To list the available models run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ns-train --help
|
|
||||||
```
|
|
||||||
|
|
||||||
## Guides
|
|
||||||
|
|
||||||
In addition to their implementations, we have provided guides that walk through each of these method.
|
|
||||||
|
|
||||||
```{toctree}
|
|
||||||
:maxdepth: 1
|
|
||||||
NeRF<nerf>
|
|
||||||
Mip-NeRF<mipnerf>
|
|
||||||
Mip-NeRF 360<mipnerf_360>
|
|
||||||
Instant-NGP<instant_ngp>
|
|
||||||
Semantic NeRF-W<semantic_nerfw>
|
|
||||||
```
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# Mip-NeRF 360
|
|
||||||
|
|
||||||
<h4>Unbounded Anti-Aliased Neural Radiance Fields</h4>
|
|
||||||
|
|
||||||
```{button-link} https://jonbarron.info/mipnerf360/
|
|
||||||
:color: primary
|
|
||||||
:outline:
|
|
||||||
Paper Website
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running Model
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python scripts/train.py --config-name=graph_mipnerf_360.yaml
|
|
||||||
```
|
|
||||||
@@ -41,7 +41,7 @@ from nerfstudio.models.vanilla_nerf import NeRFModel
|
|||||||
from nerfstudio.pipelines.base_pipeline import VanillaPipelineConfig
|
from nerfstudio.pipelines.base_pipeline import VanillaPipelineConfig
|
||||||
from nerfstudio.pipelines.dynamic_batch import DynamicBatchPipelineConfig
|
from nerfstudio.pipelines.dynamic_batch import DynamicBatchPipelineConfig
|
||||||
|
|
||||||
model_configs: Dict[str, Config] = {}
|
method_configs: Dict[str, Config] = {}
|
||||||
descriptions = {
|
descriptions = {
|
||||||
"nerfacto": "[bold green]Recommended[/bold green] Real-time model tuned for real captures. "
|
"nerfacto": "[bold green]Recommended[/bold green] Real-time model tuned for real captures. "
|
||||||
+ "This model will be continually updated.",
|
+ "This model will be continually updated.",
|
||||||
@@ -53,7 +53,7 @@ descriptions = {
|
|||||||
"tensorf": "Fast model designed for bounded scenes.",
|
"tensorf": "Fast model designed for bounded scenes.",
|
||||||
}
|
}
|
||||||
|
|
||||||
model_configs["nerfacto"] = Config(
|
method_configs["nerfacto"] = Config(
|
||||||
method_name="nerfacto",
|
method_name="nerfacto",
|
||||||
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
@@ -76,7 +76,7 @@ model_configs["nerfacto"] = Config(
|
|||||||
vis="viewer",
|
vis="viewer",
|
||||||
)
|
)
|
||||||
|
|
||||||
model_configs["instant-ngp"] = Config(
|
method_configs["instant-ngp"] = Config(
|
||||||
method_name="instant-ngp",
|
method_name="instant-ngp",
|
||||||
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
||||||
pipeline=DynamicBatchPipelineConfig(
|
pipeline=DynamicBatchPipelineConfig(
|
||||||
@@ -93,7 +93,7 @@ model_configs["instant-ngp"] = Config(
|
|||||||
vis="viewer",
|
vis="viewer",
|
||||||
)
|
)
|
||||||
|
|
||||||
model_configs["mipnerf-360"] = Config(
|
method_configs["mipnerf-360"] = Config(
|
||||||
method_name="mipnerf-360",
|
method_name="mipnerf-360",
|
||||||
trainer=TrainerConfig(steps_per_eval_batch=200),
|
trainer=TrainerConfig(steps_per_eval_batch=200),
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
@@ -115,7 +115,7 @@ model_configs["mipnerf-360"] = Config(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
model_configs["mipnerf"] = Config(
|
method_configs["mipnerf"] = Config(
|
||||||
method_name="mipnerf",
|
method_name="mipnerf",
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
datamanager=VanillaDataManagerConfig(dataparser=BlenderDataParserConfig(), train_num_rays_per_batch=8192),
|
datamanager=VanillaDataManagerConfig(dataparser=BlenderDataParserConfig(), train_num_rays_per_batch=8192),
|
||||||
@@ -135,7 +135,7 @@ model_configs["mipnerf"] = Config(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
model_configs["semantic-nerfw"] = Config(
|
method_configs["semantic-nerfw"] = Config(
|
||||||
method_name="semantic-nerfw",
|
method_name="semantic-nerfw",
|
||||||
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
trainer=TrainerConfig(steps_per_eval_batch=500, steps_per_save=2000, mixed_precision=True),
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
@@ -158,7 +158,7 @@ model_configs["semantic-nerfw"] = Config(
|
|||||||
vis="viewer",
|
vis="viewer",
|
||||||
)
|
)
|
||||||
|
|
||||||
model_configs["vanilla-nerf"] = Config(
|
method_configs["vanilla-nerf"] = Config(
|
||||||
method_name="vanilla-nerf",
|
method_name="vanilla-nerf",
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
datamanager=VanillaDataManagerConfig(
|
datamanager=VanillaDataManagerConfig(
|
||||||
@@ -174,7 +174,7 @@ model_configs["vanilla-nerf"] = Config(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
model_configs["tensorf"] = Config(
|
method_configs["tensorf"] = Config(
|
||||||
method_name="tensorf",
|
method_name="tensorf",
|
||||||
trainer=TrainerConfig(mixed_precision=True),
|
trainer=TrainerConfig(mixed_precision=True),
|
||||||
pipeline=VanillaPipelineConfig(
|
pipeline=VanillaPipelineConfig(
|
||||||
@@ -201,7 +201,7 @@ model_configs["tensorf"] = Config(
|
|||||||
|
|
||||||
|
|
||||||
AnnotatedBaseConfigUnion = dcargs.extras.subcommand_type_from_defaults(
|
AnnotatedBaseConfigUnion = dcargs.extras.subcommand_type_from_defaults(
|
||||||
defaults=model_configs, descriptions=descriptions
|
defaults=method_configs, descriptions=descriptions
|
||||||
)
|
)
|
||||||
"""Union[] type over config types, annotated with default instances for use with
|
"""Union[] type over config types, annotated with default instances for use with
|
||||||
dcargs.cli(). Allows the user to pick between one of several base configurations, and
|
dcargs.cli(). Allows the user to pick between one of several base configurations, and
|
||||||
@@ -20,7 +20,7 @@ import torch.multiprocessing as mp
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from nerfstudio.configs import base_config as cfg
|
from nerfstudio.configs import base_config as cfg
|
||||||
from nerfstudio.configs.model_configs import AnnotatedBaseConfigUnion
|
from nerfstudio.configs.method_configs import AnnotatedBaseConfigUnion
|
||||||
from nerfstudio.engine.trainer import train_loop
|
from nerfstudio.engine.trainer import train_loop
|
||||||
from nerfstudio.utils import comms, profiler
|
from nerfstudio.utils import comms, profiler
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from pathlib import Path
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from nerfstudio.configs.base_config import Config
|
from nerfstudio.configs.base_config import Config
|
||||||
from nerfstudio.configs.model_configs import model_configs
|
from nerfstudio.configs.method_configs import method_configs
|
||||||
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
|
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
|
||||||
from nerfstudio.engine.trainer import train_loop
|
from nerfstudio.engine.trainer import train_loop
|
||||||
|
|
||||||
@@ -48,13 +48,13 @@ def set_reduced_config(config: Config):
|
|||||||
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
|
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
|
||||||
def test_train():
|
def test_train():
|
||||||
"""test run train script works properly"""
|
"""test run train script works properly"""
|
||||||
all_config_names = model_configs.keys()
|
all_config_names = method_configs.keys()
|
||||||
for config_name in all_config_names:
|
for config_name in all_config_names:
|
||||||
if config_name in BLACKLIST:
|
if config_name in BLACKLIST:
|
||||||
print("skipping", config_name)
|
print("skipping", config_name)
|
||||||
continue
|
continue
|
||||||
print(f"testing run for: {config_name}")
|
print(f"testing run for: {config_name}")
|
||||||
config = model_configs[config_name]
|
config = method_configs[config_name]
|
||||||
config = set_reduced_config(config)
|
config = set_reduced_config(config)
|
||||||
|
|
||||||
train_loop(local_rank=0, world_size=0, config=config)
|
train_loop(local_rank=0, world_size=0, config=config)
|
||||||
|
|||||||