Skip to content

YOLOv9 with Openvino Backend (C++ and Python)

Notifications You must be signed in to change notification settings

iamfaith/yolov9-openvino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YOLOv9-Openvino

C++ and python implementation of YOLOv9 using Openvino Backend.

🤖 Model

  1. Download the converted model: yolov9-c-converted
  2. 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.

⚙️ Build

Python:

pip install openvino

CPP:

Follow this installation guide: guide

🚀 Usage:

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

🖥️ Requirement

  • 2023.3.0 openvino API
  • OpenCV

🔗 Acknowledgement

This project is based on the following projects:

About

YOLOv9 with Openvino Backend (C++ and Python)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 56.0%
  • Python 41.6%
  • CMake 2.4%