Skip to content

Commit

Permalink
Fix IndexError if ther is no mask filenames (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksnzh authored Dec 6, 2022
1 parent 006703b commit e605b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nerfstudio/data/dataparsers/nerfstudio_dataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _generate_dataparser_outputs(self, split="train"):

# 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
Expand Down

0 comments on commit e605b33

Please sign in to comment.