4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

realitycapture: allow periods within filename, not only for file extension (#1649)

allow periods within filename, not only for file extension
This commit is contained in:
machenmusik 2023-03-22 22:03:23 -04:00 committed by GitHub
parent 9b99802042
commit 2c79d9fe52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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