- ダウンロードされたパッケージを解凍
$ tar -xvzf l_openvino_toolkit_p_2021.3.394.tgz
- 解凍したパッケージの中にあるインストーラを起動
$ cd l_openvino_toolkit_p_2021.3.394
$ sudo ./install_GUI.sh
- 依存関係の外部パッケージをインストール
$ cd /opt/intel/openvino_2021/install_dependencies
$ sudo -E ./install_openvino_dependencies.sh
- 環境変数の設定
$ source /opt/intel/openvino_2021/bin/setupvars.sh
[setupvars.sh] OpenVINO environment initialized
シェルを起動時に自動的に環境変数を設定するため 「~/.bashrc」ファイルの最後に「source /opt/intel/openvino_2021/bin/setupvars.sh」の1行を追記する。
- Model Optimizer の設定
$ cd /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites
$ sudo ./install_prerequisites.sh
- サンプルデモの実行1 demo_security_barrier_camera.sh
$ cd /opt/intel/openvino_2021/deployment_tools/demo
$ ./demo_security_barrier_camera.sh
- サンプルデモの実行2 demo_squeezenet_download_convert_run.sh
$ ./demo_squeezenet_download_convert_run.sh
- サンプルデモの実行3 demo_benchmark_app.sh
$ ./demo_benchmark_app.sh
- 推論モデルファイルの一括ダウンロード
$ cd ~/openvino_models
$ python3 /opt/intel/openvino_2021/deployment_tools/tools/model_downloader/downloader.py --all
ダウンロードされたモデルは、./public ./intel ディレクトリ配下に格納される。
- Pytorch をインストールする。
オフィシャルサイト PyTorch FROM RESEARCH TO PRODUCTION にアクセスして、インストールパラメータを取得する。
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
- パブリックモデルの一括コンバート
$ python3 /opt/intel/openvino_2021/deployment_tools/tools/model_downloader/converter.py --all
:
[ SUCCESS ] Total execution time: 32.49 seconds.
[ SUCCESS ] Memory consumed: 1783 MB.
FAILED:
cocosnet
efficientdet-d0-tf
efficientdet-d1-tf
googlenet-v3-pytorch
regnetx-3.2gf
rexnet-v1-x1.0
コンバートできないモデルは 6
- 学習済みモデルをまとめる。
このままではアクセスしにくいので、出来上がったIRモデルをディレクトリ「~/model」に移動する。
~/model/intel/FP16
~/model/intel/FP32
~/model/public/FP16
~/model/public/FP32
オリジナル・ソースの場所 /opt/intel/openvino_2021/deployment_tools/open_model_zoo/demos
↓↓↓↓「2021.3」 ↓↓↓↓「2021.2」と同じ構成のディレクトリにコピー
├── 3d_segmentation_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/3d_segmentation_demo/
├── action_recognition_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/action_recognition/
│ └── action_recognition_demo
├── bert_question_answering_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/bert_question_answering_demo/
├── bert_question_answering_embedding_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/bert_question_answering_embedding_demo/
├── classification_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── colorization_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/colorization_demo/
├── common
│ ├── cpp
│ │ ├── models
│ │ │ ├── include
│ │ │ │ └── models
│ │ │ └── src
│ │ ├── monitors
│ │ │ ├── include
│ │ │ │ └── monitors
│ │ │ └── src
│ │ ├── pipelines
│ │ │ ├── include
│ │ │ │ └── pipelines
│ │ │ └── src
│ │ └── utils
│ │ ├── include
│ │ │ └── utils
│ │ └── src
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/common/
│ ├── models
│ ├── monitors_extension
│ └── pipelines
├── crossroad_camera_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── deblurring_demo
│ └── python xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (2021.3 にはない)
├── face_detection_mtcnn_demo
│ └── python xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (2021.3 にはない)
├── formula_recognition_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/formula_recognition_demo/
├── gaze_estimation_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ ├── include
│ └── src
├── gesture_recognition_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/gesture_recognition_demo/
│ └── gesture_recognition_demo
├── handwritten_text_recognition_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/handwritten_text_recognition_demo/
│ ├── data
│ └── utils
├── human_pose_estimation_3d_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/human_pose_estimation_3d_demo
│ ├── data
│ ├── modules
│ └── pose_extractor
│ └── src
├── human_pose_estimation_demo
│ ├── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/human_pose_estimation_demo/
├── image_inpainting_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/image_inpainting_demo/
├── image_retrieval_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/image_retrieval_demo/
│ └── image_retrieval_demo
│ └── roi_cv_detector
├── image_translation_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/image_translation_demo/
│ └── image_translation_demo
├── instance_segmentation_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/instance_segmentation_demo/
│ └── instance_segmentation_demo
├── interactive_face_detection_demo
│ ├── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ └── cpp_gapi --------------------------------------- ~/omz_demos_build/intel64/Release (2021.2 にはない)
├── machine_translation_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/machine_translation_demo/
├── mask_rcnn_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── monodepth_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/monodepth_demo/
├── multi_camera_multi_target_tracking_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/multi_camera_multi_target_tracking_demo/
│ ├── configs
│ ├── mc_tracker
│ └── utils
├── multi_channel_common
│ └── cpp
│ └── multicam
├── multi_channel_face_detection_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── multi_channel_human_pose_estimation_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── multi_channel_object_detection_demo_yolov3
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── object_detection_demo
│ ├── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/object_detection_demo/
├── pedestrian_tracker_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ ├── include
│ └── src
├── place_recognition_demo
│ └── python xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (2021.3 にはない)
│ └── place_recognition_demo
├── security_barrier_camera_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── segmentation_demo
│ ├── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/segmentation_demo/
├── single_human_pose_estimation_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/single_human_pose_estimation_demo/
├── smart_classroom_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ ├── include
│ └── src
├── sound_classification_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/sound_classification_demo/
├── speech_recognition_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/speech_recognition_demo/
│ ├── ctcdecode-numpy
│ │ ├── ctcdecode_numpy
│ │ │ └── yoklm
│ │ └── third_party
│ │ └── ThreadPool
│ └── utils
├── super_resolution_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
├── text_detection_demo
│ └── cpp -------------------------------------------- ~/omz_demos_build/intel64/Release
│ ├── include
│ └── src
├── text_spotting_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/text_spotting_demo/
│ └── text_spotting_demo
├── text_to_speech_demo
│ └── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/text_to_speech_demo/
│ ├── models
│ └── utils
├── thirdparty
│ └── gflags
│ ├── bazel
│ ├── cmake
│ ├── src
│ └── test
│ ├── config
│ └── nc
└── whiteboard_inpainting_demo
└── python >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ~/omz_demos_python/python_demos/whiteboard_inpainting_demo/
└── utils
153 directories