improved face align,
More stable and precise version of the face transformation matrix. Now full_faces are aligned with the upper and lateral boundaries of the frame, result: fix of cutted mouth, increase area of the cheeks of side faces before/after https://i.imgur.com/t9IyGZv.jpg therefore, additional training is required for existing models. Optionally, you can re-extract dst faces of your project, if they have problems with cutted mouth or cheeks.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user