mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Merge pull request #696 from Vyrill/master
Add Face Confidence to Deepface.represent()
This commit is contained in:
commit
6fb20deb1f
@ -669,7 +669,7 @@ def represent(
|
|||||||
img_objs = [(img, img_region, 0)]
|
img_objs = [(img, img_region, 0)]
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
|
|
||||||
for img, region, _ in img_objs:
|
for img, region, confidence in img_objs:
|
||||||
# custom normalization
|
# custom normalization
|
||||||
img = functions.normalize_input(img=img, normalization=normalization)
|
img = functions.normalize_input(img=img, normalization=normalization)
|
||||||
|
|
||||||
@ -684,6 +684,7 @@ def represent(
|
|||||||
resp_obj = {}
|
resp_obj = {}
|
||||||
resp_obj["embedding"] = embedding
|
resp_obj["embedding"] = embedding
|
||||||
resp_obj["facial_area"] = region
|
resp_obj["facial_area"] = region
|
||||||
|
resp_obj["face_confidence"] = confidence
|
||||||
resp_objs.append(resp_obj)
|
resp_objs.append(resp_obj)
|
||||||
|
|
||||||
return resp_objs
|
return resp_objs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user