From e5cfc5367e7a6e9590998fdc15b7ba4926ad3d22 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Thu, 14 Nov 2024 00:24:20 +0100 Subject: [PATCH] Rename template key to deepfacelive --- facefusion/face_helper.py | 2 +- facefusion/typing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/facefusion/face_helper.py b/facefusion/face_helper.py index 3ef0eb83..13644a32 100644 --- a/facefusion/face_helper.py +++ b/facefusion/face_helper.py @@ -109,7 +109,7 @@ def warp_face_by_face_landmark_5(temp_vision_frame : VisionFrame, face_landmark_ def warp_face_for_deepfacelive(temp_vision_frame : VisionFrame, face_landmark_5 : FaceLandmark5, crop_size : Size, shift : Tuple[float, float], coverage : float) -> Tuple[VisionFrame, Matrix]: - affine_matrix = estimate_matrix_by_face_landmark_5(face_landmark_5, 'deep_face_live', (1, 1)) + affine_matrix = estimate_matrix_by_face_landmark_5(face_landmark_5, 'deepfacelive', (1, 1)) square_points = POINTS_TEMPLATES.get('square') square_points = transform_points(square_points, cv2.invertAffineTransform(affine_matrix)) center_point = square_points.mean(axis = 0) diff --git a/facefusion/typing.py b/facefusion/typing.py index a2c1e0f4..f8a52ba5 100755 --- a/facefusion/typing.py +++ b/facefusion/typing.py @@ -86,7 +86,7 @@ ProcessStep = Callable[[str, int, Args], bool] Content = Dict[str, Any] -WarpTemplate = Literal['arcface_112_v1', 'arcface_112_v2', 'arcface_128_v2', 'deep_face_live', 'ffhq_512', 'mtcnn_512', 'styleganex_384'] +WarpTemplate = Literal['arcface_112_v1', 'arcface_112_v2', 'arcface_128_v2', 'deepfacelive', 'ffhq_512', 'mtcnn_512', 'styleganex_384'] WarpTemplateSet = Dict[WarpTemplate, NDArray[Any]] PointsTemplate = Literal['square', 'triangle_orthogonal', 'triangle_skew'] PointsTemplateSet = Dict[PointsTemplate, NDArray[Any]]