diff --git a/deploy/python/predict_det.py b/deploy/python/predict_det.py index 7b23e6220ffc680815ffc6b3eb59f493ddfe9e3c..e4e0a24a6dbc6c62f82810c865096f768ebd182b 100644 --- a/deploy/python/predict_det.py +++ b/deploy/python/predict_det.py @@ -109,17 +109,16 @@ class DetPredictor(Predictor): ''' inputs = self.preprocess(image) np_boxes = None - input_names = self.paddle_predictor.get_input_names() + input_names = self.predictor.get_input_names() for i in range(len(input_names)): - input_tensor = self.paddle_predictor.get_input_handle(input_names[ - i]) + input_tensor = self.predictor.get_input_handle(input_names[i]) input_tensor.copy_from_cpu(inputs[input_names[i]]) t1 = time.time() - self.paddle_predictor.run() - output_names = self.paddle_predictor.get_output_names() - boxes_tensor = self.paddle_predictor.get_output_handle(output_names[0]) + self.predictor.run() + output_names = self.predictor.get_output_names() + boxes_tensor = self.predictor.get_output_handle(output_names[0]) np_boxes = boxes_tensor.copy_to_cpu() t2 = time.time()