mirror of
https://github.com/Shawn-Shan/fawkes.git
synced 2024-12-22 07:09:33 +05:30
minor fix
This commit is contained in:
parent
5d1c2ad2d7
commit
65743ef509
@ -29,12 +29,14 @@ def align(orig_img, aligner):
|
|||||||
if dic['confidence'] < 0.9:
|
if dic['confidence'] < 0.9:
|
||||||
continue
|
continue
|
||||||
x, y, width, height = dic['box']
|
x, y, width, height = dic['box']
|
||||||
|
|
||||||
if width < 30 or height < 30:
|
if width < 30 or height < 30:
|
||||||
continue
|
continue
|
||||||
bb = [y, x, y + height, x + width]
|
bb = [y, x, y + height, x + width]
|
||||||
cropped = orig_img[bb[0]:bb[2], bb[1]:bb[3], :]
|
cropped = orig_img[bb[0]:bb[2], bb[1]:bb[3], :]
|
||||||
cropped_arr.append(np.copy(cropped))
|
cropped_arr.append(np.copy(cropped))
|
||||||
bounding_boxes_arr.append(bb)
|
bounding_boxes_arr.append(bb)
|
||||||
|
|
||||||
return cropped_arr, bounding_boxes_arr
|
return cropped_arr, bounding_boxes_arr
|
||||||
|
|
||||||
# if nrof_faces > 0:
|
# if nrof_faces > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user