From 7265cb63afae1e2be9d03bb082a6059e5965c13f Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Sun, 4 Dec 2022 16:47:52 -0800 Subject: [PATCH] Metashape parsing fix (#1084) --- nerfstudio/process_data/metashape_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nerfstudio/process_data/metashape_utils.py b/nerfstudio/process_data/metashape_utils.py index 95cfbad77..4b5e60ba5 100644 --- a/nerfstudio/process_data/metashape_utils.py +++ b/nerfstudio/process_data/metashape_utils.py @@ -94,9 +94,10 @@ def metashape_to_json( # pylint: disable=too-many-statements for camera in cameras: frame = {} # Labels sometimes have a file extension. We remove it for consistency. - if camera.get("label").split(".")[0] not in image_filename_map: # type: ignore + camera_label = camera.get("label").split(".")[0] # type: ignore + if camera_label not in image_filename_map: continue - frame["file_path"] = image_filename_map[camera.get("label")].as_posix() # type: ignore + frame["file_path"] = image_filename_map[camera_label].as_posix() if camera.find("transform") is None: if verbose: CONSOLE.print(f"Missing transforms data for {camera.get('label')}, Skipping")