diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index c7e07c5543..b454a3db45 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -92,7 +92,7 @@ endif() set(dnn_runtime_libs "") if(INF_ENGINE_TARGET) - ocv_option(OPENCV_DNN_IE_NN_BUILDER_2019 "Build with Inference Engine NN Builder API support" ON) + ocv_option(OPENCV_DNN_IE_NN_BUILDER_2019 "Build with Inference Engine NN Builder API support" ON) # future: NOT HAVE_NGRAPH if(OPENCV_DNN_IE_NN_BUILDER_2019) message(STATUS "DNN: Enabling Inference Engine NN Builder API support") add_definitions(-DHAVE_DNN_IE_NN_BUILDER_2019=1) diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp index 113893813c..e67a465334 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.hpp @@ -47,9 +47,9 @@ #include "opencv2/core/async.hpp" #if !defined CV_DOXYGEN && !defined CV_STATIC_ANALYSIS && !defined CV_DNN_DONT_ADD_EXPERIMENTAL_NS -#define CV__DNN_EXPERIMENTAL_NS_BEGIN namespace experimental_dnn_34_v16 { +#define CV__DNN_EXPERIMENTAL_NS_BEGIN namespace experimental_dnn_34_v17 { #define CV__DNN_EXPERIMENTAL_NS_END } -namespace cv { namespace dnn { namespace experimental_dnn_34_v16 { } using namespace experimental_dnn_34_v16; }} +namespace cv { namespace dnn { namespace experimental_dnn_34_v17 { } using namespace experimental_dnn_34_v17; }} #else #define CV__DNN_EXPERIMENTAL_NS_BEGIN #define CV__DNN_EXPERIMENTAL_NS_END diff --git a/modules/dnn/src/op_inf_engine.cpp b/modules/dnn/src/op_inf_engine.cpp index cea4f3fb77..9c74032a33 100644 --- a/modules/dnn/src/op_inf_engine.cpp +++ b/modules/dnn/src/op_inf_engine.cpp @@ -41,11 +41,13 @@ static const char* dumpInferenceEngineBackendType(Backend backend) Backend& getInferenceEngineBackendTypeParam() { static Backend param = parseInferenceEngineBackendType( - utils::getConfigurationParameterString("OPENCV_DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019_TYPE", -#ifndef HAVE_DNN_IE_NN_BUILDER_2019 + utils::getConfigurationParameterString("OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE", +#ifdef HAVE_DNN_NGRAPH CV_DNN_BACKEND_INFERENCE_ENGINE_NGRAPH -#else +#elif defined(HAVE_DNN_IE_NN_BUILDER_2019) CV_DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_API +#else +#error "Build configuration error: nGraph or NN Builder API backend should be enabled" #endif ) );