[DOCS] Change sample structure (#18942)
This commit is contained in:
1 parent
9b801bcff8
commit
803843dad9
20 files changed
+804
-590
No files matched your search
@@ -10,52 +10,63 @@
|
||||
|
||||
This sample demonstrates how to execute an inference of image classification networks like AlexNet and GoogLeNet using Synchronous Inference Request API and input auto-resize feature.
|
||||
|
||||
Hello Classification C sample application demonstrates how to use the C API from OpenVINO in applications.
|
||||
.. tab-set::
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=====================================+=============================================================+=========================================================================================================================================================================================+
|
||||
| OpenVINO Runtime Version | ``ov_get_openvino_version`` | Get Openvino API version |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Basic Infer Flow | ``ov_core_create``, | Common API to do inference: read and compile a model, create an infer request, configure input and output tensors |
|
||||
| | ``ov_core_read_model``, | |
|
||||
| | ``ov_core_compile_model``, | |
|
||||
| | ``ov_compiled_model_create_infer_request``, | |
|
||||
| | ``ov_infer_request_set_input_tensor_by_index``, | |
|
||||
| | ``ov_infer_request_get_output_tensor_by_index`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Synchronous Infer | ``ov_infer_request_infer`` | Do synchronous inference |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov_model_const_input``, | Get inputs and outputs of a model |
|
||||
| | ``ov_model_const_output`` | +
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov_tensor_create_from_host_ptr`` | Create a tensor shape |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Preprocessing | ``ov_preprocess_prepostprocessor_create``, | Set image of the original size as input for a model with other input size. Resize and layout conversions are performed automatically by the corresponding plugin just before inference. |
|
||||
| | ``ov_preprocess_prepostprocessor_get_input_info_by_index``, | |
|
||||
| | ``ov_preprocess_input_info_get_tensor_info``, | |
|
||||
| | ``ov_preprocess_input_tensor_info_set_from``, | |
|
||||
| | ``ov_preprocess_input_tensor_info_set_layout``, | |
|
||||
| | ``ov_preprocess_input_info_get_preprocess_steps``, | |
|
||||
| | ``ov_preprocess_preprocess_steps_resize``, | |
|
||||
| | ``ov_preprocess_input_model_info_set_layout``, | |
|
||||
| | ``ov_preprocess_output_set_element_type``, | |
|
||||
| | ``ov_preprocess_prepostprocessor_build`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+============================+============================================================================================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | Inference Engine Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Validated images | The sample uses OpenCV\* to `read input image <https://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56>`__ (\*.bmp, \*.png) |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_classification_README>`, :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>` |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+============================+============================================================================================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | Inference Engine Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Validated images | The sample uses OpenCV\* to `read input image <https://docs.opencv.org/master/d4/da8/group__imgcodecs.html#ga288b8b3da0892bd651fce07b3bbd3a56>`__ (\*.bmp, \*.png) |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_classification_README>`, :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>` |
|
||||
+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C API
|
||||
|
||||
Hello Classification C sample application demonstrates how to use the C API from OpenVINO in applications.
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=====================================+=============================================================+=========================================================================================================================================================================================+
|
||||
| OpenVINO Runtime Version | ``ov_get_openvino_version`` | Get Openvino API version |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Basic Infer Flow | ``ov_core_create``, | Common API to do inference: read and compile a model, create an infer request, configure input and output tensors |
|
||||
| | ``ov_core_read_model``, | |
|
||||
| | ``ov_core_compile_model``, | |
|
||||
| | ``ov_compiled_model_create_infer_request``, | |
|
||||
| | ``ov_infer_request_set_input_tensor_by_index``, | |
|
||||
| | ``ov_infer_request_get_output_tensor_by_index`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Synchronous Infer | ``ov_infer_request_infer`` | Do synchronous inference |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov_model_const_input``, | Get inputs and outputs of a model |
|
||||
| | ``ov_model_const_output`` | +
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov_tensor_create_from_host_ptr`` | Create a tensor shape |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Preprocessing | ``ov_preprocess_prepostprocessor_create``, | Set image of the original size as input for a model with other input size. Resize and layout conversions are performed automatically by the corresponding plugin just before inference. |
|
||||
| | ``ov_preprocess_prepostprocessor_get_input_info_by_index``, | |
|
||||
| | ``ov_preprocess_input_info_get_tensor_info``, | |
|
||||
| | ``ov_preprocess_input_tensor_info_set_from``, | |
|
||||
| | ``ov_preprocess_input_tensor_info_set_layout``, | |
|
||||
| | ``ov_preprocess_input_info_get_preprocess_steps``, | |
|
||||
| | ``ov_preprocess_preprocess_steps_resize``, | |
|
||||
| | ``ov_preprocess_input_model_info_set_layout``, | |
|
||||
| | ``ov_preprocess_output_set_element_type``, | |
|
||||
| | ``ov_preprocess_prepostprocessor_build`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/c/hello_classification/main.c
|
||||
:language: c
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -10,37 +10,48 @@
|
||||
|
||||
This sample demonstrates how to execute an inference of image classification networks like AlexNet with images in NV12 color format using Synchronous Inference Request API.
|
||||
|
||||
Hello NV12 Input Classification C Sample demonstrates how to use the NV12 automatic input pre-processing API in your applications:
|
||||
Hello NV12 Input Classification C Sample demonstrates how to use the NV12 automatic input pre-processing API in your applications.
|
||||
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=========================================+===========================================================+========================================================+
|
||||
| Node Operations | ``ov_port_get_any_name`` | Get a layer name |
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
| Infer Request Operations | ``ov_infer_request_set_tensor``, | Operate with tensors |
|
||||
| | ``ov_infer_request_get_output_tensor_by_index`` | |
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
| Preprocessing | ``ov_preprocess_input_tensor_info_set_color_format``, | Change the color format of the input data |
|
||||
| | ``ov_preprocess_preprocess_steps_convert_element_type``, | |
|
||||
| | ``ov_preprocess_preprocess_steps_convert_color`` | |
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=========================================+=======================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>` |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Model Format | Inference Engine Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Validated images | An uncompressed image in the NV12 color format - \*.yuv |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_nv12_input_classification_README>` |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C API
|
||||
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=========================================+===========================================================+========================================================+
|
||||
| Node Operations | ``ov_port_get_any_name`` | Get a layer name |
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
| Infer Request Operations | ``ov_infer_request_set_tensor``, | Operate with tensors |
|
||||
| | ``ov_infer_request_get_output_tensor_by_index`` | |
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
| Preprocessing | ``ov_preprocess_input_tensor_info_set_color_format``, | Change the color format of the input data |
|
||||
| | ``ov_preprocess_preprocess_steps_convert_element_type``, | |
|
||||
| | ``ov_preprocess_preprocess_steps_convert_color`` | |
|
||||
+-----------------------------------------+-----------------------------------------------------------+--------------------------------------------------------+
|
||||
|
||||
|
||||
Basic Inference Engine API is covered by :doc:`Hello Classification C sample <openvino_inference_engine_ie_bridges_c_samples_hello_classification_README>`.
|
||||
Basic Inference Engine API is covered by :doc:`Hello Classification C sample <openvino_inference_engine_ie_bridges_c_samples_hello_classification_README>`.
|
||||
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=========================================+=======================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>` |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Model Format | Inference Engine Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Validated images | An uncompressed image in the NV12 color format - \*.yuv |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_nv12_input_classification_README>` |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/c/hello_nv12_input_classification/main.c
|
||||
:language: c
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -7,41 +7,50 @@
|
||||
|
||||
This sample demonstrates how to estimate performance of a model using Synchronous Inference Request API. It makes sense to use synchronous inference only in latency oriented scenarios. Models with static input shapes are supported. Unlike :doc:`demos <omz_demos>` this sample doesn't have other configurable command line arguments. Feel free to modify sample's source code to try out different options.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================+==============================================+==============================================+
|
||||
| OpenVINO Runtime Version | ``ov::get_openvino_version`` | Get Openvino API version. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | ``ov::Core``, ``ov::Core::compile_model``, | Common API to do inference: compile a model, |
|
||||
| | ``ov::CompiledModel::create_infer_request``, | create an infer request, |
|
||||
| | ``ov::InferRequest::get_tensor`` | configure input tensors. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Synchronous Infer | ``ov::InferRequest::infer``, | Do synchronous inference. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | ``ov::CompiledModel::inputs`` | Get inputs of a model. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_shape``, | Get a tensor shape and its data. |
|
||||
| | ``ov::Tensor::data`` | |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
.. tab-set::
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_sync_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_sync_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C++ API
|
||||
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================+==============================================+==============================================+
|
||||
| OpenVINO Runtime Version | ``ov::get_openvino_version`` | Get Openvino API version. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | ``ov::Core``, ``ov::Core::compile_model``, | Common API to do inference: compile a model, |
|
||||
| | ``ov::CompiledModel::create_infer_request``, | create an infer request, |
|
||||
| | ``ov::InferRequest::get_tensor`` | configure input tensors. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Synchronous Infer | ``ov::InferRequest::infer``, | Do synchronous inference. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | ``ov::CompiledModel::inputs`` | Get inputs of a model. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_shape``, | Get a tensor shape and its data. |
|
||||
| | ``ov::Tensor::data`` | |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/benchmark/sync_benchmark/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
####################
|
||||
|
||||
@@ -10,42 +10,52 @@ This sample demonstrates how to estimate performance of a model using Asynchrono
|
||||
|
||||
The reported results may deviate from what :doc:`benchmark_app <openvino_inference_engine_samples_benchmark_app_README>` reports. One example is model input precision for computer vision tasks. benchmark_app sets ``uint8``, while the sample uses default model precision which is usually ``float32``.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================+==============================================+==============================================+
|
||||
| OpenVINO Runtime Version | ``ov::get_openvino_version`` | Get Openvino API version. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | ``ov::Core``, ``ov::Core::compile_model``, | Common API to do inference: compile a model, |
|
||||
| | ``ov::CompiledModel::create_infer_request``, | create an infer request, |
|
||||
| | ``ov::InferRequest::get_tensor`` | configure input tensors. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Asynchronous Infer | ``ov::InferRequest::start_async``, | Do asynchronous inference with callback. |
|
||||
| | ``ov::InferRequest::set_callback`` | |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | ``ov::CompiledModel::inputs`` | Get inputs of a model. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_shape``, | Get a tensor shape and its data. |
|
||||
| | ``ov::Tensor::data`` | |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_throughput_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_throughput_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================+==============================================+==============================================+
|
||||
| OpenVINO Runtime Version | ``ov::get_openvino_version`` | Get Openvino API version. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | ``ov::Core``, ``ov::Core::compile_model``, | Common API to do inference: compile a model, |
|
||||
| | ``ov::CompiledModel::create_infer_request``, | create an infer request, |
|
||||
| | ``ov::InferRequest::get_tensor`` | configure input tensors. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Asynchronous Infer | ``ov::InferRequest::start_async``, | Do asynchronous inference with callback. |
|
||||
| | ``ov::InferRequest::set_callback`` | |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | ``ov::CompiledModel::inputs`` | Get inputs of a model. |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_shape``, | Get a tensor shape and its data. |
|
||||
| | ``ov::Tensor::data`` | |
|
||||
+--------------------------+----------------------------------------------+----------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/benchmark/throughput_benchmark/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
####################
|
||||
|
||||
@@ -14,33 +14,44 @@ Models with only one input and output are supported.
|
||||
|
||||
In addition to regular images, the sample also supports single-channel ``ubyte`` images as an input for LeNet model.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================+=======================================================================+========================================================================================+
|
||||
| Asynchronous Infer | ``ov::InferRequest::start_async``, ``ov::InferRequest::set_callback`` | Do asynchronous inference with callback. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov::Output::get_shape``, ``ov::set_batch`` | Manage the model, operate with its batch size. Set batch size using input image count. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Infer Request Operations | ``ov::InferRequest::get_input_tensor`` | Get an input tensor. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov::shape_size``, ``ov::Tensor::data`` | Get a tensor shape size and its data. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+============================+=======================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_classification_sample_async_README>` |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+============================+=======================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_classification_sample_async_README>` |
|
||||
+----------------------------+-------------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================+=======================================================================+========================================================================================+
|
||||
| Asynchronous Infer | ``ov::InferRequest::start_async``, ``ov::InferRequest::set_callback`` | Do asynchronous inference with callback. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov::Output::get_shape``, ``ov::set_batch`` | Manage the model, operate with its batch size. Set batch size using input image count. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Infer Request Operations | ``ov::InferRequest::get_input_tensor`` | Get an input tensor. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov::shape_size``, ``ov::Tensor::data`` | Get a tensor shape size and its data. |
|
||||
+--------------------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/classification_sample_async/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -12,46 +12,58 @@ This sample demonstrates how to do inference of image classification models usin
|
||||
|
||||
Models with only one input and output are supported.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=====================================+================================================================+=========================================================================================================================================================================================+
|
||||
| OpenVINO Runtime Version | ``ov::get_openvino_version`` | Get Openvino API version |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Basic Infer Flow | ``ov::Core::read_model``, | Common API to do inference: read and compile a model, create an infer request, configure input and output tensors |
|
||||
| | ``ov::Core::compile_model``, | |
|
||||
| | ``ov::CompiledModel::create_infer_request``, | |
|
||||
| | ``ov::InferRequest::set_input_tensor``, | |
|
||||
| | ``ov::InferRequest::get_output_tensor`` | |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Synchronous Infer | ``ov::InferRequest::infer`` | Do synchronous inference |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov::Model::inputs``, | Get inputs and outputs of a model |
|
||||
| | ``ov::Model::outputs`` | |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_shape`` | Get a tensor shape |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Preprocessing | ``ov::preprocess::InputTensorInfo::set_element_type``, | Set image of the original size as input for a model with other input size. Resize and layout conversions are performed automatically by the corresponding plugin just before inference. |
|
||||
| | ``ov::preprocess::InputTensorInfo::set_layout``, | |
|
||||
| | ``ov::preprocess::InputTensorInfo::set_spatial_static_shape``, | |
|
||||
| | ``ov::preprocess::PreProcessSteps::resize``, | |
|
||||
| | ``ov::preprocess::InputModelInfo::set_layout``, | |
|
||||
| | ``ov::preprocess::OutputTensorInfo::set_element_type``, | |
|
||||
| | ``ov::preprocess::PrePostProcessor::build`` | |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=====================================+=======================================================================================================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C <openvino_inference_engine_ie_bridges_c_samples_hello_classification_README>`, :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>` |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=====================================+================================================================+=========================================================================================================================================================================================+
|
||||
| OpenVINO Runtime Version | ``ov::get_openvino_version`` | Get Openvino API version |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Basic Infer Flow | ``ov::Core::read_model``, | Common API to do inference: read and compile a model, create an infer request, configure input and output tensors |
|
||||
| | ``ov::Core::compile_model``, | |
|
||||
| | ``ov::CompiledModel::create_infer_request``, | |
|
||||
| | ``ov::InferRequest::set_input_tensor``, | |
|
||||
| | ``ov::InferRequest::get_output_tensor`` | |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Synchronous Infer | ``ov::InferRequest::infer`` | Do synchronous inference |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov::Model::inputs``, | Get inputs and outputs of a model |
|
||||
| | ``ov::Model::outputs`` | |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_shape`` | Get a tensor shape |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Preprocessing | ``ov::preprocess::InputTensorInfo::set_element_type``, | Set image of the original size as input for a model with other input size. Resize and layout conversions are performed automatically by the corresponding plugin just before inference. |
|
||||
| | ``ov::preprocess::InputTensorInfo::set_layout``, | |
|
||||
| | ``ov::preprocess::InputTensorInfo::set_spatial_static_shape``, | |
|
||||
| | ``ov::preprocess::PreProcessSteps::resize``, | |
|
||||
| | ``ov::preprocess::InputModelInfo::set_layout``, | |
|
||||
| | ``ov::preprocess::OutputTensorInfo::set_element_type``, | |
|
||||
| | ``ov::preprocess::PrePostProcessor::build`` | |
|
||||
+-------------------------------------+----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/hello_classification/main.cpp
|
||||
:language: cpp
|
||||
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=====================================+=======================================================================================================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C <openvino_inference_engine_ie_bridges_c_samples_hello_classification_README>`, :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>` |
|
||||
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -10,37 +10,48 @@
|
||||
|
||||
This sample demonstrates how to execute an inference of image classification models with images in NV12 color format using Synchronous Inference Request API.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=====================================+=============================================================+===========================================+
|
||||
| Node Operations | ``ov::Output::get_any_name`` | Get a layer name |
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
| Infer Request Operations | ``ov::InferRequest::set_tensor``, | Operate with tensors |
|
||||
| | ``ov::InferRequest::get_tensor`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
| Preprocessing | ``ov::preprocess::InputTensorInfo::set_color_format``, | Change the color format of the input data |
|
||||
| | ``ov::preprocess::PreProcessSteps::convert_element_type``, | |
|
||||
| | ``ov::preprocess::PreProcessSteps::convert_color`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=====================================+==================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>` |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Validated images | An uncompressed image in the NV12 color format - \*.yuv |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C <openvino_inference_engine_ie_bridges_c_samples_hello_nv12_input_classification_README>` |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=====================================+=============================================================+===========================================+
|
||||
| Node Operations | ``ov::Output::get_any_name`` | Get a layer name |
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
| Infer Request Operations | ``ov::InferRequest::set_tensor``, | Operate with tensors |
|
||||
| | ``ov::InferRequest::get_tensor`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
| Preprocessing | ``ov::preprocess::InputTensorInfo::set_color_format``, | Change the color format of the input data |
|
||||
| | ``ov::preprocess::PreProcessSteps::convert_element_type``, | |
|
||||
| | ``ov::preprocess::PreProcessSteps::convert_color`` | |
|
||||
+-------------------------------------+-------------------------------------------------------------+-------------------------------------------+
|
||||
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=====================================+==================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>` |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Validated images | An uncompressed image in the NV12 color format - \*.yuv |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C <openvino_inference_engine_ie_bridges_c_samples_hello_nv12_input_classification_README>` |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/hello_nv12_input_classification/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -10,24 +10,35 @@
|
||||
|
||||
This sample demonstrates how to execute an query OpenVINO™ Runtime devices, prints their metrics and default configuration values, using :doc:`Properties API <openvino_docs_OV_UG_query_api>`.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+----------------------------------------+---------------------------------------+-------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+========================================+=======================================+===================================================================+
|
||||
| Available Devices | ``ov::Core::get_available_devices``, | Get available devices information and configuration for inference |
|
||||
| | ``ov::Core::get_property`` | |
|
||||
+----------------------------------------+---------------------------------------+-------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
+----------------------------------------+----------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+========================================+==============================================================================================+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------------------+----------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_query_device_README>` |
|
||||
+----------------------------------------+----------------------------------------------------------------------------------------------+
|
||||
|
||||
+----------------------------------------+----------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+========================================+==============================================================================================+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------------------+----------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_query_device_README>` |
|
||||
+----------------------------------------+----------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+----------------------------------------+---------------------------------------+-------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+========================================+=======================================+===================================================================+
|
||||
| Available Devices | ``ov::Core::get_available_devices``, | Get available devices information and configuration for inference |
|
||||
| | ``ov::Core::get_property`` | |
|
||||
+----------------------------------------+---------------------------------------+-------------------------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/hello_query_device/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -11,38 +11,50 @@
|
||||
This sample demonstrates how to do synchronous inference of object detection models using :doc:`input reshape feature <openvino_docs_OV_UG_ShapeInference>`.
|
||||
Models with only one input and output are supported.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==================================+=============================================================+================================================+
|
||||
| Node operations | ``ov::Node::get_type_info``, | Get a node info |
|
||||
| | ``ngraph::op::DetectionOutput::get_type_info_static``, | |
|
||||
| | ``ov::Output::get_any_name``, | |
|
||||
| | ``ov::Output::get_shape`` | |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Model Operations | ``ov::Model::get_ops``, | Get model nodes, reshape input |
|
||||
| | ``ov::Model::reshape`` | |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::data`` | Get a tensor data |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Preprocessing | ``ov::preprocess::PreProcessSteps::convert_element_type``, | Model input preprocessing |
|
||||
| | ``ov::preprocess::PreProcessSteps::convert_layout`` | |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+==================================+=============================================================================================+
|
||||
| Validated Models | :doc:`person-detection-retail-0013 <omz_models_model_person_detection_retail_0013>` |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_reshape_ssd_README>` |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==================================+=============================================================+================================================+
|
||||
| Node operations | ``ov::Node::get_type_info``, | Get a node info |
|
||||
| | ``ngraph::op::DetectionOutput::get_type_info_static``, | |
|
||||
| | ``ov::Output::get_any_name``, | |
|
||||
| | ``ov::Output::get_shape`` | |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Model Operations | ``ov::Model::get_ops``, | Get model nodes, reshape input |
|
||||
| | ``ov::Model::reshape`` | |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::data`` | Get a tensor data |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
| Preprocessing | ``ov::preprocess::PreProcessSteps::convert_element_type``, | Model input preprocessing |
|
||||
| | ``ov::preprocess::PreProcessSteps::convert_layout`` | |
|
||||
+----------------------------------+-------------------------------------------------------------+------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/hello_reshape_ssd/main.cpp
|
||||
:language: cpp
|
||||
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+==================================+=============================================================================================+
|
||||
| Validated Models | :doc:`person-detection-retail-0013 <omz_models_model_person_detection_retail_0013>` |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_hello_reshape_ssd_README>` |
|
||||
+----------------------------------+---------------------------------------------------------------------------------------------+
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -12,55 +12,66 @@ This sample demonstrates how to execute an synchronous inference using :doc:`mod
|
||||
|
||||
You do not need an XML file to create a model. The API of ov::Model allows creating a model on the fly from the source code.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================================+=========================================+=======================================+
|
||||
| OpenVINO Runtime Info | ``ov::Core::get_versions`` | Get device plugins versions |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Shape Operations | ``ov::Output::get_shape``, | Operate with shape |
|
||||
| | ``ov::Shape::size``, | |
|
||||
| | ``ov::shape_size`` | |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_byte_size``, | Get tensor byte size and its data |
|
||||
| | ``ov::Tensor:data`` | |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Model Operations | ``ov::set_batch`` | Operate with model batch size |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Infer Request Operations | ``ov::InferRequest::get_input_tensor`` | Get a input tensor |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Model creation objects | ``ov::opset8::Parameter``, | Used to construct an OpenVINO model |
|
||||
| | ``ov::Node::output``, | |
|
||||
| | ``ov::opset8::Constant``, | |
|
||||
| | ``ov::opset8::Convolution``, | |
|
||||
| | ``ov::opset8::Add``, | |
|
||||
| | ``ov::opset1::MaxPool``, | |
|
||||
| | ``ov::opset8::Reshape``, | |
|
||||
| | ``ov::opset8::MatMul``, | |
|
||||
| | ``ov::opset8::Relu``, | |
|
||||
| | ``ov::opset8::Softmax``, | |
|
||||
| | ``ov::descriptor::Tensor::set_names``, | |
|
||||
| | ``ov::opset8::Result``, | |
|
||||
| | ``ov::Model``, | |
|
||||
| | ``ov::ParameterVector::vector`` | |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=========================================================+=================================================================================================+
|
||||
| Validated Models | LeNet |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Model Format | model weights file (\*.bin) |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Validated images | single-channel ``MNIST ubyte`` images |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_model_creation_sample_README>` |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=========================================================+=================================================================================================+
|
||||
| Validated Models | LeNet |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Model Format | model weights file (\*.bin) |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Validated images | single-channel ``MNIST ubyte`` images |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`Python <openvino_inference_engine_ie_bridges_python_sample_model_creation_sample_README>` |
|
||||
+---------------------------------------------------------+-------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: C++ API
|
||||
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================================+=========================================+=======================================+
|
||||
| OpenVINO Runtime Info | ``ov::Core::get_versions`` | Get device plugins versions |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Shape Operations | ``ov::Output::get_shape``, | Operate with shape |
|
||||
| | ``ov::Shape::size``, | |
|
||||
| | ``ov::shape_size`` | |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_byte_size``, | Get tensor byte size and its data |
|
||||
| | ``ov::Tensor:data`` | |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Model Operations | ``ov::set_batch`` | Operate with model batch size |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Infer Request Operations | ``ov::InferRequest::get_input_tensor`` | Get a input tensor |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
| Model creation objects | ``ov::opset8::Parameter``, | Used to construct an OpenVINO model |
|
||||
| | ``ov::Node::output``, | |
|
||||
| | ``ov::opset8::Constant``, | |
|
||||
| | ``ov::opset8::Convolution``, | |
|
||||
| | ``ov::opset8::Add``, | |
|
||||
| | ``ov::opset1::MaxPool``, | |
|
||||
| | ``ov::opset8::Reshape``, | |
|
||||
| | ``ov::opset8::MatMul``, | |
|
||||
| | ``ov::opset8::Relu``, | |
|
||||
| | ``ov::opset8::Softmax``, | |
|
||||
| | ``ov::descriptor::Tensor::set_names``, | |
|
||||
| | ``ov::opset8::Result``, | |
|
||||
| | ``ov::Model``, | |
|
||||
| | ``ov::ParameterVector::vector`` | |
|
||||
+------------------------------------------+-----------------------------------------+---------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/model_creation_sample/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -12,40 +12,50 @@ This sample demonstrates how to execute an Asynchronous Inference of acoustic mo
|
||||
|
||||
The sample works with Kaldi ARK or Numpy* uncompressed NPZ files, so it does not cover an end-to-end speech recognition scenario (speech to text), requiring additional preprocessing (feature extraction) to get a feature vector from a speech signal, as well as postprocessing (decoding) to produce text from scores.
|
||||
|
||||
The following C++ API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=============================================================+=============================================================================================================+==============================================================================+
|
||||
| Available Devices | ``ov::Core::get_available_devices``, ``ov::Core::get_property`` | Get information of the devices for inference |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Import/Export Model | ``ov::Core::import_model``, ``ov::CompiledModel::export_model`` | The GNA plugin supports loading and saving of the GNA-optimized model |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov::set_batch``, ``ov::Model::add_output``, ``ov::CompiledModel::inputs``, ``ov::CompiledModel::outputs`` | Managing of model: configure batch_size, input and output tensors |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Node Operations | ``ov::OutputVector::size``, ``ov::Output::get_shape`` | Get node shape |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Asynchronous Infer | ``ov::InferRequest::start_async``, ``ov::InferRequest::wait`` | Do asynchronous inference and waits until inference result becomes available |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| InferRequest Operations | ``ov::InferRequest::query_state``, ``ov::VariableState::reset`` | Gets and resets CompiledModel state control |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_size``, ``ov::Tensor::data``, ``ov::InferRequest::get_tensor`` | Get a tensor, its size and data |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Profiling | ``ov::InferRequest::get_profiling_info`` | Get infer request profiling info |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=============================================================+===============================================================================================================================================================+
|
||||
| Validated Models | Acoustic model based on Kaldi\* neural networks (see :ref:`Model Preparation <model-preparation-speech>` section) |
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin) |
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | See :ref:`Execution Modes <execution-modes-speech>` section below and :doc:`List Supported Devices <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
.. tab-item:: C++ API
|
||||
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=============================================================+===============================================================================================================================================================+
|
||||
| Validated Models | Acoustic model based on Kaldi\* neural networks (see :ref:`Model Preparation <model-preparation-speech>` section) |
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (\*.xml + \*.bin) |
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | See :ref:`Execution Modes <execution-modes-speech>` section below and :doc:`List Supported Devices <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
The following C++ API is used in the application:
|
||||
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=============================================================+=============================================================================================================+==============================================================================+
|
||||
| Available Devices | ``ov::Core::get_available_devices``, ``ov::Core::get_property`` | Get information of the devices for inference |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Import/Export Model | ``ov::Core::import_model``, ``ov::CompiledModel::export_model`` | The GNA plugin supports loading and saving of the GNA-optimized model |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Model Operations | ``ov::set_batch``, ``ov::Model::add_output``, ``ov::CompiledModel::inputs``, ``ov::CompiledModel::outputs`` | Managing of model: configure batch_size, input and output tensors |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Node Operations | ``ov::OutputVector::size``, ``ov::Output::get_shape`` | Get node shape |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Asynchronous Infer | ``ov::InferRequest::start_async``, ``ov::InferRequest::wait`` | Do asynchronous inference and waits until inference result becomes available |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| InferRequest Operations | ``ov::InferRequest::query_state``, ``ov::VariableState::reset`` | Gets and resets CompiledModel state control |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Tensor Operations | ``ov::Tensor::get_size``, ``ov::Tensor::data``, ``ov::InferRequest::get_tensor`` | Get a tensor, its size and data |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| Profiling | ``ov::InferRequest::get_profiling_info`` | Get infer request profiling info |
|
||||
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification C++ sample <openvino_inference_engine_samples_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/cpp/speech_sample/main.cpp
|
||||
:language: cpp
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Bert Benchmark Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_bert_benchmark_README}
|
||||
# Bert Benchmark Python Sample {#openvino_inference_engine_ie_bridges_python_sample_bert_benchmark_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -10,20 +10,29 @@ This sample demonstrates how to estimate performance of a Bert model using Async
|
||||
|
||||
The following Python API is used in the application:
|
||||
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+================================+=================================================+==============================================+
|
||||
| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model. |
|
||||
| | [openvino.runtime.Core.compile_model] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Asynchronous Infer | [openvino.runtime.AsyncInferQueue], | Do asynchronous inference. |
|
||||
| | [openvino.runtime.AsyncInferQueue.start_async], | |
|
||||
| | [openvino.runtime.AsyncInferQueue.wait_all] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | [openvino.runtime.CompiledModel.inputs] | Get inputs of a model. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+================================+=================================================+==============================================+
|
||||
| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model. |
|
||||
| | [openvino.runtime.Core.compile_model] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Asynchronous Infer | [openvino.runtime.AsyncInferQueue], | Do asynchronous inference. |
|
||||
| | [openvino.runtime.AsyncInferQueue.start_async], | |
|
||||
| | [openvino.runtime.AsyncInferQueue.wait_all] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | [openvino.runtime.CompiledModel.inputs] | Get inputs of a model. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/benchmark/bert_benchmark/bert_benchmark.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
####################
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Sync Benchmark Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_sync_benchmark_README}
|
||||
# Sync Benchmark Python Sample {#openvino_inference_engine_ie_bridges_python_sample_sync_benchmark_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -8,42 +8,51 @@
|
||||
|
||||
This sample demonstrates how to estimate performance of a model using Synchronous Inference Request API. It makes sense to use synchronous inference only in latency oriented scenarios. Models with static input shapes are supported. Unlike :doc:`demos <omz_demos>` this sample doesn't have other configurable command line arguments. Feel free to modify sample's source code to try out different options.
|
||||
|
||||
The following Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+==============================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_sync_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+================================+=================================================+==============================================+
|
||||
| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model, |
|
||||
| | [openvino.runtime.Core.compile_model], | configure input tensors. |
|
||||
| | [openvino.runtime.InferRequest.get_tensor] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Synchronous Infer | [openvino.runtime.InferRequest.infer], | Do synchronous inference. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | [openvino.runtime.CompiledModel.inputs] | Get inputs of a model. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | [openvino.runtime.Tensor.get_shape], | Get a tensor shape and its data. |
|
||||
| | [openvino.runtime.Tensor.data] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
.. tab-item:: Python API
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+==============================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_sync_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
The following Python API is used in the application:
|
||||
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+================================+=================================================+==============================================+
|
||||
| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model, |
|
||||
| | [openvino.runtime.Core.compile_model], | configure input tensors. |
|
||||
| | [openvino.runtime.InferRequest.get_tensor] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Synchronous Infer | [openvino.runtime.InferRequest.infer], | Do synchronous inference. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | [openvino.runtime.CompiledModel.inputs] | Get inputs of a model. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | [openvino.runtime.Tensor.get_shape], | Get a tensor shape and its data. |
|
||||
| | [openvino.runtime.Tensor.data] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/benchmark/sync_benchmark/sync_benchmark.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
####################
|
||||
@@ -71,7 +80,6 @@ To run the sample, you need to specify a model:
|
||||
|
||||
The sample accepts models in ONNX format (.onnx) that do not require preprocessing.
|
||||
|
||||
|
||||
Example
|
||||
++++++++++++++++++++
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Throughput Benchmark Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_throughput_benchmark_README}
|
||||
# Throughput Benchmark Python Sample {#openvino_inference_engine_ie_bridges_python_sample_throughput_benchmark_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -10,44 +10,54 @@ This sample demonstrates how to estimate performance of a model using Asynchrono
|
||||
|
||||
The reported results may deviate from what :doc:`benchmark_app <openvino_inference_engine_tools_benchmark_tool_README>` reports. One example is model input precision for computer vision tasks. benchmark_app sets uint8, while the sample uses default model precision which is usually float32.
|
||||
|
||||
The following Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+================================+=================================================+==============================================+
|
||||
| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model, |
|
||||
| | [openvino.runtime.Core.compile_model] | configure input tensors. |
|
||||
| | [openvino.runtime.InferRequest.get_tensor] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Asynchronous Infer | [openvino.runtime.AsyncInferQueue], | Do asynchronous inference. |
|
||||
| | [openvino.runtime.AsyncInferQueue.start_async], | |
|
||||
| | [openvino.runtime.AsyncInferQueue.wait_all], | |
|
||||
| | [openvino.runtime.InferRequest.results] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | [openvino.runtime.CompiledModel.inputs] | Get inputs of a model. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | [openvino.runtime.Tensor.get_shape], | Get a tensor shape and its data. |
|
||||
| | [openvino.runtime.Tensor.data] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+==============================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_throughput_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================+==============================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, |
|
||||
| | :doc:`googlenet-v1 <omz_models_model_googlenet_v1>`, |
|
||||
| | :doc:`yolo-v3-tf <omz_models_model_yolo_v3_tf>`, |
|
||||
| | :doc:`face-detection-0200 <omz_models_model_face_detection_0200>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation |
|
||||
| | (\*.xml + \*.bin), ONNX (\*.onnx) |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_throughput_benchmark_README>` |
|
||||
+--------------------------------+------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
The following Python API is used in the application:
|
||||
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+================================+=================================================+==============================================+
|
||||
| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model, |
|
||||
| | [openvino.runtime.Core.compile_model] | configure input tensors. |
|
||||
| | [openvino.runtime.InferRequest.get_tensor] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Asynchronous Infer | [openvino.runtime.AsyncInferQueue], | Do asynchronous inference. |
|
||||
| | [openvino.runtime.AsyncInferQueue.start_async], | |
|
||||
| | [openvino.runtime.AsyncInferQueue.wait_all], | |
|
||||
| | [openvino.runtime.InferRequest.results] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Model Operations | [openvino.runtime.CompiledModel.inputs] | Get inputs of a model. |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
| Tensor Operations | [openvino.runtime.Tensor.get_shape], | Get a tensor shape and its data. |
|
||||
| | [openvino.runtime.Tensor.data] | |
|
||||
+--------------------------------+-------------------------------------------------+----------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/benchmark/throughput_benchmark/throughput_benchmark.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
####################
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Image Classification Async Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_classification_sample_async_README}
|
||||
# Image Classification Async Python Sample {#openvino_inference_engine_ie_bridges_python_sample_classification_sample_async_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -11,31 +11,43 @@ This sample demonstrates how to do inference of image classification models usin
|
||||
|
||||
Models with only 1 input and output are supported.
|
||||
|
||||
The following Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+
|
||||
| Feature | API | Description |
|
||||
+====================+===========================================================================================================================================================================================================+===========================+
|
||||
| Asynchronous Infer | `openvino.runtime.AsyncInferQueue <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html>`__ , | Do asynchronous inference |
|
||||
| | `openvino.runtime.AsyncInferQueue.set_callback <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html#openvino.runtime.AsyncInferQueue.set_callback>`__ , | |
|
||||
| | `openvino.runtime.AsyncInferQueue.start_async <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html#openvino.runtime.AsyncInferQueue.start_async>`__ , | |
|
||||
| | `openvino.runtime.AsyncInferQueue.wait_all <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html#openvino.runtime.AsyncInferQueue.wait_all>`__ , | |
|
||||
| | `openvino.runtime.InferRequest.results <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.results>`__ | |
|
||||
+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+============================+===================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>` |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin), ONNX (.onnx) |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_classification_sample_async_README>` |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
The following Python API is used in the application:
|
||||
|
||||
+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+
|
||||
| Feature | API | Description |
|
||||
+====================+===========================================================================================================================================================================================================+===========================+
|
||||
| Asynchronous Infer | `openvino.runtime.AsyncInferQueue <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html>`__ , | Do asynchronous inference |
|
||||
| | `openvino.runtime.AsyncInferQueue.set_callback <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html#openvino.runtime.AsyncInferQueue.set_callback>`__ , | |
|
||||
| | `openvino.runtime.AsyncInferQueue.start_async <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html#openvino.runtime.AsyncInferQueue.start_async>`__ , | |
|
||||
| | `openvino.runtime.AsyncInferQueue.wait_all <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.AsyncInferQueue.html#openvino.runtime.AsyncInferQueue.wait_all>`__ , | |
|
||||
| | `openvino.runtime.InferRequest.results <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.results>`__ | |
|
||||
+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/classification_sample_async/classification_sample_async.py
|
||||
:language: python
|
||||
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+============================+===================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>` |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin), ONNX (.onnx) |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_classification_sample_async_README>` |
|
||||
+----------------------------+-----------------------------------------------------------------------------------+
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Hello Classification Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_hello_classification_README}
|
||||
# Hello Classification Python Sample {#openvino_inference_engine_ie_bridges_python_sample_hello_classification_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -11,41 +11,52 @@ This sample demonstrates how to do inference of image classification models usin
|
||||
|
||||
Models with only 1 input and output are supported.
|
||||
|
||||
The following Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=============================+===========================================================================================================================================================================================================================================+============================================================================================================================================================================================+
|
||||
| Basic Infer Flow | `openvino.runtime.Core <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html>`__ , | |
|
||||
| | `openvino.runtime.Core.read_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.read_model>`__ , | |
|
||||
| | `openvino.runtime.Core.compile_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.compile_model>`__ | Common API to do inference |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Synchronous Infer | `openvino.runtime.CompiledModel.infer_new_request <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.infer_new_request>`__ | Do synchronous inference |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Operations | `openvino.runtime.Model.inputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.inputs>`__ , | Managing of model |
|
||||
| | `openvino.runtime.Model.outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.outputs>`__ | |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Preprocessing | `openvino.preprocess.PrePostProcessor <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.PrePostProcessor.html>`__ , | Set image of the original size as input for a model with other input size. Resize and layout conversions will be performed automatically by the corresponding plugin just before inference |
|
||||
| | `openvino.preprocess.InputTensorInfo.set_element_type <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputTensorInfo.html#openvino.preprocess.InputTensorInfo.set_element_type>`__ , | |
|
||||
| | `openvino.preprocess.InputTensorInfo.set_layout <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputTensorInfo.html#openvino.preprocess.InputTensorInfo.set_layout>`__ , | |
|
||||
| | `openvino.preprocess.InputTensorInfo.set_spatial_static_shape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputTensorInfo.html#openvino.preprocess.InputTensorInfo.set_spatial_static_shape>`__ , | |
|
||||
| | `openvino.preprocess.PreProcessSteps.resize <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.PreProcessSteps.html#openvino.preprocess.PreProcessSteps.resize>`__ , | |
|
||||
| | `openvino.preprocess.InputModelInfo.set_layout <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputModelInfo.html#openvino.preprocess.InputModelInfo.set_layout>`__ , | |
|
||||
| | `openvino.preprocess.OutputTensorInfo.set_element_type <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.OutputTensorInfo.html#openvino.preprocess.OutputTensorInfo.set_element_type>`__ , | |
|
||||
| | `openvino.preprocess.PrePostProcessor.build <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.PrePostProcessor.html#openvino.preprocess.PrePostProcessor.build>`__ | |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+===================================+===================================================================================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin), ONNX (.onnx) |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_classification_README>`, :doc:`C <openvino_inference_engine_ie_bridges_c_samples_hello_classification_README>` |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+===================================+===================================================================================================================================================================+
|
||||
| Validated Models | :doc:`alexnet <omz_models_model_alexnet>`, :doc:`googlenet-v1 <omz_models_model_googlenet_v1>` |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin), ONNX (.onnx) |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_classification_README>`, :doc:`C <openvino_inference_engine_ie_bridges_c_samples_hello_classification_README>` |
|
||||
+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
The following Python API is used in the application:
|
||||
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=============================+===========================================================================================================================================================================================================================================+============================================================================================================================================================================================+
|
||||
| Basic Infer Flow | `openvino.runtime.Core <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html>`__ , | |
|
||||
| | `openvino.runtime.Core.read_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.read_model>`__ , | |
|
||||
| | `openvino.runtime.Core.compile_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.compile_model>`__ | Common API to do inference |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Synchronous Infer | `openvino.runtime.CompiledModel.infer_new_request <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.infer_new_request>`__ | Do synchronous inference |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Operations | `openvino.runtime.Model.inputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.inputs>`__ , | Managing of model |
|
||||
| | `openvino.runtime.Model.outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.outputs>`__ | |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Preprocessing | `openvino.preprocess.PrePostProcessor <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.PrePostProcessor.html>`__ , | Set image of the original size as input for a model with other input size. Resize and layout conversions will be performed automatically by the corresponding plugin just before inference |
|
||||
| | `openvino.preprocess.InputTensorInfo.set_element_type <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputTensorInfo.html#openvino.preprocess.InputTensorInfo.set_element_type>`__ , | |
|
||||
| | `openvino.preprocess.InputTensorInfo.set_layout <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputTensorInfo.html#openvino.preprocess.InputTensorInfo.set_layout>`__ , | |
|
||||
| | `openvino.preprocess.InputTensorInfo.set_spatial_static_shape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputTensorInfo.html#openvino.preprocess.InputTensorInfo.set_spatial_static_shape>`__ , | |
|
||||
| | `openvino.preprocess.PreProcessSteps.resize <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.PreProcessSteps.html#openvino.preprocess.PreProcessSteps.resize>`__ , | |
|
||||
| | `openvino.preprocess.InputModelInfo.set_layout <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.InputModelInfo.html#openvino.preprocess.InputModelInfo.set_layout>`__ , | |
|
||||
| | `openvino.preprocess.OutputTensorInfo.set_element_type <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.OutputTensorInfo.html#openvino.preprocess.OutputTensorInfo.set_element_type>`__ , | |
|
||||
| | `openvino.preprocess.PrePostProcessor.build <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.preprocess.PrePostProcessor.html#openvino.preprocess.PrePostProcessor.build>`__ | |
|
||||
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/hello_classification/hello_classification.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Hello Query Device Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_hello_query_device_README}
|
||||
# Hello Query Device Python Sample {#openvino_inference_engine_ie_bridges_python_sample_hello_query_device_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -10,25 +10,36 @@
|
||||
|
||||
This sample demonstrates how to show OpenVINO™ Runtime devices and prints their metrics and default configuration values using :doc:`Query Device API feature <openvino_docs_OV_UG_query_api>`.
|
||||
|
||||
The following Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=======================================+============================================================================================================================================================================================+========================================+
|
||||
| Basic | `openvino.runtime.Core <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html>`__ | Common API |
|
||||
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
|
||||
| Query Device | `openvino.runtime.Core.available_devices <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.available_devices>`__ , | Get device properties |
|
||||
| | `openvino.runtime.Core.get_metric <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.inference_engine.IECore.html#openvino.inference_engine.IECore.get_metric>`__ , | |
|
||||
| | `openvino.runtime.Core.get_config <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.inference_engine.IECore.html#openvino.inference_engine.IECore.get_config>`__ | |
|
||||
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=======================================================+==========================================================================+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_query_device_README>` |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------+
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+=======================================================+==========================================================================+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_query_device_README>` |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
The following Python API is used in the application:
|
||||
|
||||
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+=======================================+============================================================================================================================================================================================+========================================+
|
||||
| Basic | `openvino.runtime.Core <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html>`__ | Common API |
|
||||
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
|
||||
| Query Device | `openvino.runtime.Core.available_devices <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.available_devices>`__ , | Get device properties |
|
||||
| | `openvino.runtime.Core.get_metric <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.inference_engine.IECore.html#openvino.inference_engine.IECore.get_metric>`__ , | |
|
||||
| | `openvino.runtime.Core.get_config <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.inference_engine.IECore.html#openvino.inference_engine.IECore.get_config>`__ | |
|
||||
+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------+
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/hello_query_device/hello_query_device.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Hello Reshape SSD Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_hello_reshape_ssd_README}
|
||||
# Hello Reshape SSD Python Sample {#openvino_inference_engine_ie_bridges_python_sample_hello_reshape_ssd_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -12,32 +12,44 @@ This sample demonstrates how to do synchronous inference of object detection mod
|
||||
|
||||
Models with only 1 input and output are supported.
|
||||
|
||||
The following Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+====================================+================================================================================================================================================================================+======================================+
|
||||
| Model Operations | `openvino.runtime.Model.reshape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.reshape>`__ , | Managing of model |
|
||||
| | `openvino.runtime.Model.input <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.input>`__ , | |
|
||||
| | `openvino.runtime.Output.get_any_name <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Output.html#openvino.runtime.Output.get_any_name>`__ , | |
|
||||
| | `openvino.runtime.PartialShape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.PartialShape.html>`__ | |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+====================================+===========================================================================+
|
||||
| Validated Models | :doc:`mobilenet-ssd <omz_models_model_mobilenet_ssd>` |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Validated Layout | NCHW |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin), ONNX (.onnx) |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_reshape_ssd_README>` |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
The following Python API is used in the application:
|
||||
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+====================================+================================================================================================================================================================================+======================================+
|
||||
| Model Operations | `openvino.runtime.Model.reshape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.reshape>`__ , | Managing of model |
|
||||
| | `openvino.runtime.Model.input <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.input>`__ , | |
|
||||
| | `openvino.runtime.Output.get_any_name <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Output.html#openvino.runtime.Output.get_any_name>`__ , | |
|
||||
| | `openvino.runtime.PartialShape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.PartialShape.html>`__ | |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/hello_reshape_ssd/hello_reshape_ssd.py
|
||||
:language: python
|
||||
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+====================================+===========================================================================+
|
||||
| Validated Models | :doc:`mobilenet-ssd <omz_models_model_mobilenet_ssd>` |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Validated Layout | NCHW |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin), ONNX (.onnx) |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_hello_reshape_ssd_README>` |
|
||||
+------------------------------------+---------------------------------------------------------------------------+
|
||||
|
||||
How It Works
|
||||
############
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Model Creation Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_model_creation_sample_README}
|
||||
# Model Creation Python Sample {#openvino_inference_engine_ie_bridges_python_sample_model_creation_sample_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -10,39 +10,50 @@
|
||||
|
||||
This sample demonstrates how to run inference using a :doc:`model <openvino_docs_OV_UG_Model_Representation>` built on the fly that uses weights from the LeNet classification model, which is known to work well on digit classification tasks. You do not need an XML file, the model is created from the source code on the fly.
|
||||
|
||||
The following OpenVINO Python API is used in the application:
|
||||
.. tab-set::
|
||||
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================================+==============================================================================================================================================================+====================================================================================+
|
||||
| Model Operations | `openvino.runtime.Model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html>`__ , | Managing of model |
|
||||
| | `openvino.runtime.set_batch <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.set_batch.html>`__ , | |
|
||||
| | `openvino.runtime.Model.input <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.input>`__ | |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
| Opset operations | `openvino.runtime.op.Parameter <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.op.Parameter.html>`__ , | Description of a model topology using OpenVINO Python API |
|
||||
| | `openvino.runtime.op.Constant <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.op.Constant.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.convolution <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.convolution.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.add <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.add.html>`__ , | |
|
||||
| | `openvino.runtime.opset1.max_pool <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset1.max_pool.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.reshape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.reshape.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.matmul <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.matmul.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.relu <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.relu.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.softmax <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.softmax.html>`__ | |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================================+=============================================================================+
|
||||
| Validated Models | LeNet |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Model Format | Model weights file (\*.bin) |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_model_creation_sample_README>` |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+================================================+=============================================================================+
|
||||
| Validated Models | LeNet |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Model Format | Model weights file (\*.bin) |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Supported devices | :doc:`All <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_model_creation_sample_README>` |
|
||||
+------------------------------------------------+-----------------------------------------------------------------------------+
|
||||
.. tab-item:: Python API
|
||||
|
||||
The following OpenVINO Python API is used in the application:
|
||||
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+==========================================+==============================================================================================================================================================+====================================================================================+
|
||||
| Model Operations | `openvino.runtime.Model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html>`__ , | Managing of model |
|
||||
| | `openvino.runtime.set_batch <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.set_batch.html>`__ , | |
|
||||
| | `openvino.runtime.Model.input <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.input>`__ | |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
| Opset operations | `openvino.runtime.op.Parameter <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.op.Parameter.html>`__ , | Description of a model topology using OpenVINO Python API |
|
||||
| | `openvino.runtime.op.Constant <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.op.Constant.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.convolution <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.convolution.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.add <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.add.html>`__ , | |
|
||||
| | `openvino.runtime.opset1.max_pool <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset1.max_pool.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.reshape <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.reshape.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.matmul <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.matmul.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.relu <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.relu.html>`__ , | |
|
||||
| | `openvino.runtime.opset8.softmax <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.opset8.softmax.html>`__ | |
|
||||
+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/model_creation_sample/model_creation_sample.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
############
|
||||
@@ -54,7 +65,6 @@ At startup, the sample application does the following:
|
||||
- Loads the model and input data to the OpenVINO™ Runtime plugin
|
||||
- Performs synchronous inference and processes output data, logging each step in a standard output stream
|
||||
|
||||
|
||||
You can see the explicit description of each sample step at :doc:`Integration Steps <openvino_docs_OV_UG_Integrate_OV_with_your_application>` section of "Integrate OpenVINO™ Runtime with Your Application" guide.
|
||||
|
||||
Running
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Automatic Speech Recognition Python* Sample {#openvino_inference_engine_ie_bridges_python_sample_speech_sample_README}
|
||||
# Automatic Speech Recognition Python Sample {#openvino_inference_engine_ie_bridges_python_sample_speech_sample_README}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
@@ -12,38 +12,49 @@ This sample demonstrates how to do a Synchronous Inference of acoustic model bas
|
||||
|
||||
The sample works with Kaldi ARK or Numpy* uncompressed NPZ files, so it does not cover an end-to-end speech recognition scenario (speech to text), requiring additional preprocessing (feature extraction) to get a feature vector from a speech signal, as well as postprocessing (decoding) to produce text from scores.
|
||||
|
||||
Automatic Speech Recognition Python sample application demonstrates how to use the following Python API in applications:
|
||||
.. tab-set::
|
||||
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+===================================================================+================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+=======================================================================+
|
||||
| Import/Export Model | `openvino.runtime.Core.import_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.import_model>`__ , `openvino.runtime.CompiledModel.export_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.export_model>`__ | The GNA plugin supports loading and saving of the GNA-optimized model |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Model Operations | `openvino.runtime.Model.add_outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.add_outputs>`__ , `openvino.runtime.set_batch <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.html#openvino.runtime.set_batch>`__ , `openvino.runtime.CompiledModel.inputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.inputs>`__ , `openvino.runtime.CompiledModel.outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.outputs>`__ , `openvino.runtime.ConstOutput.any_name <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.ConstOutput.html#openvino.runtime.ConstOutput.any_name>`__ | Managing of model: configure batch_size, input and output tensors |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Synchronous Infer | `openvino.runtime.CompiledModel.create_infer_request <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.create_infer_request>`__ , `openvino.runtime.InferRequest.infer <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.infer>`__ | Do synchronous inference |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| InferRequest Operations | `openvino.runtime.InferRequest.get_input_tensor <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.get_input_tensor>`__ , `openvino.runtime.InferRequest.model_outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.model_outputs>`__ , `openvino.runtime.InferRequest.model_inputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.model_inputs>`__ , | Get info about model using infer request API |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| InferRequest Operations | `openvino.runtime.InferRequest.query_state <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.query_state>`__ , `openvino.runtime.VariableState.reset <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.inference_engine.VariableState.html#openvino.inference_engine.VariableState.reset>`__ | Gets and resets CompiledModel state control |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Profiling | `openvino.runtime.InferRequest.profiling_info <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.profiling_info>`__ , `openvino.runtime.ProfilingInfo.real_time <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.ProfilingInfo.html#openvino.runtime.ProfilingInfo.real_time>`__ | Get infer request profiling info |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
.. tab-item:: Requirements
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+======================================================================+======================================================================================================================================================================+
|
||||
| Validated Models | Acoustic model based on Kaldi* neural models (see :ref:`Model Preparation <model-preparation-speech-python>` section) |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin) |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | See :ref:`Execution Modes <execution-modes-speech-python>` section below and :doc:`List Supported Devices <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_speech_sample_README>` |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Options | Values |
|
||||
+======================================================================+======================================================================================================================================================================+
|
||||
| Validated Models | Acoustic model based on Kaldi* neural models (see :ref:`Model Preparation <model-preparation-speech-python>` section) |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Model Format | OpenVINO™ toolkit Intermediate Representation (.xml + .bin) |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Supported devices | See :ref:`Execution Modes <execution-modes-speech-python>` section below and :doc:`List Supported Devices <openvino_docs_OV_UG_supported_plugins_Supported_Devices>` |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Other language realization | :doc:`C++ <openvino_inference_engine_samples_speech_sample_README>` |
|
||||
+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
Automatic Speech Recognition Python sample application demonstrates how to use the following Python API in applications:
|
||||
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Feature | API | Description |
|
||||
+===================================================================+================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+=======================================================================+
|
||||
| Import/Export Model | `openvino.runtime.Core.import_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Core.html#openvino.runtime.Core.import_model>`__ , `openvino.runtime.CompiledModel.export_model <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.export_model>`__ | The GNA plugin supports loading and saving of the GNA-optimized model |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Model Operations | `openvino.runtime.Model.add_outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.add_outputs>`__ , `openvino.runtime.set_batch <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.html#openvino.runtime.set_batch>`__ , `openvino.runtime.CompiledModel.inputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.inputs>`__ , `openvino.runtime.CompiledModel.outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.outputs>`__ , `openvino.runtime.ConstOutput.any_name <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.ConstOutput.html#openvino.runtime.ConstOutput.any_name>`__ | Managing of model: configure batch_size, input and output tensors |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Synchronous Infer | `openvino.runtime.CompiledModel.create_infer_request <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.CompiledModel.html#openvino.runtime.CompiledModel.create_infer_request>`__ , `openvino.runtime.InferRequest.infer <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.infer>`__ | Do synchronous inference |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| InferRequest Operations | `openvino.runtime.InferRequest.get_input_tensor <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.get_input_tensor>`__ , `openvino.runtime.InferRequest.model_outputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.model_outputs>`__ , `openvino.runtime.InferRequest.model_inputs <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.model_inputs>`__ , | Get info about model using infer request API |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| InferRequest Operations | `openvino.runtime.InferRequest.query_state <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.query_state>`__ , `openvino.runtime.VariableState.reset <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.inference_engine.VariableState.html#openvino.inference_engine.VariableState.reset>`__ | Gets and resets CompiledModel state control |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
| Profiling | `openvino.runtime.InferRequest.profiling_info <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.InferRequest.html#openvino.runtime.InferRequest.profiling_info>`__ , `openvino.runtime.ProfilingInfo.real_time <https://docs.openvino.ai/2023.0/api/ie_python_api/_autosummary/openvino.runtime.ProfilingInfo.html#openvino.runtime.ProfilingInfo.real_time>`__ | Get infer request profiling info |
|
||||
+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+
|
||||
|
||||
Basic OpenVINO™ Runtime API is covered by :doc:`Hello Classification Python* Sample <openvino_inference_engine_ie_bridges_python_sample_hello_classification_README>`.
|
||||
|
||||
.. tab-item:: Sample Code
|
||||
|
||||
.. doxygensnippet:: samples/python/speech_sample/speech_sample.py
|
||||
:language: python
|
||||
|
||||
How It Works
|
||||
############
|
||||
@@ -53,6 +64,7 @@ At startup, the sample application reads command-line parameters, loads a specif
|
||||
You can see the explicit description of
|
||||
each sample step at :doc:`Integration Steps <openvino_docs_OV_UG_Integrate_OV_with_your_application>` section of "Integrate OpenVINO™ Runtime with Your Application" guide.
|
||||
|
||||
|
||||
GNA-specific details
|
||||
####################
|
||||
|
||||
|
||||
Reference in new issue
Block a user