First of all, thanks for the great work!
I use this repo to convert darknet weights to onnx and then later to TensorRT version using trtexec.
Then, when I use demo_trt to run the demo, I got the below error. I am not able to resolve it. Can you help me to find out the problem.
First of all, thanks for the great work! I use this repo to convert darknet weights to onnx and then later to TensorRT version using trtexec. Then, when I use demo_trt to run the demo, I got the below error. I am not able to resolve it. Can you help me to find out the problem.
` ubuntu@ubuntu-desktop:~/Tao/pytorch-YOLOv4$ python3 demo_trt.py YOLOV4_prune aircraft608.jpg 608 608
Reading engine from file YOLOV4_prune
Shape of the network input: (1, 3, 608, 608)
Length of inputs: 1
Len of outputs: 3
Traceback (most recent call last):
File "demo_trt.py", line 201, in
main(engine_path, image_path, image_size)
File "demo_trt.py", line 132, in main boxes = detect(context, buffers, image_src, image_size, num_classes)
File "demo_trt.py", line 176, in detect trt_outputs[1] = trt_outputs[1].reshape(1, -1, num_classes)
ValueError: cannot reshape array of size 25992 into shape (1,newaxis,80) `