This repository will demostrate how to deploy a offical YOLOv7 pre-trained model with OpenVINO runtime api
$ pip install -r python/requirements.txt
Please follow the Guides to install OpenVINO and OpenCV
Download YOLOv7 pre-trained weight from YOLOv7
$ git clone [email protected]:WongKinYiu/yolov7.git
$ cd yolov7/models
$ python export.py --weights yolov7.pt
The input image can be found in YOLOv7's repository
$ python python/main.py -m yolov7.onnx -i data/horse.jpg
You can also try running the code with Preprocessing API for performance optimization.
$ python python/main_preprocessing.py -m yolov7.onnx -i data/horse.jpg
Compile the source code
$ cd cpp
$ mkdir build && cd build
$ source '~/intel/openvino_2022.1.0.643/bin/setupvars.sh'
$ cmake ..
$ make
You can also uncomment the code in CMakeLists.txt
to trigger Preprocessing API for performance optimization.
Run inference
$ yolov7 yolov7.onnx data/horses.jpg 'CPU'