From 2c79d9fe52ae2eef2887aa621ae701ef91da95b0 Mon Sep 17 00:00:00 2001 From: machenmusik Date: Wed, 22 Mar 2023 22:03:23 -0400 Subject: [PATCH] realitycapture: allow periods within filename, not only for file extension (#1649) allow periods within filename, not only for file extension --- nerfstudio/process_data/realitycapture_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nerfstudio/process_data/realitycapture_utils.py b/nerfstudio/process_data/realitycapture_utils.py index 7bc73e132..87ce9240c 100644 --- a/nerfstudio/process_data/realitycapture_utils.py +++ b/nerfstudio/process_data/realitycapture_utils.py @@ -60,7 +60,7 @@ def realitycapture_to_json( cameras.setdefault(column, []).append(value) for name in cameras["#name"]: - camera_label = name.split(".")[0] + camera_label = name.rpartition(".")[0] if camera_label in image_filename_map: img = np.array(Image.open(output_dir / image_filename_map[camera_label])) break @@ -73,7 +73,7 @@ def realitycapture_to_json( missing_image_data = 0 for i, name in enumerate(cameras["#name"]): - basename = name.split(".")[0] + basename = name.rpartition(".")[0] if basename not in image_filename_map: if verbose: CONSOLE.print(f"Missing image for camera data {basename}, Skipping")