mirror of
https://github.com/serengil/deepface.git
synced 2025-06-10 13:27:08 +00:00
previous code
This commit is contained in:
parent
71ffe92186
commit
3485c348bc
@ -55,7 +55,10 @@ def detect_face(detector, img, align = True):
|
||||
for idx, d in enumerate(detections):
|
||||
left = d.left(); right = d.right()
|
||||
top = d.top(); bottom = d.bottom()
|
||||
|
||||
#detected_face = img[top:bottom, left:right]
|
||||
detected_face = img[max(0, top): min(bottom, img.shape[0]), max(0, left): min(right, img.shape[1])]
|
||||
|
||||
img_region = [left, top, right - left, bottom - top]
|
||||
|
||||
if align:
|
||||
|
Loading…
x
Reference in New Issue
Block a user