Remove demo_security_barrier_camera and update relevant docs (#7494)
* Remove demo_security_barrier_camera * rename demo to samples, update python version * update get_started docs Co-authored-by: Vladimir Dudnik <vladimir.dudnik@intel.com>
This commit is contained in:
@@ -4,7 +4,7 @@ The OpenVINO™ toolkit optimizes and runs Deep Learning Neural Network models o
|
||||
|
||||
In this guide, you will:
|
||||
* Learn the OpenVINO™ inference workflow.
|
||||
* Run demo scripts that perform the steps for you. These demo scripts illustrate the workflow.
|
||||
* Run sample scripts that perform the steps for you. These sample scripts illustrate the workflow.
|
||||
* Run the workflow steps yourself, using detailed instructions with a code sample and demo application.
|
||||
|
||||
## <a name="openvino-components"></a>OpenVINO™ toolkit Components
|
||||
@@ -13,8 +13,8 @@ The toolkit consists of three primary components:
|
||||
* **Model Optimizer:** Optimizes models for Intel® architecture, converting models into a format compatible with the Inference Engine. This format is called an Intermediate Representation (IR).
|
||||
* **Intermediate Representation (IR):** The Model Optimizer output. A model converted to a format that has been optimized for Intel® architecture and is usable by the Inference Engine.
|
||||
|
||||
In addition, demo scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Demo Scripts** - Shell scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
In addition, sample scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Sample Scripts** - Shell scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
* **[Code Samples](../IE_DG/Samples_Overview.md)** - Small console applications that show you how to:
|
||||
* Utilize specific OpenVINO capabilities in an application
|
||||
* Perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
@@ -34,11 +34,11 @@ If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory
|
||||
The primary tools for deploying your models and applications are installed to the `/opt/intel/openvino_2021/deployment_tools` directory.
|
||||
<details>
|
||||
<summary><strong>Click for the Intel® Distribution of OpenVINO™ toolkit directory structure</strong></summary>
|
||||
|
||||
|
||||
|
||||
| Directory | Description |
|
||||
|:----------------------------------------|:--------------------------------------------------------------------------------------|
|
||||
| `demo/` | Demo scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Demo Scripts](#use-openvino-demo-scripts) section.|
|
||||
| `demo/` | Sample scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Sample Scripts](#use-openvino-sample-scripts) section.|
|
||||
| `inference_engine/` | Inference Engine directory. Contains Inference Engine API binaries and source files, samples and extensions source files, and resources like hardware drivers.|
|
||||
| `~intel_models/` | Symbolic link to the `intel_models` subfolder of the `open_model-zoo` folder |
|
||||
| `include/` | Inference Engine header files. For API documentation, see the [Inference Engine API Reference](./annotated.html). |
|
||||
@@ -61,29 +61,29 @@ The simplified OpenVINO™ workflow is:
|
||||
2. **Run the trained model through the Model Optimizer** to convert the model to an Intermediate Representation, which consists of a pair of `.xml` and `.bin` files that are used as the input for Inference Engine.
|
||||
3. **Use the Inference Engine API in the application** to run inference against the Intermediate Representation (optimized model) and output inference results. The application can be an OpenVINO™ sample, demo, or your own application.
|
||||
|
||||
## Use the Demo Scripts to Learn the Workflow
|
||||
## Use the Sample Scripts to Learn the Workflow
|
||||
|
||||
The demo scripts in `/opt/intel/openvino_2021/deployment_tools/demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The demo steps let you see how to:
|
||||
The sample scripts in `/opt/intel/openvino_2021/deployment_tools/demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The sample steps let you see how to:
|
||||
* Compile several samples from the source files delivered as part of the OpenVINO toolkit.
|
||||
* Download trained models.
|
||||
* Perform pipeline steps and see the output on the console.
|
||||
|
||||
> **NOTE**: You must have Internet access to run the demo scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
> **NOTE**: You must have Internet access to run the sample scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
|
||||
The demo scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
The sample scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
|
||||
```sh
|
||||
./<script_name> -d [CPU, GPU, MYRIAD, HDDL]
|
||||
```
|
||||
|
||||
Before running the demo applications on Intel® Processor Graphics or on an Intel® Neural Compute Stick 2 device, you must complete the additional configuration steps. For details, see:
|
||||
Before running the sample or demo applications on Intel® Processor Graphics or on an Intel® Neural Compute Stick 2 device, you must complete the additional configuration steps. For details, see:
|
||||
* Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-linux.md)
|
||||
* Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
|
||||
The following paragraphs describe each demo script.
|
||||
The following paragraphs describe each sample script.
|
||||
|
||||
### Image Classification Demo Script
|
||||
The `demo_squeezenet_download_convert_run` script illustrates the image classification pipeline.
|
||||
### Image Classification Sample Script
|
||||
The `run_sample_squeezenet` script illustrates the image classification pipeline.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
@@ -92,7 +92,7 @@ The script:
|
||||
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Image Classification demo script</strong></summary>
|
||||
<summary><strong>Click for an example of running the Image Classification sample script</strong></summary>
|
||||
|
||||
To preview the image that the script will classify:
|
||||
|
||||
@@ -104,7 +104,7 @@ eog car.png
|
||||
To run the script to perform inference on a CPU:
|
||||
|
||||
```sh
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
./run_sample_squeezenet.sh
|
||||
```
|
||||
|
||||
When the script completes, you see the label and confidence for the top-10 categories:
|
||||
@@ -134,56 +134,27 @@ Average running time of one iteration: 2.6642941 ms
|
||||
|
||||
Throughput: 375.3339402 FPS
|
||||
|
||||
[ INFO ] Execution successful
|
||||
[ INFO ] Classification sample execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Inference Pipeline Demo Script
|
||||
The `demo_security_barrier_camera` uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
|
||||
### Benchmark Sample Script
|
||||
The `run_sample_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads three pre-trained model IRs.
|
||||
2. Builds the Security Barrier Camera Demo application.
|
||||
3. Runs the application with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
|
||||
|
||||
This application:
|
||||
|
||||
1. Identifies an object identified as a vehicle.
|
||||
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
|
||||
3. Uses the the license plate as input to the third model, which recognizes specific characters in the license plate.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of Running the Pipeline demo script</strong></summary>
|
||||
|
||||
To run the script performing inference on Intel® Processor Graphics:
|
||||
|
||||
```sh
|
||||
./demo_security_barrier_camera.sh -d GPU
|
||||
```
|
||||
|
||||
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
### Benchmark Demo Script
|
||||
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Inference Engine Benchmark tool.
|
||||
3. Builds the Inference Engine Benchmark sample.
|
||||
4. Runs the tool with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Benchmark demo script</strong></summary>
|
||||
<summary><strong>Click for an example of running the Benchmark sample script</strong></summary>
|
||||
|
||||
To run the script that performs inference (runs on CPU by default):
|
||||
|
||||
```sh
|
||||
./demo_benchmark_app.sh
|
||||
./run_sample_benchmark_app.sh
|
||||
```
|
||||
|
||||
When the verification script completes, you see the performance counters, resulting latency, and throughput values displayed on the screen.
|
||||
@@ -191,9 +162,9 @@ When the verification script completes, you see the performance counters, result
|
||||
|
||||
## <a name="using-sample-application"></a>Use Code Samples and Demo Applications to Learn the Workflow
|
||||
|
||||
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
|
||||
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
|
||||
|
||||
You will perform the following steps:
|
||||
You will perform the following steps:
|
||||
|
||||
1. <a href="#download-models">Use the Model Downloader to download suitable models.</a>
|
||||
2. <a href="#convert-models-to-intermediate-representation">Convert the models with the Model Optimizer.</a>
|
||||
@@ -215,7 +186,7 @@ Inputs you'll need to specify:
|
||||
|
||||
### Build the Code Samples and Demo Applications
|
||||
|
||||
To perform sample inference, run the Image Classification code sample and Security Barrier Camera demo application that were automatically compiled when you ran the Image Classification and Inference Pipeline demo scripts. The binary files are in the `~/inference_engine_cpp_samples_build/intel64/Release` and `~/inference_engine_demos_build/intel64/Release` directories, respectively.
|
||||
The Image Classification Sample that was automatically compiled when you ran the Image Classification sample script. The binary file is in the `~/inference_engine_cpp_samples_build/intel64/Release` directory.
|
||||
|
||||
To run other sample code or demo applications, build them from the source files delivered as part of the OpenVINO toolkit. To learn how to build these, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) and [Demo Applications Overview](@ref omz_demos) sections.
|
||||
|
||||
@@ -252,14 +223,11 @@ sudo python3 ./downloader.py --name <model_name> --output_dir <models_dir>
|
||||
```
|
||||
> **NOTE:** Always run the downloader with `sudo`.
|
||||
|
||||
Download the following models if you want to run the Image Classification Sample and Security Barrier Camera Demo application:
|
||||
Download the following models if you want to run the Image Classification Sample:
|
||||
|
||||
|Model Name | Code Sample or Demo App |
|
||||
|Model Name | Code Sample |
|
||||
|-----------------------------------------------|-----------------------------------------------------|
|
||||
|`squeezenet1.1` | Image Classification Sample |
|
||||
|`vehicle-license-plate-detection-barrier-0106` | Security Barrier Camera Demo application |
|
||||
|`vehicle-attributes-recognition-barrier-0039` | Security Barrier Camera Demo application |
|
||||
|`license-plate-recognition-barrier-0001` | Security Barrier Camera Demo application |
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading the SqueezeNet Caffe* model</strong></summary>
|
||||
@@ -285,36 +253,6 @@ Your screen looks similar to this after the download:
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading models for the Security Barrier Camera Demo application</strong></summary>
|
||||
|
||||
To download all three pre-trained models in FP16 precision to the `~/models` folder:
|
||||
|
||||
```sh
|
||||
./downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir ~/models --precisions FP16
|
||||
```
|
||||
Your screen looks similar to this after the download:
|
||||
```
|
||||
################|| Downloading models ||################
|
||||
|
||||
========== Downloading /home/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml
|
||||
... 100%, 204 KB, 183949 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /home/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin
|
||||
... 100%, 1256 KB, 3948 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /home/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml
|
||||
... 100%, 32 KB, 133398 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /home/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin
|
||||
... 100%, 1222 KB, 3167 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /home/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml
|
||||
... 100%, 47 KB, 85357 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /home/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin
|
||||
... 100%, 2378 KB, 5333 KB/s, 0 seconds passed
|
||||
|
||||
################|| Post-processing ||################
|
||||
```
|
||||
|
||||
@@ -330,10 +268,9 @@ Models in the Intermediate Representation format always include a pair of `.xml`
|
||||
|
||||
This guide uses the public SqueezeNet 1.1 Caffe\* model to run the Image Classification Sample. See the example to download a model in the <a href="#download-models">Download Models</a> section to learn how to download this model.
|
||||
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
The `vehicle-license-plate-detection-barrier-0106`, `vehicle-attributes-recognition-barrier-0039`, `license-plate-recognition-barrier-0001` models are downloaded in the Intermediate Representation format. You don't need to use the Model Optimizer to convert these models.
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
|
||||
1. Create an `<ir_dir>` directory to contain the model's Intermediate Representation (IR).
|
||||
1. Create an `<ir_dir>` directory to contain the model's Intermediate Representation (IR).
|
||||
|
||||
2. The Inference Engine can perform inference on different precision formats, such as `FP32`, `FP16`, `INT8`. To prepare an IR with specific precision, run the Model Optimizer with the appropriate `--data_type` option.
|
||||
|
||||
@@ -378,7 +315,7 @@ As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes two
|
||||
|
||||
### <a name="run-image-classification"></a>Step 4: Run the Image Classification Code Sample
|
||||
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification demo script. If you want to compile it manually, see the *Build the Sample Applications on Linux* section in the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification sample script. If you want to compile it manually, see the *Build the Sample Applications on Linux* section in the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
|
||||
@@ -388,7 +325,7 @@ To run the **Image Classification** code sample with an input image on the IR:
|
||||
```
|
||||
2. Go to the code samples build directory:
|
||||
```sh
|
||||
cd ~/inference_engine_samples_build/intel64/Release
|
||||
cd ~/inference_engine_cpp_samples_build/intel64/Release
|
||||
```
|
||||
3. Run the code sample executable, specifying the input media file, the IR of your model, and a target device on which you want to perform inference:
|
||||
```sh
|
||||
@@ -425,7 +362,7 @@ The following commands run the Image Classification Code Sample using the `car.p
|
||||
./classification_sample_async -i /opt/intel/openvino_2021/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d HDDL
|
||||
```
|
||||
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
```sh
|
||||
Top 10 results:
|
||||
|
||||
@@ -450,58 +387,7 @@ Average running time of one iteration: 2.6642941 ms
|
||||
|
||||
Throughput: 375.3339402 FPS
|
||||
|
||||
[ INFO ] Execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
|
||||
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you ran the Inference Pipeline demo scripts. If you want to build it manually, see the [Demo Applications Overview](@ref omz_demos) section.
|
||||
|
||||
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
|
||||
|
||||
1. Set up the OpenVINO environment variables:
|
||||
```sh
|
||||
source /opt/intel/openvino_2021/bin/setupvars.sh
|
||||
```
|
||||
2. Go to the demo application build directory:
|
||||
```sh
|
||||
cd ~/inference_engine_demos_build/intel64/Release
|
||||
```
|
||||
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device on which to perform inference:
|
||||
```sh
|
||||
./security_barrier_camera_demo -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for examples of running the Security Barrier Camera demo application on different devices</strong></summary>
|
||||
|
||||
**CPU:**
|
||||
|
||||
```sh
|
||||
./security_barrier_camera_demo -i /opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp -m /home/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -m_va /home/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml -m_lpr /home/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml -d CPU
|
||||
```
|
||||
|
||||
**GPU:**
|
||||
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./security_barrier_camera_demo -i /opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on the Intel® Neural Compute Stick 2 device with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i <DLDT_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
**HDDL:**
|
||||
|
||||
> **NOTE**: Running inference on the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs device with the HDDL plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i <DLDT_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d HDDL
|
||||
[ INFO ] Classification sample execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -510,10 +396,10 @@ To run the **Security Barrier Camera Demo Application** using an input image on
|
||||
|
||||
Following are some basic guidelines for executing the OpenVINO™ workflow using the code samples and demo applications:
|
||||
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
```sh
|
||||
source /opt/intel/openvino_2021/bin/setupvars.sh
|
||||
```
|
||||
```
|
||||
2. Have the directory path for the following:
|
||||
- Code Sample binaries located in `~/inference_engine_cpp_samples_build/intel64/Release`
|
||||
- Demo Application binaries located in `~/inference_engine_demos_build/intel64/Release`
|
||||
@@ -553,7 +439,7 @@ With the sample information specified, the command might look like this:
|
||||
-m ~/ir/fp32/mobilenet-ssd.xml -d CPU
|
||||
```
|
||||
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
|
||||
Some demo applications let you use multiple models for different purposes. In these cases, the output of the first model is usually used as the input for later models.
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Get Started with OpenVINO™ Toolkit on macOS* {#openvino_docs_get_started_get_started_macos}
|
||||
|
||||
The OpenVINO™ toolkit optimizes and runs Deep Learning Neural Network models on Intel® hardware. This guide helps you get started with the OpenVINO™ toolkit you installed on macOS*.
|
||||
The OpenVINO™ toolkit optimizes and runs Deep Learning Neural Network models on Intel® hardware. This guide helps you get started with the OpenVINO™ toolkit you installed on macOS*.
|
||||
|
||||
In this guide, you will:
|
||||
* Learn the OpenVINO™ inference workflow
|
||||
* Run demo scripts that illustrate the workflow and perform the steps for you
|
||||
* Run sample scripts that illustrate the workflow and perform the steps for you
|
||||
* Run the workflow steps yourself, using detailed instructions with a code sample and demo application
|
||||
|
||||
## <a name="openvino-components"></a>OpenVINO™ toolkit Components
|
||||
@@ -13,8 +13,8 @@ The toolkit consists of three primary components:
|
||||
* **Intermediate Representation:** The Model Optimizer output. A model converted to a format that has been optimized for Intel® architecture and is usable by the Inference Engine.
|
||||
* **Inference Engine:** The software libraries that run inference against the IR (optimized model) to produce inference results.
|
||||
|
||||
In addition, demo scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Demo Scripts** - Batch scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
In addition, sample scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Sample Scripts** - Batch scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
* **[Code Samples](../IE_DG/Samples_Overview.md)** - Small console applications that show you how to:
|
||||
* Utilize specific OpenVINO capabilities in an application.
|
||||
* Perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
@@ -29,16 +29,16 @@ By default, the Intel® Distribution of OpenVINO™ is installed to the followin
|
||||
|
||||
For simplicity, a symbolic link to the latest installation is also created: `/home/<user>/intel/openvino_2021/`.
|
||||
|
||||
If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory other than the default, replace `/opt/intel` or `/home/<USER>/` with the directory in which you installed the software.
|
||||
If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory other than the default, replace `/opt/intel` or `/home/<USER>/` with the directory in which you installed the software.
|
||||
|
||||
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/deployment_tools` directory.
|
||||
<details>
|
||||
<summary><strong>Click for the Intel® Distribution of OpenVINO™ toolkit directory structure</strong></summary>
|
||||
|
||||
|
||||
|
||||
| Directory | Description |
|
||||
|:----------------------------------------|:--------------------------------------------------------------------------------------|
|
||||
| `demo/` | Demo scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Demo Scripts](#use-openvino-demo-scripts) section.|
|
||||
| `demo/` | Sample scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Sample Scripts](#use-openvino-sample-scripts) section.|
|
||||
| `inference_engine/` | Inference Engine directory. Contains Inference Engine API binaries and source files, samples and extensions source files, and resources like hardware drivers.|
|
||||
| `external/` | Third-party dependencies and drivers.|
|
||||
| `include/` | Inference Engine header files. For API documentation, see the [Inference Engine API Reference](./annotated.html). |
|
||||
@@ -49,7 +49,7 @@ The primary tools for deploying your models and applications are installed to th
|
||||
| `model_optimizer/` | Model Optimizer directory. Contains configuration scripts, scripts to run the Model Optimizer and other files. See the [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).|
|
||||
| `ngraph/` | nGraph directory. Includes the nGraph header and library files. |
|
||||
| `open_model_zoo/` | Open Model Zoo directory. Includes the Model Downloader tool to download [pre-trained OpenVINO](@ref omz_models_group_intel) and public models, OpenVINO models documentation, demo applications and the Accuracy Checker tool to evaluate model accuracy.|
|
||||
| `demos/` | Demo applications for inference scenarios. Also includes documentation and build scripts.|
|
||||
| `demos/` | Sample applications for inference scenarios. Also includes documentation and build scripts.|
|
||||
| `intel_models/` | Pre-trained OpenVINO models and associated documentation. See the [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_group_intel).|
|
||||
| `models` | Intel's trained and public models that can be obtained with Model Downloader.|
|
||||
| `tools/` | Model Downloader and Accuracy Checker tools. |
|
||||
@@ -64,42 +64,42 @@ The simplified OpenVINO™ workflow is:
|
||||
2. **Run the trained model through the Model Optimizer** to convert the model to an IR, which consists of a pair of `.xml` and `.bin` files that are used as the input for Inference Engine.
|
||||
3. **Use the Inference Engine API in the application** to run inference against the IR (optimized model) and output inference results. The application can be an OpenVINO™ sample, demo, or your own application.
|
||||
|
||||
## Use the Demo Scripts to Learn the Workflow
|
||||
## Use the Sample Scripts to Learn the Workflow
|
||||
|
||||
The demo scripts in `<INSTALL_DIR>/deployment_tools/demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The demo steps let you see how to:
|
||||
The sample scripts in `<INSTALL_DIR>/deployment_tools/demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The sample steps let you see how to:
|
||||
* Compile several samples from the source files delivered as part of the OpenVINO toolkit
|
||||
* Download trained models
|
||||
* Perform pipeline steps and see the output on the console
|
||||
|
||||
> **NOTE**: You must have Internet access to run the demo scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
> **NOTE**: You must have Internet access to run the sample scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
|
||||
The demo scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
The sample scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
|
||||
```sh
|
||||
./<script_name> -d [CPU, MYRIAD]
|
||||
```
|
||||
|
||||
Before running the demo applications on Intel® Neural Compute Stick 2 device, you must complete additional configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
Before running the sample or demo applications on Intel® Neural Compute Stick 2 device, you must complete additional configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
|
||||
The following paragraphs describe each demo script.
|
||||
The following paragraphs describe each sample script.
|
||||
|
||||
### Image Classification Demo Script
|
||||
The `demo_squeezenet_download_convert_run` script illustrates the image classification pipeline.
|
||||
### Image Classification Sample Script
|
||||
The `run_sample_squeezenet` script illustrates the image classification pipeline.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Image Classification Sample Async application.
|
||||
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Image Classification demo script</strong></summary>
|
||||
<summary><strong>Click for an example of running the Image Classification sample script</strong></summary>
|
||||
|
||||
To run the script to view the sample image and perform inference on the CPU:
|
||||
|
||||
```sh
|
||||
open car.png
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
./run_sample_squeezenet.sh
|
||||
```
|
||||
|
||||
When the script completes, you see the label and confidence for the top-10 categories:
|
||||
@@ -123,65 +123,36 @@ classid probability label
|
||||
468 0.0013083 cab, hack, taxi, taxicab
|
||||
661 0.0007443 Model T
|
||||
|
||||
[ INFO ] Execution successful
|
||||
[ INFO ] Classification sample execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Inference Pipeline Demo Script
|
||||
The `demo_security_barrier_camera` uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
|
||||
### Benchmark Sample Script
|
||||
The `run_sample_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads three pre-trained model IRs.
|
||||
2. Builds the Security Barrier Camera Demo application.
|
||||
3. Runs the application with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
|
||||
|
||||
This application:
|
||||
|
||||
1. Identifies an object identified as a vehicle.
|
||||
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
|
||||
3. Uses the the license plate as input to the third model, which recognizes specific characters in the license plate.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of Running the Pipeline demo script</strong></summary>
|
||||
|
||||
To run the script performing inference on a CPU:
|
||||
|
||||
```sh
|
||||
./demo_security_barrier_camera.sh
|
||||
```
|
||||
|
||||
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
### Benchmark Demo Script
|
||||
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Inference Engine Benchmark tool.
|
||||
4. Runs the tool with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Benchmark demo script</strong></summary>
|
||||
<summary><strong>Click for an example of running the Benchmark sample script</strong></summary>
|
||||
|
||||
To run the script that performs inference on a CPU:
|
||||
|
||||
```sh
|
||||
./demo_benchmark_app.sh
|
||||
./run_sample_benchmark_app.sh
|
||||
```
|
||||
When the verification script completes, you see the performance counters, resulting latency, and throughput values displayed on the screen.
|
||||
</details>
|
||||
|
||||
## <a name="using-sample-application"></a>Use Code Samples and Demo Applications to Learn the Workflow
|
||||
|
||||
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
|
||||
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
|
||||
|
||||
You will perform the following steps:
|
||||
You will perform the following steps:
|
||||
|
||||
1. <a href="#download-models">Use the Model Downloader to download suitable models.</a>
|
||||
2. <a href="#convert-models-to-intermediate-representation">Convert the models with the Model Optimizer.</a>
|
||||
@@ -197,9 +168,9 @@ Inputs you need to specify when using a code sample or demo application:
|
||||
- **One or more media files**. The media is typically a video file, but can be a still photo.
|
||||
- **One or more target device** on which you run inference. The target device can be the CPU, or VPU accelerator.
|
||||
|
||||
### Build the Code Samples and Demo Applications
|
||||
### Build the Code Samples and Demo Applications
|
||||
|
||||
To perform sample inference, run the Image Classification code sample and Security Barrier Camera demo application that are automatically compiled when you run the Image Classification and Inference Pipeline demo scripts. The binary files are in the `~/inference_engine_samples_build/intel64/Release` and `~/inference_engine_demos_build/intel64/Release` directories, respectively.
|
||||
The Image Classification Sample that was automatically compiled when you ran the Image Classification sample script. The binary file is in the `~/inference_engine_cpp_samples_build/intel64/Release` directory.
|
||||
|
||||
You can also build all available sample code and demo applications from the source files delivered with the OpenVINO toolkit. To learn how to do this, see the instructions in the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) and [Demo Applications Overview](@ref omz_demos) sections.
|
||||
|
||||
@@ -211,13 +182,13 @@ You must have a model that is specific for you inference task. Example model typ
|
||||
- Custom (Often based on SSD)
|
||||
|
||||
Options to find a model suitable for the OpenVINO™ toolkit are:
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/openvinotoolkit/open_model_zoo) using the [Model Downloader tool](@ref omz_tools_downloader).
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/openvinotoolkit/open_model_zoo) using the [Model Downloader tool](@ref omz_tools_downloader).
|
||||
- Download from GitHub*, Caffe* Zoo, TensorFlow* Zoo, and other resources.
|
||||
- Train your own model.
|
||||
|
||||
|
||||
This guide uses the Model Downloader to get pre-trained models. You can use one of the following options to find a model:
|
||||
|
||||
* **List the models available in the downloader**:
|
||||
* **List the models available in the downloader**:
|
||||
```sh
|
||||
cd /opt/intel/openvino_2021/deployment_tools/tools/model_downloader/
|
||||
```
|
||||
@@ -225,7 +196,7 @@ cd /opt/intel/openvino_2021/deployment_tools/tools/model_downloader/
|
||||
python3 info_dumper.py --print_all
|
||||
```
|
||||
|
||||
* **Use `grep` to list models that have a specific name pattern**:
|
||||
* **Use `grep` to list models that have a specific name pattern**:
|
||||
```sh
|
||||
python3 info_dumper.py --print_all | grep <model_name>
|
||||
```
|
||||
@@ -236,14 +207,11 @@ sudo python3 ./downloader.py --name <model_name> --output_dir <models_dir>
|
||||
```
|
||||
> **NOTE:** Always run the downloader with `sudo`.
|
||||
|
||||
Download the following models if you want to run the Image Classification Sample and Security Barrier Camera Demo application:
|
||||
Download the following models if you want to run the Image Classification Sample:
|
||||
|
||||
|Model Name | Code Sample or Demo App |
|
||||
|-----------------------------------------------|-----------------------------------------------------|
|
||||
|`squeezenet1.1` | Image Classification Sample |
|
||||
|`vehicle-license-plate-detection-barrier-0106` | Security Barrier Camera Demo application |
|
||||
|`vehicle-attributes-recognition-barrier-0039` | Security Barrier Camera Demo application |
|
||||
|`license-plate-recognition-barrier-0001` | Security Barrier Camera Demo application |
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading the SqueezeNet Caffe* model</strong></summary>
|
||||
@@ -270,41 +238,6 @@ Your screen looks similar to this after the download:
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading models for the Security Barrier Camera Demo application</strong></summary>
|
||||
|
||||
To download all three pre-trained models in FP16 precision to the `~/models` folder:
|
||||
|
||||
```sh
|
||||
./downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir ~/models --precisions FP16
|
||||
```
|
||||
Your screen looks similar to this after the download:
|
||||
```
|
||||
################|| Downloading models ||################
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml
|
||||
... 100%, 207 KB, 313926 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin
|
||||
... 100%, 1256 KB, 2552 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml
|
||||
... 100%, 32 KB, 172042 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin
|
||||
... 100%, 1222 KB, 2712 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml
|
||||
... 100%, 47 KB, 217130 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin
|
||||
... 100%, 2378 KB, 4222 KB/s, 0 seconds passed
|
||||
|
||||
################|| Post-processing ||################
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="convert-models-to-intermediate-representation"></a> Step 2: Convert the Models to the Intermediate Representation
|
||||
|
||||
In this step, your trained models are ready to run through the Model Optimizer to convert them to the Intermediate Representation (IR) format. This is required before using the Inference Engine with the model.
|
||||
@@ -317,10 +250,9 @@ The conversion may also create a `model_name.mapping` file, but it is not needed
|
||||
|
||||
This guide uses the public SqueezeNet 1.1 Caffe\* model to run the Image Classification Sample. See the example to download a model in the <a href="#download-models">Download Models</a> section to learn how to download this model.
|
||||
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
The `vehicle-license-plate-detection-barrier-0106`, `vehicle-attributes-recognition-barrier-0039`, `license-plate-recognition-barrier-0001` models are downloaded in the Intermediate Representation format. You don't need to use the Model Optimizer to convert these models.
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
|
||||
1. Create an `<ir_dir>` directory to contain the model's IR.
|
||||
1. Create an `<ir_dir>` directory to contain the model's IR.
|
||||
|
||||
2. The Inference Engine can perform inference on different precision formats, such as `FP32`, `FP16`, `INT8`. To prepare an IR with specific precision, run the Model Optimizer with the appropriate `--data_type` option.
|
||||
|
||||
@@ -341,14 +273,14 @@ The following command converts the public SqueezeNet 1.1 Caffe\* model to the FP
|
||||
```sh
|
||||
cd /opt/intel/openvino_2021/deployment_tools/model_optimizer
|
||||
```
|
||||
```sh
|
||||
```sh
|
||||
python3 ./mo.py --input_model ~/models/public/squeezenet1.1/squeezenet1.1.caffemodel --data_type FP16 --output_dir ~/models/public/squeezenet1.1/ir
|
||||
```
|
||||
|
||||
After the Model Optimizer script is completed, the produced IR files (`squeezenet1.1.xml`, `squeezenet1.1.bin`) are in the specified `~/models/public/squeezenet1.1/ir` directory.
|
||||
|
||||
Copy the `squeezenet1.1.labels` file from the `/opt/intel/openvino_2021/deployment_tools/demo/` to `<ir_dir>`. This file contains the classes that ImageNet uses. Therefore, the inference results show text instead of classification numbers:
|
||||
```sh
|
||||
```sh
|
||||
cp /opt/intel/openvino_2021/deployment_tools/demo/squeezenet1.1.labels <ir_dir>
|
||||
```
|
||||
</details>
|
||||
@@ -365,7 +297,7 @@ As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes two
|
||||
|
||||
### <a name="run-image-classification"></a>Step 4: Run the Image Classification Code Sample
|
||||
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification demo script. If you want to compile it manually, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) document.
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification sample script. If you want to compile it manually, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) document.
|
||||
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
|
||||
@@ -375,7 +307,7 @@ To run the **Image Classification** code sample with an input image on the IR:
|
||||
```
|
||||
2. Go to the code samples build directory:
|
||||
```sh
|
||||
cd ~/inference_engine_samples_build/intel64/Release
|
||||
cd ~/inference_engine_cpp_samples_build/intel64/Release
|
||||
```
|
||||
3. Run the code sample executable, specifying the input media file, the IR of your model, and a target device on which you want to perform inference:
|
||||
```sh
|
||||
@@ -391,15 +323,15 @@ The following commands run the Image Classification Code Sample using the `car.p
|
||||
./classification_sample_async -i /opt/intel/openvino_2021/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d CPU
|
||||
```
|
||||
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Neural Compute Stick 2) with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
```sh
|
||||
```sh
|
||||
./classification_sample_async -i /opt/intel/openvino_2021/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
```sh
|
||||
Top 10 results:
|
||||
|
||||
@@ -418,44 +350,7 @@ classid probability label
|
||||
864 0.0012045 tow truck, tow car, wrecker
|
||||
581 0.0005833 grille, radiator grille
|
||||
|
||||
[ INFO ] Execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
|
||||
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the instructions in the [Demo Applications Overview](@ref omz_demos) section.
|
||||
|
||||
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
|
||||
|
||||
1. Set up the OpenVINO environment variables:
|
||||
```sh
|
||||
source /opt/intel/openvino_2021/bin/setupvars.sh
|
||||
```
|
||||
2. Go to the demo application build directory:
|
||||
```sh
|
||||
cd ~/inference_engine_demos_build/intel64/Release
|
||||
```
|
||||
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device on which to perform inference:
|
||||
```sh
|
||||
./security_barrier_camera_demo -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for examples of running the Security Barrier Camera demo application on different devices</strong></summary>
|
||||
|
||||
**CPU:**
|
||||
|
||||
```sh
|
||||
./security_barrier_camera_demo -i /opt/intel/openvino_2021/deployment_tools/demo/car_1.bmp -m ~/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -m_va ~/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml -m_lpr ~/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml -d CPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Neural Compute Stick 2) with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
```sh
|
||||
./classification_sample_async -i <INSTALL_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d MYRIAD
|
||||
[ INFO ] Classification sample execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -464,10 +359,10 @@ To run the **Security Barrier Camera Demo Application** using an input image on
|
||||
|
||||
Following are some basic guidelines for executing the OpenVINO™ workflow using the code samples and demo applications:
|
||||
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
```sh
|
||||
source /opt/intel/openvino_2021/bin/setupvars.sh
|
||||
```
|
||||
```
|
||||
2. Have the directory path for the following:
|
||||
- Code Sample binaries located in `~/inference_engine_cpp_samples_build/intel64/Release`
|
||||
- Demo Application binaries located in `~/inference_engine_demos_build/intel64/Release`
|
||||
@@ -507,7 +402,7 @@ cd $INTEL_OPENVINO_DIR/deployment_tools/open_model_zoo/demos/object_detection_de
|
||||
./object_detection_demo -i ~/Videos/catshow.mp4 -m ~/ir/fp32/mobilenet-ssd.xml -d CPU
|
||||
```
|
||||
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
|
||||
Some demo applications let you use multiple models for different purposes. In these cases, the output of the first model is usually used as the input for later models.
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ The OpenVINO toolkit for Raspbian* OS is distributed without installer. This doc
|
||||
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/deployment_tools` directory.
|
||||
<details>
|
||||
<summary><strong>Click for the <code>deployment_tools</code> directory structure</strong></summary>
|
||||
|
||||
|
||||
| Directory | Description |
|
||||
|
||||
| Directory | Description |
|
||||
|:----------------------------------------|:--------------------------------------------------------------------------------------|
|
||||
| `inference_engine/` | Inference Engine directory. Contains Inference Engine API binaries and source files, samples and extensions source files, and resources like hardware drivers.|
|
||||
| `external/` | Third-party dependencies and drivers.|
|
||||
@@ -42,7 +42,7 @@ The primary tools for deploying your models and applications are installed to th
|
||||
|
||||
The OpenVINO™ workflow on Raspbian* OS is as follows:
|
||||
1. **Get a pre-trained model** for your inference task. If you want to use your model for inference, the model must be converted to the `.bin` and `.xml` Intermediate Representation (IR) files, which are used as input by Inference Engine. On Raspberry PI, OpenVINO™ toolkit includes only the Inference Engine module. The Model Optimizer is not supported on this platform. To get the optimized models you can use one of the following options:
|
||||
|
||||
|
||||
* Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/openvinotoolkit/open_model_zoo) using [Model Downloader tool](@ref omz_tools_downloader).
|
||||
<br> For more information on pre-trained models, see [Pre-Trained Models Documentation](@ref omz_models_group_intel)
|
||||
|
||||
@@ -82,10 +82,10 @@ The application outputs an image (`out_0.bmp`) with detected faced enclosed in r
|
||||
|
||||
Following are some basic guidelines for executing the OpenVINO™ workflow using the code samples:
|
||||
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
```sh
|
||||
source <INSTALL_DIR>/bin/setupvars.sh
|
||||
```
|
||||
```
|
||||
2. Have the directory path for the following:
|
||||
- Code Sample binaries
|
||||
- Media: Video or image. Many sources are available from which you can download video media to use the code samples and demo applications, like https://videos.pexels.com and https://images.google.com.
|
||||
|
||||
@@ -4,7 +4,7 @@ The OpenVINO™ toolkit optimizes and runs Deep Learning Neural Network models o
|
||||
|
||||
In this guide, you will:
|
||||
* Learn the OpenVINO™ inference workflow
|
||||
* Run demo scripts that illustrate the workflow and perform the steps for you
|
||||
* Run ыфьзду scripts that illustrate the workflow and perform the steps for you
|
||||
* Run the workflow steps yourself, using detailed instructions with a code sample and demo application
|
||||
|
||||
## <a name="openvino-components"></a>OpenVINO™ toolkit Components
|
||||
@@ -14,8 +14,8 @@ The toolkit consists of three primary components:
|
||||
* **Inference Engine:** The software libraries that run inference against the IR (optimized model) to produce inference results.
|
||||
|
||||
|
||||
In addition, demo scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Demo Scripts** - Batch scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
In addition, sample scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Sample Scripts** - Batch scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
* **[Code Samples](../IE_DG/Samples_Overview.md)** - Small console applications that show you how to:
|
||||
* Utilize specific OpenVINO capabilities in an application.
|
||||
* Perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
@@ -29,11 +29,11 @@ By default, the installation directory is `C:\Program Files (x86)\Intel\openvino
|
||||
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>\deployment_tools` directory.
|
||||
<details>
|
||||
<summary><strong>Click for the <code>deployment_tools</code> directory structure</strong></summary>
|
||||
|
||||
|
||||
| Directory | Description |
|
||||
|
||||
| Directory | Description |
|
||||
|:----------------------------------------|:--------------------------------------------------------------------------------------|
|
||||
| `demo\` | Demo scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Demo Scripts](#use-openvino-demo-scripts) section.|
|
||||
| `demo\` | Sample scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Demo Scripts](#use-openvino-demo-scripts) section.|
|
||||
| `inference_engine\` | Inference Engine directory. Contains Inference Engine API binaries and source files, samples and extensions source files, and resources like hardware drivers.|
|
||||
| `bin\` | Inference Engine binaries.|
|
||||
| `external\` | Third-party dependencies and drivers.|
|
||||
@@ -61,45 +61,44 @@ The simplified OpenVINO™ workflow is:
|
||||
2. **Run the trained model through the Model Optimizer** to convert the model to an IR, which consists of a pair of `.xml` and `.bin` files that are used as the input for Inference Engine.
|
||||
3. **Use the Inference Engine API in the application** to run inference against the IR (optimized model) and output inference results. The application can be an OpenVINO™ sample, demo, or your own application.
|
||||
|
||||
## Use the Demo Scripts to Learn the Workflow
|
||||
## Use the Sample Scripts to Learn the Workflow
|
||||
|
||||
The demo scripts in `<INSTALL_DIR>\deployment_tools\demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The demo steps demonstrate how to:
|
||||
The sample scripts in `<INSTALL_DIR>\deployment_tools\demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The demo steps demonstrate how to:
|
||||
* Compile several samples from the source files delivered as part of the OpenVINO toolkit
|
||||
* Download trained models
|
||||
* Perform pipeline steps and see the output on the console
|
||||
|
||||
> **REQUIRED**: You must have Internet access to run the demo scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
> **REQUIRED**: You must have Internet access to run the sample scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
|
||||
The demo scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
The sample scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
|
||||
```bat
|
||||
.\<script_name> -d [CPU, GPU, MYRIAD, HDDL]
|
||||
```
|
||||
|
||||
Before running the demo applications on Intel® Processor Graphics or Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, you must complete additional hardware configuration steps. For details, see the following sections in the [installation instructions](../install_guides/installing-openvino-windows.md):
|
||||
Before running the sample or demo applications on Intel® Processor Graphics or Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, you must complete additional hardware configuration steps. For details, see the following sections in the [installation instructions](../install_guides/installing-openvino-windows.md):
|
||||
* Additional Installation Steps for Intel® Processor Graphics (GPU)
|
||||
* Additional Installation Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
|
||||
The following paragraphs describe each demo script.
|
||||
The following paragraphs describe each sample script.
|
||||
|
||||
### Image Classification Demo Script
|
||||
The `demo_squeezenet_download_convert_run` script illustrates the image classification pipeline.
|
||||
### Image Classification Sample Script
|
||||
The `run_sample_squeezenet` script illustrates the image classification pipeline.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Image Classification Sample Async application.
|
||||
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Image Classification demo script</strong></summary>
|
||||
<summary><strong>Click for an example of running the Image Classification sample script</strong></summary>
|
||||
|
||||
To preview the image that the script will classify open the `car.png` file in any image viewer.
|
||||
|
||||
To run the script to perform inference on a CPU:
|
||||
|
||||
1. Open the `car.png` file in any image viewer to see what the demo will be classifying.
|
||||
2. Run the following script:
|
||||
```bat
|
||||
.\demo_squeezenet_download_convert_run.bat
|
||||
.\run_sample_squeezenet.bat
|
||||
```
|
||||
|
||||
When the script completes, you see the label and confidence for the top-10 categories:
|
||||
@@ -123,56 +122,27 @@ classid probability label
|
||||
468 0.0013083 cab, hack, taxi, taxicab
|
||||
661 0.0007443 Model T
|
||||
|
||||
[ INFO ] Execution successful
|
||||
[ INFO ] Classification sample execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Inference Pipeline Demo Script
|
||||
The `demo_security_barrier_camera` uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
|
||||
### Benchmark Sample Script
|
||||
The `run_sample_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads three pre-trained model IRs.
|
||||
2. Builds the Security Barrier Camera Demo application.
|
||||
3. Runs the application with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
|
||||
|
||||
This application:
|
||||
|
||||
1. Identifies an object identified as a vehicle.
|
||||
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
|
||||
3. Uses the the license plate as input to the third model, which recognizes specific characters in the license plate.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of Running the Pipeline demo script</strong></summary>
|
||||
|
||||
To run the script performing inference on Intel® Processor Graphics:
|
||||
|
||||
```bat
|
||||
.\demo_security_barrier_camera.bat -d GPU
|
||||
```
|
||||
|
||||
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
### Benchmark Demo Script
|
||||
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Inference Engine Benchmark tool.
|
||||
4. Runs the tool with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Benchmark demo script</strong></summary>
|
||||
<summary><strong>Click for an example of running the Benchmark sample script</strong></summary>
|
||||
|
||||
To run the script that performs inference (runs on CPU by default):
|
||||
|
||||
```bat
|
||||
.\demo_benchmark_app.bat
|
||||
.\run_sample_benchmark_app.bat
|
||||
```
|
||||
When the verification script completes, you see the performance counters, resulting latency, and throughput values displayed on the screen.
|
||||
</details>
|
||||
@@ -181,7 +151,7 @@ When the verification script completes, you see the performance counters, result
|
||||
|
||||
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
|
||||
|
||||
You will perform the following steps:
|
||||
You will perform the following steps:
|
||||
|
||||
1. <a href="#download-models">Use the Model Downloader to download suitable models.</a>
|
||||
2. <a href="#convert-models-to-intermediate-representation">Convert the models with the Model Optimizer.</a>
|
||||
@@ -199,7 +169,7 @@ Inputs you need to specify when using a code sample or demo application:
|
||||
|
||||
### Build the Code Samples and Demo Applications
|
||||
|
||||
To perform sample inference, run the Image Classification code sample and Security Barrier Camera demo application that are automatically compiled when you run the Image Classification and Inference Pipeline demo scripts. The binary files are in the `C:\Users\<USER_ID>\Intel\OpenVINO\inference_engine_cpp_samples_build\intel64\Release` and `C:\Users\<USER_ID>\Intel\OpenVINO\inference_engine_demos_build\intel64\Release` directories, respectively.
|
||||
The Image Classification Sample that was automatically compiled when you ran the Image Classification sample script. The binary file is in the `C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_cpp_samples_build\intel64\Release` directory.
|
||||
|
||||
You can also build all available sample code and demo applications from the source files delivered with the OpenVINO™ toolkit. To learn how to do this, see the instruction in the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) and [Demo Applications Overview](@ref omz_demos) sections.
|
||||
|
||||
@@ -214,10 +184,10 @@ Options to find a model suitable for the OpenVINO™ toolkit are:
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/openvinotoolkit/open_model_zoo) using the [Model Downloader tool](@ref omz_tools_downloader).
|
||||
- Download from GitHub*, Caffe* Zoo, TensorFlow* Zoo, and other resources.
|
||||
- Train your own model.
|
||||
|
||||
|
||||
This guide uses the Model Downloader to get pre-trained models. You can use one of the following options to find a model:
|
||||
|
||||
* **List the models available in the downloader**:
|
||||
* **List the models available in the downloader**:
|
||||
```bat
|
||||
cd <INSTALL_DIR>\deployment_tools\tools\model_downloader\
|
||||
```
|
||||
@@ -225,7 +195,7 @@ cd <INSTALL_DIR>\deployment_tools\tools\model_downloader\
|
||||
python info_dumper.py --print_all
|
||||
```
|
||||
|
||||
* **Use `grep` to list models that have a specific name pattern**:
|
||||
* **Use `grep` to list models that have a specific name pattern**:
|
||||
```bat
|
||||
python info_dumper.py --print_all | grep <model_name>
|
||||
```
|
||||
@@ -240,9 +210,6 @@ Download the following models if you want to run the Image Classification Sample
|
||||
|Model Name | Code Sample or Demo App |
|
||||
|-----------------------------------------------|-----------------------------------------------------|
|
||||
|`squeezenet1.1` | Image Classification Sample |
|
||||
|`vehicle-license-plate-detection-barrier-0106` | Security Barrier Camera Demo application |
|
||||
|`vehicle-attributes-recognition-barrier-0039` | Security Barrier Camera Demo application |
|
||||
|`license-plate-recognition-barrier-0001` | Security Barrier Camera Demo application |
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading the SqueezeNet Caffe* model</strong></summary>
|
||||
@@ -269,41 +236,6 @@ Your screen looks similar to this after the download:
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading models for the Security Barrier Camera Demo application</strong></summary>
|
||||
|
||||
To download all three pre-trained models in FP16 precision to the `C:\Users\<USER_ID>\Documents\models` folder:
|
||||
|
||||
```bat
|
||||
python .\downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir C:\Users\username\Documents\models --precisions FP16
|
||||
```
|
||||
Your screen looks similar to this after the download:
|
||||
```
|
||||
################|| Downloading models ||################
|
||||
|
||||
========== Downloading C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml
|
||||
... 100%, 207 KB, 13810 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.bin
|
||||
... 100%, 1256 KB, 70 KB/s, 17 seconds passed
|
||||
|
||||
========== Downloading C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml
|
||||
... 100%, 32 KB, ? KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.bin
|
||||
... 100%, 1222 KB, 277 KB/s, 4 seconds passed
|
||||
|
||||
========== Downloading C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml
|
||||
... 100%, 47 KB, ? KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.bin
|
||||
... 100%, 2378 KB, 120 KB/s, 19 seconds passed
|
||||
|
||||
################|| Post-processing ||################
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="convert-models-to-intermediate-representation"></a> Step 2: Convert the Models to the Intermediate Representation
|
||||
|
||||
In this step, your trained models are ready to run through the Model Optimizer to convert them to the Intermediate Representation (IR) format. This is required before using the Inference Engine with the model.
|
||||
@@ -314,10 +246,9 @@ Models in the Intermediate Representation format always include a pair of `.xml`
|
||||
|
||||
This guide uses the public SqueezeNet 1.1 Caffe\* model to run the Image Classification Sample. See the example to download a model in the <a href="#download-models">Download Models</a> section to learn how to download this model.
|
||||
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
The `vehicle-license-plate-detection-barrier-0106`, `vehicle-attributes-recognition-barrier-0039`, `license-plate-recognition-barrier-0001` models are downloaded in the IR format. You do not need to use the Model Optimizer to convert these models.
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
|
||||
1. Create an `<ir_dir>` directory to contain the model's IR.
|
||||
1. Create an `<ir_dir>` directory to contain the model's IR.
|
||||
|
||||
2. The Inference Engine can perform inference on different precision formats, such as `FP32`, `FP16`, `INT8`. To prepare an IR with specific precision, run the Model Optimizer with the appropriate `--data_type` option.
|
||||
|
||||
@@ -325,7 +256,7 @@ The `vehicle-license-plate-detection-barrier-0106`, `vehicle-attributes-recognit
|
||||
```bat
|
||||
cd <INSTALL_DIR>\deployment_tools\model_optimizer
|
||||
```
|
||||
```bat
|
||||
```bat
|
||||
python .\mo.py --input_model <model_dir>\<model_file> --data_type <model_precision> --output_dir <ir_dir>
|
||||
```
|
||||
The produced IR files are in the `<ir_dir>` directory.
|
||||
@@ -338,21 +269,21 @@ The following command converts the public SqueezeNet 1.1 Caffe\* model to the FP
|
||||
```bat
|
||||
cd <INSTALL_DIR>\deployment_tools\model_optimizer
|
||||
```
|
||||
```bat
|
||||
```bat
|
||||
python .\mo.py --input_model C:\Users\username\Documents\models\public\squeezenet1.1\squeezenet1.1.caffemodel --data_type FP16 --output_dir C:\Users\username\Documents\models\public\squeezenet1.1\ir
|
||||
```
|
||||
|
||||
After the Model Optimizer script is completed, the produced IR files (`squeezenet1.1.xml`, `squeezenet1.1.bin`) are in the specified `C:\Users\<USER_ID>\Documents\models\public\squeezenet1.1\ir` directory.
|
||||
|
||||
Copy the `squeezenet1.1.labels` file from the `<INSTALL_DIR>\deployment_tools\demo\` to `<ir_dir>`. This file contains the classes that ImageNet uses. Therefore, the inference results show text instead of classification numbers:
|
||||
```batch
|
||||
```batch
|
||||
cp <INSTALL_DIR>\deployment_tools\demo\squeezenet1.1.labels <ir_dir>
|
||||
```
|
||||
</details>
|
||||
|
||||
### <a name="download-media"></a> Step 3: Download a Video or a Still Photo as Media
|
||||
|
||||
Many sources are available from which you can download video media to use the code samples and demo applications. Possibilities include:
|
||||
Many sources are available from which you can download video media to use the code samples and demo applications. Possibilities include:
|
||||
- https://videos.pexels.com
|
||||
- https://images.google.com
|
||||
|
||||
@@ -362,17 +293,17 @@ As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes two
|
||||
|
||||
### <a name="run-image-classification"></a>Step 4: Run the Image Classification Code Sample
|
||||
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you run the Image Classification demo script. If you want to compile it manually, see the Build the Sample Applications on Microsoft Windows* OS section in [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you run the Image Classification sample script. If you want to compile it manually, see the Build the Sample Applications on Microsoft Windows* OS section in [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
|
||||
1. Set up the OpenVINO environment variables:
|
||||
```bat
|
||||
<INSTALL_DIR>\openvino\bin\setupvars.sh
|
||||
```
|
||||
```
|
||||
2. Go to the code samples build directory:
|
||||
```bat
|
||||
cd C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release
|
||||
cd C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_cpp_samples_build\intel64\Release
|
||||
```
|
||||
3. Run the code sample executable, specifying the input media file, the IR of your model, and a target device on which you want to perform inference:
|
||||
```bat
|
||||
@@ -395,13 +326,13 @@ The following commands run the Image Classification Code Sample using the `car.p
|
||||
.\classification_sample_async -i <INSTALL_DIR>\deployment_tools\demo\car.png -m C:\Users\<USER_ID>\models\public\squeezenet1.1\ir\squeezenet1.1.xml -d GPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
**MYRIAD:**
|
||||
|
||||
```bat
|
||||
```bat
|
||||
.\classification_sample_async -i <INSTALL_DIR>\deployment_tools\demo\car.png -m C:\Users\<USER_ID>\models\public\squeezenet1.1\ir\squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
```bat
|
||||
Top 10 results:
|
||||
|
||||
@@ -420,50 +351,7 @@ classid probability label
|
||||
864 0.0012045 tow truck, tow car, wrecker
|
||||
581 0.0005833 grille, radiator grille
|
||||
|
||||
[ INFO ] Execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
|
||||
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the instructions in the [Demo Applications Overview](@ref omz_demos) section.
|
||||
|
||||
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
|
||||
|
||||
1. Set up the OpenVINO environment variables:
|
||||
```bat
|
||||
<INSTALL_DIR>\bin\setupvars.bat
|
||||
```
|
||||
2. Go to the demo application build directory:
|
||||
```bat
|
||||
cd C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release
|
||||
```
|
||||
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device on which to perform inference:
|
||||
```bat
|
||||
.\security_barrier_camera_demo -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for examples of running the Security Barrier Camera demo application on different devices</strong></summary>
|
||||
|
||||
**CPU:**
|
||||
|
||||
```bat
|
||||
.\security_barrier_camera_demo -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m C:\Users\username\Documents\models\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml -m_va C:\Users\username\Documents\models\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml -m_lpr C:\Users\username\Documents\models\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml -d CPU
|
||||
```
|
||||
|
||||
**GPU:**
|
||||
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-windows.md).
|
||||
```bat
|
||||
.\security_barrier_camera_demo -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
```bat
|
||||
.\classification_sample_async -i <INSTALL_DIR>\inference-engine\samples\sample_data\car.png -m <ir_dir>\squeezenet1.1.xml -d MYRIAD
|
||||
[ INFO ] Classification sample execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -472,10 +360,10 @@ To run the **Security Barrier Camera Demo Application** using an input image on
|
||||
|
||||
Below you can find basic guidelines for executing the OpenVINO™ workflow using the code samples and demo applications:
|
||||
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
```bat
|
||||
<INSTALL_DIR>\bin\setupvars.bat
|
||||
```
|
||||
```
|
||||
2. Make sure to have the directory path for the following:
|
||||
- Code Sample binaries located in `C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_cpp_samples_build\intel64\Release`
|
||||
- Demo Application binaries located in `C:\Users\<USER_ID>\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release`
|
||||
@@ -515,7 +403,7 @@ With the sample information specified, the command might look like this:
|
||||
-m C:\Users\<USER_ID>\Documents\ir\fp32\mobilenet-ssd.xml -d CPU
|
||||
```
|
||||
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
|
||||
Some demo applications let you use multiple models for different purposes. In these cases, the output of the first model is usually used as the input for later models.
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9ca0811c19b4108054bfa66d99107e469409d7a0200745da96dd3e8fdac79daf
|
||||
size 397011
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:619da8838c460aa26253fa6cfed3d3346fcf7c7c5deb8f178e9bd55dc78c9c8f
|
||||
size 2017750
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c08b4d12634d3e17a7ed198cdc15be7b8e4b1fe33728d5f38d0998faa7ea8e7e
|
||||
size 568383
|
||||
@@ -323,34 +323,34 @@ docker run -it --rm --net=host -v /var/tmp:/var/tmp –-ipc=host <image_name>
|
||||
|
||||
### Run Demos in the Docker* Image
|
||||
|
||||
To run the Security Barrier Camera Demo on a specific inference device, run the following commands with the root privileges (additional third-party dependencies will be installed):
|
||||
To run the Classification Demo Using SqueezeNet on a specific inference device, run the following commands with the root privileges (additional third-party dependencies will be installed):
|
||||
|
||||
**CPU**:
|
||||
|
||||
```sh
|
||||
docker run -itu root:root --rm <image_name>
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d CPU -sample-options -no_show"
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/run_sample_squeezenet.sh -d CPU"
|
||||
```
|
||||
|
||||
**GPU**:
|
||||
|
||||
```sh
|
||||
docker run -itu root:root --rm --device /dev/dri:/dev/dri <image_name>
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d GPU -sample-options -no_show"
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/run_sample_squeezenet.sh -d GPU"
|
||||
```
|
||||
|
||||
**MYRIAD**:
|
||||
|
||||
```sh
|
||||
docker run -itu root:root --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb <image_name>
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d MYRIAD -sample-options -no_show"
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/run_sample_squeezenet.sh -d MYRIAD"
|
||||
```
|
||||
|
||||
**HDDL**:
|
||||
|
||||
```sh
|
||||
docker run -itu root:root --rm --device=/dev/ion:/dev/ion -v /var/tmp:/var/tmp <image_name>
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d HDDL -sample-options -no_show"
|
||||
/bin/bash -c "apt update && apt install sudo && deployment_tools/demo/run_sample_squeezenet.sh -d HDDL"
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
@@ -83,7 +83,7 @@ docker run -it --rm <image_name>
|
||||
If you want to try some demos then run image with the root privileges (some additional 3-rd party dependencies will be installed):
|
||||
|
||||
```bat
|
||||
docker run -itu ContainerAdministrator --rm <image_name> cmd /S /C "cd deployment_tools\demo && demo_security_barrier_camera.bat -d CPU -sample-options -no_show"
|
||||
docker run -itu ContainerAdministrator --rm <image_name> cmd /S /C "cd deployment_tools\demo && run_sample_squeezenet.bat -d CPU"
|
||||
```
|
||||
|
||||
## Configure and Run the Docker* Image for GPU
|
||||
@@ -138,9 +138,9 @@ GPU Acceleration in Windows containers feature requires to meet Windows host, Op
|
||||
```bat
|
||||
copy C:\tmp\OpenCL.dll C:\Windows\System32\ && reg add "HKLM\SOFTWARE\Khronos\OpenCL\Vendors" /v "C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409\ocl\bin\x64\intelocl64.dll" /t REG_DWORD /d 0
|
||||
```
|
||||
3. For example, run the `demo_security_barrier_camera` demo with the command below:
|
||||
3. For example, run the `run_sample_squeezenet` demo with the command below:
|
||||
```bat
|
||||
cd bin && setupvars.bat && cd ../ && cd deployment_tools\demo && demo_security_barrier_camera.bat -d GPU -sample-options -no_show
|
||||
cd bin && setupvars.bat && cd ../ && cd deployment_tools\demo && run_sample_squeezenet.bat -d GPU
|
||||
```
|
||||
> **NOTE**: Addittional third-party dependencies will be installed.
|
||||
|
||||
|
||||
@@ -346,12 +346,7 @@ cd /opt/intel/openvino_2021/deployment_tools/demo
|
||||
|
||||
2. Run the **Image Classification verification script**. If you have access to the Internet through the proxy server only, please make sure that it is configured in your OS environment.
|
||||
```sh
|
||||
./demo_squeezenet_download_convert_run.sh -d HDDL
|
||||
```
|
||||
|
||||
3. Run the **Inference Pipeline verification script**:
|
||||
```sh
|
||||
./demo_security_barrier_camera.sh -d HDDL
|
||||
./run_sample_squeezenet.sh -d HDDL
|
||||
```
|
||||
|
||||
You've completed all required configuration steps to perform inference on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
=====================================================
|
||||
Demo Scripts for Model Optimizer and Inference Engine
|
||||
Scripts to build and run OpenVINO samples
|
||||
=====================================================
|
||||
|
||||
The demo scripts illustrate Intel(R) Deep Learning Deployment Toolkit usage to convert and optimize pre-trained models and perform inference.
|
||||
These scripts simplify process of build samples, download and convert models and run samples to perform inference. They can used to quick validation of OpenVINO installation and proper environment initialization.
|
||||
|
||||
Setting Up Demos
|
||||
Setting Up
|
||||
================
|
||||
If you are behind a proxy, set the following environment variables in the console session:
|
||||
|
||||
@@ -16,29 +16,25 @@ On Windows* OS:
|
||||
set http_proxy=http://<proxyHost>:<proxyPort>
|
||||
set https_proxy=https://<proxyHost>:<proxyPort>
|
||||
|
||||
Running Demos
|
||||
Running Samples
|
||||
=============
|
||||
|
||||
The "demo" folder contains three scripts:
|
||||
The "demo" folder contains two scripts:
|
||||
|
||||
1. Classification demo using public SqueezeNet topology (demo_squeezenet_download_convert_run.sh|bat)
|
||||
1. Classification sample using public SqueezeNet topology (run_sample_squeezenet.sh|bat)
|
||||
|
||||
2. Security barrier camera demo that showcases three models coming with the product (demo_squeezenet_download_convert_run.sh|bat)
|
||||
2. Benchmark sample using public SqueezeNet topology (run_sample_benchmark_app.sh|bat)
|
||||
|
||||
3. Benchmark demo using public SqueezeNet topology (demo_benchmark_app.sh|bat)
|
||||
To run the samples, invoke run_sample_squeezenet.sh or run_sample_benchmark_app.sh (*.bat on Windows) scripts from the console without parameters, for example:
|
||||
|
||||
4. Speech recognition demo utilizing models trained on open LibriSpeech dataset
|
||||
|
||||
To run the demos, run demo_squeezenet_download_convert_run.sh or demo_security_barrier_camera.sh or demo_benchmark_app.sh or demo_speech_recognition.sh (*.bat on Windows) scripts from the console without parameters, for example:
|
||||
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
./run_sample_squeezenet.sh
|
||||
|
||||
The script allows to specify the target device to infer on using -d <CPU|GPU|MYRIAD> option.
|
||||
|
||||
Classification Demo Using SqueezeNet
|
||||
Classification Sample Using SqueezeNet
|
||||
====================================
|
||||
|
||||
The demo illustrates the general workflow of using the Intel(R) Deep Learning Deployment Toolkit and performs the following:
|
||||
The sample illustrates the general workflow of using the Intel(R) Deep Learning Deployment Toolkit and performs the following:
|
||||
|
||||
- Downloads a public SqueezeNet model using the Model Downloader (open_model_zoo\tools\downloader\downloader.py)
|
||||
- Installs all prerequisites required for running the Model Optimizer using the scripts from the "model_optimizer\install_prerequisites" folder
|
||||
@@ -47,54 +43,22 @@ The demo illustrates the general workflow of using the Intel(R) Deep Learning De
|
||||
- Runs the sample with the car.png picture located in the demo folder
|
||||
|
||||
The sample application prints top-10 inference results for the picture.
|
||||
|
||||
|
||||
For more information about the Inference Engine classification sample, refer to the documentation available in the sample folder.
|
||||
|
||||
|
||||
Security Barrier Camera Demo
|
||||
============================
|
||||
|
||||
The demo illustrates using the Inference Engine with pre-trained models to perform vehicle detection, vehicle attributes and license-plate recognition tasks.
|
||||
As the sample produces visual output, it should be run in GUI mode.
|
||||
|
||||
The demo script does the following:
|
||||
|
||||
- Builds the Inference Engine security barrier camera sample (inference_engine\samples\security_barrier_camera_sample)
|
||||
- Runs the sample with the car_1.bmp located in the demo folder
|
||||
|
||||
The sample application displays the resulting frame with detections rendered as bounding boxes and text.
|
||||
|
||||
For more information about the Inference Engine security barrier camera sample, refer to the documentation available in the sample folder.
|
||||
|
||||
|
||||
Benchmark Demo Using SqueezeNet
|
||||
Benchmark Sample Using SqueezeNet
|
||||
===============================
|
||||
|
||||
The demo illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
The sample illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The demo script does the following:
|
||||
The sample script does the following:
|
||||
|
||||
- Downloads a public SqueezeNet model using the Model Downloader (open_model_zoo\tools\downloader\downloader.py)
|
||||
- Installs all prerequisites required for running the Model Optimizer using the scripts from the "model_optimizer\install_prerequisites" folder
|
||||
- Converts SqueezeNet to an IR using the Model Optimizer (model_optimizer\mo.py) via the Model Converter (open_model_zoo\tools\downloader\converter.py)
|
||||
- Builds the Inference Engine benchmark tool (inference_engine\samples\demo_benchmark_app)
|
||||
- Builds the Inference Engine benchmark tool (inference_engine\samples\benchmark_app)
|
||||
- Runs the tool with the car.png picture located in the demo folder
|
||||
|
||||
The benchmark app prints performance counters, resulting latency, and throughput values.
|
||||
|
||||
|
||||
For more information about the Inference Engine benchmark app, refer to the documentation available in the sample folder.
|
||||
|
||||
Speech Recognition Demo Using LibriSpeech models
|
||||
================================================
|
||||
|
||||
The demo illustrates live speech recognition - transcribing speech from microphone or offline (from wave file).
|
||||
The demo is also capable of live close captioning of an audio clip or movie, where signal is intercepted from the speaker.
|
||||
|
||||
The demo script does the following:
|
||||
|
||||
- Downloads US English models trained on LibriSpeech dataset prepared for direct usage by the Inference Engine
|
||||
- Installs the required components
|
||||
- Runs the command line offline demo
|
||||
- As a final step, runs live speech recognition application with graphical interface
|
||||
|
||||
The GUI application prints the speech transcribed from input signal in window. Up to two channels can be transcribed in parallel: microphone & speakers streams.
|
||||
|
||||
@@ -1,239 +0,0 @@
|
||||
:: Copyright (C) 2018-2021 Intel Corporation
|
||||
:: SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set TARGET=CPU
|
||||
set SAMPLE_OPTIONS=
|
||||
set BUILD_FOLDER=%USERPROFILE%\Documents\Intel\OpenVINO
|
||||
set VENV_DIR=%USERPROFILE%\Documents\Intel\OpenVINO\venv_openvino
|
||||
|
||||
:: command line arguments parsing
|
||||
:input_arguments_loop
|
||||
if not "%1"=="" (
|
||||
if "%1"=="-d" (
|
||||
set TARGET=%2
|
||||
echo target = !TARGET!
|
||||
shift
|
||||
)
|
||||
if "%1"=="-sample-options" (
|
||||
set SAMPLE_OPTIONS=%2 %3 %4 %5 %6
|
||||
echo sample_options = !SAMPLE_OPTIONS!
|
||||
shift
|
||||
)
|
||||
if "%1"=="-help" (
|
||||
echo Security barrier camera demo that showcases three models coming with the product
|
||||
echo.
|
||||
echo Options:
|
||||
echo -help Print help message
|
||||
echo -d DEVICE Specify the target device to infer on; CPU, GPU, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -sample-options OPTIONS Specify command line arguments for the sample
|
||||
exit /b
|
||||
)
|
||||
shift
|
||||
goto :input_arguments_loop
|
||||
)
|
||||
|
||||
set ROOT_DIR=%~dp0
|
||||
|
||||
set target_image_path=%ROOT_DIR%car_1.bmp
|
||||
|
||||
set TARGET_PRECISION=FP16
|
||||
|
||||
echo target_precision = !TARGET_PRECISION!
|
||||
|
||||
if exist "%ROOT_DIR%..\..\bin\setupvars.bat" (
|
||||
call "%ROOT_DIR%..\..\bin\setupvars.bat"
|
||||
) else (
|
||||
echo setupvars.bat is not found, INTEL_OPENVINO_DIR can't be set
|
||||
goto error
|
||||
)
|
||||
|
||||
echo INTEL_OPENVINO_DIR is set to %INTEL_OPENVINO_DIR%
|
||||
|
||||
:: Check if Python is installed
|
||||
python --version 2>NUL
|
||||
if errorlevel 1 (
|
||||
echo Error^: Python is not installed. Please install Python 3.5 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
goto error
|
||||
)
|
||||
|
||||
:: Check if Python version is equal or higher 3.4
|
||||
for /F "tokens=* USEBACKQ" %%F IN (`python --version 2^>^&1`) DO (
|
||||
set version=%%F
|
||||
)
|
||||
echo %var%
|
||||
|
||||
for /F "tokens=1,2,3 delims=. " %%a in ("%version%") do (
|
||||
set Major=%%b
|
||||
set Minor=%%c
|
||||
)
|
||||
|
||||
if "%Major%" geq "3" (
|
||||
if "%Minor%" geq "5" (
|
||||
set python_ver=okay
|
||||
)
|
||||
)
|
||||
if not "%python_ver%"=="okay" (
|
||||
echo Unsupported Python version. Please install Python 3.5 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
goto error
|
||||
)
|
||||
|
||||
:: install yaml python modules required for downloader.py
|
||||
if exist "%VENV_DIR%" (
|
||||
echo.
|
||||
echo ###############^|^| Using the existing python virtual environment ^|^|###############
|
||||
echo.
|
||||
) else (
|
||||
echo.
|
||||
echo ###############^|^| Creating the python virtual environment ^|^|###############
|
||||
echo.
|
||||
python -m venv "%VENV_DIR%"
|
||||
)
|
||||
|
||||
call "%VENV_DIR%\Scripts\activate.bat"
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
set models_path=%BUILD_FOLDER%\openvino_models\ir
|
||||
set models_cache=%BUILD_FOLDER%\openvino_models\cache
|
||||
|
||||
if not exist "%models_cache%" (
|
||||
mkdir "%models_cache%"
|
||||
)
|
||||
|
||||
set downloader_dir=%INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\tools\downloader
|
||||
|
||||
for /F "tokens=1,2 usebackq" %%a in ("%ROOT_DIR%demo_security_barrier_camera.conf") do (
|
||||
echo python "%downloader_dir%\downloader.py" --name "%%b" --output_dir "%models_path%" --cache_dir "%models_cache%"
|
||||
python "%downloader_dir%\downloader.py" --name "%%b" --output_dir "%models_path%" --cache_dir "%models_cache%"
|
||||
|
||||
for /F "tokens=* usebackq" %%d in (
|
||||
`python "%downloader_dir%\info_dumper.py" --name "%%b" ^|
|
||||
python -c "import sys, json; print(json.load(sys.stdin)[0]['subdirectory'])"`
|
||||
) do (
|
||||
set model_args=!model_args! %%a "%models_path%\%%d\%target_precision%\%%b.xml"
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ###############^|^| Generate VS solution for Inference Engine demos using cmake ^|^|###############
|
||||
echo.
|
||||
CALL :delay 3
|
||||
|
||||
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
|
||||
set "PLATFORM=x64"
|
||||
) else (
|
||||
set "PLATFORM=Win32"
|
||||
)
|
||||
|
||||
set VSWHERE="false"
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
set VSWHERE="true"
|
||||
cd /d "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
|
||||
) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
set VSWHERE="true"
|
||||
cd /d "%ProgramFiles%\Microsoft Visual Studio\Installer"
|
||||
) else (
|
||||
echo "vswhere tool is not found"
|
||||
)
|
||||
|
||||
if !VSWHERE! == "true" (
|
||||
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
|
||||
set VS_PATH=%%i
|
||||
)
|
||||
if exist "!VS_PATH!\MSBuild\14.0\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=!VS_PATH!\MSBuild\14.0\Bin\MSBuild.exe"
|
||||
)
|
||||
if exist "!VS_PATH!\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=!VS_PATH!\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
)
|
||||
if exist "!VS_PATH!\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=!VS_PATH!\MSBuild\Current\Bin\MSBuild.exe"
|
||||
)
|
||||
for /f "usebackq tokens=1 delims=." %%i in (`vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationVersion`) do (
|
||||
set VS_MAJOR_VER=%%i
|
||||
)
|
||||
if "!VS_MAJOR_VER!"=="16" set "MSBUILD_VERSION=16 2019"
|
||||
if "!VS_MAJOR_VER!"=="15" set "MSBUILD_VERSION=15 2017"
|
||||
)
|
||||
|
||||
if "!MSBUILD_BIN!" == "" (
|
||||
if exist "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
|
||||
set "MSBUILD_VERSION=14 2015"
|
||||
)
|
||||
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
set "MSBUILD_VERSION=15 2017"
|
||||
)
|
||||
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
set "MSBUILD_VERSION=15 2017"
|
||||
)
|
||||
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
set "MSBUILD_BIN=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
set "MSBUILD_VERSION=15 2017"
|
||||
)
|
||||
) else (
|
||||
if not "!MSBUILD_BIN:2019=!"=="!MSBUILD_BIN!" set "MSBUILD_VERSION=16 2019"
|
||||
if not "!MSBUILD_BIN:2017=!"=="!MSBUILD_BIN!" set "MSBUILD_VERSION=15 2017"
|
||||
if not "!MSBUILD_BIN:2015=!"=="!MSBUILD_BIN!" set "MSBUILD_VERSION=14 2015"
|
||||
)
|
||||
|
||||
if "!MSBUILD_BIN!" == "" (
|
||||
echo Build tools for Visual Studio 2015 / 2017 / 2019 cannot be found. If you use Visual Studio 2017, please download and install build tools from https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
|
||||
GOTO errorHandling
|
||||
)
|
||||
|
||||
set "SOLUTION_DIR64=%BUILD_FOLDER%\inference_engine_demos_build"
|
||||
|
||||
echo Creating Visual Studio !MSBUILD_VERSION! %PLATFORM% files in %SOLUTION_DIR64%... && ^
|
||||
if exist "%SOLUTION_DIR64%\CMakeCache.txt" del "%SOLUTION_DIR64%\CMakeCache.txt"
|
||||
cd /d "%INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\demos" && cmake -E make_directory "%SOLUTION_DIR64%" && cd /d "%SOLUTION_DIR64%" && cmake -G "Visual Studio !MSBUILD_VERSION!" -A %PLATFORM% "%INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\demos"
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
CALL :delay 7
|
||||
echo.
|
||||
echo ###############^|^| Build Inference Engine demos using MS Visual Studio (MSBuild.exe) ^|^|###############
|
||||
echo.
|
||||
CALL :delay 3
|
||||
echo "!MSBUILD_BIN!" Demos.sln /p:Configuration=Release /t:security_barrier_camera_demo /clp:ErrorsOnly /m
|
||||
"!MSBUILD_BIN!" Demos.sln /p:Configuration=Release /t:security_barrier_camera_demo /clp:ErrorsOnly /m
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
CALL :delay 7
|
||||
|
||||
:runSample
|
||||
echo.
|
||||
echo ###############^|^| Run Inference Engine security barrier camera demo ^|^|###############
|
||||
echo.
|
||||
CALL :delay 3
|
||||
cd /d "%SOLUTION_DIR64%\intel64\Release"
|
||||
if not exist security_barrier_camera_demo.exe (
|
||||
cd /d "%INTEL_OPENVINO_DIR%\inference_engine\demos\intel64\Release"
|
||||
echo "%INTEL_OPENVINO_DIR%\inference_engine\demos\intel64\Release\security_barrier_camera_demo.exe" -i "%target_image_path%" %model_args% -d !TARGET! -d_va !TARGET! -d_lpr !TARGET! !SAMPLE_OPTIONS!
|
||||
)
|
||||
else (
|
||||
echo "%SOLUTION_DIR64%\intel64\Release\security_barrier_camera_demo.exe" -i "%target_image_path%" %model_args% -d !TARGET! -d_va !TARGET! -d_lpr !TARGET! !SAMPLE_OPTIONS!
|
||||
)
|
||||
security_barrier_camera_demo.exe -i "%target_image_path%" %model_args% ^
|
||||
-d !TARGET! -d_va !TARGET! -d_lpr !TARGET! !SAMPLE_OPTIONS!
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
echo.
|
||||
echo ###############^|^| Demo completed successfully ^|^|###############
|
||||
cd /d "%ROOT_DIR%"
|
||||
|
||||
goto :eof
|
||||
|
||||
:errorHandling
|
||||
echo Error
|
||||
cd /d "%ROOT_DIR%"
|
||||
|
||||
:delay
|
||||
timeout %~1 2> nul
|
||||
EXIT /B 0
|
||||
@@ -1,3 +0,0 @@
|
||||
-m vehicle-license-plate-detection-barrier-0106
|
||||
-m_lpr license-plate-recognition-barrier-0001
|
||||
-m_va vehicle-attributes-recognition-barrier-0039
|
||||
@@ -1,178 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (C) 2018-2021 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
echo -ne "\e[0;33mWARNING: If you get an error when running the demo in the Docker container, you may need to install additional packages. To do this, run the container as root (-u 0) and run install_openvino_dependencies.sh script. If you get a package-independent error, try setting additional parameters using -sample-options.\e[0m\n"
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" && pwd )"
|
||||
VENV_DIR="$HOME/venv_openvino"
|
||||
|
||||
. "$ROOT_DIR/utils.sh"
|
||||
|
||||
usage() {
|
||||
echo "Security barrier camera demo that showcases three models coming with the product"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -help Print help message"
|
||||
echo " -d DEVICE Specify the target device to infer on; CPU, GPU, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified"
|
||||
echo " -sample-options OPTIONS Specify command line arguments for the sample"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
trap 'error ${LINENO}' ERR
|
||||
|
||||
target="CPU"
|
||||
|
||||
# parse command line options
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h | -help | --help)
|
||||
usage
|
||||
;;
|
||||
-d)
|
||||
target="$2"
|
||||
echo target = "${target}"
|
||||
shift
|
||||
;;
|
||||
-sample-options)
|
||||
sampleoptions=("${@:2}")
|
||||
echo sample-options = "${sampleoptions[*]}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
target_image_path="$ROOT_DIR/car_1.bmp"
|
||||
|
||||
run_again="Then run the script again\n\n"
|
||||
|
||||
if [ -e "$ROOT_DIR/../../bin/setupvars.sh" ]; then
|
||||
setupvars_path="$ROOT_DIR/../../bin/setupvars.sh"
|
||||
else
|
||||
echo -ne "Error: setupvars.sh is not found\n"
|
||||
fi
|
||||
if ! . "$setupvars_path" ; then
|
||||
echo -ne "Unable to run ./setupvars.sh. Please check its presence. ${run_again}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f /etc/centos-release ]]; then
|
||||
DISTRO="centos"
|
||||
elif [[ -f /etc/lsb-release ]]; then
|
||||
DISTRO="ubuntu"
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
DISTRO="macos"
|
||||
fi
|
||||
|
||||
if [[ $DISTRO == "centos" ]]; then
|
||||
# check installed Python version
|
||||
if command -v python3.5 >/dev/null 2>&1; then
|
||||
python_binary=python3.5
|
||||
fi
|
||||
if command -v python3.6 >/dev/null 2>&1; then
|
||||
python_binary=python3.6
|
||||
fi
|
||||
elif [[ $DISTRO == "ubuntu" ]]; then
|
||||
python_binary=python3
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# check installed Python version
|
||||
if command -v python3.8 >/dev/null 2>&1; then
|
||||
python_binary=python3.8
|
||||
elif command -v python3.7 >/dev/null 2>&1; then
|
||||
python_binary=python3.7
|
||||
elif command -v python3.6 >/dev/null 2>&1; then
|
||||
python_binary=python3.6
|
||||
elif command -v python3.5 >/dev/null 2>&1; then
|
||||
python_binary=python3.5
|
||||
else
|
||||
python_binary=python3
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v $python_binary &>/dev/null; then
|
||||
echo -ne "\n\nPython 3.5 (x64) or higher is not installed. It is required to run Model Optimizer, please install it. ${run_again}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "$VENV_DIR" ]; then
|
||||
echo -ne "\n###############|| Using the existing python virtual environment ||###############\n\n"
|
||||
else
|
||||
echo -ne "\n###############|| Creating the python virtual environment ||###############\n\n"
|
||||
"$python_binary" -m venv "$VENV_DIR"
|
||||
fi
|
||||
|
||||
. "$VENV_DIR/bin/activate"
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r "$ROOT_DIR/../open_model_zoo/tools/downloader/requirements.in"
|
||||
|
||||
# Step 1. Downloading Intel models
|
||||
echo -ne "\n###############|| Downloading Intel models ||###############\n\n"
|
||||
|
||||
target_precision="FP16"
|
||||
|
||||
echo -ne "target_precision = ${target_precision}\n"
|
||||
|
||||
downloader_dir="${INTEL_OPENVINO_DIR}/deployment_tools/open_model_zoo/tools/downloader"
|
||||
|
||||
downloader_path="$downloader_dir/downloader.py"
|
||||
models_path="$HOME/openvino_models/ir"
|
||||
models_cache="$HOME/openvino_models/cache"
|
||||
|
||||
declare -a model_args
|
||||
|
||||
while read -r model_opt model_name; do
|
||||
model_subdir=$(python "$downloader_dir/info_dumper.py" --name "$model_name" |
|
||||
python -c 'import sys, json; print(json.load(sys.stdin)[0]["subdirectory"])')
|
||||
|
||||
model_path="$models_path/$model_subdir/$target_precision/$model_name"
|
||||
|
||||
print_and_run python "$downloader_path" --name "$model_name" --output_dir "$models_path" --cache_dir "$models_cache"
|
||||
|
||||
model_args+=("$model_opt" "${model_path}.xml")
|
||||
done < "$ROOT_DIR/demo_security_barrier_camera.conf"
|
||||
|
||||
# Step 2. Build samples
|
||||
echo -ne "\n###############|| Build Inference Engine demos ||###############\n\n"
|
||||
|
||||
demos_path="${INTEL_OPENVINO_DIR}/deployment_tools/open_model_zoo/demos"
|
||||
|
||||
if ! command -v cmake &>/dev/null; then
|
||||
echo -ne "\n\nCMAKE is not installed. It is required to build Inference Engine demos. Please install it. ${run_again}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OS_PATH=$(uname -m)
|
||||
NUM_THREADS="-j2"
|
||||
|
||||
if [ "$OS_PATH" == "x86_64" ]; then
|
||||
OS_PATH="intel64"
|
||||
NUM_THREADS="-j8"
|
||||
fi
|
||||
|
||||
build_dir="$HOME/inference_engine_demos_build"
|
||||
if [ -e "$build_dir/CMakeCache.txt" ]; then
|
||||
rm -rf "$build_dir/CMakeCache.txt"
|
||||
fi
|
||||
mkdir -p "$build_dir"
|
||||
cd "$build_dir"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release "$demos_path"
|
||||
make $NUM_THREADS security_barrier_camera_demo
|
||||
|
||||
# Step 3. Run samples
|
||||
echo -ne "\n###############|| Run Inference Engine security_barrier_camera demo ||###############\n\n"
|
||||
|
||||
binaries_dir="${build_dir}/${OS_PATH}/Release"
|
||||
cd "$binaries_dir"
|
||||
|
||||
print_and_run ./security_barrier_camera_demo -d "$target" -d_va "$target" -d_lpr "$target" -i "$target_image_path" "${model_args[@]}" "${sampleoptions[@]}"
|
||||
|
||||
echo -ne "\n###############|| Demo completed successfully ||###############\n\n"
|
||||
@@ -22,7 +22,7 @@ if not "%1"=="" (
|
||||
shift
|
||||
)
|
||||
if "%1"=="-help" (
|
||||
echo Benchmark demo using public SqueezeNet topology
|
||||
echo Benchmark sample using public SqueezeNet topology
|
||||
echo.
|
||||
echo Options:
|
||||
echo -help Print help message
|
||||
@@ -64,7 +64,7 @@ echo INTEL_OPENVINO_DIR is set to %INTEL_OPENVINO_DIR%
|
||||
:: Check if Python is installed
|
||||
python --version 2>NUL
|
||||
if errorlevel 1 (
|
||||
echo Error^: Python is not installed. Please install Python 3.5 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
echo Error^: Python is not installed. Please install Python 3.6 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
goto error
|
||||
)
|
||||
|
||||
@@ -80,13 +80,13 @@ for /F "tokens=1,2,3 delims=. " %%a in ("%version%") do (
|
||||
)
|
||||
|
||||
if "%Major%" geq "3" (
|
||||
if "%Minor%" geq "5" (
|
||||
if "%Minor%" geq "6" (
|
||||
set python_ver=okay
|
||||
)
|
||||
)
|
||||
|
||||
if not "%python_ver%"=="okay" (
|
||||
echo Unsupported Python version. Please install Python 3.5 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
echo Unsupported Python version. Please install Python 3.6 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
goto error
|
||||
)
|
||||
|
||||
9
scripts/demo/demo_benchmark_app.sh → scripts/demo/run_sample_benchmark_app.sh
Executable file → Normal file
9
scripts/demo/demo_benchmark_app.sh → scripts/demo/run_sample_benchmark_app.sh
Executable file → Normal file
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2018-2021 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
echo -ne "\e[0;33mWARNING: If you get an error when running the demo in the Docker container, you may need to install additional packages. To do this, run the container as root (-u 0) and run install_openvino_dependencies.sh script. If you get a package-independent error, try setting additional parameters using -sample-options.\e[0m\n"
|
||||
echo -ne "\e[0;33mWARNING: If you get an error when running the sample in the Docker container, you may need to install additional packages. To do this, run the container as root (-u 0) and run install_openvino_dependencies.sh script. If you get a package-independent error, try setting additional parameters using -sample-options.\e[0m\n"
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" && pwd )"
|
||||
VENV_DIR="$HOME/venv_openvino"
|
||||
@@ -88,9 +88,6 @@ fi
|
||||
|
||||
if [[ $DISTRO == "centos" ]]; then
|
||||
# check installed Python version
|
||||
if command -v python3.5 >/dev/null 2>&1; then
|
||||
python_binary=python3.5
|
||||
fi
|
||||
if command -v python3.6 >/dev/null 2>&1; then
|
||||
python_binary=python3.6
|
||||
fi
|
||||
@@ -104,15 +101,13 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
python_binary=python3.7
|
||||
elif command -v python3.6 >/dev/null 2>&1; then
|
||||
python_binary=python3.6
|
||||
elif command -v python3.5 >/dev/null 2>&1; then
|
||||
python_binary=python3.5
|
||||
else
|
||||
python_binary=python3
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v $python_binary &>/dev/null; then
|
||||
echo -ne "\n\nPython 3.5 (x64) or higher is not installed. It is required to run Model Optimizer, please install it. ${run_again}"
|
||||
echo -ne "\n\nPython 3.6 (x64) or higher is not installed. It is required to run Model Optimizer, please install it. ${run_again}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -22,7 +22,7 @@ if not "%1"=="" (
|
||||
shift
|
||||
)
|
||||
if "%1"=="-help" (
|
||||
echo Classification demo using public SqueezeNet topology
|
||||
echo Classification sample using public SqueezeNet topology
|
||||
echo.
|
||||
echo Options:
|
||||
echo -help Print help message
|
||||
@@ -60,7 +60,7 @@ echo INTEL_OPENVINO_DIR is set to %INTEL_OPENVINO_DIR%
|
||||
:: Check if Python is installed
|
||||
python --version 2>NUL
|
||||
if errorlevel 1 (
|
||||
echo Error^: Python is not installed. Please install Python 3.5 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
echo Error^: Python is not installed. Please install Python 3.6 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
goto error
|
||||
)
|
||||
|
||||
@@ -76,13 +76,13 @@ for /F "tokens=1,2,3 delims=. " %%a in ("%version%") do (
|
||||
)
|
||||
|
||||
if "%Major%" geq "3" (
|
||||
if "%Minor%" geq "5" (
|
||||
if "%Minor%" geq "6" (
|
||||
set python_ver=okay
|
||||
)
|
||||
)
|
||||
|
||||
if not "%python_ver%"=="okay" (
|
||||
echo Unsupported Python version. Please install Python 3.5 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
echo Unsupported Python version. Please install Python 3.6 ^(64-bit^) or higher from https://www.python.org/downloads/
|
||||
goto error
|
||||
)
|
||||
|
||||
@@ -258,7 +258,7 @@ classification_sample_async.exe -i "%target_image_path%" -m "%ir_dir%\%model_nam
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
echo.
|
||||
echo ###############^|^| Classification demo completed successfully ^|^|###############
|
||||
echo ###############^|^| Classification sample completed successfully ^|^|###############
|
||||
|
||||
CALL :delay 10
|
||||
cd /d "%ROOT_DIR%"
|
||||
13
scripts/demo/demo_squeezenet_download_convert_run.sh → scripts/demo/run_sample_squeezenet.sh
Executable file → Normal file
13
scripts/demo/demo_squeezenet_download_convert_run.sh → scripts/demo/run_sample_squeezenet.sh
Executable file → Normal file
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 2018-2021 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
echo -ne "\e[0;33mWARNING: If you get an error when running the demo in the Docker container, you may need to install additional packages. To do this, run the container as root (-u 0) and run install_openvino_dependencies.sh script. If you get a package-independent error, try setting additional parameters using -sample-options.\e[0m\n"
|
||||
echo -ne "\e[0;33mWARNING: If you get an error when running the sample in the Docker container, you may need to install additional packages. To do this, run the container as root (-u 0) and run install_openvino_dependencies.sh script. If you get a package-independent error, try setting additional parameters using -sample-options.\e[0m\n"
|
||||
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" && pwd )"
|
||||
VENV_DIR="$HOME/venv_openvino"
|
||||
@@ -11,7 +11,7 @@ VENV_DIR="$HOME/venv_openvino"
|
||||
. "$ROOT_DIR/utils.sh"
|
||||
|
||||
usage() {
|
||||
echo "Classification demo using public SqueezeNet topology"
|
||||
echo "Classification sample using public SqueezeNet topology"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -help Print help message"
|
||||
@@ -84,9 +84,6 @@ fi
|
||||
|
||||
if [[ $DISTRO == "centos" ]]; then
|
||||
# check installed Python version
|
||||
if command -v python3.5 >/dev/null 2>&1; then
|
||||
python_binary=python3.5
|
||||
fi
|
||||
if command -v python3.6 >/dev/null 2>&1; then
|
||||
python_binary=python3.6
|
||||
fi
|
||||
@@ -100,15 +97,13 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
python_binary=python3.7
|
||||
elif command -v python3.6 >/dev/null 2>&1; then
|
||||
python_binary=python3.6
|
||||
elif command -v python3.5 >/dev/null 2>&1; then
|
||||
python_binary=python3.5
|
||||
else
|
||||
python_binary=python3
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v $python_binary &>/dev/null; then
|
||||
echo -ne "\n\nPython 3.5 (x64) or higher is not installed. It is required to run Model Optimizer, please install it. ${run_again}"
|
||||
echo -ne "\n\nPython 3.6 (x64) or higher is not installed. It is required to run Model Optimizer, please install it. ${run_again}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -189,4 +184,4 @@ cp -f "$ROOT_DIR/${model_name}.labels" "${ir_dir}/"
|
||||
|
||||
print_and_run ./classification_sample_async -d "$target" -i "$target_image_path" -m "${ir_dir}/${model_name}.xml" "${sampleoptions[@]}"
|
||||
|
||||
echo -ne "\n###############|| Demo completed successfully ||###############\n\n"
|
||||
echo -ne "\n###############|| Classification sample completed successfully ||###############\n\n"
|
||||
Reference in New Issue
Block a user