PaddlePaddle / FastDeploy

⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
https://www.paddlepaddle.org.cn/fastdeploy
Apache License 2.0
2.81k stars 441 forks source link

ppyoloe 无法使用tensorrt #2181

Open kkpssr opened 10 months ago

kkpssr commented 10 months ago

我通过如下命令运行 1 import cv2 2 import fastdeploy as fd 3 import os 4 option=fd.RuntimeOption() 5 option.use_gpu(0) 6 option.use_trt_backend() 7 option.enable_paddle_to_trt() 8 option.enable_paddle_trt_collect_shape() 10 option.set_trt_input_shape("image", [1, 3, 256, 256], [1,3,512,512],[1, 3, 1024, 1024]) 11 option.set_trt_input_shape("scale_factor", [1,1], [1,1],[2,2]) 12 option.enable_trt_fp16() 13 model_path=os.path.join("weights/car_detect","model.pdmodel") 14 params_file = os.path.join("weights/car_detect", "model.pdiparams") 15 config_file = os.path.join("weights/car_detect", "infer_cfg.yml") 16 model=fd.vision.detection.PPYOLOE(model_path,params_file,config_file,runtime_option=option) 不知道是不是由于scale_factor指定格式不对,会报如下错误 E0824 14:48:57.136653 11031 helper.h:127] Could not register plugin creator - ::InstanceNormalization_TRT version 2 E0824 14:49:01.417342 11031 helper.h:127] 4: [shapeCompiler.cpp::evaluateShapeChecks::1180] Error Code 4: Internal Error (kOPT values for profile 0 violate shape constraints: IShuffleLayer reshape (Output: reshape2_6.tmp_01713): reshaping failed for tensor: conv2d_322.tmp_11711 Reshape dimension of -1 has no solution.) E0824 14:49:01.426880 11031 helper.h:127] 2: [builder.cpp::buildSerializedNetwork::751] Error Code 2: Internal Error (Assertion engine != nullptr failed. )

rainyfly commented 5 months ago

已收到问题反馈