How to solve the following error when using nx to configure yolov5

Here are my steps

  1. generate .wts from pytorch with .pt, or download .wts from model zoo
// clone code according to above #Different versions of yolov5
// download https://github.com/ultralytics/yolov5/releases/download/v6.0/yolov5s.pt
cp {tensorrtx}/yolov5/gen_wts.py {ultralytics}/yolov5
cd {ultralytics}/yolov5
python gen_wts.py -w yolov5s.pt -o yolov5s.wts
// a file 'yolov5s.wts' will be generated.
  1. build tensorrtx/yolov5 and run
cd {tensorrtx}/yolov5/
// update CLASS_NUM in yololayer.h if your model is trained on custom dataset
mkdir build
cd build
cp {ultralytics}/yolov5/yolov5s.wts {tensorrtx}/yolov5/build
cmake ..
make
sudo ./yolov5 -s [.wts] [.engine] [n/s/m/l/x/n6/s6/m6/l6/x6 or c/c6 gd gw]  // serialize model to plan file
sudo ./yolov5 -d [.engine] [image folder]  // deserialize and run inference, the images in [image folder] will be processed.
// For example yolov5s
sudo ./yolov5 -s yolov5s.wts yolov5s.engine s
Error results after execution:
CUDA error 1 at /home/nvidia/tensorrtx/yolov5/yololayer.cu:52yolov5: /home/nvidia/tensorrtx/yolov5/yololayer.cu:52: virtual nvinfer1::YoloLayerPlugin::~YoloLayerPlugin(): Assertion `0' failed.
Aborted

Hi,

It seems that you are using a third-party sample.
Have you checked this issue with the sample owner first?

Thanks.

I refer to the solution on the Internet. I have a message under the solution, but I have not received a reply. I hope that I can get some useful information from you to solve my problem.

Hi,

Based on the error message below:

nvinfer1::YoloLayerPlugin::~YoloLayerPlugin(): Assertion `0' failed.
Aborted

It looks like there are some implementation issues in the plugin layer.
If the sample can work previously, maybe you can try it with older JetPack.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.