From 86642d309ef9a8f5d58751ff1703ef4cd1b99801 Mon Sep 17 00:00:00 2001 From: JYChen Date: Wed, 25 May 2022 21:22:07 +0800 Subject: [PATCH] fix image infer error in pphuman (#6061) --- 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