dnn: modified IE search, R2 compatibility fixed
This commit is contained in:
@@ -85,12 +85,6 @@ else()
|
||||
set(sources_options EXCLUDE_OPENCL)
|
||||
endif()
|
||||
|
||||
if(HAVE_INF_ENGINE)
|
||||
add_definitions(-DHAVE_INF_ENGINE=1)
|
||||
list(APPEND include_dirs ${INF_ENGINE_INCLUDE_DIRS})
|
||||
list(APPEND libs ${INF_ENGINE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
ocv_module_include_directories(${include_dirs})
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
ocv_append_source_files_cxx_compiler_options(fw_srcs "-Wno-suggest-override") # GCC
|
||||
@@ -98,9 +92,9 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
ocv_append_source_files_cxx_compiler_options(fw_srcs "-Wno-inconsistent-missing-override") # Clang
|
||||
endif()
|
||||
ocv_glob_module_sources(${sources_options} SOURCES ${fw_srcs})
|
||||
ocv_create_module(${libs})
|
||||
ocv_create_module(${libs} ${INF_ENGINE_TARGET})
|
||||
ocv_add_samples()
|
||||
ocv_add_accuracy_tests()
|
||||
ocv_add_accuracy_tests(${INF_ENGINE_TARGET})
|
||||
ocv_add_perf_tests()
|
||||
|
||||
ocv_option(${the_module}_PERF_CAFFE "Add performance tests of Caffe framework" OFF)
|
||||
@@ -120,9 +114,3 @@ if(BUILD_PERF_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Test Intel's Inference Engine models
|
||||
if(HAVE_INF_ENGINE AND TARGET opencv_test_dnn)
|
||||
ocv_target_include_directories(opencv_test_dnn PRIVATE ${INF_ENGINE_INCLUDE_DIRS})
|
||||
ocv_target_link_libraries(opencv_test_dnn LINK_PRIVATE ${INF_ENGINE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
@@ -334,6 +334,7 @@ size_t InfEngineBackendNet::getBatchSize() const noexcept
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2018R2)
|
||||
InferenceEngine::StatusCode InfEngineBackendNet::AddExtension(const InferenceEngine::IShapeInferExtensionPtr &extension, InferenceEngine::ResponseDesc *resp) noexcept
|
||||
{
|
||||
CV_Error(Error::StsNotImplemented, "");
|
||||
@@ -345,6 +346,7 @@ InferenceEngine::StatusCode InfEngineBackendNet::reshape(const InferenceEngine::
|
||||
CV_Error(Error::StsNotImplemented, "");
|
||||
return InferenceEngine::StatusCode::OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
void InfEngineBackendNet::init(int targetId)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,17 @@
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5
|
||||
//#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#define INF_ENGINE_RELEASE_2018R1 2018010000
|
||||
#define INF_ENGINE_RELEASE_2018R2 2018020000
|
||||
|
||||
#ifndef INF_ENGINE_RELEASE
|
||||
#warning("IE version have not been provided via command-line. Using 2018R2 by default")
|
||||
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2018R2
|
||||
#endif
|
||||
|
||||
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
|
||||
|
||||
#endif // HAVE_INF_ENGINE
|
||||
|
||||
namespace cv { namespace dnn {
|
||||
@@ -92,9 +103,10 @@ public:
|
||||
|
||||
virtual size_t getBatchSize() const noexcept CV_OVERRIDE;
|
||||
|
||||
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2018R2)
|
||||
virtual InferenceEngine::StatusCode AddExtension(const InferenceEngine::IShapeInferExtensionPtr& extension, InferenceEngine::ResponseDesc* resp) noexcept;
|
||||
|
||||
virtual InferenceEngine::StatusCode reshape(const InputShapes& inputShapes, InferenceEngine::ResponseDesc* resp) noexcept;
|
||||
#endif
|
||||
|
||||
void init(int targetId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user