2017-12-01 06:14:40 +08:00
YOLO DNNs {#tutorial_dnn_yolo}
===============================
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.
![Picture example ](images/yolo.jpg )
Examples
--------
VIDEO DEMO:
@youtube {NHtRlndE2cg}
Source Code
-----------
2018-03-02 17:04:39 +08:00
Use a universal sample for object detection models written
[in C++ ](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp ) and
[in Python ](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.py ) languages
2017-12-01 06:14:40 +08:00
2018-03-02 17:04:39 +08:00
Usage examples
--------------
2017-12-01 06:14:40 +08:00
Execute in webcam:
@code {.bash}
2018-03-02 17:04:39 +08:00
$ 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
2017-12-01 06:14:40 +08:00
@endcode
2018-03-02 17:04:39 +08:00
Execute with image or video file:
2017-12-01 06:14:40 +08:00
@code {.bash}
2018-03-12 23:42:53 +08:00
$ 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]
2017-12-01 06:14:40 +08:00
@endcode
Questions and suggestions email to: Alessandro de Oliveira Faria cabelo@opensuse.org or OpenCV Team.