Feature/azaytsev/from 2021 4 (#9247)

* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Updated the link to software license agreements

* Revert "Updated the link to software license agreements"

This reverts commit 706dac500e.

* Docs to Sphinx (#8151)

* docs to sphinx

* Update GPU.md

* Update CPU.md

* Update AUTO.md

* Update performance_int8_vs_fp32.md

* update

* update md

* updates

* disable doc ci

* disable ci

* fix index.rst

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
# Conflicts:
#	.gitignore
#	docs/CMakeLists.txt
#	docs/IE_DG/Deep_Learning_Inference_Engine_DevGuide.md
#	docs/IE_DG/Extensibility_DG/Custom_ONNX_Ops.md
#	docs/IE_DG/Extensibility_DG/VPU_Kernel.md
#	docs/IE_DG/InferenceEngine_QueryAPI.md
#	docs/IE_DG/Int8Inference.md
#	docs/IE_DG/Integrate_with_customer_application_new_API.md
#	docs/IE_DG/Model_caching_overview.md
#	docs/IE_DG/supported_plugins/GPU_RemoteBlob_API.md
#	docs/IE_DG/supported_plugins/HETERO.md
#	docs/IE_DG/supported_plugins/MULTI.md
#	docs/MO_DG/prepare_model/convert_model/Convert_Model_From_Caffe.md
#	docs/MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md
#	docs/MO_DG/prepare_model/convert_model/Convert_Model_From_MxNet.md
#	docs/MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md
#	docs/MO_DG/prepare_model/convert_model/Converting_Model.md
#	docs/MO_DG/prepare_model/convert_model/Converting_Model_General.md
#	docs/MO_DG/prepare_model/convert_model/Cutting_Model.md
#	docs/MO_DG/prepare_model/convert_model/pytorch_specific/Convert_RNNT.md
#	docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_EfficientDet_Models.md
#	docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_WideAndDeep_Family_Models.md
#	docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md
#	docs/doxygen/Doxyfile.config
#	docs/doxygen/ie_docs.xml
#	docs/doxygen/ie_plugin_api.config
#	docs/doxygen/ngraph_cpp_api.config
#	docs/doxygen/openvino_docs.xml
#	docs/get_started/get_started_macos.md
#	docs/get_started/get_started_raspbian.md
#	docs/get_started/get_started_windows.md
#	docs/img/cpu_int8_flow.png
#	docs/index.md
#	docs/install_guides/VisionAcceleratorFPGA_Configure.md
#	docs/install_guides/VisionAcceleratorFPGA_Configure_Windows.md
#	docs/install_guides/deployment-manager-tool.md
#	docs/install_guides/installing-openvino-linux.md
#	docs/install_guides/installing-openvino-macos.md
#	docs/install_guides/installing-openvino-windows.md
#	docs/optimization_guide/dldt_optimization_guide.md
#	inference-engine/ie_bridges/c/include/c_api/ie_c_api.h
#	inference-engine/ie_bridges/python/docs/api_overview.md
#	inference-engine/ie_bridges/python/sample/ngraph_function_creation_sample/README.md
#	inference-engine/ie_bridges/python/sample/speech_sample/README.md
#	inference-engine/ie_bridges/python/src/openvino/inference_engine/ie_api.pyx
#	inference-engine/include/ie_api.h
#	inference-engine/include/ie_core.hpp
#	inference-engine/include/ie_version.hpp
#	inference-engine/samples/benchmark_app/README.md
#	inference-engine/samples/speech_sample/README.md
#	inference-engine/src/plugin_api/exec_graph_info.hpp
#	inference-engine/src/plugin_api/file_utils.h
#	inference-engine/src/transformations/include/transformations_visibility.hpp
#	inference-engine/tools/benchmark_tool/README.md
#	ngraph/core/include/ngraph/ngraph.hpp
#	ngraph/frontend/onnx_common/include/onnx_common/parser.hpp
#	ngraph/python/src/ngraph/utils/node_factory.py
#	openvino/itt/include/openvino/itt.hpp
#	thirdparty/ade
#	tools/benchmark/README.md

* Cherry-picked remove font-family (#8211)

* Cherry-picked: Update get_started_scripts.md (#8338)

* doc updates (#8268)

* Various doc changes

* theme changes

* remove font-family (#8211)

* fix  css

* Update uninstalling-openvino.md

* fix css

* fix

* Fixes for Installation Guides

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
Co-authored-by: kblaszczak-intel <karol.blaszczak@intel.com>
# Conflicts:
#	docs/IE_DG/Bfloat16Inference.md
#	docs/IE_DG/InferenceEngine_QueryAPI.md
#	docs/IE_DG/OnnxImporterTutorial.md
#	docs/IE_DG/supported_plugins/AUTO.md
#	docs/IE_DG/supported_plugins/HETERO.md
#	docs/IE_DG/supported_plugins/MULTI.md
#	docs/MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md
#	docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md
#	docs/install_guides/installing-openvino-macos.md
#	docs/install_guides/installing-openvino-windows.md
#	docs/ops/opset.md
#	inference-engine/samples/benchmark_app/README.md
#	inference-engine/tools/benchmark_tool/README.md
#	thirdparty/ade

* Cherry-picked: doc script changes (#8568)

* fix openvino-sphinx-theme

* add linkcheck target

* fix

* change version

* add doxygen-xfail.txt

* fix

* AA

* fix

* fix

* fix

* fix

* fix
# Conflicts:
#	thirdparty/ade

* Cherry-pick: Feature/azaytsev/doc updates gna 2021 4 2 (#8567)

* Various doc changes

* Reformatted C++/Pythob sections. Updated with info from PR8490

* additional fix

* Gemini Lake replaced with Elkhart Lake

* Fixed links in IGs, Added 12th Gen
# Conflicts:
#	docs/IE_DG/supported_plugins/GNA.md
#	thirdparty/ade

* Cherry-pick: Feature/azaytsev/doc fixes (#8897)

* Various doc changes

* Removed the empty Learning path topic

* Restored the Gemini Lake CPIU list
# Conflicts:
#	docs/IE_DG/supported_plugins/GNA.md
#	thirdparty/ade

* Cherry-pick: sphinx copybutton doxyrest code blocks (#8992)

# Conflicts:
#	thirdparty/ade

* Cherry-pick: iframe video enable fullscreen (#9041)

# Conflicts:
#	thirdparty/ade

* Cherry-pick: fix untitled titles (#9213)

# Conflicts:
#	thirdparty/ade

* Cherry-pick: perf bench graph animation (#9045)

* animation

* fix
# Conflicts:
#	thirdparty/ade

* Cherry-pick: doc pytest (#8888)

* docs pytest

* fixes
# Conflicts:
#	docs/doxygen/doxygen-ignore.txt
#	docs/scripts/ie_docs.xml
#	thirdparty/ade

* Cherry-pick: restore deleted files (#9215)

* Added new operations to the doc structure (from removed ie_docs.xml)

* Additional fixes

* Update docs/IE_DG/InferenceEngine_QueryAPI.md

Co-authored-by: Helena Kloosterman <helena.kloosterman@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Helena Kloosterman <helena.kloosterman@intel.com>

* Update Custom_Layers_Guide.md

* Changes according to review  comments

* doc scripts fixes

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Helena Kloosterman <helena.kloosterman@intel.com>

* Update Int8Inference.md

* update xfail

* clang format

* updated xfail

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
Co-authored-by: Nikolay Tyukaev <nikolay.tyukaev@intel.com>
Co-authored-by: kblaszczak-intel <karol.blaszczak@intel.com>
Co-authored-by: Yury Gorbachev <yury.gorbachev@intel.com>
Co-authored-by: Helena Kloosterman <helena.kloosterman@intel.com>
This commit is contained in:
670 files changed
+23447 -15486

No files matched your search

+874
View File
@@ -0,0 +1,874 @@
# Get Started with Sample and Demo Applications {#openvino_docs_get_started_get_started_demos}
## Introduction
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
You will perform the following steps:
1. <a href="#download-models">Use the Model Downloader to download suitable models.</a>
2. <a href="#convert-models-to-intermediate-representation">Convert the models with the Model Optimizer.</a>
3. <a href="download-media">Download media files to run inference on.</a>
4. <a href="run-image-classification">Run inference on the sample and see the results:</a>
- <a href="run-image-classification">Image Classification Code Sample</a>
- <a href="run-security-barrier">Security Barrier Camera Demo application</a>
If you installed OpenVINO™ via `pip` you need to change commands listed below. Details are listed in one of [tutorials](https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/002-openvino-api/002-openvino-api.ipynb).
This guide assumes you completed all installation and configuration steps. If you have not yet installed and configured the toolkit:
@sphinxdirective
.. tab:: Linux
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Linux* <openvino_docs_install_guides_installing_openvino_linux>`
.. tab:: Windows
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Windows* <openvino_docs_install_guides_installing_openvino_windows>`
.. tab:: macOS
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for macOS* <openvino_docs_install_guides_installing_openvino_macos>`
@endsphinxdirective
## Build Samples and Demos
If you have already built the demos and samples, you can skip this section. The build will take about 5-10 minutes, depending on your system.
To build OpenVINO samples:
@sphinxdirective
.. tab:: Linux
Go to the :doc:`Inference Engine Samples page <openvino_docs_IE_DG_Samples_Overview>` and see the "Build the Sample Applications on Linux*" section.
.. tab:: Windows
Go to the :doc:`Inference Engine Samples page <openvino_docs_IE_DG_Samples_Overview>` and see the "Build the Sample Applications on Microsoft Windows* OS" section.
.. tab:: macOS
Go to the :doc:`Inference Engine Samples page <openvino_docs_IE_DG_Samples_Overview>` and see the "Build the Sample Applications on macOS*" section.
@endsphinxdirective
To build OpenVINO demos:
@sphinxdirective
.. tab:: Linux
Go to the :doc:`Open Model Zoo Demos page <omz_demos>` and see the "Build the Demo Applications on Linux*" section.
.. tab:: Windows
Go to the :doc:`Open Model Zoo Demos page <omz_demos>` and see the "Build the Demo Applications on Microsoft Windows* OS" section.
.. tab:: macOS
Go to the :doc:`Open Model Zoo Demos page <omz_demos>` and see the "Build the Demo Applications on Linux*" section. You can use the requirements from "To build OpenVINO samples" above and adapt the Linux build steps for macOS*.
@endsphinxdirective
## <a name="download-models"></a> Step 1: Download the Models
You must have a model that is specific for your inference task. Example model types are:
- Classification (AlexNet, GoogleNet, SqueezeNet, others): Detects one type of element in an image
- Object Detection (SSD, YOLO): Draws bounding boxes around multiple types of objects in an image
- Custom: Often based on SSD
Options to find a model suitable for the OpenVINO™ toolkit:
- Download public or Intel pre-trained models from the [Open Model Zoo](https://github.com/openvinotoolkit/open_model_zoo) using the [Model Downloader tool](@ref omz_tools_downloader)
- Download from GitHub*, Caffe* Zoo, TensorFlow* Zoo, etc.
- Train your own model with machine learning tools
This guide uses the OpenVINO™ Model Downloader to get pre-trained models. You can use one of the following commands to find a model:
### List the models available in the downloader
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
cd /opt/intel/openvino_2021/deployment_tools/tools/model_downloader/
python3 info_dumper.py --print_all
.. tab:: Windows
.. code-block:: bat
cd <INSTALL_DIR>\deployment_tools\tools\model_downloader\
python info_dumper.py --print_all
.. tab:: macOS
.. code-block:: sh
cd /opt/intel/openvino_2021/deployment_tools/tools/model_downloader/
python3 info_dumper.py --print_all
@endsphinxdirective
### Use `grep` to list models that have a specific name pattern
``` sh
python3 info_dumper.py --print_all | grep <model_name>
```
Use the Model Downloader to download the models to a models directory. This guide uses `<models_dir>` and `<models_name>` as placeholders for the models directory and model name:
@sphinxdirective
.. tab:: Linux
Don't run downloader with `sudo`. It will further lead to complications
.. code-block:: sh
python3 downloader.py --name <model_name> --output_dir <models_dir>
.. tab:: Windows
.. code-block:: bat
python downloader.py --name <model_name> --output_dir <models_dir>
.. tab:: macOS
Don't run downloader with `sudo`. It will further lead to complications
.. code-block:: sh
python3 downloader.py --name <model_name> --output_dir <models_dir>
@endsphinxdirective
Download the following models to run the Image Classification Sample and Security Barrier Camera Demo applications:
|Model Name | Code Sample or Demo App |
|-----------------------------------------------|------------------------------------------|
|`squeezenet1.1` | Image Classification Sample |
|`vehicle-license-plate-detection-barrier-0106` | Security Barrier Camera Demo |
|`vehicle-attributes-recognition-barrier-0039` | Security Barrier Camera Demo |
|`license-plate-recognition-barrier-0001` | Security Barrier Camera Demo |
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="Click for an example of downloading the SqueezeNet Caffe* model">
@endsphinxdirective
To download the SqueezeNet 1.1 Caffe* model to the `models` folder:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
python3 downloader.py --name squeezenet1.1 --output_dir ~/models
.. tab:: Windows
.. code-block:: bat
python downloader.py --name squeezenet1.1 --output_dir C:\Users\<USER_ID>\Documents\models
.. tab:: macOS
.. code-block:: sh
python3 downloader.py --name squeezenet1.1 --output_dir ~/models
@endsphinxdirective
Your screen looks similar to this after the download and shows the paths of downloaded files:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
###############|| Downloading models ||###############
========= Downloading /home/username/models/public/squeezenet1.1/squeezenet1.1.prototxt
========= Downloading /home/username/models/public/squeezenet1.1/squeezenet1.1.caffemodel
... 100%, 4834 KB, 3157 KB/s, 1 seconds passed
###############|| Post processing ||###############
========= Replacing text in /home/username/models/public/squeezenet1.1/squeezenet1.1.prototxt =========
.. tab:: Windows
.. code-block:: bat
################|| Downloading models ||################
========== Downloading C:\Users\username\Documents\models\public\squeezenet1.1\squeezenet1.1.prototxt
... 100%, 9 KB, ? KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\public\squeezenet1.1\squeezenet1.1.caffemodel
... 100%, 4834 KB, 571 KB/s, 8 seconds passed
################|| Post-processing ||################
========== Replacing text in C:\Users\username\Documents\models\public\squeezenet1.1\squeezenet1.1.prototxt
.. tab:: macOS
.. code-block:: sh
###############|| Downloading models ||###############
========= Downloading /Users/username/models/public/squeezenet1.1/squeezenet1.1.prototxt
... 100%, 9 KB, 44058 KB/s, 0 seconds passed
========= Downloading /Users/username/models/public/squeezenet1.1/squeezenet1.1.caffemodel
... 100%, 4834 KB, 4877 KB/s, 0 seconds passed
###############|| Post processing ||###############
========= Replacing text in /Users/username/models/public/squeezenet1.1/squeezenet1.1.prototxt =========
@endsphinxdirective
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="Click for an example of downloading models for the Security Barrier Camera Demo application">
@endsphinxdirective
To download all three pre-trained models in FP16 precision to the `models` folder in your home folder:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
python3 downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir ~/models --precisions FP16
.. tab:: Windows
.. code-block:: bat
python downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir C:\Users\<USER_ID>\Documents\models --precisions FP16
.. tab:: macOS
.. code-block:: sh
python3 downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir ~/models --precisions FP16
@endsphinxdirective
Your screen looks similar to this after the download:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
################|| Downloading models ||################
========== Downloading /home/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml
... 100%, 204 KB, 183949 KB/s, 0 seconds passed
========== Downloading /home/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin
... 100%, 1256 KB, 3948 KB/s, 0 seconds passed
========== Downloading /home/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml
... 100%, 32 KB, 133398 KB/s, 0 seconds passed
========== Downloading /home/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin
... 100%, 1222 KB, 3167 KB/s, 0 seconds passed
========== Downloading /home/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml
... 100%, 47 KB, 85357 KB/s, 0 seconds passed
========== Downloading /home/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin
... 100%, 2378 KB, 5333 KB/s, 0 seconds passed
################|| Post-processing ||################
.. tab:: Windows
.. code-block:: bat
################|| Downloading models ||################
========== Downloading C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml
... 100%, 207 KB, 13810 KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.bin
... 100%, 1256 KB, 70 KB/s, 17 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml
... 100%, 32 KB, ? KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.bin
... 100%, 1222 KB, 277 KB/s, 4 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml
... 100%, 47 KB, ? KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.bin
... 100%, 2378 KB, 120 KB/s, 19 seconds passed
################|| Post-processing ||################
.. tab:: macOS
.. code-block:: sh
################|| Downloading models ||################
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml
... 100%, 207 KB, 313926 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin
... 100%, 1256 KB, 2552 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml
... 100%, 32 KB, 172042 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin
... 100%, 1222 KB, 2712 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml
... 100%, 47 KB, 217130 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin
... 100%, 2378 KB, 4222 KB/s, 0 seconds passed
################|| Post-processing ||################
@endsphinxdirective
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="convert-models-to-intermediate-representation"></a>Step 2: Convert the Model with Model Optimizer
In this step, your trained models are ready to run through the Model Optimizer to convert them to the IR (Intermediate Representation) format. For most model types, this is required before using the Inference Engine with the model.
Models in the IR format always include an `.xml` and `.bin` file and may also include other files such as `.json` or `.mapping`. Make sure you have these files together in a single directory so the Inference Engine can find them.
REQUIRED: `model_name.xml`
REQUIRED: `model_name.bin`
OPTIONAL: `model_name.json`, `model_name.mapping`, etc.
This tutorial uses the public SqueezeNet 1.1 Caffe* model to run the Image Classification Sample. See the example in the Download Models section of this page to learn how to download this model.
The SqueezeNet1.1 model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to IR. The `vehicle-license-plate-detection-barrier-0106`, `vehicle-attributes-recognition-barrier-0039`, and `license-plate-recognition-barrier-0001` models are downloaded in IR format. You don't need to use the Model Optimizer on them because they are Intel models that have previously been converted. Public models will need converting with Model Optimizer.
Create an `<ir_dir>` directory to contain the model's Intermediate Representation (IR).
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
mkdir ~/ir
.. tab:: Windows
.. code-block:: bat
mkdir C:\Users\<USER_ID>\Documents\ir
.. tab:: macOS
.. code-block:: sh
mkdir ~/ir
@endsphinxdirective
The Inference Engine can perform inference on different precision formats, such as FP32, FP16, or INT8. To generate an IR with a specific precision, run the Model Optimizer with the appropriate `--data_type` option.
Generic Model Optimizer script:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
cd /opt/intel/openvino/deployment_tools/model_optimizer
python3 mo.py --input_model <model_dir>/<model_file> --data_type <model_precision> --output_dir <ir_dir>
.. tab:: Windows
.. code-block:: bat
cd <INSTALL_DIR>\deployment_tools\model_optimizer
python mo.py --input_model <model_dir>\<model_file> --data_type <model_precision> --output_dir <ir_dir>
.. tab:: macOS
.. code-block:: sh
cd /opt/intel/openvino/deployment_tools/model_optimizer
python3 ./mo.py --input_model <model_dir>/<model_file> --data_type <model_precision> --output_dir <ir_dir>
@endsphinxdirective
IR files produced by the script are written to the <ir_dir> directory.
The command with most placeholders filled in and FP16 precision:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
cd /opt/intel/openvino/deployment_tools/model_optimizer
python3 mo.py --input_model ~/models/public/squeezenet1.1/squeezenet1.1.caffemodel --data_type FP16 --output_dir ~/ir
.. tab:: Windows
.. code-block:: bat
cd <INSTALL_DIR>\deployment_tools\model_optimizer
python mo.py --input_model C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\squeezenet1.1.caffemodel --data_type FP16 --output_dir C:\Users\<USER_ID>\Documents\ir
.. tab:: macOS
.. code-block:: sh
cd /opt/intel/openvino/deployment_tools/model_optimizer
python3 mo.py --input_model ~/models/public/squeezenet1.1/squeezenet1.1.caffemodel --data_type FP16 --output_dir ~/ir
@endsphinxdirective
## <a name="download-media"></a> Step 3: Download a Video or Still Photo as Media
Many sources are available from which you can download video media to use the code samples and demo applications. Possibilities include:
- [Pexels](https://pexels.com)
- [Google Images](https://images.google.com)
As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes several sample images and videos that you can use for running code samples and demo applications:
@sphinxdirective
.. tab:: Linux
- ``/opt/intel/openvino_2021/deployment_tools/demo/car.png``
- ``/opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp``
- `Sample images and video <https://storage.openvinotoolkit.org/data/test_data/>`_
- `Sample videos <https://github.com/intel-iot-devkit/sample-videos>`_
.. tab:: Windows
- ``<INSTALL_DIR>\deployment_tools\demo\car.png``
- ``<INSTALL_DIR>\deployment_tools\demo\car_1.bmp``
- `Sample images and video <https://storage.openvinotoolkit.org/data/test_data/>`_
- `Sample videos <https://github.com/intel-iot-devkit/sample-videos>`_
.. tab:: macOS
- ``/opt/intel/openvino_2021/deployment_tools/demo/car.png``
- ``/opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp``
- `Sample images and video <https://storage.openvinotoolkit.org/data/test_data/>`_
- `Sample videos <https://github.com/intel-iot-devkit/sample-videos>`_
@endsphinxdirective
## <a name="run-image-classification"></a>Step 4: Run Inference on the Sample
### Run the Image Classification Code Sample
To run the **Image Classification** code sample with an input image using the IR model:
1. Set up the OpenVINO environment variables:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
source /opt/intel/openvino/bin/setupvars.sh
.. tab:: Windows
.. code-block:: bat
<INSTALL_DIR>\openvino\bin\setupvars.bat
.. tab:: macOS
.. code-block:: sh
source /opt/intel/openvino/bin/setupvars.sh
@endsphinxdirective
2. Go to the code samples release directory created when you built the samples earlier:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
cd ~/inference_engine_cpp_samples_build/intel64/Release
.. tab:: Windows
.. code-block:: bat
cd C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release
.. tab:: macOS
.. code-block:: sh
cd ~/inference_engine_cpp_samples_build/intel64/Release
@endsphinxdirective
3. Run the code sample executable, specifying the input media file, the IR for your model, and a target device for performing inference:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
classification_sample_async -i <path_to_media> -m <path_to_model> -d <target_device>
.. tab:: Windows
.. code-block:: bat
classification_sample_async.exe -i <path_to_media> -m <path_to_model> -d <target_device>
.. tab:: macOS
.. code-block:: sh
classification_sample_async -i <path_to_media> -m <path_to_model> -d <target_device>
@endsphinxdirective
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="Click for examples of running the Image Classification code sample on different devices">
@endsphinxdirective
The following commands run the Image Classification Code Sample using the `car.png` file from the `demo` directory as an input image, the model in IR format from the `ir` directory, and on different hardware devices:
**CPU:**
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d CPU
.. tab:: Windows
.. code-block:: bat
.\classification_sample_async.exe -i <INSTALL_DIR>\deployment_tools\demo\car.png -m C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\ir\squeezenet1.1.xml -d CPU
.. tab:: macOS
.. code-block:: sh
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d CPU
@endsphinxdirective
**GPU:**
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires
[additional hardware configuration steps](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-GPU-steps), as described earlier on this page. Running on GPU is not compatible with macOS*.
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./classification_sample -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d GPU
.. tab:: Windows
.. code-block:: bat
.\classification_sample_async.exe -i <INSTALL_DIR>\deployment_tools\demo\car.png -m C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\ir\squeezenet1.1.xml -d GPU
@endsphinxdirective
**MYRIAD:**
> **NOTE**: Running inference on VPU devices (Intel® Movidius™ Neural Compute
Stick or Intel® Neural Compute Stick 2) with the MYRIAD plugin requires
[additional hardware configuration steps](inference-engine/README.md#optional-additional-installation-steps-for-the-intel-movidius-neural-compute-stick-and-neural-compute-stick-2), as described earlier on this page.
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./classification_sample -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d MYRIAD
.. tab:: Windows
.. code-block:: bat
.\classification_sample_async.exe -i <INSTALL_DIR>\deployment_tools\demo\car.png -m C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\ir\squeezenet1.1.xml -d MYRIAD
.. tab:: macOS
.. code-block:: sh
./classification_sample -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d MYRIAD
@endsphinxdirective
When the sample application is complete, you see the label and confidence for the top 10 categories on the display. Below is a sample output with inference results on CPU:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
Top 10 results:
Image /opt/intel/deployment-tools/demo/car.png
classid probability label
------- ----------- -----
817 0.8363345 sports car, sport car
511 0.0946488 convertible
479 0.0419131 car wheel
751 0.0091071 racer, race car, racing car
436 0.0068161 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
656 0.0037564 minivan
586 0.0025741 half track
717 0.0016069 pickup, pickup truck
864 0.0012027 tow truck, tow car, wrecker
581 0.0005882 grille, radiator grille
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
.. tab:: Windows
.. code-block:: bat
Top 10 results:
Image C:\Program Files (x86)\Intel\openvino_2021\deployment_tools\demo\car.png
classid probability label
------- ----------- -----
817 0.8363345 sports car, sport car
511 0.0946488 convertible
479 0.0419131 car wheel
751 0.0091071 racer, race car, racing car
436 0.0068161 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
656 0.0037564 minivan
586 0.0025741 half track
717 0.0016069 pickup, pickup truck
864 0.0012027 tow truck, tow car, wrecker
581 0.0005882 grille, radiator grille
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
.. tab:: macOS
.. code-block:: sh
Top 10 results:
Image /opt/intel/deployment-tools/demo/car.png
classid probability label
------- ----------- -----
817 0.8363345 sports car, sport car
511 0.0946488 convertible
479 0.0419131 car wheel
751 0.0091071 racer, race car, racing car
436 0.0068161 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
656 0.0037564 minivan
586 0.0025741 half track
717 0.0016069 pickup, pickup truck
864 0.0012027 tow truck, tow car, wrecker
581 0.0005882 grille, radiator grille
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
@endsphinxdirective
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="run-security-barrier"></a>Run the Security Barrier Camera Demo Application
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IR models:
1. Set up the OpenVINO environment variables:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
source /opt/intel/openvino/bin/setupvars.sh
.. tab:: Windows
.. code-block:: bat
<INSTALL_DIR>\bin\setupvars.bat
.. tab:: macOS
.. code-block:: sh
source /opt/intel/openvino/bin/setupvars.sh
@endsphinxdirective
2. Go to the demo application build directory:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
cd ~/inference_engine_demos_build/intel64/Release
.. tab:: Windows
.. code-block:: bat
cd C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release
.. tab:: macOS
.. code-block:: sh
cd ~/inference_engine_demos_build/intel64/Release
@endsphinxdirective
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device for performing inference:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./security_barrier_camera_demo -i <path_to_media> -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_vehicle_attributes model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_license_plate_recognition_model>/license-plate-recognition-barrier-0001.xml -d <target_device>
.. tab:: Windows
.. code-block:: bat
.\security_barrier_camera_demo.exe -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
.. tab:: macOS
.. code-block:: sh
./security_barrier_camera_demo -i <path_to_media> -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_vehicle_attributes model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_license_plate_recognition_model>/license-plate-recognition-barrier-0001.xml -d <target_device>
@endsphinxdirective
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="Click for examples of running the Security Barrier Camera demo application on different devices">
@endsphinxdirective
**CPU:**
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d CPU
.. tab:: Windows
.. code-block:: bat
.\security_barrier_camera_demo.exe -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml -m_va C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml -m_lpr C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml -d CPU
.. tab:: macOS
.. code-block:: sh
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d CPU
@endsphinxdirective
**GPU:**
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires [additional hardware configuration steps](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-GPU-steps), as described earlier on this page. Running on GPU is not compatible with macOS*.
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
.. tab:: Windows
.. code-block:: bat
.\security_barrier_camera_demo.exe -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
.. tab:: macOS
.. code-block:: sh
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
@endsphinxdirective
**MYRIAD:**
> **NOTE**: Running inference on VPU devices (Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2) with the MYRIAD plugin requires [additional hardware configuration steps](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-NCS-steps), as described earlier on this page.
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d MYRIAD
.. tab:: Windows
.. code-block:: bat
.\security_barrier_camera_demo.exe -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d MYRIAD
@endsphinxdirective
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## Other Demos/Samples
For more samples and demos, you can visit the samples and demos pages below. You can review samples and demos by complexity or by usage, run the relevant application, and adapt the code for your use.
[Samples](../IE_DG/Samples_Overview.md)
[Demos](@ref omz_demos)
+31 -18
View File
@@ -14,38 +14,51 @@ Start working with the OpenVINO™ toolkit right from your browser: import a mod
* Analyze the quality of your model and visualize output.
* Use preconfigured JupyterLab\* environment to learn OpenVINO™ workflow.
## Run DL Workbench
You can [run DL Workbench](@ref workbench_docs_Workbench_DG_Install) on your local system or in the Intel® DevCloud for the Edge. Ensure that you have met the [prerequisites](@ref workbench_docs_Workbench_DG_Prerequisites).
Run DL Workbench on your local system by using the installation form. Select your options and run the commands on the local machine:
<iframe style="width: 100%; height: 620px;" src="https://openvinotoolkit.github.io/workbench_aux/" frameborder="0" allow="clipboard-write;"></iframe>
@sphinxdirective
.. raw:: html
<iframe allowfullscreen mozallowfullscreen msallowfullscreen oallowfullscreen webkitallowfullscreen style="width: 100%; height: 620px;" src="https://openvinotoolkit.github.io/workbench_aux/" frameborder="0" allow="clipboard-write;"></iframe>
@endsphinxdirective
Once DL Workbench is set up, open the http://127.0.0.1:5665 link.
![](./dl_workbench_img/active_projects_page.png)
Watch the video to learn more detailed information on how to run DL Workbench:
@sphinxdirective
.. list-table::
* - .. raw:: html
<iframe allowfullscreen mozallowfullscreen msallowfullscreen oallowfullscreen webkitallowfullscreen width="560" height="100%" src="https://www.youtube.com/embed/JBDG2g5hsoM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
* - **Inference Engine Concept**. Duration: 3:43
@endsphinxdirective
@sphinxdirective
.. list-table::
* - .. raw:: html
<iframe allowfullscreen mozallowfullscreen msallowfullscreen oallowfullscreen webkitallowfullscreen width="560" height="100%" src="https://www.youtube.com/embed/on8xSSTKCt8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
* - **Inference Engine Concept**. Duration: 3:43
@endsphinxdirective
Congratulations, you have installed DL Workbench. Your next step is to [Get Started with DL Workbench](@ref workbench_docs_Workbench_DG_Work_with_Models_and_Sample_Datasets) and create your first project.
## Videos
<table>
<tr>
<td>
<iframe width="320" src="https://www.youtube.com/embed/on8xSSTKCt8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</td>
<td>
<iframe width="320" src="https://www.youtube.com/embed/JBDG2g5hsoM" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</td>
</tr>
<tr>
<td><strong>What is the OpenVINO™ toolkit DL Workbench</strong>. <br>Duration: 1:31</td>
<td><strong>How to Install the OpenVINO™ toolkit DL Workbench</strong>. <br>Duration: 8:20</td>
</tr>
</table>
## See Also
* [Get Started with DL Workbench](@ref workbench_docs_Workbench_DG_Work_with_Models_and_Sample_Datasets)
* [DL Workbench Overview](@ref workbench_docs_Workbench_DG_Introduction)
@@ -0,0 +1,20 @@
# Get Started with Instructions {#openvino_docs_get_started_get_started_instructions}
# Introduction
This guide assumes you completed all installation and configuration steps. If you have not yet installed and configured the toolkit:
@sphinxdirective
.. tab:: Linux
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Linux* <openvino_docs_install_guides_installing_openvino_linux>`
.. tab:: Windows
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Windows* <openvino_docs_install_guides_installing_openvino_windows>`
.. tab:: macOS
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for macOS* <openvino_docs_install_guides_installing_openvino_macos>`
@endsphinxdirective
+1 -1
View File
@@ -221,7 +221,7 @@ Use the Model Downloader to download the models to a models directory. This guid
```sh
sudo python3 ./downloader.py --name <model_name> --output_dir <models_dir>
```
> **NOTE:** Always run the downloader with `sudo`.
> **NOTE**: Always run the downloader with `sudo`.
Download the following models if you want to run the Image Classification Sample:
+275 -21
View File
@@ -31,10 +31,18 @@ For simplicity, a symbolic link to the latest installation is also created: `/ho
If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory other than the default, replace `/opt/intel` or `/home/<USER>/` with the directory in which you installed the software.
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/tools` directory.
<details>
<summary><strong>Click for the Intel® Distribution of OpenVINO™ toolkit directory structure</strong></summary>
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/deployment_tools` directory.
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for the Intel® Distribution of OpenVINO™ toolkit directory structure</strong>">
@endsphinxdirective
| Directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description |
|:----------------------------------------|:--------------------------------------------------------------------------------------|
@@ -55,7 +63,16 @@ The primary tools for deploying your models and applications are installed to th
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`tools/` | Model Downloader and Accuracy Checker tools. |
| `tools/` | Contains a symbolic link to the Model Downloader folder and auxiliary tools to work with your models: Calibration tool, Benchmark and Collect Statistics tools.|
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="workflow-overview"></a>OpenVINO™ Workflow Overview
@@ -92,8 +109,16 @@ The script:
3. Builds the Image Classification Sample Async application.
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
<details>
<summary><strong>Click for an example of running the Image Classification sample script</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of running the Image Classification demo script</strong>">
@endsphinxdirective
To run the script to view the sample image and perform inference on the CPU:
@@ -126,19 +151,82 @@ classid probability label
[ INFO ] Classification sample execution successful
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### Benchmark Sample Script
The `run_sample_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
The script:
1. Downloads three pre-trained model IRs.
2. Builds the Security Barrier Camera Demo application.
3. Runs the application with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
This application:
1. Identifies an object identified as a vehicle.
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
3. Uses the the license plate as input to the third model, which recognizes specific characters in the license plate.
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of Running the Pipeline demo script</strong>">
@endsphinxdirective
To run the script performing inference on a CPU:
```sh
./demo_security_barrier_camera.sh
```
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
![](../img/inference_pipeline_script_mac.png)
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### Benchmark Demo Script
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
The script:
1. Downloads a SqueezeNet model.
2. Runs the Model Optimizer to convert the model to the IR.
3. Builds the Inference Engine Benchmark tool.
4. Runs the tool with the `car.png` image located in the `demo` directory.
<details>
<summary><strong>Click for an example of running the Benchmark sample script</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of running the Benchmark demo script</strong>">
@endsphinxdirective
To run the script that performs inference on a CPU:
@@ -146,7 +234,16 @@ To run the script that performs inference on a CPU:
./run_sample_benchmark_app.sh
```
When the verification script completes, you see the performance counters, resulting latency, and throughput values displayed on the screen.
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="using-sample-application"></a>Use Code Samples and Demo Applications to Learn the Workflow
@@ -205,7 +302,7 @@ Use the Model Downloader to download the models to a models directory. This guid
```sh
sudo python3 ./downloader.py --name <model_name> --output_dir <models_dir>
```
> **NOTE:** Always run the downloader with `sudo`.
> **NOTE**: Always run the downloader with `sudo`.
Download the following models if you want to run the Image Classification Sample:
@@ -213,8 +310,16 @@ Download the following models if you want to run the Image Classification Sample
|-----------------------------------------------|-----------------------------------------------------|
|`squeezenet1.1` | Image Classification Sample |
<details>
<summary><strong>Click for an example of downloading the SqueezeNet Caffe* model</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of downloading the SqueezeNet Caffe* model</strong>">
@endsphinxdirective
To download the SqueezeNet 1.1 Caffe* model to the `~/models` folder:
@@ -236,7 +341,68 @@ Your screen looks similar to this after the download:
========= Replacing text in /Users/username/models/public/squeezenet1.1/squeezenet1.1.prototxt =========
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of downloading models for the Security Barrier Camera Demo application</strong>">
@endsphinxdirective
To download all three pre-trained models in FP16 precision to the `~/models` folder:
```sh
./downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir ~/models --precisions FP16
```
Your screen looks similar to this after the download:
```
################|| Downloading models ||################
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml
... 100%, 207 KB, 313926 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin
... 100%, 1256 KB, 2552 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml
... 100%, 32 KB, 172042 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin
... 100%, 1222 KB, 2712 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml
... 100%, 47 KB, 217130 KB/s, 0 seconds passed
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin
... 100%, 2378 KB, 4222 KB/s, 0 seconds passed
################|| Post-processing ||################
```
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="convert-models-to-intermediate-representation"></a> Step 2: Convert the Models to the Intermediate Representation
@@ -265,8 +431,16 @@ The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the M
```
The produced IR files are in the `<ir_dir>` directory.
<details>
<summary><strong>Click for an example of converting the SqueezeNet Caffe* model</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of converting the SqueezeNet Caffe* model</strong>">
@endsphinxdirective
The following command converts the public SqueezeNet 1.1 Caffe\* model to the FP16 IR and saves to the `~/models/public/squeezenet1.1/ir` output directory:
@@ -283,7 +457,16 @@ Copy the `squeezenet1.1.labels` file from the `/opt/intel/openvino_2022/samples/
```sh
cp /opt/intel/openvino_2022/samples/scripts/squeezenet1.1.labels <ir_dir>
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="download-media"></a> Step 3: Download a Video or a Still Photo as Media
@@ -313,8 +496,16 @@ To run the **Image Classification** code sample with an input image on the IR:
```sh
./classification_sample_async -i <path_to_media> -m <path_to_model> -d <target_device>
```
<details>
<summary><strong>Click for examples of running the Image Classification code sample on different devices</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for examples of running the Image Classification code sample on different devices</strong>">
@endsphinxdirective
The following commands run the Image Classification Code Sample using the `car.png` file from the `/opt/intel/openvino_2022/samples/scripts/` directory as an input image, the IR of your model from `~/models/public/squeezenet1.1/ir` and on different hardware devices:
@@ -350,10 +541,73 @@ classid probability label
864 0.0012045 tow truck, tow car, wrecker
581 0.0005833 grille, radiator grille
[ INFO ] Classification sample execution successful
[ INFO ] Execution successful
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the instructions in the [Demo Applications Overview](@ref omz_demos) section.
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
1. Set up the OpenVINO environment variables:
```sh
source /opt/intel/openvino_2021/bin/setupvars.sh
```
2. Go to the demo application build directory:
```sh
cd ~/inference_engine_demos_build/intel64/Release
```
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device on which to perform inference:
```sh
./security_barrier_camera_demo -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
```
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for examples of running the Security Barrier Camera demo application on different devices</strong>">
@endsphinxdirective
**CPU:**
```sh
./security_barrier_camera_demo -i /opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp -m ~/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -m_va ~/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml -m_lpr ~/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml -d CPU
```
**MYRIAD:**
> **NOTE**: Running inference on VPU devices (Intel® Neural Compute Stick 2) with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
```sh
./classification_sample_async -i <INSTALL_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d MYRIAD
```
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="basic-guidelines-sample-application"></a>Basic Guidelines for Using Code Samples and Demo Applications
+21 -4
View File
@@ -22,10 +22,18 @@ This guide assumes you completed all Intel® Distribution of OpenVINO™ toolkit
The OpenVINO toolkit for Raspbian* OS is distributed without installer. This document refers to the directory to which you unpacked the toolkit package as `<INSTALL_DIR>`.
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/tools` directory.
<details>
<summary><strong>Click for the <code>tools</code> directory structure</strong></summary>
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/deployment_tools` directory.
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for the <code>deployment_tools</code> directory structure</strong>">
@endsphinxdirective
| Directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description |
|:----------------------------------------|:--------------------------------------------------------------------------------------|
@@ -36,7 +44,16 @@ The primary tools for deploying your models and applications are installed to th
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`samples/` | Inference Engine samples. Contains source code for C++ and Python* samples and build scripts. See the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md). |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`share/` | CMake configuration files for linking with Inference Engine.|
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="workflow-overview"></a>OpenVINO™ Workflow Overview
+357
View File
@@ -0,0 +1,357 @@
# Getting Started with Demo Scripts {#openvino_docs_get_started_get_started_scripts}
## Introduction
A set of demo scripts in the `openvino_2021/deployment_tools/demo` directory give you a starting point for learning the OpenVINO™ workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The demo steps let you see how to:
* Compile several samples from the source files delivered as part of the OpenVINO™ toolkit.
* Download trained models.
* Convert the models to IR (Intermediate Representation format used by OpenVINO™) with Model Optimizer.
* Perform pipeline steps and see the output on the console.
This guide assumes you completed all installation and configuration steps. If you have not yet installed and configured the toolkit:
@sphinxdirective
.. tab:: Linux
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Linux* <openvino_docs_install_guides_installing_openvino_linux>`
.. tab:: Windows
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Windows* <openvino_docs_install_guides_installing_openvino_windows>`
.. tab:: macOS
See :doc:`Install Intel® Distribution of OpenVINO™ toolkit for macOS* <openvino_docs_install_guides_installing_openvino_macos>`
@endsphinxdirective
The demo scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device (i.e., processor) is the CPU, you can add the `-d` parameter to specify a different inference device. The general command to run a demo script is as follows:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
#If you installed in a location other than /opt/intel, substitute that path.
cd /opt/intel/openvino_2021/deployment_tools/demo/
./<script_name> -d [CPU, GPU, MYRIAD, HDDL]
.. tab:: Windows
.. code-block:: sh
rem If you installed in a location other than the default, substitute that path.
cd "C:\Program Files (x86)\Intel\openvino_2021\deployment_tools\demo"
.\<script_name> -d [CPU, GPU, MYRIAD, HDDL]
.. tab:: macOS
.. code-block:: sh
#If you installed in a location other than /opt/intel, substitute that path.
cd /opt/intel/openvino_2021/deployment_tools/demo/
./<script_name> -d [CPU, MYRIAD]
@endsphinxdirective
Before running the demo applications on Intel® Processor Graphics or on an Intel® Neural Compute Stick 2 device, you must complete additional configuration steps.
@sphinxdirective
.. tab:: Linux
For details, see the following sections in the :doc:`installation instructions <openvino_docs_install_guides_installing_openvino_linux>`:
* Steps for Intel® Processor Graphics (GPU)
* Steps for Intel® Neural Compute Stick 2
.. tab:: Windows
For details, see the following sections in the :doc:`installation instructions <openvino_docs_install_guides_installing_openvino_windows>`:
* Additional Installation Steps for Intel® Processor Graphics (GPU)
* Additional Installation Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
.. tab:: macOS
For details, see the following sections in the :doc:`installation instructions <openvino_docs_install_guides_installing_openvino_macos>`:
* Steps for Intel® Neural Compute Stick 2
@endsphinxdirective
The following sections describe each demo script.
## Image Classification Demo Script
The `demo_squeezenet_download_convert_run` script illustrates the image classification pipeline.
The script:
1. Downloads a SqueezeNet model.
2. Runs the Model Optimizer to convert the model to the IR format used by OpenVINO™.
3. Builds the Image Classification Sample Async application.
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
### Example of Running the Image Classification Demo Script
@sphinxdirective
.. raw:: html
<div class="collapsible-section">
@endsphinxdirective
**Click for an example of running the Image Classification demo script**
To preview the image that the script will classify:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
cd /opt/intel/openvino_2021/deployment_tools/demo
eog car.png
.. tab:: Windows
.. code-block:: sh
car.png
.. tab:: macOS
.. code-block:: sh
cd /opt/intel/openvino_2021/deployment_tools/demo
open car.png
@endsphinxdirective
To run the script and perform inference on the CPU:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./demo_squeezenet_download_convert_run.sh
.. tab:: Windows
.. code-block:: bat
.\demo_squeezenet_download_convert_run.bat
.. tab:: macOS
.. code-block:: sh
./demo_squeezenet_download_convert_run.sh
@endsphinxdirective
When the script completes, you see the label and confidence for the top 10 categories:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
Top 10 results:
Image /opt/intel/openvino_2021/deployment_tools/demo/car.png
classid probability label
------- ----------- -----
817 0.8363345 sports car, sport car
511 0.0946488 convertible
479 0.0419131 car wheel
751 0.0091071 racer, race car, racing car
436 0.0068161 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
656 0.0037564 minivan
586 0.0025741 half track
717 0.0016069 pickup, pickup truck
864 0.0012027 tow truck, tow car, wrecker
581 0.0005882 grille, radiator grille
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
.. tab:: Windows
.. code-block:: bat
Top 10 results:
Image C:\Program Files (x86)\Intel\openvino_2021\deployment_tools\demo\car.png
classid probability label
------- ----------- -----
817 0.8363345 sports car, sport car
511 0.0946488 convertible
479 0.0419131 car wheel
751 0.0091071 racer, race car, racing car
436 0.0068161 beach wagon, station wagon, wagon, estate car, beach wagon, station wagon, wagon
656 0.0037564 minivan
586 0.0025741 half track
717 0.0016069 pickup, pickup truck
864 0.0012027 tow truck, tow car, wrecker
581 0.0005882 grille, radiator grille
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
.. tab:: macOS
.. code-block:: sh
Top 10 results:
Image /Users/colin/intel/openvino_2021/deployment_tools/demo/car.png
classid probability label
------- ----------- -----
817 0.8363345 sports car, sport car
511 0.0946488 convertible
479 0.0419131 car wheel
751 0.0091071 racer, race car, racing car
436 0.0068161 beach wagon, station wagon, wagon, estate car, beach wagon, station wagon, wagon
656 0.0037564 minivan
586 0.0025741 half track
717 0.0016069 pickup, pickup truck
864 0.0012027 tow truck, tow car, wrecker
581 0.0005882 grille, radiator grille
[ INFO ] Execution successful
[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool
@endsphinxdirective
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## Inference Pipeline Demo Script
The `demo_security_barrier_camera` application uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
The script:
1. Downloads three pre-trained models, already converted to IR format.
2. Builds the Security Barrier Camera Demo application.
3. Runs the application with the three models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
This application:
1. Gets the boundaries an object identified as a vehicle with the first model.
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
3. Uses the license plate as input to the third model, which recognizes specific characters in the license plate.
### Example of Running the Pipeline Demo Script
@sphinxdirective
.. raw:: html
<div class="collapsible-section">
@endsphinxdirective
**Click for an example of Running the Pipeline demo script**
To run the script performing inference on Intel® Processor Graphics:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./demo_security_barrier_camera.sh -d GPU
.. tab:: Windows
.. code-block:: bat
.\demo_security_barrier_camera.bat -d GPU
@endsphinxdirective
When the verification script is complete, you see an image that displays the resulting frame with detections rendered as bounding boxes and overlaid text:
@sphinxdirective
.. tab:: Linux
.. image:: ../img/inference_pipeline_script_lnx.png
.. tab:: Windows
.. image:: ../img/inference_pipeline_script_win.png
.. tab:: macOS
.. image:: ../img/inference_pipeline_script_mac.png
@endsphinxdirective
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## Benchmark Demo Script
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
The script:
1. Downloads a SqueezeNet model.
2. Runs the Model Optimizer to convert the model to IR format.
3. Builds the Inference Engine Benchmark tool.
4. Runs the tool with the `car.png` image located in the `demo` directory.
### Example of Running the Benchmark Demo Script
@sphinxdirective
.. raw:: html
<div class="collapsible-section">
@endsphinxdirective
**Click for an example of running the Benchmark demo script**
To run the script that performs measures inference performance:
@sphinxdirective
.. tab:: Linux
.. code-block:: sh
./demo_benchmark_app.sh
.. tab:: Windows
.. code-block:: bat
.\demo_benchmark_app.bat
.. tab:: macOS
.. code-block:: sh
./demo_benchmark_app.sh
@endsphinxdirective
When the verification script is complete, you see the performance counters, resulting latency, and throughput values displayed on the screen.
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## Other Get Started Documents
For more get started documents, visit the pages below:
[Get Started with Sample and Demo Applications](get_started_demos.md)
[Get Started with Instructions](get_started_instructions.md)
+284 -24
View File
@@ -4,7 +4,7 @@ The OpenVINO™ toolkit optimizes and runs Deep Learning Neural Network models o
In this guide, you will:
* Learn the OpenVINO™ inference workflow
* Run ыфьзду scripts that illustrate the workflow and perform the steps for you
* Run sample scripts that illustrate the workflow and perform the steps for you
* Run the workflow steps yourself, using detailed instructions with a code sample and demo application
## <a name="openvino-components"></a>OpenVINO™ toolkit Components
@@ -26,10 +26,18 @@ This guide assumes you completed all Intel® Distribution of OpenVINO™ toolkit
By default, the installation directory is `C:\Program Files (x86)\Intel\openvino_<version>`, referred to as `<INSTALL_DIR>`. If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory other than the default, replace `C:\Program Files (x86)\Intel` with the directory in which you installed the software. For simplicity, a shortcut to the latest installation is also created: `C:\Program Files (x86)\Intel\openvino_2022`.
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>\tools` directory.
<details>
<summary><strong>Click for the <code>tools</code> directory structure</strong></summary>
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>\deployment_tools` directory.
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for the <code>deployment_tools</code> directory structure</strong>">
@endsphinxdirective
| Directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description |
|:----------------------------------------|:--------------------------------------------------------------------------------------|
@@ -52,7 +60,16 @@ The primary tools for deploying your models and applications are installed to th
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`tools\` | Model Downloader and Accuracy Checker tools. |
| `tools\` | Contains a symbolic link to the Model Downloader folder and auxiliary tools to work with your models: Calibration tool, Benchmark and Collect Statistics tools.|
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="workflow-overview"></a>OpenVINO™ Workflow Overview
@@ -91,8 +108,16 @@ The script:
3. Builds the Image Classification Sample Async application.
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
<details>
<summary><strong>Click for an example of running the Image Classification sample script</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of running the Image Classification demo script</strong>">
@endsphinxdirective
To preview the image that the script will classify open the `car.png` file in any image viewer.
@@ -125,19 +150,82 @@ classid probability label
[ INFO ] Classification sample execution successful
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### Benchmark Sample Script
The `run_sample_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
The script:
1. Downloads three pre-trained model IRs.
2. Builds the Security Barrier Camera Demo application.
3. Runs the application with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
This application:
1. Identifies an object identified as a vehicle.
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
3. Uses the the license plate as input to the third model, which recognizes specific characters in the license plate.
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of Running the Pipeline demo script</strong>">
@endsphinxdirective
To run the script performing inference on Intel® Processor Graphics:
```bat
.\demo_security_barrier_camera.bat -d GPU
```
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
![](../img/inference_pipeline_script_win.png)
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### Benchmark Demo Script
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
The script:
1. Downloads a SqueezeNet model.
2. Runs the Model Optimizer to convert the model to the IR.
3. Builds the Inference Engine Benchmark tool.
4. Runs the tool with the `car.png` image located in the `demo` directory.
<details>
<summary><strong>Click for an example of running the Benchmark sample script</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of running the Benchmark demo script</strong>">
@endsphinxdirective
To run the script that performs inference (runs on CPU by default):
@@ -145,7 +233,16 @@ To run the script that performs inference (runs on CPU by default):
.\run_sample_benchmark_app.bat
```
When the verification script completes, you see the performance counters, resulting latency, and throughput values displayed on the screen.
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="using-sample-application"></a>Use Code Samples and Demo Applications to Learn the Workflow
@@ -211,8 +308,16 @@ Download the following models if you want to run the Image Classification Sample
|-----------------------------------------------|-----------------------------------------------------|
|`squeezenet1.1` | Image Classification Sample |
<details>
<summary><strong>Click for an example of downloading the SqueezeNet Caffe* model</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of downloading the SqueezeNet Caffe* model</strong>">
@endsphinxdirective
To download the SqueezeNet 1.1 Caffe* model to the `C:\Users\<USER_ID>\Documents\models` folder:
@@ -234,7 +339,68 @@ Your screen looks similar to this after the download:
========== Replacing text in C:\Users\username\Documents\models\public\squeezenet1.1\squeezenet1.1.prototxt
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of downloading models for the Security Barrier Camera Demo application</strong>">
@endsphinxdirective
To download all three pre-trained models in FP16 precision to the `C:\Users\<USER_ID>\Documents\models` folder:
```bat
python .\downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir C:\Users\username\Documents\models --precisions FP16
```
Your screen looks similar to this after the download:
```
################|| Downloading models ||################
========== Downloading C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml
... 100%, 207 KB, 13810 KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.bin
... 100%, 1256 KB, 70 KB/s, 17 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml
... 100%, 32 KB, ? KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.bin
... 100%, 1222 KB, 277 KB/s, 4 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml
... 100%, 47 KB, ? KB/s, 0 seconds passed
========== Downloading C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.bin
... 100%, 2378 KB, 120 KB/s, 19 seconds passed
################|| Post-processing ||################
```
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="convert-models-to-intermediate-representation"></a> Step 2: Convert the Models to the Intermediate Representation
@@ -261,8 +427,16 @@ The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the M
```
The produced IR files are in the `<ir_dir>` directory.
<details>
<summary><strong>Click for an example of converting the SqueezeNet Caffe* model</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for an example of converting the SqueezeNet Caffe* model</strong>">
@endsphinxdirective
The following command converts the public SqueezeNet 1.1 Caffe\* model to the FP16 IR and saves to the `C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\ir` output directory:
@@ -276,7 +450,16 @@ Copy the `squeezenet1.1.labels` file from the `<INSTALL_DIR>\samples\scripts\` t
```batch
cp <INSTALL_DIR>\samples\scripts\squeezenet1.1.labels <ir_dir>
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="download-media"></a> Step 3: Download a Video or a Still Photo as Media
@@ -306,8 +489,16 @@ To run the **Image Classification** code sample with an input image on the IR:
```bat
classification_sample_async.exe -i <path_to_media> -m <path_to_model> -d <target_device>
```
<details>
<summary><strong>Click for examples of running the Image Classification code sample on different devices</strong></summary>
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for examples of running the Image Classification code sample on different devices</strong>">
@endsphinxdirective
The following commands run the Image Classification Code Sample using the `car.png` file from the `<INSTALL_DIR>\samples\scripts` directory as an input image, the IR of your model from `C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\ir` and on different hardware devices:
@@ -348,10 +539,79 @@ classid probability label
864 0.0012045 tow truck, tow car, wrecker
581 0.0005833 grille, radiator grille
[ INFO ] Classification sample execution successful
[ INFO ] Execution successful
```
</details>
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the instructions in the [Demo Applications Overview](@ref omz_demos) section.
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
1. Set up the OpenVINO environment variables:
```bat
<INSTALL_DIR>\bin\setupvars.bat
```
2. Go to the demo application build directory:
```bat
cd C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release
```
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device on which to perform inference:
```bat
.\security_barrier_camera_demo -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
```
@sphinxdirective
.. raw:: html
<div class="collapsible-section" data-title="<strong>Click for examples of running the Security Barrier Camera demo application on different devices</strong>">
@endsphinxdirective
**CPU:**
```bat
.\security_barrier_camera_demo -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml -m_va C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml -m_lpr C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml -d CPU
```
**GPU:**
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-windows.md).
```bat
.\security_barrier_camera_demo -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
```
**MYRIAD:**
```bat
.\classification_sample_async -i <INSTALL_DIR>\inference-engine\samples\sample_data\car.png -m <ir_dir>\squeezenet1.1.xml -d MYRIAD
```
@sphinxdirective
.. raw:: html
</div>
@endsphinxdirective
## <a name="basic-guidelines-sample-application"></a>Basic Guidelines for Using Code Samples and Demo Applications
@@ -374,10 +634,10 @@ This section explains how to build and use the sample and demo applications prov
To build all the demos and samples:
```sh
cd $INTEL_OPENVINO_DIR\inference_engine_samples\cpp
# to compile C samples, go here also: cd <INSTALL_DIR>\samples\c
cd %INTEL_OPENVINO_DIR%\inference_engine_samples\cpp
# to compile C samples, go here also: cd <INSTALL_DIR>\inference_engine\samples\c
build_samples_msvc.bat
cd $INTEL_OPENVINO_DIR\extras\open_model_zoo\demos
cd %INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\demos
build_demos_msvc.bat
```