From 80265a0815ea88c58c1f812fce881d19ade26546 Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Wed, 14 Nov 2018 13:42:06 +0300 Subject: [PATCH] Fix a bug with OpenVINO backend --- modules/dnn/src/dnn.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/dnn/src/dnn.cpp b/modules/dnn/src/dnn.cpp index 8880edbd2d..ed5451fc2e 100644 --- a/modules/dnn/src/dnn.cpp +++ b/modules/dnn/src/dnn.cpp @@ -1899,6 +1899,9 @@ struct Net::Impl } } + if (preferableBackend != DNN_BACKEND_OPENCV) + continue; // Go to the next layer. + // the optimization #2. if there is no layer that takes max pooling layer's computed // max indices (and only some semantical segmentation networks might need this; // many others only take the maximum values), then we switch the max pooling