私的AI研究会 > OpenVINO20
推論機能の実装に特化した「OpenVINO™ ツールキット」の使い方を検討する。
OpenVINO™ ツールキットインストール環境でこれまでに作成した各種プログラムを OpenVINO ランタイム・パッケージ環境で実行できるようにして検証する。
※ 上記引用 → 無料で使えるインテル社のAI導入ツール 業種を問わない万能さで注目のOpenVINOツールキットに迫る
※ OpenVINO は Version2022.1以降 API2.0 に変更されているので、ここでは以前のAPIで使える Version2021.4LTSを使用する。
OpenVINO™ ランタイムパッケージが未インストールの場合は → 別項参照
種別 | 機能 | プログラム名 |
感情分析 | 画像から顔を特定しディープラーニングで感情推論 | emotion3.py |
年齢/性別分析 | 顔を特定しディープラーニングで年齢/性別を推論 | age_gender3.py |
リアルタイム感情分析 | 「顔検出」と「感情分類」を組合せ、リアルタイムにグラフ表示や画像表示 | sentiment_analysis3.py |
顔追跡 | 機械学習で画像から人物の顔を検出し、フレーム間での一致を調べて、追跡 | face-tracking3.py |
マスク着用の検査 | 顔認識の推論モデルとマスク着用検出推論モデルを使ってマスク着用の有無を調べる | face_mask3.py |
人物追跡 | 機械学習で画像から人物を検出し、人物のフレーム間での一致を調べて、追跡 | person-tracking3.py |
物体検出(YOLO V3) | YOLO(You only Look Once)V3 アルゴリズムによりディープラーニングで 80種類のオブジェクトを検出 | object_detect_yolo3_3.py |
物体検出(YOLO V5) | YOLO(You only Look Once)V5 アルゴリズムによりディープラーニングで 80種類のオブジェクトを検出 | object_detect_yolo5.py |
画像分類 | Caffe の学習済み軽量化モデル「squeezenet1.1」を使って、画像分類 | image_classification3.py |
メガネ・帽子 バーチャル試着 | 顔認識の推論モデルを使って「メガネ」「帽子」の試着 | virtual_fitting3.py |
コマンドオプション | デフォールト設定 | 意味 | ※注 |
-h, --help | - | ヘルプ表示 | |
-i, --input | cam | カメラ(cam)または動画・静止画像ファイル | ※1 |
-m_dt, --m_detector | ※ | IR フォーマットの検出モデル | ※2 |
-m_re, --m_recognition | ※ | IR フォーマット推論モデル | ※21 |
-d, --device | CPY | デバイス指定 (CPU/GPU/MYRIAD) | |
--log | 3 | ログ出力レベル(0/1/2/3/4/5) | |
-l, --language | jp | 言語 (en/jp) | ※2 |
-t, --title | y | タイトル表示 (y/n) | |
-s, --speed | y | スピード計測表示 (y/n) | |
-o, --out | non | 処理結果を出力する場合のファイルパス |
(py37) $ cd ~/workspace_py37/openvino/ (py37) $ python3 プログラム名~Windows の場合
(py37) > cd X:\anaconda_win\workspace_py37\openvino\ (py37) > python プログラム名~
コマンドオプション「-i 0」の指定により各種サンプル画像に対する機能確認ができる
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python emotion3.py Starting.. - Program title : Emotion Recognition 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : cam - m_detect : ../../model/intel/FP32/face-detection-adas-0001.xml - m_recognition : ../../model/intel/FP32/emotions-recognition-retail-0003.xml - Device : CPU - Log level : 3 - Language : jp - Input Shape1 : data - Output Shape1 : detection_out - Input Shape2 : data - Output Shape2 : prob_emotion - Program Title : y - Speed flag : y - Processed out : non FPS average: 20.80 Finished.
(py37w) > python emotion3.py -h usage: emotion3.py [-h] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_re M_RECOGNITION] [-d DEVICE] [--log LOG] [-l LANGUAGE] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is 'cam' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- detection-adas-0001.xml -m_re M_RECOGNITION, --m_recognition M_RECOGNITION Emotion Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/emotions-recognition- retail-0003.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -l LANGUAGE, --language LANGUAGE Language.(jp/en) Default value is 'jp' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python age_gender3.py Starting.. - Program title : Age/Gender Recognition 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : cam - m_detect : ../../model/intel/FP32/face-detection-adas-0001.xml - m_recognition : ../../model/intel/FP32/age-gender-recognition-retail-0013.xml - Device : CPU - Log level : 3 - Language : jp - Input Shape1 : data - Output Shape1 : detection_out - Input Shape2 : data - Output Shape2 : age_conv3 - Program Title : y - Speed flag : y - Processed out : non FPS average: 20.10 Finished.
(py37w) > python age_gender3.py -h usage: age_gender3.py [-h] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_re M_RECOGNITION] [-d DEVICE] [--log LOG] [-l LANGUAGE] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is 'cam' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- detection-adas-0001.xml -m_re M_RECOGNITION, --m_recognition M_RECOGNITION Recognition Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/age- gender-recognition-retail-0013.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -l LANGUAGE, --language LANGUAGE Language.(jp/en) Default value is 'jp' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python sentiment_analysis3.py Starting.. - Program title : Real-time sentiment analysis 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : cam - m_detect : ../../model/intel/FP32/face-detection-retail-0004.xml - m_recognition : ../../model/intel/FP32/emotions-recognition-retail-0003.xml - Device : CPU - Log level : 3 - Language : jp - Program Title : y - Speed flag : y - Processed out : non FPS average: 19.50 Finished.
(py37w) > python sentiment_analysis3.py -h usage: sentiment_analysis3.py [-h] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_re M_RECOGNITION] [-d DEVICE] [--log LOG] [-l LANGUAGE] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is 'cam' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- detection-retail-0004.xml -m_re M_RECOGNITION, --m_recognition M_RECOGNITION Recognition Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/emotions-recognition- retail-0003.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -l LANGUAGE, --language LANGUAGE Language.(jp/en) Default value is 'jp' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python face-tracking3.py Starting.. - Program title : Face Tracking 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : ../../Videos/video001.mp4 - m_detect : ../../model/intel/FP32/face-detection-0200.xml - m_redient. : ../../model/intel/FP32/face-reidentification-retail-0095.xml - Device : CPU - Threshold : 0.5 - Log level : 3 - Program Title : y - Speed flag : y - Processed out : non FPS average: 23.70 Finished.
(py37w) > python face-tracking3.py -h usage: face-tracking3.py [-h] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_re M_REIDENTIFICATION] [-d DEVICE] [--threshold FLOAT] [--log LOG] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is '../../Videos/video001.mp4' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- detection-0200.xml -m_re M_REIDENTIFICATION, --m_reidentification M_REIDENTIFICATION Reidentification Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- reidentification-retail-0095.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --threshold FLOAT Threshold for detection. --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python face_mask3.py Starting.. - Program title : Face Mask Detection 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : ../../Images/mask-test.jpg - m_detect : ../../model/intel/FP32/face-detection-adas-0001.xml - m_mask : ../../model/face_mask.xml - Device : CPU - Log level : 3 - Language : jp - Input Shape1 : data - Output Shape1 : detection_out - Input Shape2 : data - Output Shape2 : fc5 - Program Title : y - Speed flag : y - Processed out : non FPS average: 6.70 Finished.
(py37w) > python face_mask3.py -h usage: face_mask3.py [-h] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_mk M_MASK] [-d DEVICE] [--log LOG] [-l LANGUAGE] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is '../../Images/mask-test.jpg' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- detection-adas-0001.xml -m_mk M_MASK, --m_mask M_MASK Face-mask Path to an .xml file with a trained model.Default value is ../../model/face_mask.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -l LANGUAGE, --language LANGUAGE Language.(jp/en) Default value is 'jp' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python person-tracking3.py Starting.. - Program title : Person Tracking 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : ../../Videos/video003.mp4 - m_detect : ../../model/intel/FP32/person-detection-retail-0013.xml - m_redient. : ../../model/intel/FP32/person-reidentification-retail-0287.xml - Device : CPU - Threshold : 0.8 - Log level : 3 - Program Title : y - Speed flag : y - Processed out : non FPS average: 11.20 Finished.
(py37w) > python person-tracking3.py -h usage: person-tracking3.py [-h] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_re M_REIDENTIFICATION] [-d DEVICE] [--threshold FLOAT] [--log LOG] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is '../../Videos/video003.mp4' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/person- detection-retail-0013.xml -m_re M_REIDENTIFICATION, --m_reidentification M_REIDENTIFICATION Reidentification Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/person- reidentification-retail-0287.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --threshold FLOAT Threshold for detection. --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python object_detect_yolo3_3.py Starting.. - Program title : TinyYOLO V3 Object detection 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : ../../Videos/car1_m.mp4 - Model : ../../model/public/FP32/yolo-v3-tiny-tf.xml - Device : CPU - Labels File : coco.names_jp - Threshold : 0.6 - Intersection Over Union: 0.25 - Log level : 3 - Program Title : y - Speed flag : y - Processed out : non - Input Shape : [1, 3, 416, 416] - Output Shapes : - output #0 name : conv2d_12/Conv2D/YoloRegion - output shape: [1, 255, 26, 26] - output #1 name : conv2d_9/Conv2D/YoloRegion - output shape: [1, 255, 13, 13] .\object_detect_yolo3_3.py:376: DeprecationWarning: 'outputs' property of InferRequest is deprecated. Please instead use 'output_blobs' property. all_output_results = req_handle.outputs FPS average: 15.40 Finished.
(py37w) > python object_detect_yolo3_3.py -h usage: object_detect_yolo3_3.py [-h] [-i INPUT_IMAGE] [--ir IR_File] [-d DEVICE] [-lb LABEL_FILE] [--threshold FLOAT] [--iou FLOAT] [--log LOG] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is '../../Videos/car1_m.mp4' --ir IR_File Absolute path to the neural network IR xml file.Default value is ../../model/public/FP32/yolo-v3-tiny-tf.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU -lb LABEL_FILE, --labels LABEL_FILE Absolute path to labels file.Default value is 'coco.names_jp' --threshold FLOAT Threshold for detection.Default value is '0.6' --iou FLOAT Intersection Over Union.Default value is '0.25' --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python object_detect_yolo5.py Starting.. - Program title : Object detection YOLO V5 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : ../../Videos/car1_m.mp4 - Model : ../../model/yolov5s.xml - Device : CPU - Label : coco.names_jp - Threshold : 0.5 - Threshold (IOU): 0.4 - Log level : 3 - Program Title : y - Speed flag : y - Processed out : non Starting inference... FPS average: 3.10 Finished.
(py37w) > python object_detect_yolo5.py -h usage: object_detect_yolo5.py [-h] [-i INPUT_IMAGE] [-m MODEL] [-d DEVICE] [-lb LABEL_FILE] [--threshold FLOAT] [--iou FLOAT] [--log LOG] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is '../../Videos/car1_m.mp4' -m MODEL, --model MODEL Model Path to an .xml file with a trained model.Default value is ../../model/yolov5s.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU -lb LABEL_FILE, --labels LABEL_FILE Absolute path to labels file.Default value is 'coco.names_jp' --threshold FLOAT Optional. Probability threshold for detections filteringDefault value is '0.5' --iou FLOAT Optional. Intersection over union threshold for overlapping detections filteringDefault value is '0.4' --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python image_classification3.py Starting.. - Program title : Image Classification 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Input image : cam - Model : ../../model/public/FP32/squeezenet1.1.xml - Device : CPU - Log level : 3 - Label : ./synset_words_jp.txt - Program Title : y - Speed flag : y - Processed out : non FPS average: 19.50 Finished.
(py37w) > python image_classification3.py -h usage: image_classification3.py [-h] [-i INPUT_IMAGE] [-m MODEL] [-d DEVICE] [-l LABEL] [--log LOG] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is 'cam' -m MODEL, --model MODEL Model Path to an .xml file with a trained model.Default value is ../../model/public/FP32/squeezenet1.1.xml -d DEVICE, --device DEVICE Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU -l LABEL, --label LABEL Absolute path to labels file.Default value is c./synset_words_jp.txt --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
(py37w) > cd X:\anaconda_win\workspace_py37\openvino (py37w) > python virtual_fitting3.py Starting.. - Program title : Virtual Fitting 3 - OpenCV version : 4.5.3 - OpenVINO engine: 2021.4.2-3974-e2a469a3450-releases/2021/4 - Item File : cam - Input image : 0 - m_detect : ../../model/intel/FP32/face-detection-retail-0005.xml - m_recognition : ../../model/intel/FP32/landmarks-regression-retail-0009.xml - Device : CPU - Log level : 3 - Program Title : y - Speed flag : y - Processed out : non FPS average: 27.40 Finished.
(py37w) > python virtual_fitting3.py -h usage: virtual_fitting3.py [-h] [-item ITEMINDEX] [-i INPUT_IMAGE] [-m_dt M_DETECTOR] [-m_lm M_LANDMARKS] [-d DEVICE] [--log LOG] [-t TITLE] [-s SPEED] [-o IMAGE_OUT] optional arguments: -h, --help show this help message and exit -item ITEMINDEX, --itemindex ITEMINDEX Item Index number (0-9) -i INPUT_IMAGE, --input INPUT_IMAGE Absolute path to image file or cam for camera stream.Default value is 'cam' -m_dt M_DETECTOR, --m_detector M_DETECTOR Detector Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/face- detection-retail-0005.xml -m_lm M_LANDMARKS, --m_landmarks M_LANDMARKS Landmarks Path to an .xml file with a trained model.Default value is ../../model/intel/FP32/landmarks-regression- retail-0009.xml -d DEVICE, --device DEVICE Optional. Specify a target device to infer on. CPU, GPU, FPGA, HDDL or MYRIAD is acceptable. The demo will look for a suitable plugin for the device specified. Default value is CPU --log LOG Log level(-1/0/1/2/3/4/5) Default value is '3' -t TITLE, --title TITLE Program title flag.(y/n) Default value is 'y' -s SPEED, --speed SPEED Speed display flag.(y/n) Default calue is 'y' -o IMAGE_OUT, --out IMAGE_OUT Processed image file path. Default value is 'non'
以下詳細手順は → 「Anaconda と OpenVINO™ toolkit」 を参照。
$ conda update -n base -c defaults conda
$ conda create -n py37 python=3.7
$ conda activate py37
(py37) $ python -m pip install --upgrade pip
(py37) $ conda install openvino-ie4py-ubuntu20 -c intel・Windows の場合
(py37) $ conda install openvino-ie4py -c intel
(py37) $ conda install munkres
(py37) $ python -c "from openvino.inference_engine import IECore"エラーが出なければインストール OK
$ conda update -n base -c defaults conda
$ conda create -n py38 python=3.8
$ conda activate py38
(py38) $ python -m pip install --upgrade pip
(py38) $ pip install openvino==2022.1.0
(py38) $ python -c "from openvino.inference_engine import IECore"エラーが出なければインストール OK
「2021/4」版対応のプログラムは基本的に問題なく動作する
(py38) PS H:\anaconda_win\workspace_py37\openvino> python -c "from openvino.inference_engine import IECore" Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\izuts\.conda\envs\py38\lib\site-packages\openvino\inference_engine\__init__.py", line 30, in <module> from .ie_api import * ImportError: DLL load failed while importing ie_api: 指定されたモジュールが見つ かりません。Path を追加してエラーが出なくなることを確認する
(py38) > $env:Path="C:\Users\<ユーザー名>\.conda\envs\py38\lib\site-packages\openvino\libs;"+$env:Path (py38) > python -c "from openvino.inference_engine import IECore"
(py38) $ pip install pymupdf Collecting pymupdf Downloading PyMuPDF-1.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 25.3 MB/s eta 0:00:00 Installing collected packages: pymupdf Successfully installed pymupdf-1.21.0
: ## 3. Perform Inference ## # Perform the inference asynchronously req_handle = exec_net.start_async(request_id=0, inputs={input_blob: reshaped_image}) status = req_handle.wait() ## 4. Get results ## all_output_results = req_handle.outputs :↓↓↓ ↓↓↓
: ## 3. Perform Inference ## ## 4. Get results ## all_output_results = exec_net.infer(inputs={input_blob: reshaped_image}) :