From 3e005815ccfa8e110039dbf71e3b3641445335fa Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Sat, 25 Feb 2023 22:54:49 -0800 Subject: [PATCH] Check that video path is correct (#1513) --- nerfstudio/process_data/process_data_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nerfstudio/process_data/process_data_utils.py b/nerfstudio/process_data/process_data_utils.py index 31456d94a..6b94bbaa9 100644 --- a/nerfstudio/process_data/process_data_utils.py +++ b/nerfstudio/process_data/process_data_utils.py @@ -113,6 +113,13 @@ def convert_video_to_images( A tuple containing summary of the conversion and the number of extracted frames. """ + if video_path.is_dir(): + CONSOLE.print(f"[bold red]Error: Video path is a directory, not a path: {video_path}") + sys.exit(1) + if video_path.exists() is False: + CONSOLE.print(f"[bold red]Error: Video does not exist: {video_path}") + sys.exit(1) + with status(msg="Converting video to images...", spinner="bouncingBall", verbose=verbose): # delete existing images in folder for img in image_dir.glob("*.png"):