more stable and precise version of face transformation matrix.

fixed bleeding mask on some samples
This commit is contained in:
Colombo 2019-12-20 10:30:49 +04:00
parent 068c7d0d55
commit 64021b9c62
5 changed files with 68 additions and 57 deletions

View file

@ -83,7 +83,7 @@ class FANExtractor(object):
for i, lmrks in enumerate(landmarks):
try:
if lmrks is not None:
image_to_face_mat = LandmarksProcessor.get_transform_mat (lmrks, 256, FaceType.FULL)
image_to_face_mat = LandmarksProcessor.get_transform_mat (lmrks, 256, FaceType.FULL, full_face_align_top=False)
face_image = cv2.warpAffine(input_image, image_to_face_mat, (256, 256), cv2.INTER_CUBIC )
rects2 = second_pass_extractor.extract(face_image, is_bgr=is_bgr)