Merge pull request #696 from Vyrill/master

Add Face Confidence to Deepface.represent()
This commit is contained in:
Sefik Ilkin Serengil 2023-03-09 17:02:43 +00:00 committed by GitHub
commit 6fb20deb1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -669,7 +669,7 @@ def represent(
img_objs = [(img, img_region, 0)]
# ---------------------------------
for img, region, _ in img_objs:
for img, region, confidence in img_objs:
# custom normalization
img = functions.normalize_input(img=img, normalization=normalization)
@ -684,6 +684,7 @@ def represent(
resp_obj = {}
resp_obj["embedding"] = embedding
resp_obj["facial_area"] = region
resp_obj["face_confidence"] = confidence
resp_objs.append(resp_obj)
return resp_objs