This tool imports, converts, and optimizes models, which were trained in popular frameworks, to a format usable by Intel tools, especially the Inference Engine. Popular frameworks include Caffe*, TensorFlow*, MXNet*, and ONNX*.
Inference Engine
ディープラーニングエンジン アプリケーション組み込みライブラリ
Drivers and runtimes for OpenCL™ version 2.1
Enables OpenCL on the GPU/CPU for Intel® processors
Intel® Media SDK
Offers access to hardware accelerated video codecs and frame processing
OpenCV
Intel Hardware用にコンパイルされたOpenCV
Sample Applications
推論エンジンを使用するためのコンソールデモアプリケーション
Demos
A set of console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use-cases
Additional Tools
A set of tools to work with your models
Documentation for PreTrained Models
Documentation for the pre-trained models available in the Open Model Zoo repo
プラットフォーム
ハードウェアの制限
6th-10th Generation Intel® Core™
Intel® Xeon® v5 family
Intel® Xeon® v6 family
Intel® Neural Compute Stick 2
OS
Ubuntu 18.04.x long-term support (LTS), 64-bit
CentOS 7.4, 64-bit (for target only)
Yocto Project v3.0, 64-bit (for target only and requires modifications)
wget -O GPG_KEY https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020?elq_cid=6195740&erpm_id=9311153
sudo apt-key add GPG_KEY
echo "deb https://apt.repos.intel.com/openvino/2020 all main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2020.list
sudo apt update
sudo apt-get install intel-openvino-dev-ubuntu18-2020.3.194
cd /opt/intel/openvino/deployment_tools/demo/
ここから先は通常のインストールと同じになります
外部依存ソフトウェアのインストール
openvino@ubuntu$ cd /opt/intel/openvino/install_dependencies/
openvino@ubuntu$ sudo -E ./install_openvino_dependencies.sh
This script installs the following OpenVINO 3rd-party dependencies:
1. GTK+, FFmpeg and GStreamer libraries used by OpenCV
2. libusb library required for Myriad plugin for Inference Engine
3. build dependencies for OpenVINO samples
4. build dependencies for GStreamer Plugins
環境により異なりますが、上記ライブラリが自動的にインストールされます
環境変数の設定
openvino@ubuntu$ source /opt/intel/openvino/bin/setupvars.sh
#ログイン時に環境変数を有効にする場合
vi <user_directory>/.bashrc
#最終行に下記を追加
source /opt/intel/openvino/bin/setupvars.sh
Model Optimizer の設定
openvino@ubuntu$ cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites
openvino@ubuntu$ sudo ./install_prerequisites.sh
インストールのチェック
openvino@ubuntu$ cd /opt/intel/openvino/deployment_tools/demo
openvino@ubuntu$ ./demo_squeezenet_download_convert_run.sh
Demo check
openvino@ubuntu$ cd /opt/intel/openvino/deployment_tools/demo
openvino@ubuntu$ ./demo_security_barrier_camera.sh
GPU関連モジュールインストール
openvino@ubuntu$ cd /opt/intel/openvino/install_dependencies/
openvino@ubuntu$ sudo -E su
root@ubuntu# ./install_NEO_OCL_driver.sh
テレビ会議が一気に普及し、自宅仕事が増えてる状況ですね。暑くなってきましたし、上だけフォーマルな人も増えているのは分かります。自分も今は短パンです。YouTubeで「Luke Ming Flanagan underwear speech」とか「Reporter Caught With No Pants Live on Air」とかで検索すると、ウッカリさんが面白ニュースとしていじられていますね。気持ちは分かりますよ。暑いですもん。
記事を読んでいると、「Safe Meeting prevents embarrassing and unprofessional situations by stopping your video stream if certain attire that’s inappropriate for business is detected.」だそうです。”ビジネスに相応しくない”というところが気になりますね。いろんなパンツとかどうやって検出しているんでしょう。謎です。セクスウィなパンツや、逆に派手なスーツやドレスもちゃんと判定してくれるのでしょうか。
This is a multi-person 2D pose estimation network (based on the OpenPose approach) with tuned MobileNet v1 as a feature extractor. For every person in an image, the network detects a human pose: a body skeleton consisting of keypoints and connections between them. The pose may contain up to 18 keypoints: ears, eyes, nose, neck, shoulders, elbows, wrists, hips, knees, and ankles.
[ INFO ] 2020-06-05 11:14:48,240 Loading models
[ INFO ] 2020-06-05 11:14:48,241 Loading the model from '/home/pi/openvino/models/face-detection-retail-0004/FP16/face-detection-retail-0004.xml'
face_recognition_demo.py:177: DeprecationWarning: Reading network using constructor is deprecated. Please, use IECore.read_network() method instead
model = IENetwork(model_description_path, model_weights_path)
Traceback (most recent call last):
File "face_recognition_demo.py", line 446, in
main()
File "face_recognition_demo.py", line 441, in main
visualizer = Visualizer(args)
File "face_recognition_demo.py", line 240, in __init__
self.frame_processor = FrameProcessor(args)
File "face_recognition_demo.py", line 131, in __init__
face_detector_net = self.load_model(args.m_fd)
File "face_recognition_demo.py", line 177, in load_model
model = IENetwork(model_description_path, model_weights_path)
File "ie_api.pyx", line 1099, in openvino.inference_engine.ie_api.IENetwork.__cinit__
RuntimeError: fc7_mbox_priorbox/naked_not_unsqueezed has zero dimension that is not allowable
This tool imports, converts, and optimizes models, which were trained in popular frameworks, to a format usable by Intel tools, especially the Inference Engine. Popular frameworks include Caffe*, TensorFlow*, MXNet*, and ONNX*.
Inference Engine
ディープラーニングエンジン アプリケーション組み込みライブラリ
Drivers and runtimes for OpenCL™ version 2.1
Enables OpenCL on the GPU/CPU for Intel® processors
Intel® Media SDK
Offers access to hardware accelerated video codecs and frame processing
OpenCV
Intel Hardware用にコンパイルされたOpenCV
Sample Applications
推論エンジンを使用するためのコンソールデモアプリケーション
Demos
A set of console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use-cases
Additional Tools
A set of tools to work with your models
Documentation for PreTrained Models
Documentation for the pre-trained models available in the Open Model Zoo repo
プラットフォーム
ハードウェアの制限
6th-10th Generation Intel® Core™
Intel® Xeon® v5 family
Intel® Xeon® v6 family
Intel® Neural Compute Stick 2
OS
Ubuntu 18.04.x long-term support (LTS), 64-bit
CentOS 7.4, 64-bit (for target only)
Yocto Project v3.0, 64-bit (for target only and requires modifications)
openvino@ubuntu$ ls l_openvino_toolkit_p_2020.2.120.tgz
openvino@ubuntu$ tar -xvzf l_openvino_toolkit_p_2020.2.120.tgz
openvino@ubuntu$ cd l_openvino_toolkit_p_2020.2.120/
#コマンドラインインストール
openvino@ubuntu$ sudo ./install.sh
Welcome
--------------------------------------------------------------------------------
Welcome to the Intel® Distribution of OpenVINO™ toolkit 2020.2 for Linux*
--------------------------------------------------------------------------------
The Intel installation wizard will install the Intel® Distribution of OpenVINO™
toolkit 2020.2 for Linux* to your system.
The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and
solutions that emulate human vision. Based on Convolutional Neural Networks
(CNN), the toolkit extends computer vision (CV) workloads across Intel®
hardware, maximizing performance. The Intel Distribution of OpenVINO toolkit
includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT).
Before installation please check system requirements:
https://docs.openvinotoolkit.org/2020.2/_docs_install_guides_installing_openvino
_linux.html#system_requirements
and run following script to install external software dependencies:
sudo -E ./install_openvino_dependencies.sh
Please note that after the installation is complete, additional configuration
steps are still required.
For the complete installation procedure, refer to the Installation guide:
https://docs.openvinotoolkit.org/2020.2/_docs_install_guides_installing_openvino
_linux.html.
You will complete the following steps:
1. Welcome
2. End User License Agreement
3. Prerequisites
4. Configuration
5. Installation
6. First Part of Installation is Complete
--------------------------------------------------------------------------------
Press "Enter" key to continue or "q" to quit:
defaultのまま設定をすすめていくと、
First Part of Installation is Complete
--------------------------------------------------------------------------------
The first part of Intel® Distribution of OpenVINO™ toolkit 2020.2 for Linux*
has been successfully installed in
/opt/intel/openvino_2020.2.120.
ADDITIONAL STEPS STILL REQUIRED:
Open the Installation guide at:
https://docs.openvinotoolkit.org/2020.2/_docs_install_guides_installing_openvin
o_linux.html
and follow the guide instructions to complete the remaining tasks listed below:
• Set Environment variables
• Configure Model Optimizer
• Run the Verification Scripts to Verify Installation and Compile Samples
--------------------------------------------------------------------------------
Press "Enter" key to quit:
インストール完了です
外部依存ソフトウェアのインストール
openvino@ubuntu$ cd /opt/intel/openvino/install_dependencies/
openvino@ubuntu$ sudo -E ./install_openvino_dependencies.sh
This script installs the following OpenVINO 3rd-party dependencies:
1. GTK+, FFmpeg and GStreamer libraries used by OpenCV
2. libusb library required for Myriad plugin for Inference Engine
3. build dependencies for OpenVINO samples
4. build dependencies for GStreamer Plugins
環境により異なりますが、上記ライブラリが自動的にインストールされます
環境変数の設定
openvino@ubuntu$ source /opt/intel/openvino/bin/setupvars.sh
#ログイン時に環境変数を有効にする場合
vi <user_directory>/.bashrc
#最終行に下記を追加
source /opt/intel/openvino/bin/setupvars.sh
Model Optimizer の設定
openvino@ubuntu$ cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites
openvino@ubuntu$ sudo ./install_prerequisites.sh
インストールのチェック
openvino@ubuntu$ cd /opt/intel/openvino/deployment_tools/demo
openvino@ubuntu$ ./demo_squeezenet_download_convert_run.sh
Demo check
openvino@ubuntu$ cd /opt/intel/openvino/deployment_tools/demo
openvino@ubuntu$ ./demo_security_barrier_camera.sh
2020.1リリースよりも若干早くなっているようです
GPU関連モジュールインストール
openvino@ubuntu$ cd /opt/intel/openvino/install_dependencies/
openvino@ubuntu$ sudo -E su
root@ubuntu# ./install_NEO_OCL_driver.sh
ここで過去にOpenVINOをインストールしていた場合、依存関係で下記のようなエラーが発生します
dpkg: dependency problems prevent removal of intel-igc-core:
intel-igc-opencl depends on intel-igc-core (= 1.0.2597).
dpkg: error processing package intel-igc-core (--purge):
dependency problems - not removing
Errors were encountered while processing:
intel-igc-core
ERROR: unable to remove intel-igc-core
please resolve it manually and try to launch the script again.
cd C:\Program Files (x86)\IntelSWTools\openvino\bin\
setupvars.bat
この画面ではpythonのバージョンを確認後、バッチファイルを実行して環境変数を設定しています。
Model Optimizerの構成
Model Optimizerは、Intel® Distribution of OpenVINO™ toolkitの主要コンポーネントです。Model Optimizerを使用してモデルを実行しないと、トレーニング済みモデルで推論を行うことはできません。モデルオプティマイザーを使用して事前トレーニング済みのモデルを実行すると、ネットワークの中間表現(IR)を出力します。IRはモデル全体を記述するファイルのペアです:
Model OptimizerはPython *ベースのコマンドラインツール(mo.py)で、C:\ Program Files(x86)\ IntelSWTools \ openvino \ deployment_tools \ model_optimizerにあります。 Caffe *、TensorFlow *、MXNet *、ONNX *などの一般的なディープラーニングフレームワークでトレーニングされたモデルでこのツールを使用して、推論エンジンが使用できる最適化されたIR形式に変換します。
このセクションでは、スクリプトを使用して、Model Optimizerを、サポートされているすべてのフレームワークに対して同時に、または個々のフレームワークに対して構成する方法について説明します。スクリプトを使用する代わりにModel Optimizerを手動で構成する場合は、「Model Optimizerの構成Configuring the Model Optimizer」ページの「手動構成プロセスの使用」セクションを参照してください。
このスクリプトは、SqueezeNetモデルをダウンロードし、Model Optimizerを使用して、モデルを.binおよび.xml中間表現(IR)ファイルに変換します。推論エンジンはこのモデル変換を必要とするため、IRを入力として使用し、Intelハードウェアで最適なパフォーマンスを実現できます。 この検証スクリプトは、Image Classification Sample AsyncアプリケーションImage Classification Sample Async をビルドし、demoディレクトリのcar.pngイメージを使用して実行します。中間表現の簡単な説明については、Model Optimizerの構成Configuring the Model Optimizerを参照してください。
検証スクリプトが完了すると、トップ10カテゴリのラベルと信頼度が得られます。
実行結果。スポーツカーとして認識されている事が確認できます。
Inference Pipeline Verification Scriptの実行
コンソールでdemo_security_barrier_camera.batファイルを開始します。 このスクリプトは、事前にトレーニングされた3つのモデルIRをダウンロードし、セキュリティバリアカメラデモアプリケーションSecurity Barrier Camera Demoをビルドし、ダウンロードしたモデルとデモディレクトリからcar_1.bmpイメージを使用して実行し、推論パイプラインを表示します。検証スクリプトは、車両属性を相互に構築する車両認識を使用して、特定の属性に絞り込みます。
This tool imports, converts, and optimizes models, which were trained in popular frameworks, to a format usable by Intel tools, especially the Inference Engine. Popular frameworks include Caffe*, TensorFlow*, MXNet*, and ONNX*.
Inference Engine
ディープラーニングエンジン アプリケーション組み込みライブラリ
OpenCV
Intel Hardware用にコンパイルされたOpenCV
Sample Applications
推論エンジンを使用するためのコンソールデモアプリケーション
Demos
A set of console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use-cases
Additional Tools
A set of tools to work with your models
Documentation for PreTrained Models
Documentation for the pre-trained models available in the Open Model Zoo repo
プラットフォーム
ハードウェアの制限
6th-10th Generation Intel® Core™
Intel® Xeon® v5 family
Intel® Xeon® v6 family
Intel® Neural Compute Stick 2
ソフトウェアのインストール
必要なソフトウェア
CMake 3.4 or higher
Python 3.5 or higher
Apple Xcode* Command Line Tools
(Optional) Apple Xcode* IDE (not required for OpenVINO, but useful for development)