Commit 1073175c authored by Li Peng's avatar Li Peng

add opencl option for resnet_ssd_face sample

Signed-off-by: 's avatarLi Peng <peng.li@intel.com>
parent 34bfd7ef
......@@ -30,6 +30,7 @@ const char* params
"{ model | | model weights (res10_300x300_ssd_iter_140000.caffemodel) }"
"{ camera_device | 0 | camera device number }"
"{ video | | video or image for detection }"
"{ opencl | false | enable OpenCL }"
"{ min_confidence | 0.5 | min confidence }";
int main(int argc, char** argv)
......@@ -62,6 +63,11 @@ int main(int argc, char** argv)
exit(-1);
}
if (parser.get<bool>("opencl"))
{
net.setPreferableTarget(DNN_TARGET_OPENCL);
}
VideoCapture cap;
if (parser.get<String>("video").empty())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment