fix bug in DetPredictor.predict
parent
9e53098c4f
commit
9399748381
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue