私的AI研究会 > OpenVINO16

OpenVINO™ Toolkit for Linux on VirtualBox

 OpenVINO™ツールキットの最新版「2021.3」を 「Core™ i7-6700」VirtualBox 上の ubuntu20.04 にインストールする。
 VirtualBox は USB デバイスを使用できるので、これまでの Hyper-V から移行することにする。(残念ながら同居はできない)

※ 最終更新:2021/06/20 

「OpenVINO™ Toolkit for Linux 2021.3」のインストール

事前準備

OpenVINO™ Toolkit のダウンロード

OpenVINO™ Toolkit のインストール

  1. ダウンロードされたパッケージを解凍
    $ tar -xvzf l_openvino_toolkit_p_2021.3.394.tgz
  2. 解凍したパッケージの中にあるインストーラを起動
    $ cd l_openvino_toolkit_p_2021.3.394
    $ sudo ./install_GUI.sh
  3. 依存関係の外部パッケージをインストール
    $ cd /opt/intel/openvino_2021/install_dependencies
    $ sudo -E ./install_openvino_dependencies.sh
  4. 環境変数の設定
    $ source /opt/intel/openvino_2021/bin/setupvars.sh
    [setupvars.sh] OpenVINO environment initialized
    シェルを起動時に自動的に環境変数を設定するため 「~/.bashrc」ファイルの最後に「source /opt/intel/openvino_2021/bin/setupvars.sh」の1行を追記する。

  5. Model Optimizer の設定
    $ cd /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites
    $ sudo ./install_prerequisites.sh
  6. Pytorch をインストール
    オフィシャルサイト PyTorch FROM RESEARCH TO PRODUCTION にアクセスして、インストールパラメータを取得する。
    pip3 install torch==1.8.0+cpu torchvision==0.9.0+cpu torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
    $ pip3 install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
  7. scipy をインストール
    $ pip3 install scipy
  8. Neural Compute Stick 2 (NCS2) の設定
    $ sudo usermod -a -G users "$(whoami)"
    
    $ sudo cp /opt/intel/openvino_2021/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/
    $ sudo udevadm control --reload-rules
    $ sudo udevadm trigger
    $ sudo ldconfig
    1. システムを再起動する。
    2. VirtualBox の USBデバイスで「Miriad...」をチェックしておく。
    3. 設定確認
      $ lsusb
      Bus 001 Device 002: ID 03e7:2485 Intel Movidius MyriadX
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
      Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      $ id mizutu
      uid=1000(mizutu) gid=1000(mizutu) groups=1000(mizutu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),100(users),120(lpadmin),131(lxd),132(sambashare)
  9. サンプルデモの実行1 demo_security_barrier_camera.sh
    $ cd /opt/intel/openvino_2021/deployment_tools/demo
    $ ./demo_security_barrier_camera.sh
  10. サンプルデモの実行2 demo_squeezenet_download_convert_run.sh
    $ ./demo_squeezenet_download_convert_run.sh
  11. サンプルデモの実行3 demo_benchmark_app.sh
    $ ./demo_benchmark_app.sh
  12. 推論モデルファイル
    ここ からホームディレクトリにダウンロードして展開する。
    $ tar xvzf model_xxxxxxxx.tar.gz
    学習済みモデルの場所
  13. OpenVINO™ ツールキット サンプルデモ ここ からホームディレクトリにダウンロードして展開する。
    $ tar xvzf Images_xxxxxxxx.tar.gz
    $ tar xvzf Videos_xxxxxxxx.tar.gz
    $ tar xvzf run_app_xxxxxxxx.tar.gz
    $ tar xvzf workspace_xxxxxxxx.tar.gz
    $ tar xvzf omz_demos_build_xxxxxxxx.tar.gz
  14. デモ実行環境設定のシェルスクリプト
    シェルを起動時に自動的に環境変数を設定するため 「~/.bashrc」ファイルの最後に「source ~/omz_demos_build/omz_demos.sh」の1行を追記する。

OpenVINO™ Toolkit に付属するデモソフト

「2021.3」に付属するデモソフト一覧)

Virtual Box で NCS2を使うために USBフィルターを追加する

Open Model Zoo Demos

3D Human Pose Estimation Python* Demo

デモの実行

#ref(): File not found: "omz01_s.jpg" at page "OpenVINO15/OMZdemo"

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
fps13.56.61.13.91.54.54.1

Action Recognition Python* Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
Data totaifps11521469984642362172
ms0.871010121.562.775.79
Encoder totalfps235951117521.454.5143.8
ms4.310.5915.746.818.36.95
Decoder totalfps44202.5537.911.397.7
ms23504001912688.210.2
Render totalfps27152.026.64.665.4118.99
ms376749438215118552

Object Detection Python* Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
Latency(ms)219.24316575151526233010867
fps4.52.50.21.90.41.11.9

Human Pose Estimation Python* Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
USER_SPECIFIDE modeFPS17.39.21.20.51.95.64.6
Latency (ms)44.1104714236534170211
MIN_LATENCY modeFPS19.99.51.23.91.7--
Latency (ms)48.1101701236.5563--

Gesture Recognition Python* Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
fps14.38.70.95X1.93.7X
fps14.58.80.94X1.93.8X

Handwritten Text Recognition Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
Average throughput(ms)277603435386627421195913

Text Detection C++ Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
detection model inferencems10218511546851079361655
fps9.85.40.871.460.932.771.53
detection model postprocessingms40.4691481541119893.6
fps24.714.46.766.509.010.210.7
recognition model inferencems7.114.610376.077.326.377.1
fps14068.79.7013.212.93813.0
recognition model postprocessingms0.0070.010.0150.040.0120.0190.028
fps136364917316334823160813285211413622

Crossroad Camera C++ Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
detection time(ms)3050.1312.2275.3342--
fps32143,13.63.09.83.7

Human Pose Estimation C++ Demo

デモの実行

速度比較

 ※「2021.3」で変更あり。比較データ無し。

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
SYNCOpwnCV cap/render timems59.6363716.5--
Wallclock timems45100710248510--
fps13101.44.11.93--
Detection timems4595677205503--
fps22101.54.01.8--
ASYNCOpwnCV cap/render timems914693628--
Wallclock timems509571242536--
fps19101.4242.0--

Object Detection C++ Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
Latency(ms)2245259.3145.116278.2316.1
fps73.042.37.513.011.823.815.6

Smart Classroom C++ Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
fps2112132.36.423

Pedestrian Tracker C++ Demo

デモの実行

Super Resolution C++ Demo

デモの実行

Single Human Pose Estimation Demo (top-down pipeline)

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
summary (fps)0.90.70.10.50.20.50.3
estimation (fps)5.62.40.31.60.51.21.6
detection (fps)109.969.19.122.214.320.125.1

Interactive Face Detection C++ Demo

デモの実行

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
throughput (fps)19.39.160.450.61.94.892.38

Gaze Estimation Demo

デモの実行

速度比較]

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
Overeli (fps)1106355142419
Interface (fps)20210657163625

Security Barrier Camera C++ Demo

デモの実行]

速度比較

項目Core™
i5-10210
Hyper-V Core™
i7-6700
Celeron®
J4005
Celeron®
J4005 + NCS2
Hyper-v Core™
i7-6700
VirtualBox Core™
i7-6700
VirtualBox Core™
i7-6700 + NCS2
fps164.510611.724.725.954.333.0

Image Inpainting Python Demo

デモの実行

Colorization Python Demo

デモの実行

Image Deblurring Python* Demo

デモの実行

Hello Query Device Python* Sample

デモの実行

テスト環境

 

更新履歴

参考資料


Last-modified: 2021-06-20 (日) 05:23:59