私的AI研究会 > OpenVINO18

OpenVINO™ Toolkit for Linux (番外編)

 OpenVINO™ツールキットの最新版「2021.3」を 「Celeron® N3050」上の ubuntu20.04 にインストールする。
 Webサーバーとして使用していたマシンをOSを入れ替えてこの用途で動作するかをテストしてみる。

※ 最終更新: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
    ※ 1度エラーで終了したので再試行
  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. 設定確認
      $ 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行を追記する。
     

Open Model Zoo Demos

OpenVINO™ Benchmark Test

OpenVINO™ ベンチマークテスト実行結果

項目Core™ i7-1185G7Core™ i3-1115G4Core™ i5-10210UCore™ i7-6700Core™ i7-2620MCeleron® N3050
GPU(32)GPU(16)CPU(32)CPU(16)
Duration (ms)13322263234223894332211929332467160666
Latency (ms)5.177.859.429.603.898.419.9022.2157.54
Throughput (fps)751442427419230.847234140.516.48

Neural Compute Stick 2 (NCS2) の実行速度

項目NCS2
Core™ i7-1185G7Core™ i3-1115G4Core™ i5-10210UCore™ i7-6700Core™ i7-2620MRaspberry Pi4※Celeron® N3050
Duration (ms)35053601347737161065935338176
Latency (ms)14.014.2913.8614.6941.0414.0833.23
Throughput (fps)28527828826993.8283.07122.31

  ※ CPU Broadcom 2711/4コア1.5GHz Arm Cortex-A72

Open Model Zoo Demos

3D Human Pose Estimation Python* Demo

Action Recognition Python* Demo

Object Detection Python* Demo

Human Pose Estimation Python* Demo

Gesture Recognition Python* Demo

Handwritten Text Recognition Demo

Text Detection C++ Demo

Crossroad Camera C++ Demo

Human Pose Estimation C++ Demo

Object Detection C++ Demo

Smart Classroom C++ Demo

Pedestrian Tracker C++ Demo

Super Resolution C++ Demo

Single Human Pose Estimation Demo (top-down pipeline)

Interactive Face Detection C++ Demo

Gaze Estimation Demo

Security Barrier Camera C++ Demo

Image Inpainting Python Demo

Colorization Python Demo

Image Deblurring Python* Demo

Hello Query Device Python* Sample

 使用可能なすべての推論エンジン デバイスを照会し、サポートされているメトリックと既定の構成値を出力する。

 

テスト環境

 

更新履歴

参考資料


Last-modified: 2021-07-08 (木) 05:24:36