Spaces:
Running
Running
Update inference2.py
Browse files- inference2.py +2 -1
inference2.py
CHANGED
@@ -70,7 +70,8 @@ def face_detect(images, pads, face_det_batch_size, nosmooth, img_size):
|
|
70 |
y1 = max(0, rect[1] - pady1)
|
71 |
y2 = min(image.shape[0], rect[3] + pady2)
|
72 |
x1 = max(0, rect[0] - padx1)
|
73 |
-
x2 = min(image.shape[1], image.shape[1], rect[2] + padx2) # Corrected typo: image.shape[1] twice
|
|
|
74 |
|
75 |
results.append([x1, y1, x2, y2])
|
76 |
|
|
|
70 |
y1 = max(0, rect[1] - pady1)
|
71 |
y2 = min(image.shape[0], rect[3] + pady2)
|
72 |
x1 = max(0, rect[0] - padx1)
|
73 |
+
#x2 = min(image.shape[1], image.shape[1], rect[2] + padx2) # Corrected typo: image.shape[1] twice
|
74 |
+
x2 = min(image.shape[1], rect[2] + padx2)
|
75 |
|
76 |
results.append([x1, y1, x2, y2])
|
77 |
|