|
|
@ -30,6 +30,7 @@ const char* params |
|
|
|
"{ model | | model weights (res10_300x300_ssd_iter_140000.caffemodel) }" |
|
|
|
"{ model | | model weights (res10_300x300_ssd_iter_140000.caffemodel) }" |
|
|
|
"{ camera_device | 0 | camera device number }" |
|
|
|
"{ camera_device | 0 | camera device number }" |
|
|
|
"{ video | | video or image for detection }" |
|
|
|
"{ video | | video or image for detection }" |
|
|
|
|
|
|
|
"{ opencl | false | enable OpenCL }" |
|
|
|
"{ min_confidence | 0.5 | min confidence }"; |
|
|
|
"{ min_confidence | 0.5 | min confidence }"; |
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) |
|
|
|
int main(int argc, char** argv) |
|
|
@ -62,6 +63,11 @@ int main(int argc, char** argv) |
|
|
|
exit(-1); |
|
|
|
exit(-1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (parser.get<bool>("opencl")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
net.setPreferableTarget(DNN_TARGET_OPENCL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VideoCapture cap; |
|
|
|
VideoCapture cap; |
|
|
|
if (parser.get<String>("video").empty()) |
|
|
|
if (parser.get<String>("video").empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|