mirror of
https://github.com/alibaba/EasyCV.git
synced 2025-06-03 14:49:00 +08:00
parent
8d27ce1ed6
commit
265d4cc6e5
4
easycv/thirdparty/mtcnn/utils.py
vendored
4
easycv/thirdparty/mtcnn/utils.py
vendored
@ -148,14 +148,14 @@ def get_image_boxes(bounding_boxes, img, size=24):
|
||||
bounding_boxes, width, height
|
||||
)
|
||||
img_boxes = np.zeros((num_boxes, 3, size, size), "float32")
|
||||
img_array = np.asarray(img, "uint8")
|
||||
|
||||
for i in range(num_boxes):
|
||||
img_box = np.zeros((h[i], w[i], 3), "uint8")
|
||||
|
||||
img_array = np.asarray(img, "uint8")
|
||||
img_box[dy[i] : (edy[i] + 1), dx[i] : (edx[i] + 1), :] = img_array[
|
||||
y[i] : (ey[i] + 1), x[i] : (ex[i] + 1), :
|
||||
]
|
||||
].copy()
|
||||
|
||||
# resize
|
||||
img_box = Image.fromarray(img_box)
|
||||
|
Loading…
x
Reference in New Issue
Block a user