/OpenVINO_CPP_YOLOX-YOLOV5-YOLOV8

C++ inference of YOLOX/YOLOV5/YOLOV8 for OpenVINO,Support float32、float16 and int8.

Primary LanguageC++

YOLOX-YOLOV5-YOLOV8-OpenVINO in C++

This tutorial includes a C++ inference of YOLOX/YOLOV5/YOLOV8 for OpenVINO.

Install OpenVINO Toolkit

Please visit Openvino Homepage for more details.

Environment

OpenVINO_2022.3.0
OpenCV-4.6.0

Convert model

  1. Export ONNX model

  2. Convert ONNX to OpenVINO

    Install requirements for convert tool

    pip install openvino-dev

    Convert ONNX into the OpenVINO IR

    FP32

    mo -m <onnx_model_path>  --output_dir <MODEL_DIR> 

    FP16

    mo -m <onnx_model_path>  --output_dir <MODEL_DIR> --compress_to_fp16

    INT8 Quantization with POT

    pot -q default -m <ir_model_xml> -w <ir_model_bin> --engine simplified --data-source <data_dir> --output-dir <output_dir_name> --direct-dump --name <int8_model_name>

    visit Openvino POT for more details.

Build

Linux

mkdir build
cd build
cmake ..
make

Demo

c++

./detect  <...><...>