diff --git a/modules/dnn/src/layers/detection_output_layer.cpp b/modules/dnn/src/layers/detection_output_layer.cpp index d32357b04e..76142181ae 100644 --- a/modules/dnn/src/layers/detection_output_layer.cpp +++ b/modules/dnn/src/layers/detection_output_layer.cpp @@ -54,9 +54,14 @@ #ifdef HAVE_DNN_NGRAPH #include "../ie_ngraph.hpp" +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) +#include +#else #include #endif +#endif + namespace cv { namespace dnn diff --git a/modules/dnn/src/layers/pooling_layer.cpp b/modules/dnn/src/layers/pooling_layer.cpp index cd16ec7f3b..3f2a0f7d03 100644 --- a/modules/dnn/src/layers/pooling_layer.cpp +++ b/modules/dnn/src/layers/pooling_layer.cpp @@ -48,9 +48,14 @@ #ifdef HAVE_DNN_NGRAPH #include "../ie_ngraph.hpp" +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) +#include +#include +#else #include #include #endif +#endif #include #include diff --git a/modules/dnn/src/layers/prior_box_layer.cpp b/modules/dnn/src/layers/prior_box_layer.cpp index dbd5b0426f..7385afd3b0 100644 --- a/modules/dnn/src/layers/prior_box_layer.cpp +++ b/modules/dnn/src/layers/prior_box_layer.cpp @@ -46,9 +46,14 @@ #ifdef HAVE_DNN_NGRAPH #include "../ie_ngraph.hpp" +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) +#include +#include +#else #include #include #endif +#endif #include #include diff --git a/modules/dnn/src/layers/proposal_layer.cpp b/modules/dnn/src/layers/proposal_layer.cpp index 2420dbf579..990cfeda30 100644 --- a/modules/dnn/src/layers/proposal_layer.cpp +++ b/modules/dnn/src/layers/proposal_layer.cpp @@ -10,8 +10,12 @@ #ifdef HAVE_DNN_NGRAPH #include "../ie_ngraph.hpp" +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) +#include +#else #include #endif +#endif namespace cv { namespace dnn { diff --git a/modules/dnn/src/layers/reorg_layer.cpp b/modules/dnn/src/layers/reorg_layer.cpp index d6fafa664f..6961243865 100644 --- a/modules/dnn/src/layers/reorg_layer.cpp +++ b/modules/dnn/src/layers/reorg_layer.cpp @@ -41,7 +41,6 @@ //M*/ #include "../precomp.hpp" -#include "../op_inf_engine.hpp" #include #include @@ -50,10 +49,15 @@ #include "opencl_kernels_dnn.hpp" #endif +#include "../op_inf_engine.hpp" #ifdef HAVE_DNN_NGRAPH #include "../ie_ngraph.hpp" +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) +#include +#else #include #endif +#endif namespace cv { diff --git a/modules/dnn/src/layers/resize_layer.cpp b/modules/dnn/src/layers/resize_layer.cpp index 3679c9e51b..7fc21154cf 100644 --- a/modules/dnn/src/layers/resize_layer.cpp +++ b/modules/dnn/src/layers/resize_layer.cpp @@ -11,8 +11,12 @@ #ifdef HAVE_DNN_NGRAPH #include "../ie_ngraph.hpp" +#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4) +#include +#else #include #endif +#endif namespace cv { namespace dnn {