|
@@ -175,8 +175,6 @@ class Predictor(object):
|
|
|
logging.error(
|
|
logging.error(
|
|
|
"Invalid model type {}.".format(self._model.model_type),
|
|
"Invalid model type {}.".format(self._model.model_type),
|
|
|
exit=True)
|
|
exit=True)
|
|
|
- if len(preds) == 1:
|
|
|
|
|
- preds = preds[0]
|
|
|
|
|
|
|
|
|
|
return preds
|
|
return preds
|
|
|
|
|
|
|
@@ -255,6 +253,9 @@ class Predictor(object):
|
|
|
self.timer.repeats = repeats
|
|
self.timer.repeats = repeats
|
|
|
self.timer.info(average=True)
|
|
self.timer.info(average=True)
|
|
|
|
|
|
|
|
|
|
+ if isinstance(img_file, (str, np.ndarray)):
|
|
|
|
|
+ results = results[0]
|
|
|
|
|
+
|
|
|
return results
|
|
return results
|
|
|
|
|
|
|
|
def batch_predict(self, image_list, **params):
|
|
def batch_predict(self, image_list, **params):
|