yolov7 icon indicating copy to clipboard operation
yolov7 copied to clipboard

convert trt model & inference trt error >> failed.Cannot deserialize

Open HeungJunKim opened this issue 2 years ago • 2 comments

try python/c++ example. same error occurs.

step1. python export.py --weights yolov7x_reparam.pt --grid --end2end --simplify --topk-all 100 --iou-thres 0.45 --conf-thres 0.05 --img-size 640 640 step2. python ./tensorrt-python/export.py -o yolov7x_reparam.onnx -e yolov7x-nms.trt -p fp16

error log is ...

[07/28/2022-15:02:55] [TRT] [E] 1: [pluginV2Runner.cpp::load::290] Error Code 1: Serialization (Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry) [07/28/2022-15:02:55] [TRT] [E] 4: [runtime.cpp::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)

image

HeungJunKim avatar Jul 28 '22 06:07 HeungJunKim

I meet the same error. and add trt.init_libnvinfer_plugins(logger, namespace="") solve it

deepthman avatar Jul 28 '22 08:07 deepthman

I meet the same error. and add trt.init_libnvinfer_plugins(logger, namespace="") solve it good answer. thank you

HeungJunKim avatar Aug 04 '22 01:08 HeungJunKim