diff --git a/deploy/python/infer.py b/deploy/python/infer.py index c276175897f9a700c3f337a06080ae441f3e7292..bc503941cdc86c4553ec1db4b2c4c72fc7d8f0ab 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)