Ask Your Question

Revision history [back]

const char* keys =
"{ help  h     | | Print help message. }"
"{ device      |  1 | camera device number. }"
"{ input i     | | Path to input image or video file. Skip this argument to capture frames from a camera. }"
"{ model m     | yolov2-tiny.weights | Path to a binary file of model contains trained weights. "
                  "It could be a file with extensions .caffemodel (Caffe), "
                  ".pb (TensorFlow), .t7 or .net (Torch), .weights (Darknet).}"
"{ config c    | yolov2-tiny.cfg | Path to a text file of model contains network configuration. "
                  "It could be a file with extensions .prototxt (Caffe), .pbtxt (TensorFlow), .cfg (Darknet).}"
"{ framework f | | Optional name of an origin framework of the model. Detect it automatically if it does not set. }"
"{ classes     | coco.names | Optional path to a text file with names of classes to label detected objects. }"
"{ mean        |  | Preprocess input image by subtracting mean values. Mean values should be in BGR order and delimited by spaces. }"
"{ scale       |  0.003921.f | Preprocess input image by multiplying on a scale factor. }"
"{ width       | 416 | Preprocess input image by resizing to a specific width. }"
"{ height      | 416 | Preprocess input image by resizing to a specific height. }"
"{ rgb         |  1  | Indicate that model works with RGB input images instead BGR ones. }"
"{ thr         | .5 | Confidence threshold. }"
"{ backend     |  0 | Choose one of computation backends: "
                     "0: automatically (by default), "
                     "1: Halide language (http://halide-lang.org/), "
                     "2: Intel's Deep Learning Inference Engine (https://software.intel.com/openvino-toolkit), "
                     "3: OpenCV implementation }"
"{ target      | 0 | Choose one of target computation devices: "
                     "0: CPU target (by default), "
                     "1: OpenCL, "
                     "2: OpenCL fp16 (half-float precision), "
                     "3: VPU }";

scale: 0.003921.f = 1/255.f

This is how I configured it. It works well.