From df57a8db725927bfede1e7a8eccb618806ad8408 Mon Sep 17 00:00:00 2001 From: Zhensheng Yuan <564361+yzslab@users.noreply.github.com> Date: Sat, 29 Jun 2024 00:31:26 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20different=20initial=20tension=20value=20b?= =?UTF-8?q?etween=20`tension=5Fslider`=20and=20`cam=E2=80=A6=20(#3271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix different initial tension value between `tension_slider` and `camera_path.tension` * Fix ruff check --- nerfstudio/configs/method_configs.py | 2 -- nerfstudio/viewer/render_panel.py | 1 + tests/pipelines/test_vanilla_pipeline.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nerfstudio/configs/method_configs.py b/nerfstudio/configs/method_configs.py index 87912a272..ce54a35a3 100644 --- a/nerfstudio/configs/method_configs.py +++ b/nerfstudio/configs/method_configs.py @@ -301,8 +301,6 @@ method_configs["instant-ngp-bounded"] = TrainerConfig( viewer=ViewerConfig(num_rays_per_chunk=1 << 12), vis="viewer", ) -# -# method_configs["mipnerf"] = TrainerConfig( method_name="mipnerf", pipeline=VanillaPipelineConfig( diff --git a/nerfstudio/viewer/render_panel.py b/nerfstudio/viewer/render_panel.py index 4cfe380d9..8ac9a09ca 100644 --- a/nerfstudio/viewer/render_panel.py +++ b/nerfstudio/viewer/render_panel.py @@ -1166,6 +1166,7 @@ def populate_render_tab( camera_path = CameraPath(server, duration_number, control_panel._time_enabled) else: camera_path = CameraPath(server, duration_number) + camera_path.tension = tension_slider.value camera_path.default_fov = fov_degrees.value / 180.0 * np.pi camera_path.default_transition_sec = transition_sec_number.value diff --git a/tests/pipelines/test_vanilla_pipeline.py b/tests/pipelines/test_vanilla_pipeline.py index 322c67b16..5e0ef367e 100644 --- a/tests/pipelines/test_vanilla_pipeline.py +++ b/tests/pipelines/test_vanilla_pipeline.py @@ -42,7 +42,7 @@ def test_load_state_dict(): """Test pipeline load_state_dict calls model's load_state_dict""" was_called = False - class MockedModel(Model): # + class MockedModel(Model): """Mocked model""" def __init__(self, *args, **kwargs):