From d2f86f6eac798988b646efeb64bc94e3da545033 Mon Sep 17 00:00:00 2001 From: JYChen Date: Wed, 25 May 2022 21:21:58 +0800 Subject: [PATCH] fix image infer error in pphuman (#6060) --- deploy/pphuman/pipe_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/pphuman/pipe_utils.py b/deploy/pphuman/pipe_utils.py index 43904e657..4c7601a53 100644 --- a/deploy/pphuman/pipe_utils.py +++ b/deploy/pphuman/pipe_utils.py @@ -297,6 +297,8 @@ def crop_image_with_det(batch_input, det_res, thresh=0.3): crop_res = [] for b_id, input in enumerate(batch_input): boxes_num_i = boxes_num[b_id] + if boxes_num_i == 0: + continue boxes_i = boxes[start_idx:start_idx + boxes_num_i, :] score_i = score[start_idx:start_idx + boxes_num_i] res = [] -- GitLab