Skip to content

Commit a5c47c6

Browse files
committed
Resolve pylint warnings with care in RetinaFace.py
1 parent 80f5a93 commit a5c47c6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

retinaface/RetinaFace.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,12 @@ def extract_faces(
281281
# Expand the facial area to be extracted and stay within img.shape limits
282282
x1 = max(0, facial_area[0] - int((facial_area[2] * expand_face_area) / 100))
283283
y1 = max(0, facial_area[1] - int((facial_area[3] * expand_face_area) / 100))
284-
x2 = min(img.shape[1], facial_area[2] +
285-
int((facial_area[2] * expand_face_area) / 100))
286-
y2 = min(img.shape[0], facial_area[3] +
287-
int((facial_area[3] * expand_face_area) / 100))
284+
x2 = min(
285+
img.shape[1], facial_area[2] + int((facial_area[2] * expand_face_area) / 100)
286+
)
287+
y2 = min(
288+
img.shape[0], facial_area[3] + int((facial_area[3] * expand_face_area) / 100)
289+
)
288290
facial_img = facial_img[y1:y2, x1:x2]
289291

290292
resp.append(facial_img[:, :, ::-1])

0 commit comments

Comments
 (0)