Improvement: check image exists first

This commit is contained in:
kremnik 2024-09-02 18:20:51 +03:00
parent d3200c259e
commit b2e3d8d21a

View File

@ -100,6 +100,10 @@ def find(
if not os.path.isdir(db_path):
raise ValueError(f"Passed path {db_path} does not exist!")
img, _ = image_utils.load_image(img_path)
if img is None:
raise ValueError(f"Passed image path {img_path} does not exist!")
file_parts = [
"ds",
"model",