Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 816 Bytes

README.md

File metadata and controls

42 lines (25 loc) · 816 Bytes

Introdution

Deploy ultralytics Yolov5 pretained model with C++ language ;

Env

  1. GCC 7.5
  2. Opencv 4.5.4

Get ONNX Model

  1. go to yolov5 release page download yolov5 pretrained model(official onnx can't work right),such as yolv5s.pt

  2. useexport.py convert yolov5s.pt to yolov5.onnx:

    git clone https://github.com/ultralytics/yolov5.git
    cd yolov5
    python3.7 export.py --data data/coco128.yaml --weights yolov5s.pt --include onnx

Build

git clone https://github.com/Hexmagic/ONNX_yolov5.git
mkdir build&&cd build
cmake ..
make -j4
cd ..
./build/main yolov5s.onnx data/images/zidane.jpg