Skip to content

Commit

Permalink
Moved Volinga as an external method (nerfstudio-project#2282)
Browse files Browse the repository at this point in the history
* Moved Volinga as an external method

* Update external_methods.py for black

* Formatted with black

---------

Co-authored-by: jperezh <jperezh@arquimea.com>
  • Loading branch information
Frivas97 and Cjperezh authored Jul 31, 2023
1 parent ce6b9bd commit e6cd951
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 49 deletions.
7 changes: 1 addition & 6 deletions docs/extensions/unreal_engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@

NeRFStudio models can be used in Unreal Engine if they are converted to an NVOL file. NVOL is a new standard file format to store NeRFs in a fast and efficient way. NVOL files can be obtained from NeRFStudio checkpoints files (.ckpt) using the [Volinga Suite](https://volinga.ai/).

:::{admonition} Note
:class: warning
Volinga Suite is not yet publicly available. If you are interested in converting your models to NVOL, sign up for the beta at [volinga.ai](https://volinga.ai).
:::


## Exporting your model to NVOL
Currently NVOL file only supports Volinga model (which is based on nerfacto). You can train your model using the following command:
Currently NVOL file only supports Volinga model (which is based on nerfacto). To use Volinga model you will need to install [Volinga extension for NeRFStudio](https://github.com/Volinga/volinga-model). You can train your model using the following command:

```bash
ns-train volinga --data /path/to/your/data --vis viewer
Expand Down
18 changes: 18 additions & 0 deletions nerfstudio/configs/external_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@ class ExternalMethod:
)
)

# Volinga
external_methods.append(
ExternalMethod(
"""[bold yellow]Volinga[/bold yellow]
For more information visit: https://docs.nerf.studio/en/latest/extensions/unreal_engine.html
To enable Volinga, you must install it first by running:
[grey]pip install git+https://github.com/Volinga/volinga-model[/grey]""",
configurations=[
(
"volinga",
"Real-time rendering model from Volinga. Directly exportable to NVOL format at https://volinga.ai/",
),
],
pip_package="git+https://github.com/Volinga/volinga-model",
)
)


@dataclass
class ExternalMethodTrainerConfig(TrainerConfig):
Expand Down
42 changes: 0 additions & 42 deletions nerfstudio/configs/method_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
descriptions = {
"nerfacto": "Recommended real-time model tuned for real captures. This model will be continually updated.",
"depth-nerfacto": "Nerfacto with depth supervision.",
"volinga": "Real-time rendering model from Volinga. Directly exportable to NVOL format at https://volinga.ai/",
"instant-ngp": "Implementation of Instant-NGP. Recommended real-time model for unbounded scenes.",
"instant-ngp-bounded": "Implementation of Instant-NGP. Recommended for bounded real and synthetic scenes",
"mipnerf": "High quality model for bounded scenes. (slow)",
Expand Down Expand Up @@ -233,47 +232,6 @@
vis="viewer",
)

method_configs["volinga"] = TrainerConfig(
method_name="volinga",
steps_per_eval_batch=500,
steps_per_save=2000,
max_num_iterations=30000,
mixed_precision=True,
pipeline=VanillaPipelineConfig(
datamanager=VanillaDataManagerConfig(
dataparser=NerfstudioDataParserConfig(),
train_num_rays_per_batch=4096,
eval_num_rays_per_batch=4096,
camera_optimizer=CameraOptimizerConfig(
mode="SO3xR3", optimizer=AdamOptimizerConfig(lr=6e-4, eps=1e-8, weight_decay=1e-2)
),
),
model=NerfactoModelConfig(
eval_num_rays_per_chunk=1 << 15,
hidden_dim=32,
hidden_dim_color=32,
hidden_dim_transient=32,
num_nerf_samples_per_ray=24,
proposal_net_args_list=[
{"hidden_dim": 16, "log2_hashmap_size": 17, "num_levels": 5, "max_res": 128, "use_linear": True},
{"hidden_dim": 16, "log2_hashmap_size": 17, "num_levels": 5, "max_res": 256, "use_linear": True},
],
),
),
optimizers={
"proposal_networks": {
"optimizer": AdamOptimizerConfig(lr=1e-2, eps=1e-15),
"scheduler": None,
},
"fields": {
"optimizer": AdamOptimizerConfig(lr=1e-2, eps=1e-15),
"scheduler": None,
},
},
viewer=ViewerConfig(num_rays_per_chunk=1 << 15),
vis="viewer",
)

method_configs["instant-ngp"] = TrainerConfig(
method_name="instant-ngp",
steps_per_eval_batch=500,
Expand Down
1 change: 0 additions & 1 deletion tests/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"instant-ngp",
"instant-ngp-bounded",
"nerfacto-big",
"volinga",
"phototourism",
"depth-nerfacto",
"neus",
Expand Down

0 comments on commit e6cd951

Please sign in to comment.