mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
Merge pull request #1269 from mowshon/master
Face alignment with rotation using resample
This commit is contained in:
commit
1fcd8c6594
@ -177,5 +177,5 @@ def align_face(
|
||||
return img, 0
|
||||
|
||||
angle = float(np.degrees(np.arctan2(left_eye[1] - right_eye[1], left_eye[0] - right_eye[0])))
|
||||
img = np.array(Image.fromarray(img).rotate(angle))
|
||||
img = np.array(Image.fromarray(img).rotate(angle, resample=Image.BICUBIC))
|
||||
return img, angle
|
||||
|
Loading…
x
Reference in New Issue
Block a user