C++ and python implementation of YOLOv9 using Openvino Backend.
- Download the converted model: yolov9-c-converted
- Convert your custom model:
ovc yolov9-c-converted.onnx --compress_to_fp16 True --input images[1,3,640,640]
Note that this repository is only for model inference using openvino. Therefore, it assumes the YOLOv9 model is already trained and exported to openvino (.bin, .xml) format. ocv
can be installed using pip
command below.
Python:
pip install openvino
CPP:
Follow this installation guide: guide
CPP:
yolov9-openvino-cpp.exe <xml model path> <data> <confidence threshold> <nms threshold>
# infer an image
yolov9-openvino-cpp.exe yolov9-c.engine test.jpg
# infer a folder(images)
yolov9-openvino-cpp.exe yolov9-c.engine data
# infer a video
yolov9-openvino-cpp.exe yolov9-c.engine test.mp4 # the video path
Python:
cd python
# infer an image
python main.py --model=yolov9-c-converted.xml --data_path=test.jpg
# infer a folder(images)
python main.py --model=yolov9-c-converted.xml --data_path=data
# infer a video
python main.py --model=yolov9-c-converted.xml --data_path=test.mp4
- 2023.3.0 openvino API
- OpenCV
This project is based on the following projects: