Skip to content

sjYoondeltar/yolov8_CPP_Inference_OpenCV_ONNX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yolov8/yolov5 Inference C++

Usage:

git clone https://github.com/JustasBart/yolov8_CPP_Inference_OpenCV_ONNX
cd yolov8_CPP_Inference_OpenCV_ONNX

Edit the main.cpp to change the projectBasePath to match your user.

mkdir build
cd build
cmake ..
make
./Yolov8CPPInference

yolov8s.onnx:

image

yolov5s.onnx:

image

This repository is based on OpenCVs dnn API to run an ONNX exported model of either yolov5/yolov8 (In theory should work for yolov6 and yolov7 but not tested). Note that for this example the networks are exported as rectangular (640x480) resolutions, but it would work for any resolution that you export as although you might want to use the letterBox approach for square images depending on your use-case.

The main branch version is based on using Qt as a GUI wrapper the main interest here is the Inference class file which shows how to transpose yolov8 models to work as yolov5 models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.6%
  • CMake 5.7%
  • Shell 1.7%