-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run the trt_yolov3.py error #419
Comments
"trt_yolov3.py" is a rather old version of the code. It has been replaced by "trt_yolo.py" now. Please |
the error message: |
My code assumes the conv features maps before yolo layers are: tensorrt_demos/yolo/plugins.py Line 90 in 0276e9b
But your custom model is using "// 4" instead of "// 8", i.e. you're using "stride=4" for the last yolo layer. As a quick fix, you could patch the above line of code with the following: yolo_whs = [[w // 32, h // 32], [w // 16, h // 16], [w // 4, h // 4]] |
This happens when your TensorRT inference runs too fast (inference and draw detection boxes on the same image multiple times). You could use the "--copy_frame" command-line option to get around that. (FPS would be slightly lower since the image needs to be copied before each inference.) |
@kaiven11 Please debug the code by yourself. I don't have time to review it. |
Thk you! I tried to run the code , And not found the same problem. |
helmet.txt
env
os:ubuntu 18.04
python: 3.6.9
change the class num in yolo.py
category_num=5
change the class name dict in yolov3_class.py
convert the weights to onnx file (success)
convert the onnx to trt file (success)
execute commad
python3_ trt_yolov3.py --model yolov3-416 --rtsp --uri rtsp://admin:abcd1234@192.168.3.11:554/h264/ch1/main/av_stream
the error message :
trt_outputs = [output.reshape(shape) for output, shape
ValueError: cannot reshape array of size 5070 into shape (1,255,13,13)
cfg file:
helmet.txt
weights file:
链接:https://pan.baidu.com/s/1LQVdKnSkQQtLsUbJgDPi3w
提取码:u39i
i had try many ways ,but i still can't resolve the error,pls give me some advice.thk you .
The text was updated successfully, but these errors were encountered: