/yolov5-opencv-dnn-cpp

YOLO5 using OPENCV in C++

Primary LanguageC++Apache License 2.0Apache-2.0

This repository is clonned and heavily inspired by https://github.com/UNeedCryDear/yolov5-opencv-dnn-cpp.

However I have made some changes and updates to make running it in ubuntu simple and straight forward.

Please note you need OpenCV>=4.5.0

Compile

mkdir build

cd build

cmake ../

make

How to Use

./build/yolo5_detector -img="./image/bus.jpg" -model="./models/yolov5n.onnx"

Bus with Yolo5 Nano

./build/yolo5_detector -img="./image/zidane.jpg" -model="./models/yolov5n.onnx"

Zidane Image with Yolo5 Nano

Useful Links

Ultralytics-Yolo5

Detecting objects with YOLOv5, OpenCV, Python and C++

Training YOLOv5 custom dataset with ease

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 20.04