From 4de4ad938bb7935146f74996f5cb405a3e503a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E5=AE=87=E4=BD=B3?= Date: Thu, 20 Feb 2025 16:23:08 +0800 Subject: [PATCH] =?UTF-8?q?FIX=20=E4=BF=AE=E5=A4=8D=E9=9D=A2=E9=83=A8?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E8=BE=B9=E7=95=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))