mirror of
https://github.com/serengil/deepface.git
synced 2025-06-08 20:45:22 +00:00
bug fix in case of load image returns none
This commit is contained in:
parent
ab38a1fcf7
commit
0d18a7c2df
@ -76,6 +76,9 @@ def extract_faces(
|
|||||||
# img might be path, base64 or numpy array. Convert it to numpy whatever it is.
|
# img might be path, base64 or numpy array. Convert it to numpy whatever it is.
|
||||||
img, img_name = preprocessing.load_image(img_path)
|
img, img_name = preprocessing.load_image(img_path)
|
||||||
|
|
||||||
|
if img is None:
|
||||||
|
raise ValueError(f"Exception while loading {img_name}")
|
||||||
|
|
||||||
base_region = FacialAreaRegion(x=0, y=0, w=img.shape[1], h=img.shape[0], confidence=0)
|
base_region = FacialAreaRegion(x=0, y=0, w=img.shape[1], h=img.shape[0], confidence=0)
|
||||||
|
|
||||||
if detector_backend == "skip":
|
if detector_backend == "skip":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user