Skip to content

Commit

Permalink
Check is metashape xml is present (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
tancik authored Nov 29, 2022
1 parent 6c805b6 commit 666b43a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,11 @@ class ProcessMetashape:
def main(self) -> None:
"""Process images into a nerfstudio dataset."""

if self.xml.suffix != ".xml":
raise ValueError(f"XML file {self.xml} must have a .xml extension")
if not self.xml.exists:
raise ValueError(f"XML file {self.xml} doesn't exist")

self.output_dir.mkdir(parents=True, exist_ok=True)
image_dir = self.output_dir / "images"
image_dir.mkdir(parents=True, exist_ok=True)
Expand Down

0 comments on commit 666b43a

Please sign in to comment.