Check is metashape xml is present (#1044)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-11-28 16:39:09 -08:00
1 parent 6c805b6d33
commit 666b43a577
1 file changed
+5
+5
View File
@@ -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)