mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 20:15:21 +00:00
Merge pull request #1334 from kremnik/checkimagefirst
Improvement: check image exists first
This commit is contained in:
commit
9d15881ddb
@ -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