This repository contains the code for performing inference on the YOLOv8n object detection model in C++. The three approaches implemented are:
- OpenCV DNN Module – The easiest to integrate, supports Intel OpenVINO backend for acceleration.
- ONNX Runtime – More flexible across different platforms; allows selecting execution providers like OpenVINO or TensorRT based on hardware.
- OpenVINO – Optimized for Intel hardware, delivering the best performance.
For comparison, I tested all three approaches using YOLOv8n object detection with both FP32 models and INT8 static quantized models.
OpenVINO proved to be the fastest on my Intel® Core™ i7-12650H processor.
Check out the subfolders for individual implementation instructions:
opencv_dnn/– OpenCV DNN Module.onnxruntime/– ONNX Runtime with OpenVINO Execution Provider.openvino/– Native OpenVINO Inference.
Comparison of inference performance across different approaches:
