diff --git a/doc/tutorials/dnn/dnn_android/dnn_android.markdown b/doc/tutorials/dnn/dnn_android/dnn_android.markdown index 6ab67b3820..2c81b7ed1d 100644 --- a/doc/tutorials/dnn/dnn_android/dnn_android.markdown +++ b/doc/tutorials/dnn/dnn_android/dnn_android.markdown @@ -2,7 +2,7 @@ @tableofcontents -@prev_tutorial{tutorial_dnn_halide_scheduling} +@prev_tutorial{tutorial_dnn_openvino} @next_tutorial{tutorial_dnn_yolo} | | | diff --git a/doc/tutorials/dnn/dnn_halide_scheduling/dnn_halide_scheduling.markdown b/doc/tutorials/dnn/dnn_halide_scheduling/dnn_halide_scheduling.markdown index 6d2751a467..ec89a26eb8 100644 --- a/doc/tutorials/dnn/dnn_halide_scheduling/dnn_halide_scheduling.markdown +++ b/doc/tutorials/dnn/dnn_halide_scheduling/dnn_halide_scheduling.markdown @@ -3,7 +3,7 @@ @tableofcontents @prev_tutorial{tutorial_dnn_halide} -@next_tutorial{tutorial_dnn_android} +@next_tutorial{tutorial_dnn_openvino} | | | | -: | :- | diff --git a/doc/tutorials/dnn/dnn_openvino/dnn_openvino.markdown b/doc/tutorials/dnn/dnn_openvino/dnn_openvino.markdown new file mode 100644 index 0000000000..57c9840386 --- /dev/null +++ b/doc/tutorials/dnn/dnn_openvino/dnn_openvino.markdown @@ -0,0 +1,28 @@ +OpenCV usage with OpenVINO {#tutorial_dnn_openvino} +===================== + +@prev_tutorial{tutorial_dnn_halide_scheduling} +@next_tutorial{tutorial_dnn_android} + +| | | +| -: | :- | +| Original author | Aleksandr Voron | +| Compatibility | OpenCV == 4.x | + +This tutorial provides OpenCV installation guidelines how to use OpenCV with OpenVINO. + +Since 2021.1.1 release OpenVINO does not provide pre-built OpenCV. +The change does not affect you if you are using OpenVINO runtime directly or OpenVINO samples: it does not have a strong dependency to OpenCV. +However, if you are using Open Model Zoo demos or OpenVINO runtime as OpenCV DNN backend you need to get the OpenCV build. + +There are 2 approaches how to get OpenCV: + +- Install pre-built OpenCV from another sources: system repositories, pip, conda, homebrew. Generic pre-built OpenCV package may have several limitations: + - OpenCV version may be out-of-date + - OpenCV may not contain G-API module with enabled OpenVINO support (e.g. some OMZ demos use G-API functionality) + - OpenCV may not be optimized for modern hardware (default builds need to cover wide range of hardware) + - OpenCV may not support Intel TBB, Intel Media SDK + - OpenCV DNN module may not use OpenVINO as an inference backend +- Build OpenCV from source code against specific version of OpenVINO. This approach solves the limitations mentioned above. + +The instruction how to follow both approaches is provided in [OpenCV wiki](https://github.com/opencv/opencv/wiki/BuildOpenCV4OpenVINO). diff --git a/doc/tutorials/dnn/table_of_content_dnn.markdown b/doc/tutorials/dnn/table_of_content_dnn.markdown index 3f74826dac..e878eb2357 100644 --- a/doc/tutorials/dnn/table_of_content_dnn.markdown +++ b/doc/tutorials/dnn/table_of_content_dnn.markdown @@ -4,6 +4,7 @@ Deep Neural Networks (dnn module) {#tutorial_table_of_content_dnn} - @subpage tutorial_dnn_googlenet - @subpage tutorial_dnn_halide - @subpage tutorial_dnn_halide_scheduling +- @subpage tutorial_dnn_openvino - @subpage tutorial_dnn_android - @subpage tutorial_dnn_yolo - @subpage tutorial_dnn_javascript diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp index 6f03a8c32e..6ed0d6e70c 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.hpp @@ -65,12 +65,12 @@ CV__DNN_INLINE_NS_BEGIN enum Backend { //! DNN_BACKEND_DEFAULT equals to DNN_BACKEND_INFERENCE_ENGINE if - //! OpenCV is built with Intel's Inference Engine library or + //! OpenCV is built with Intel OpenVINO or //! DNN_BACKEND_OPENCV otherwise. DNN_BACKEND_DEFAULT = 0, DNN_BACKEND_HALIDE, - DNN_BACKEND_INFERENCE_ENGINE, //!< Intel's Inference Engine computational backend - //!< @sa setInferenceEngineBackendType + DNN_BACKEND_INFERENCE_ENGINE, //!< Intel OpenVINO computational backend + //!< @note Tutorial how to build OpenCV with OpenVINO: @ref tutorial_dnn_openvino DNN_BACKEND_OPENCV, DNN_BACKEND_VKCOM, DNN_BACKEND_CUDA,