OpenCV  4.0.1
Open Source Computer Vision
YOLO DNNs

Introduction

In this text you will learn how to use opencv_dnn module using yolo_object_detection (Sample of using OpenCV dnn module in real time with device capture, video and image).

We will demonstrate results of this example on the following picture.

yolo.jpg
Picture example

Examples

VIDEO DEMO:

Source Code

Use a universal sample for object detection models written in C++ and in Python languages

Usage examples

Execute in webcam:

$ example_dnn_object_detection --config=[PATH-TO-DARKNET]/cfg/yolo.cfg --model=[PATH-TO-DARKNET]/yolo.weights --classes=object_detection_classes_pascal_voc.txt --width=416 --height=416 --scale=0.00392 --rgb

Execute with image or video file:

$ example_dnn_object_detection --config=[PATH-TO-DARKNET]/cfg/yolo.cfg --model=[PATH-TO-DARKNET]/yolo.weights --classes=object_detection_classes_pascal_voc.txt --width=416 --height=416 --scale=0.00392 --input=[PATH-TO-IMAGE-OR-VIDEO-FILE] --rgb

Questions and suggestions email to: Alessandro de Oliveira Faria cabel.nosp@m.o@op.nosp@m.ensus.nosp@m.e.or.nosp@m.g or OpenCV Team.