4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 10:34:29 +08:00

Metashape parsing fix (#1084)

This commit is contained in:
Matthew Tancik 2022-12-04 16:47:52 -08:00 committed by GitHub
parent 740cdebbb5
commit 7265cb63af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")