mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
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:
parent
9e9dc364c9
commit
dd1d5e8909
4 changed files with 66 additions and 54 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue