PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.38k stars 2.84k forks source link

PP-YOLOE推理使用TensorRT出错 #5675

Closed 923629877 closed 1 year ago

923629877 commented 2 years ago

python deploy/python/infer.py --model_dir=D:\Yanglingyun\Github\model\ppyoloe_crn_m_300e_coco --image_file=D:\Yanglingyun\Github\datas\RGB\s08_e01\colorImg34.jpg --run_mode=trt_fp16 --device=gpu --run_benchmark=True

推理执行出错:

ValueError: (InvalidArgument) Pass tensorrt_subgraph_pass has not been registered. Please use the paddle inference library compiled with tensorrt or disable the tensorrt engine in inference configuration! [Hint: Expected Has(pass_type) == true, but received Has(pass_type):0 != true:1.] (at ..\paddle/fluid/framework/ir/pass.h:236)

wangxinxin08 commented 2 years ago

使用TensorRT需要安装带TensorRT编译的Paddle版本,可以参考官网文档https://paddleinference.paddlepaddle.org.cn/user_guides/download_lib.html#python, 下载适用于你的cuda, cudnn和tensorrt的wheel包

qingqing01 commented 2 years ago

@923629877 感谢提issue反馈,修改您的issue标题和内容,建议精确描述~