mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
[update] one-line checking
This commit is contained in:
parent
0f65a8765e
commit
bb820a7ef4
@ -131,9 +131,7 @@ def analyze(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Anti-spoofing check
|
# Anti-spoofing check
|
||||||
if anti_spoofing:
|
if anti_spoofing and any(img_obj.get("is_real", True) is False for img_obj in img_objs):
|
||||||
for img_obj in img_objs:
|
|
||||||
if img_obj.get("is_real", True) is False:
|
|
||||||
raise ValueError("Spoof detected in the given image.")
|
raise ValueError("Spoof detected in the given image.")
|
||||||
|
|
||||||
# Prepare the input for the model
|
# Prepare the input for the model
|
||||||
|
Loading…
x
Reference in New Issue
Block a user