From 666b43a5772f8c9419444175ed117005dcb8458f Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Mon, 28 Nov 2022 16:39:09 -0800 Subject: [PATCH] Check is metashape xml is present (#1044) --- scripts/process_data.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/process_data.py b/scripts/process_data.py index da2b95d30..0b8240008 100755 --- a/scripts/process_data.py +++ b/scripts/process_data.py @@ -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)