From 66e119485df55e8786ac470ef24851da5ac82de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= <124616582+f-dy@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:16:40 +0100 Subject: [PATCH] Remove useless call to .with_suffix(""), which causes a bug if filename contains dots (#2882) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove useless call to .with_suffix(""), which causes a bug if filename contains dots Fixes https://github.com/nerfstudio-project/nerfstudio/issues/2881 --------- Co-authored-by: Frédéric Devernay --- nerfstudio/scripts/render.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nerfstudio/scripts/render.py b/nerfstudio/scripts/render.py index 27901f2c1..c67310390 100644 --- a/nerfstudio/scripts/render.py +++ b/nerfstudio/scripts/render.py @@ -804,9 +804,7 @@ class DatasetRender(BaseRender): image_name = f"{camera_idx:05d}" # Try to get the original filename - image_name = ( - dataparser_outputs.image_filenames[camera_idx].with_suffix("").relative_to(images_root) - ) + image_name = dataparser_outputs.image_filenames[camera_idx].relative_to(images_root) output_path = self.output_path / split / rendered_output_name / image_name output_path.parent.mkdir(exist_ok=True, parents=True)