noahmr/yolov5-tensorrt

When I'm using fp16 and yolov5s modle on jetson xavier, tensorrt throws a runtime error.

EternalSaga opened this issue · 2 comments

I use the c++ version build_engine to create tensorrt modle.

./yolov5-tensorrt/build/build_engine --model ./models/yolov5s.onnx --output ./models/yolov5s.engine --precision fp16

Then I run inference. However, this error occured.
[pluginV2Runner.cpp::load::292] Error Code 1: Serialization (Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)

Hi @EternalSaga,

What are you using for inference? Could you share (some of) the code you're using? Or are you using one of the example applications (e.g. process_image)?

Also, what version of TensorRT are you using?

I have access to a Jetson system as well, so if you share the details, I can try to see if I can reproduce the error.

Thank you for your reply. I get the same error when I was using the sample application-process_image.
The onnx modle is from this repo.
The jetpack I'm using is L4t 32.6.1 and the tensorrt version is 8.0.1.
The full output of process_image is here.

./build/process_image --engine ../ffmpegdecoder/models/yolov5s.engine --input ../ffmpegdecoder/testpics/009577.jpg --classes ../ffmpegdecoder/models/coco.names --output ./result.png
|yolov5|info|[Detector] Using OpenCV-CUDA pre-processor
|yolov5|info|[TensorRT] [MemUsageChange] Init CUDA: CPU +347, GPU +0, now: CPU 378, GPU 5757 (MiB)
|yolov5|info|[Detector] Loading TensorRT engine from '../ffmpegdecoder/models/yolov5s.engine'
|yolov5|info|[Detector] Deserializing inference engine. This may take a while...
|yolov5|info|[TensorRT] Loaded engine size: 47 MB
|yolov5|info|[TensorRT] [MemUsageSnapshot] deserializeCudaEngine begin: CPU 426 MiB, GPU 5805 MiB
|yolov5|error|[TensorRT] 3: getPluginCreator could not find plugin: ScatterND version: 1
|yolov5|error|[TensorRT] 1: [pluginV2Runner.cpp::load::292] Error Code 1: Serialization (Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)
|yolov5|error|[TensorRT] 4: [runtime.cpp::deserializeCudaEngine::76] Error Code 4: Internal Error (Engine deserialization failed.)
|yolov5|error|[Detector] loadEngine() failure: could not deserialize engine
loadEngine() failed: tensorrt error