- OpenCV 4.x with DNN module support
- CMake 3.10+
- C++ Compiler
YOLOv1 model based on this (paper)[https://www.cv-foundation.org/openaccess/content_cvpr_2016/html/Redmon_You_Only_Look_CVPR_2016_paper.html].
This project implements object detection using YOLOv4 with the COCO dataset. The inference system can detect and classify 80 different object classes in static images, or live using your computer webcam.
- YOLOv4 Model: Uses the powerful YOLOv4 architecture for accurate object detection
- COCO Dataset: Trained on 80 common object classes (person, car, bicycle, etc.)
- Inference: Use CPU for inference
The project requires YOLOv4 model files in the inference/models/ directory. Some files are included, but you need to download the weights file:
To download it, use the following command :
cd inference/models/
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weightsOr download manually from: https://github.com/AlexeyAB/darknet/releases
-
Go to the inference directory:
cd inference -
Build the project:
cmake . && make
This will create the
object-detectionandlive-detectionexecutable.
Run object detection on a single image:
./object-detection <image_path>Replace <image_path> with the image you want to procces an object detection on.
The test/ directory contains sample images for testing the project.
Run live object detection using your webcam:
./live-detectionThis will open your default webcam and display real-time object detection results in a window.