From 3cb1f0d54b757e19ed4245897a091409457623b8 Mon Sep 17 00:00:00 2001 From: Fernando Rivas-Manzaneque Date: Mon, 31 Jul 2023 10:56:47 +0100 Subject: [PATCH 1/3] Moved Volinga as an external method --- docs/extensions/unreal_engine.md | 7 +---- nerfstudio/configs/external_methods.py | 15 +++++++++ nerfstudio/configs/method_configs.py | 42 -------------------------- tests/test_train.py | 1 - 4 files changed, 16 insertions(+), 49 deletions(-) diff --git a/docs/extensions/unreal_engine.md b/docs/extensions/unreal_engine.md index f533f2a56b..1fa523a0d9 100644 --- a/docs/extensions/unreal_engine.md +++ b/docs/extensions/unreal_engine.md @@ -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 diff --git a/nerfstudio/configs/external_methods.py b/nerfstudio/configs/external_methods.py index 4b7433969c..0b6a0fb824 100644 --- a/nerfstudio/configs/external_methods.py +++ b/nerfstudio/configs/external_methods.py @@ -121,6 +121,21 @@ 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): diff --git a/nerfstudio/configs/method_configs.py b/nerfstudio/configs/method_configs.py index 428f91d01a..72e4f20c8d 100644 --- a/nerfstudio/configs/method_configs.py +++ b/nerfstudio/configs/method_configs.py @@ -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)", @@ -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, diff --git a/tests/test_train.py b/tests/test_train.py index d5d25c141a..9b95068f91 100644 --- a/tests/test_train.py +++ b/tests/test_train.py @@ -21,7 +21,6 @@ "instant-ngp", "instant-ngp-bounded", "nerfacto-big", - "volinga", "phototourism", "depth-nerfacto", "neus", From 9415aff3eb61e5e3d5ac2db5880edcbee6b297ba Mon Sep 17 00:00:00 2001 From: Fernando Rivas-Manzaneque <98962882+Frivas97@users.noreply.github.com> Date: Mon, 31 Jul 2023 11:34:52 +0100 Subject: [PATCH 2/3] Update external_methods.py for black --- nerfstudio/configs/external_methods.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nerfstudio/configs/external_methods.py b/nerfstudio/configs/external_methods.py index 0b6a0fb824..7bbd5fc120 100644 --- a/nerfstudio/configs/external_methods.py +++ b/nerfstudio/configs/external_methods.py @@ -136,7 +136,6 @@ class ExternalMethod: ) ) - @dataclass class ExternalMethodTrainerConfig(TrainerConfig): """ From d4b6fbd2bb14a00c893edc27357c0c1c44ce1182 Mon Sep 17 00:00:00 2001 From: jperezh Date: Mon, 31 Jul 2023 11:51:02 +0100 Subject: [PATCH 3/3] Formatted with black --- nerfstudio/configs/external_methods.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nerfstudio/configs/external_methods.py b/nerfstudio/configs/external_methods.py index 7bbd5fc120..6a0c78b099 100644 --- a/nerfstudio/configs/external_methods.py +++ b/nerfstudio/configs/external_methods.py @@ -130,12 +130,16 @@ class ExternalMethod: 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/"), + ( + "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): """