Skip to content

Commit 085bd5f

Browse files
committed
Merge pull request opencv#17658 from ilya-lavrenov:get-layer-by-name
2 parents 6044395 + 8690575 commit 085bd5f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

modules/dnn/src/dnn.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3543,6 +3543,9 @@ Net Net::Impl::createNetworkFromModelOptimizer(InferenceEngine::CNNNetwork& ieNe
35433543
}
35443544
else
35453545
{
3546+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
3547+
CV_Error(Error::StsNotImplemented, "This OpenCV version is built with Inference Engine which has dropped IR v7 support");
3548+
#else
35463549
CV_TRACE_REGION("legacy_cnn_layer");
35473550
try
35483551
{
@@ -3558,6 +3561,8 @@ Net Net::Impl::createNetworkFromModelOptimizer(InferenceEngine::CNNNetwork& ieNe
35583561
CV_LOG_DEBUG(NULL, "IE layer extraction failure: '" << name << "' - " << e.what());
35593562
return false;
35603563
}
3564+
#endif
3565+
35613566
}
35623567
};
35633568

modules/dnn/src/op_inf_engine.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define INF_ENGINE_RELEASE_2020_1 2020010000
2727
#define INF_ENGINE_RELEASE_2020_2 2020020000
2828
#define INF_ENGINE_RELEASE_2020_3 2020030000
29+
#define INF_ENGINE_RELEASE_2020_4 2020040000
2930

3031
#ifndef INF_ENGINE_RELEASE
3132
#warning("IE version have not been provided via command-line. Using 2020.3 by default")

0 commit comments

Comments
 (0)