This link cannot handle the problem of yolov4_tiny. I want to use the darknet model of v4_tiny or the pytorch model in deepstream. I found that the darknet model of yolov4_tiny and the model trained by pytorch cannot be converted to onnx. How do I deal with it?
git clone https://github.com/linghu8812/tensorrt_inference.git
then download the weight of yolov4-tiny follow the readme.md of the repo:
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights
follow the readme,convert the model to onnx: python3 export_onnx.py --cfg_file cfg/yolov4-tiny.cfg --weights_file yolov4-tiny.weights --output_file yolov4-tiny.onnx --strides 32 16 --neck FPN
use trtexec to convert the onnx model to trt plan: trtexec --onnx=yolov4-tiny.onnx --saveEngine=yolov4-tiny.plan --verbose