From 92fb8b2e89db282cc425bc04ce20a942d1038062 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Thu, 15 Sep 2022 15:41:57 +0800 Subject: [PATCH] fix deploy when bs=2 (#6915) --- deploy/python/infer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/deploy/python/infer.py b/deploy/python/infer.py index c27617589..bc503941c 100644 --- a/deploy/python/infer.py +++ b/deploy/python/infer.py @@ -154,7 +154,7 @@ class Detector(object): np_boxes_num = result['boxes_num'] if sum(np_boxes_num) <= 0: print('[WARNNING] No object detected.') - result = {'boxes': np.zeros([0, 6]), 'boxes_num': [0]} + result = {'boxes': np.zeros([0, 6]), 'boxes_num': np_boxes_num} result = {k: v for k, v in result.items() if v is not None} return result @@ -402,10 +402,8 @@ class Detector(object): self.pred_config.labels, output_dir=self.output_dir, threshold=self.threshold) - results.append(result) print('Test iter {}'.format(i)) - results = self.merge_batch_result(results) if save_results: Path(self.output_dir).mkdir(exist_ok=True) -- GitLab