1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

dnn: drop OpenCL code path for DetectionOutputLayer

getUMat()/getMat() calls are scope based. Results of these calls can't be
stored somewhere for future usage.
This commit is contained in:
Alexander Alekhin
2017-11-21 17:28:42 +03:00
parent c3cced0f89
commit 0f34628af7
2 changed files with 8 additions and 82 deletions
@@ -37,7 +37,9 @@ const char* params
"{ camera_device | 0 | camera device number }"
"{ video | | video or image for detection}"
"{ out | | path to output video file}"
"{ min_confidence | 0.2 | min confidence }";
"{ min_confidence | 0.2 | min confidence }"
"{ opencl | false | enable OpenCL }"
;
int main(int argc, char** argv)
{
@@ -57,6 +59,11 @@ int main(int argc, char** argv)
dnn::Net net = readNetFromCaffe(modelConfiguration, modelBinary);
//! [Initialize network]
if (parser.get<bool>("opencl"))
{
net.setPreferableTarget(DNN_TARGET_OPENCL);
}
if (net.empty())
{
cerr << "Can't load network by using the following files: " << endl;