mirror of
https://github.com/serengil/deepface.git
synced 2025-06-09 04:55:24 +00:00
resolving issue 1099
This commit is contained in:
parent
9705e6f4ef
commit
ec4c3cd17c
@ -100,12 +100,9 @@ class YuNetClient(Detector):
|
|||||||
left eye, nose tip, the right corner and left corner of the mouth respectively.
|
left eye, nose tip, the right corner and left corner of the mouth respectively.
|
||||||
"""
|
"""
|
||||||
(x, y, w, h, x_re, y_re, x_le, y_le) = list(map(int, face[:8]))
|
(x, y, w, h, x_re, y_re, x_le, y_le) = list(map(int, face[:8]))
|
||||||
left_eye = (x_re, y_re)
|
|
||||||
right_eye = (x_le, y_le)
|
|
||||||
|
|
||||||
# Yunet returns negative coordinates if it thinks part of
|
# YuNet returns negative coordinates if it thinks part of the detected face
|
||||||
# the detected face is outside the frame.
|
# is outside the frame.
|
||||||
# We set the coordinate to 0 if they are negative.
|
|
||||||
x = max(x, 0)
|
x = max(x, 0)
|
||||||
y = max(y, 0)
|
y = max(y, 0)
|
||||||
if resized:
|
if resized:
|
||||||
@ -124,8 +121,8 @@ class YuNetClient(Detector):
|
|||||||
w=w,
|
w=w,
|
||||||
h=h,
|
h=h,
|
||||||
confidence=confidence,
|
confidence=confidence,
|
||||||
left_eye=left_eye,
|
left_eye=(x_re, y_re),
|
||||||
right_eye=right_eye,
|
right_eye=(x_le, y_le),
|
||||||
)
|
)
|
||||||
resp.append(facial_area)
|
resp.append(facial_area)
|
||||||
return resp
|
return resp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user