Skip to content

Files

Latest commit

 

History

History

Object-Detection-using-YOLOv5-and-OpenCV-DNN-in-CPP-and-Python

Object Detection using YOLOv5 and OpenCV DNN (C++/Python)

This repository contains the code for Object Detection using YOLOv5 and OpenCV DNN in C++ and Python blogpost.

<img src="https://learnopencv.com/wp-content/uploads/2022/04/yolov5-feature-image.gif" alt="Introduction to YOLOv5 with OpenCV DNN" width="950")

Install Dependancies

download

pip install -r requirements.txt

List of tutorials for installing OpenCV for C++ here.

Execution

Python

python yolov5.py

CMake C++ Linux

mkdir build
cd build
cmake ..
cmake --build .
./main

CMake C++ Windows

rmdir /s /q build
cmake -S . -B build
cmake --build build --config Release
.\build\Release\main.exe

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.