windows系统下openvino对推理引擎例子的编译操作
流程图:
打开cmd,初始化环境变量
cd C:\Intel\computer_vision_sdk_2018.5.456\bin
运行setupvars.bat
打开inference_engine\samples目录
cd C:\Users\czw\Desktop\inference_engine\samples
运行create_msvc2017_solution.bat--生成windows系统下的msvc文件
然后转到C:\Users...\OpenVINO\inference_engine_samples_2017目录下
我们可以看到.sln/.vcxproj/.vcxproj.filters等文件,然后用Visual Studio C++工具继续编译。点击Samples.sln文件,用Miscroso Visual Studio 2017打开
我们可以看到右侧的资源视图中有原inference_engine\samples目录下的32个项目,然后点击 项目-属性 可以看到
10.JPG
接下来就是最重要的工作了---配置文件
(1)配置属性-常规
输出目录:
C:\Users\czw\Documents\Intel\OpenVINO\inference_engine_samples_2017\intel64\Debug
C/C++ - 常规:附加包含目录
C:\Intel\computer_vision_sdk_2018.5.456\deployment_tools\inference_engine\include;
C:\Users\czw\Desktop\inference_engine\samples\common\format_reader;
C:\Users\czw\Documents\Intel\OpenVINO\inference_engine_samples_2017\intel64\gflags\include;
C:\Users\czw\Desktop\inference_engine\samples\common;
C:\Intel\computer_vision_sdk_2018.5.456\deployment_tools\inference_engine\src\extension;
C:\Users\czw\Documents\Intel\OpenVINO\inference_engine_samples_2017\thirdparty\gflags\include;
C:\Intel\computer_vision_sdk_2018.5.456\opencv\include;%(AdditionalIncludeDirectories)
(2)链接器-输入
附加依赖项:
..\intel64\Debug\format_reader.lib;
..\intel64\Debug\cpu_extension.lib;
C:\Windows\System32\inference_engined.lib;
..\intel64\Debug\gflags_nothreads_static.lib;
C:\Intel\computer_vision_sdk_2018.5.456\opencv\lib\opencv_world401d.lib;
-nodefaultlib:vcomp;
C:\Intel\computer_vision_sdk_2018.5.456\deployment_tools\inference_engine\lib\intel64\Debug\libiomp5md.lib;
shlwapi.lib;
kernel32.lib;
user32.lib;
gdi32.lib;
winspool.lib;
shell32.lib;
ole32.lib;
oleaut32.lib;
uuid.lib;
comdlg32.lib;
advapi32.lib
(3)在本地添加
将C:\Intel\xxx\inference_engine\bin\intel64\Debug和C:\Intel\xxx\inference_engine\lib\intel64\Debug下的
inference_engined.dll
libiomp5md.dll
inference_engined.lib
libiomp5md.lib
加入到本地C:\Windows\System32目录下
然后用本地windows调试器生成,结果如下:
这时候C:\Users\xxx\Documents\Intel\OpenVINO\inference_engine_samples_2017\intel64\Debug目录下就有了这些可执行文件
验证
cd C:...\OpenVINO\inference_engine_samples_2017\intel64\Debug
security_barrier_camera_demo -i 路径 -m 模型