Missing images error warning (#1122)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-12-13 13:24:22 -08:00
1 parent 96f269cc1a
commit c8daa1a1d7
1 file changed
+4
@@ -167,6 +167,10 @@ def copy_images(data: Path, image_dir: Path, verbose) -> int:
allowed_exts = [".jpg", ".jpeg", ".png", ".tif", ".tiff"]
image_paths = sorted([p for p in data.glob("[!.]*") if p.suffix.lower() in allowed_exts])
if len(image_paths) == 0:
CONSOLE.log("[bold red]:skull: No usable images in the data folder.")
sys.exit(1)
num_frames = len(copy_images_list(image_paths, image_dir, verbose))
return num_frames