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

fix image infer error in pphuman (#6061)

上级 f0eb507c
...@@ -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.
先完成此消息的编辑!
想要评论请 注册