mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
exception handling for bulk representations
This commit is contained in:
parent
91f5b448ee
commit
91a220335a
@ -354,15 +354,21 @@ def __find_bulk_embeddings(
|
|||||||
desc="Finding representations",
|
desc="Finding representations",
|
||||||
disable=silent,
|
disable=silent,
|
||||||
):
|
):
|
||||||
img_objs = detection.extract_faces(
|
try:
|
||||||
img_path=employee,
|
img_objs = detection.extract_faces(
|
||||||
target_size=target_size,
|
img_path=employee,
|
||||||
detector_backend=detector_backend,
|
target_size=target_size,
|
||||||
grayscale=False,
|
detector_backend=detector_backend,
|
||||||
enforce_detection=enforce_detection,
|
grayscale=False,
|
||||||
align=align,
|
enforce_detection=enforce_detection,
|
||||||
expand_percentage=expand_percentage,
|
align=align,
|
||||||
)
|
expand_percentage=expand_percentage,
|
||||||
|
)
|
||||||
|
except ValueError as err:
|
||||||
|
logger.warn(
|
||||||
|
f"Exception while extracting faces from {employee}: {str(err)}. Skipping it."
|
||||||
|
)
|
||||||
|
img_objs = []
|
||||||
|
|
||||||
for img_obj in img_objs:
|
for img_obj in img_objs:
|
||||||
img_content = img_obj["face"]
|
img_content = img_obj["face"]
|
||||||
|
BIN
tests/dataset/img39.jpg
Normal file
BIN
tests/dataset/img39.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 776 KiB |
Loading…
x
Reference in New Issue
Block a user