From c1bf3f53ba46ea73241db256f4adc741986cb83f Mon Sep 17 00:00:00 2001 From: Colombo Date: Fri, 28 Feb 2020 19:31:33 +0400 Subject: [PATCH] add comment --- facelib/LandmarksProcessor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/facelib/LandmarksProcessor.py b/facelib/LandmarksProcessor.py index 88f9f22..2344fba 100644 --- a/facelib/LandmarksProcessor.py +++ b/facelib/LandmarksProcessor.py @@ -272,6 +272,7 @@ def get_transform_mat (image_landmarks, output_size, face_type, scale=1.0): mod = (1.0 / scale)* ( npla.norm(g_p[0]-g_p[2])*(padding*np.sqrt(2.0) + 0.5) ) if face_type == FaceType.WHOLE_FACE: + # adjust center for WHOLE_FACE, 7% below in order to cover more forehead vec = (g_p[0]-g_p[3]).astype(np.float32) vec_len = npla.norm(vec) vec /= vec_len