fix bug in DetPredictor.predict

pull/1912/head
HydrogenSulfate 2022-05-11 14:56:08 +08:00
parent 9e53098c4f
commit 9399748381
2 changed files with 6 additions and 6 deletions

View File

@ -128,13 +128,11 @@ class DetPredictor(Predictor):
results = []
if reduce(lambda x, y: x * y, np_boxes.shape) < 6:
print('[WARNNING] No object detected.')
results = np.array([])
results = []
else:
results = np_boxes
results = self.parse_det_results(results,
self.config["Global"]["threshold"],
self.config["Global"]["label_list"])
results = self.parse_det_results(
np_boxes, self.config["Global"]["threshold"],
self.config["Global"]["label_list"])
return results

View File

@ -14,6 +14,8 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import division
from __future__ import print_function
import platform
import paddle