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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user