未验证 提交 0328c38b 编写于 作者: W Walter 提交者: GitHub

Merge pull request #1912 from HydrogenSulfate/fix_predict_det

fix bug in DetPredictor.predict
...@@ -128,13 +128,10 @@ class DetPredictor(Predictor): ...@@ -128,13 +128,10 @@ class DetPredictor(Predictor):
results = [] results = []
if reduce(lambda x, y: x * y, np_boxes.shape) < 6: if reduce(lambda x, y: x * y, np_boxes.shape) < 6:
print('[WARNNING] No object detected.') print('[WARNNING] No object detected.')
results = np.array([])
else: else:
results = np_boxes results = self.parse_det_results(
np_boxes, self.config["Global"]["threshold"],
results = self.parse_det_results(results, self.config["Global"]["label_list"])
self.config["Global"]["threshold"],
self.config["Global"]["label_list"])
return results return results
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册