fix bug in DetPredictor.predict
parent
9e53098c4f
commit
9399748381
|
@ -128,12 +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([])
|
results = []
|
||||||
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"]["threshold"],
|
|
||||||
self.config["Global"]["label_list"])
|
self.config["Global"]["label_list"])
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import division
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
import paddle
|
import paddle
|
||||||
|
|
Loading…
Reference in New Issue