環境構築(Linux-vm編)

インストールの前に

  • インターネット環境

インストールされるコンポーネント

コンポーネント説明
Model OptimizerThis 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.1Enables OpenCL on the GPU/CPU for Intel® processors
Intel® Media SDKOffers access to hardware accelerated video codecs and frame processing
OpenCVIntel Hardware用にコンパイルされたOpenCV
Sample Applications推論エンジンを使用するためのコンソールデモアプリケーション
DemosA set of console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use-cases
Additional ToolsA set of tools to work with your models
Documentation for PreTrained ModelsDocumentation 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)

ソフトウェアのインストール

今回は、Windows10で動作するVMwareのUbuntu18.04にセットアップします

必要なソフトウェア

  • CMake 3.4 or higher
  • Python 3.5 or higher

OpenVINO Toolkit のインストール

openvino@ubuntu$ ls
l_openvino_toolkit_p_2020.1.023.tgz

openvino@ubuntu$ tar -xvzf l_openvino_toolkit_p_2020.1.023.tgz

openvino@ubuntu$ cd l_openvino_toolkit_p_2020.1.023/

#コマンドラインインストール
openvino@ubuntu$ sudo ./install.sh
Welcome
 Welcome to the Intel® Distribution of OpenVINO™ toolkit 2020.1 for Linux*
 The Intel installation wizard will install the Intel® Distribution of OpenVINO™
 toolkit 2020.1 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.1/_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.1/_docs_install_guides_installing_openvino
 _linux.html.
 You will complete the following steps:
 Welcome
 End User License Agreement
 Prerequisites
 Configuration
 Installation
 First Part of Installation is Complete 
 
 Press "Enter" key to continue or "q" to quit: 
必要条件にチェックが入ります
Missing optional prerequisites
 -- CMake* 2.8 or higher is not installed
 -- Intel® GPU is not detected on this machine
 -- Intel® Graphics Compute Runtime for OpenCL™ Driver is missing but you will
 be prompted to install later
 -- Missing required libraries or packages. You will be prompted to install them 
 later
必要であればここで別端末を利用してソフトウェアをインストールします
openvino@ubuntu$ sudo apt-get install cmake
defaultのまま設定をすすめていくと、
First Part of Installation is Complete
 The first part of Intel® Distribution of OpenVINO™ toolkit 2020.1 for Linux*
 has been successfully installed in 
 /opt/intel/openvino_2020.1.023.
 ADDITIONAL STEPS STILL REQUIRED: 
 Open the Installation guide at:
  https://docs.openvinotoolkit.org/2020.1/_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

環境変数の設定

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

CPUであれば、VM環境でも問題無く実行できました

GPU関連モジュールインストール

openvino@ubuntu$ cd /opt/intel/openvino/install_dependencies/
openvino@ubuntu$ sudo -E su
root@ubuntu# ./install_NEO_OCL_driver.sh

でGPU関連のモジュールがインストールされます
ただし、VM環境の場合はここまでで終了です
GPUをVMがエミュレーションしているので、実際には動作しません

Neural Compute Stick2 の使用

現在作成中

お疲れ様でした
インストールはこれで完了です