mirror of
https://github.com/serengil/deepface.git
synced 2025-07-22 18:00:02 +00:00
Improvement: check image exists first
This commit is contained in:
parent
d3200c259e
commit
b2e3d8d21a
@ -100,6 +100,10 @@ def find(
|
|||||||
if not os.path.isdir(db_path):
|
if not os.path.isdir(db_path):
|
||||||
raise ValueError(f"Passed path {db_path} does not exist!")
|
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 = [
|
file_parts = [
|
||||||
"ds",
|
"ds",
|
||||||
"model",
|
"model",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user