Commit 16ad53f3 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #15962 from alalek:dnn_fix_ie_opencvlayer

parents e459a510 86042af1
...@@ -646,8 +646,6 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net) ...@@ -646,8 +646,6 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net)
enginePtr->AddExtension(extension, 0); enginePtr->AddExtension(extension, 0);
#else #else
ie.AddExtension(extension, "CPU"); ie.AddExtension(extension, "CPU");
// OpenCV fallbacks as extensions.
ie.AddExtension(std::make_shared<InfEngineExtension>(), "CPU");
#endif #endif
CV_LOG_INFO(NULL, "DNN-IE: Loaded extension plugin: " << libName); CV_LOG_INFO(NULL, "DNN-IE: Loaded extension plugin: " << libName);
found = true; found = true;
...@@ -660,6 +658,10 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net) ...@@ -660,6 +658,10 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net)
CV_LOG_WARNING(NULL, "DNN-IE: Can't load extension plugin (extra layers for some networks). Specify path via OPENCV_DNN_IE_EXTRA_PLUGIN_PATH parameter"); CV_LOG_WARNING(NULL, "DNN-IE: Can't load extension plugin (extra layers for some networks). Specify path via OPENCV_DNN_IE_EXTRA_PLUGIN_PATH parameter");
} }
// Some of networks can work without a library of extra layers. // Some of networks can work without a library of extra layers.
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2019R1)
// OpenCV fallbacks as extensions.
ie.AddExtension(std::make_shared<InfEngineExtension>(), "CPU");
#endif
#ifndef _WIN32 #ifndef _WIN32
// Limit the number of CPU threads. // Limit the number of CPU threads.
#if INF_ENGINE_VER_MAJOR_LE(INF_ENGINE_RELEASE_2019R1) #if INF_ENGINE_VER_MAJOR_LE(INF_ENGINE_RELEASE_2019R1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment