- 前言:介紹windows跑OpenVINO
tags: 六角學院
主題:雜亂大全39-OpenVINO (中)windows範例demo1
本篇重點:
- 接續前篇介紹OpenVINO
- 實作windows跑OpenVINO
win10測試
- 先到官方下載
- (我是選用LTS版本,比較穩定)
- 安裝相依開發工具
包含
1.Microsoft Visual Studio* with C++ 2019, 2017, or 2015
2.CMake
3.Python3.7 - 設定環境變數(CMD指令)
1
$ cd C:\Program Files (x86)\IntelSWTools\openvino\bin\
1
$ setupvars.bat
- 驗證執行Demo腳本-車輛偵測車牌識別範例
1
$ cd C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\
1
$ demo_security_barrier_camera.bat
- 演算過程
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo>demo_security_barrier_camera.bat
target_precision = FP16
Python 3.7.1
[setupvars.bat] OpenVINO environment initialized
INTEL_OPENVINO_DIR is set to C:\Program Files (x86)\IntelSWTools\openvino
Python 3.7.1
ECHO 已關閉。
Requirement already satisfied: pyyaml in c:\users\liaozz\anaconda3\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\..\open_model_zoo\tools\downloader\requirements.in (line 1)) (3.13)
Requirement already satisfied: requests in c:\users\liaozz\anaconda3\lib\site-packages (from -r C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\..\open_model_zoo\tools\downloader\requirements.in (line 2)) (2.21.0)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\liaozz\anaconda3\lib\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\..\open_model_zoo\tools\downloader\requirements.in (line 2)) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\liaozz\anaconda3\lib\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\..\open_model_zoo\tools\downloader\requirements.in (line 2)) (2018.11.29)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\users\liaozz\anaconda3\lib\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\..\open_model_zoo\tools\downloader\requirements.in (line 2)) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\liaozz\anaconda3\lib\site-packages (from requests->-r C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\..\open_model_zoo\tools\downloader\requirements.in (line 2)) (3.0.4)
python "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\tools\downloader\downloader.py" --name "vehicle-license-plate-detection-barrier-0106" --output_dir "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir" --cache_dir "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\cache"
################|| Downloading models ||################
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP32\vehicle-license-plate-detection-barrier-0106.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP32\vehicle-license-plate-detection-barrier-0106.bin from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.bin from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP16-INT8\vehicle-license-plate-detection-barrier-0106.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP16-INT8\vehicle-license-plate-detection-barrier-0106.bin from the cache
################|| Post-processing ||################
python "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\tools\downloader\downloader.py" --name "license-plate-recognition-barrier-0001" --output_dir "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir" --cache_dir "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\cache"
################|| Downloading models ||################
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP32\license-plate-recognition-barrier-0001.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP32\license-plate-recognition-barrier-0001.bin from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.bin from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP16-INT8\license-plate-recognition-barrier-0001.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP16-INT8\license-plate-recognition-barrier-0001.bin from the cache
################|| Post-processing ||################
python "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\tools\downloader\downloader.py" --name "vehicle-attributes-recognition-barrier-0039" --output_dir "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir" --cache_dir "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\cache"
################|| Downloading models ||################
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP32\vehicle-attributes-recognition-barrier-0039.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP32\vehicle-attributes-recognition-barrier-0039.bin from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.bin from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP16-INT8\vehicle-attributes-recognition-barrier-0039.xml from the cache
========== Retrieving C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP16-INT8\vehicle-attributes-recognition-barrier-0039.bin from the cache
################|| Post-processing ||################
###############|| Generate VS solution for Inference Engine demos using cmake ||###############
等候 0 秒後,請按任何一個鍵繼續 ...
Creating Visual Studio 16 2019 x64 files in C:\Users\liaozz\Documents\Intel\OpenVINO\inference_engine_demos_build...
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.27.29112.0
-- The CXX compiler identification is MSVC 19.27.29112.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check size of __int32
-- Check size of __int32 - done
-- Found OpenCV: C:/Program Files (x86)/IntelSWTools/openvino/opencv (found version "4.3.0") found components: core imgproc
-- Found InferenceEngine: C:/Program Files (x86)/IntelSWTools/openvino/deployment_tools/inference_engine/lib/intel64/Release/inference_engine.lib (Required is at least version "2.0")
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/liaozz/Documents/Intel/OpenVINO/inference_engine_demos_build
等候 0 秒後,請按任何一個鍵繼續 ...
###############|| Build Inference Engine demos using MS Visual Studio (MSBuild.exe) ||###############
等候 0 秒後,請按任何一個鍵繼續 ...
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" Demos.sln /p:Configuration=Release /t:security_barrier_camera_demo /clp:ErrorsOnly /m
Microsoft (R) Build Engine for .NET Framework 16.7.0+b89cb5fde 版
Copyright (C) Microsoft Corporation. 著作權所有,並保留一切權利。
等候 0 秒後,請按任何一個鍵繼續 ...
###############|| Run Inference Engine security barrier camera demo ||###############
等候 0 秒後,請按任何一個鍵繼續 ...
"C:\Users\liaozz\Documents\Intel\OpenVINO\inference_engine_demos_build\intel64\Release\security_barrier_camera_demo.exe" -i "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car_1.bmp" -m "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-license-plate-detection-barrier-0106\FP16\vehicle-license-plate-detection-barrier-0106.xml" -m_lpr "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\license-plate-recognition-barrier-0001\FP16\license-plate-recognition-barrier-0001.xml" -m_va "C:\Users\liaozz\Documents\Intel\OpenVINO\openvino_models\ir\intel\vehicle-attributes-recognition-barrier-0039\FP16\vehicle-attributes-recognition-barrier-0039.xml" -d CPU -d_va CPU -d_lpr CPU
[ INFO ] InferenceEngine: 00007FF9A9361340
[ INFO ] Files were added: 1
[ INFO ] C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car_1.bmp
[ INFO ] Loading device CPU
CPU
MKLDNNPlugin version ......... 2.1
Build ........... 2020.3.1-3500-68236d2e44c-releases/2020/3
[ INFO ] Loading detection model to the CPU plugin
[ INFO ] Loading Vehicle Attribs model to the CPU plugin
[ INFO ] Loading Licence Plate Recognition (LPR) model to the CPU plugin
[ INFO ] Number of InferRequests: 1 (detection), 3 (classification), 3 (recognition)
[ INFO ] 4 streams for CPU
[ INFO ] Display resolution: 1920x1080
[ INFO ] Number of allocated frames: 3
[ INFO ] Resizable input with support of ROI crop and auto resize is disabled - 完成結果
- 驗證執行Demo腳本-語音文字識別
1
$ demo_speech_recognition
- 執行結果-辨識how are you的語音檔
補充資料
- [1]OpenVINO学习笔记(八)凝视估计演示
https://mc.dfrobot.com.cn/thread-306009-1-1.html - [2]使用OpenVino的預訓練模型進行人臉識別
https://chtseng.wordpress.com/2019/08/09/%E4%BD%BF%E7%94%A8openvino%E9%80%B2%E8%A1%8C%E4%BA%BA%E8%87%89%E8%AD%98%E5%88%A5/ - [3]Face Detection with OpenVINO on Raspberry Pi
https://www.hackster.io/glowascii/face-detection-with-openvino-on-raspberry-pi-bac869 - [4]【邊緣AI系列】 OpenVINO C++範例編譯建置
https://medium.com/@grady1006/%E9%82%8A%E7%B7%A3ai%E7%B3%BB%E5%88%97-openvino-c-%E7%AF%84%E4%BE%8B%E7%B7%A8%E8%AD%AF%E5%BB%BA%E7%BD%AE-53ea5d08d247 - [5]OpenVINO之二:Windows环境下OpenVINO安装与配置
https://blog.csdn.net/shanglianlm/article/details/89286218
後記:
下一篇將介紹以windows執行的組合結果
- 若有任何問題↓
- 請聯繫我:
liao86221@gmail.com
- 或填表: https://forms.gle/4FB5Tmtd9A7XcXjF8