diff --git a/__init__.py b/__init__.py index e3e0f93..19259eb 100644 --- a/__init__.py +++ b/__init__.py @@ -149,8 +149,8 @@ class FaceExtract: for b, b1 in zip( list(range(int(y1), int(y2))), list(range(face_size)) ): - if (a >= 0 and a <= r.orig_img.shape[1]) and ( - b >= 0 and b <= r.orig_img.shape[0] + if (a >= 0 and a < r.orig_img.shape[0]) and ( + b >= 0 and b < r.orig_img.shape[1] ): template[a1][b1] = r.orig_img[a][b] print(int(x1), int(x2), int(y1), int(y2))