PaddlePaddle / PaddleX

All-in-One Development Tool based on PaddlePaddle(飞桨低代码开发工具)
Apache License 2.0
4.92k stars 961 forks source link

Very slow prediction [object detection] #2503

Open cadpm opened 4 days ago

cadpm commented 4 days ago

I am doing object detection with a pp-yolo-plus-S model.

And I'm getting prediction time of 300mS approximately.

Using a model trained by model yolov5-S I'm getting predictions of 90mS.

How can I reduce the prediction time?

I am generating my prediction with the following structure:

` from paddlex import create_pipeline, create_model

model_deteccion = create_model("PaddleX/output01/best_model/inference", device="GPU")

frame="myimage.jpg"

myPrediction=list(model_deteccion.predict(frame)

`

cuicheng01 commented 4 days ago

Could you provide a sample of your test image, and could you also provide the specifications of your GPU?

cadpm commented 3 days ago

Sure, my GPU is rtx3060 12gb

cadpm commented 3 days ago

The problem is not the image, it is the processing time.

I did Testing with PP-yolov-plus-s and yolov5-s both with coco models and evaluation with coco images. The prediction performance is 3 times less in Yolov5 (with pytorch)

cuicheng01 commented 2 days ago

Could you kindly explain how your PyTorch model makes predictions? If it’s convenient, could you share some example code?