RuntimeError: cannot get YoloLayer_TRT plugin creator

I’m trying to run the YoloV4 (Demo 5) in tensorrt_demos github repo (of jkjung-avt) on AWS ec2.

I created ec2 VM with nvidia-gpu (with AMI - Amazon Linux 2 AMI with NVIDIA TESLA GPU Driver),

which has: NVIDIA-SMI 450.119.01 Driver Version: 450.119.01 CUDA Version: 11.0.

On this EC2 I pulled and entered into the tensorrt official container, with:

sudo docker run --gpus all -it -v /home/ec2-user/player-detection:/home bash

I did the following steps:

  1. Ran python3 -m pip install --upgrade setuptools pip && python3 -m pip install nvidia-pyindex && pip install nvidia-tensorrt.
  2. Inside the yolo/ folder, I ran:
    pip3 install -r requirements.txt.
  3. pip3 install onnx==1.9.0.
  4. Inside the plugins/ folder, I ran make.
  5. Inside the yolo/ folder, I ran ./ && python3 -m yolov4 && python3 -m yolov4.

I got the following error for the python3 -m yolov4 command:

 "RuntimeError: cannot get YoloLayer_TRT plugin creator"

From reading onnx to trt failed.. "cannot get YoloLayer_TRT plugin creator" · Issue #476 · jkjung-avt/tensorrt_demos · GitHub it seems that the problem is related to dynamic libaries.

I tried to view the libaries that I have, and got:

$ ldd (0x00007fff142a4000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9673734000) => /usr/local/cuda-11.1/targets/x86_64-linux/lib/ (0x00007f96734af000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9673126000) => /lib/x86_64-linux-gnu/ (0x00007f9672f0e000) => /lib/x86_64-linux-gnu/ (0x00007f9672b1d000) => /usr/lib/x86_64-linux-gnu/ (0x00007f96728f4000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9672074000) => /usr/local/cuda-11.1/targets/x86_64-linux/lib/ (0x00007f966feac000) => /lib/x86_64-linux-gnu/ (0x00007f966fca4000) => /lib/x86_64-linux-gnu/ (0x00007f966faa0000) => /lib/x86_64-linux-gnu/ (0x00007f966f702000)
	/lib64/ (0x00007f9699135000) => /lib/x86_64-linux-gnu/ (0x00007f966f4e3000) => /usr/local/cuda-11.1/targets/x86_64-linux/lib/ (0x00007f9668008000) => /usr/local/cuda-11.1/targets/x86_64-linux/lib/ (0x00007f965a23e000)

It seems that I miss some, and also when I tried to print all the plugins, I didn’t see the YoloLayer_TRT.

Any idea how to solve it?

TensorRT plugins does not include YoloLayer_TRT
TensorRT/plugin at main · NVIDIA/TensorRT (
The author developed “yolo_layer” plugin which is under tensorrt_demos/plugins at master · jkjung-avt/tensorrt_demos (,
you can read through the whole readme
jkjung-avt/tensorrt_demos: TensorRT MODNet, YOLOv4, YOLOv3, SSD, MTCNN, and GoogLeNet (
or reach to the author.

thx, but maybe its gpu related? I know that it works for others on (e.g. rtx2070s). I’m trying to understand why on some environments it works, and on some it doesn’t.

It’s not GPU related.