- YOLOv4: YOLOv4: Optimal Speed and Accuracy of Object Detection
- darknet: https://github.com/AlexeyAB/darknet
model | weights |
---|---|
yolov4 | weights |
yolov4-tiny | weights |
yolov4x-mish | weights |
yolov4-csp | weights |
yolov3 | weights |
yolov3-spp | weights |
yolov3-tiny | weights |
Above in the table are now supported models, for more darknet models, please see the official model zoo.
- export yolov4 onnx
python3 export_onnx.py
- export yolov4-tiny 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
- export yolov4x-mish, yolov4-csp onnx
python3 export_onnx.py --cfg_file cfg/yolov4x-mish.cfg --weights_file yolov4x-mish.weights --output_file yolov4x-mish.onnx
python3 export_onnx.py --cfg_file cfg/yolov4-csp.cfg --weights_file yolov4-csp.weights --output_file yolov4-csp.onnx
- export yolov3, yolov3-spp onnx
python3 export_onnx.py --cfg_file cfg/yolov3.cfg --weights_file yolov3.weights --output_file yolov3.onnx --strides 32 16 8 --neck FPN
python3 export_onnx.py --cfg_file cfg/yolov3-spp.cfg --weights_file yolov3-spp.weights --output_file yolov3-spp.onnx --strides 32 16 8 --neck FPN
- export yolov3-tiny onnx
python3 export_onnx.py --cfg_file cfg/yolov3-tiny.cfg --weights_file yolov3-tiny.weights --output_file yolov3-tiny.onnx --strides 32 16 --neck FPN
cd ../ # in project directory
mkdir build && cd build
cmake ..
make -j
- inference with yolov4
cd ../../bin/
./tensorrt_inference Yolov4 ../configs/Yolov4/config.yaml ../samples/detection_segmentation
- inference with yolov4-tiny
cd ../../bin/
./tensorrt_inference Yolov4 ../configs/Yolov4/config-tiny.yaml ../samples/detection_segmentation
- inference with yolov4x-mish
cd ../../bin/
./tensorrt_inference Yolov4 ../configs/Yolov4/config-xmish.yaml ../samples/detection_segmentation
For more information, please see this blog: https://blog.csdn.net/linghu8812/article/details/109270320