diff --git a/deploy/python/infer.py b/deploy/python/infer.py index 036423e33ea37a685ca723436ba0a832d25f9b10..ed7eb66f8c3106cca35fb202b4fac9f237ae9037 100644 --- a/deploy/python/infer.py +++ b/deploy/python/infer.py @@ -170,7 +170,7 @@ class Detector(object): results = [] if reduce(lambda x, y: x * y, np_boxes.shape) < 6: print('[WARNNING] No object detected.') - results = {'boxes': np.array([[]]), 'boxes_num': [0]} + results = {'boxes': np.zeros([0, 6]), 'boxes_num': [0]} else: results = self.postprocess( np_boxes, np_masks, inputs, np_boxes_num, threshold=threshold)