未验证 提交 d2f86f6e 编写于 作者: J JYChen 提交者: GitHub

fix image infer error in pphuman (#6060)

上级 1f58e8ba
...@@ -297,6 +297,8 @@ def crop_image_with_det(batch_input, det_res, thresh=0.3): ...@@ -297,6 +297,8 @@ def crop_image_with_det(batch_input, det_res, thresh=0.3):
crop_res = [] crop_res = []
for b_id, input in enumerate(batch_input): for b_id, input in enumerate(batch_input):
boxes_num_i = boxes_num[b_id] boxes_num_i = boxes_num[b_id]
if boxes_num_i == 0:
continue
boxes_i = boxes[start_idx:start_idx + boxes_num_i, :] boxes_i = boxes[start_idx:start_idx + boxes_num_i, :]
score_i = score[start_idx:start_idx + boxes_num_i] score_i = score[start_idx:start_idx + boxes_num_i]
res = [] res = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册