mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
add opencl option for resnet_ssd_face sample
Signed-off-by: Li Peng <peng.li@intel.com>
This commit is contained in:
parent
34bfd7ef51
commit
1073175c77
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user