jkjung-avt / tensorrt_demos

TensorRT MODNet, YOLOv4, YOLOv3, SSD, MTCNN, and GoogLeNet
https://jkjung-avt.github.io/
MIT License
1.75k stars 547 forks source link

yolov4-tiny custom weights issue #449

Closed Myron1996 closed 3 years ago

Myron1996 commented 3 years ago

Hi @jkjung-avt . I hope you are doing well. I am trying to convert my custom trained **yolov4-tiny model** but I am getting following error. I attached a cfg file. Can you help me with this ?

root@1bf3cb8ffb41:~/FastMOT/tensorrt_demos/yolo# python3 yolo_to_onnx.py -c 12 -m yolov4-tiny
Traceback (most recent call last):
  File "yolo_to_onnx.py", line 955, in <module>
    main()
  File "yolo_to_onnx.py", line 884, in main
    w, h = get_input_wh(args.model)
  File "/usr/src/app/FastMOT/tensorrt_demos/yolo/plugins.py", line 29, in get_input_wh
    h = w = int(yolo_dim)
ValueError: invalid literal for int() with base 10: 'tiny'

yolov4-tiny.txt

jkjung-avt commented 3 years ago

Please git pull the latest code of this repo. You should not encounter such a problem with the latest code.

By the way, you could refer to this blog post of mine: TensorRT YOLO For Custom Trained Models (Updated).