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,6 +354,7 @@ def __find_bulk_embeddings(
|
||||
desc="Finding representations",
|
||||
disable=silent,
|
||||
):
|
||||
try:
|
||||
img_objs = detection.extract_faces(
|
||||
img_path=employee,
|
||||
target_size=target_size,
|
||||
@ -363,6 +364,11 @@ def __find_bulk_embeddings(
|
||||
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:
|
||||
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