mirror of
https://github.com/serengil/deepface.git
synced 2025-06-09 12:57:08 +00:00
Linting
This commit is contained in:
parent
001e609a82
commit
53510f0584
@ -124,11 +124,13 @@ def detect_faces(
|
||||
img=img, left_eye=left_eye, right_eye=right_eye
|
||||
)
|
||||
rotated_x1, rotated_y1, rotated_x2, rotated_y2 = rotate_facial_area(
|
||||
facial_area=(x, y, x + w, y + h),
|
||||
angle=angle,
|
||||
facial_area=(x, y, x + w, y + h),
|
||||
angle=angle,
|
||||
size=(img.shape[0], img.shape[1])
|
||||
)
|
||||
detected_face = aligned_img[int(rotated_y1) : int(rotated_y2), int(rotated_x1) : int(rotated_x2)]
|
||||
detected_face = aligned_img[
|
||||
int(rotated_y1) : int(rotated_y2),
|
||||
int(rotated_x1) : int(rotated_x2)]
|
||||
|
||||
result = DetectedFace(
|
||||
img=detected_face,
|
||||
@ -142,7 +144,7 @@ def detect_faces(
|
||||
|
||||
|
||||
def rotate_facial_area(
|
||||
facial_area: Tuple[int, int, int, int],
|
||||
facial_area: Tuple[int, int, int, int],
|
||||
angle: float, # in degrees. The sign determines the direction of rotation
|
||||
size: Tuple[int, int] # (width, height)
|
||||
) -> Tuple[int, int, int, int]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user