Fix IndexError if ther is no mask filenames (#1095)

This commit is contained in:
ksnzh authored and GitHub committed 2022-12-05 22:10:55 -08:00
1 parent 006703bb64
commit e605b3344a
1 file changed
+1 -1
@@ -196,7 +196,7 @@ class Nerfstudio(DataParser):
# Choose image_filenames and poses based on split, but after auto orient and scaling the poses.
image_filenames = [image_filenames[i] for i in indices]
mask_filenames = [mask_filenames[i] for i in indices]
mask_filenames = [mask_filenames[i] for i in indices] if len(mask_filenames) > 0 else []
poses = poses[indices]
# in x,y,z order