fix predict_det.py error
@@ -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()
