This is a project to demonstrate the use of YOLOv5 with cpp and opencv to detect objects in a given video input. YoloV5 is a powerful object detection model that can be used in various applications such as autonomous vehicles, security systems, and many more. This project uses the YOLOv5 model to detect objects in a video and display the output with bounding boxes around the detected objects.
- Python 3.8 and above
- OpenCV 4.5.4 and above
- CMake
- YOLOv5 5.0
- GCC 6.3.0
- Clone the repository
- Install OpenCV - follow the this link: https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
- Install CMake - follow the this link: https://cmake.org/download/
- Install YOLOv5 - follow the this link: https://sourceforge.net/projects/yolov5.mirror/files/v7.0/yolov5m.onnx/download
Run the following commands:
mkdir build
cd build
cmake ..
make
./YOLOv5_Detector
- The output will be displayed in the data folder.
The code will convert the video input into frames and then detect objects in each frame. The output will be displayed with bounding boxes around the detected objects.
All the images output will be saved in the data folder.
The project demonstrates the use of YOLOv5 with cpp and opencv to detect objects in a given image input. The project can be further extended to detect objects in a video stream or a live feed from a camera.