Closed love6tao closed 4 years ago
Dearest @love6tao
I can promise you that your environment variables are incorrect and this is exactly why you're having such errors. Let's solve this problem using the following methodical steps:
1) Build Inference Engine as DEBUG (so you can step through and debug your code). Use this README. However if you want to build with Python API, then use Python API README
2) Copy the following classification_sample to a new sample folder in the same location - rename it to something unique https://github.com/opencv/dldt/tree/2019/inference-engine/samples/classification_sample
3) Put your code in the newly created folder. Modify what you need to. You will have to change set (TARGET_NAME "classification_sample") in the CMakeLists.txt and also the name of the header file .
4) Study this Open Model Zoo Demos README as a guide but the most important things from this README are the following:
please set InferenceEngine_DIR to a CMake folder you built the dldt project from, for example
/inference-engine/build Please also set the OpenCV_DIR variable pointing to the required OpenCV package.
5) Rebuild your samples only by creating a build directory in your samples folder and for Windows, cmake -G "Visual Studio 15 2017 Win64" . For Linux it will just be something like cmake -DCMAKE_BUILD_TYPE=Debug && make -j2
But in step 4 you must point 2 environment variables to the binaries you built in step 1.
I realize that this approach may not be quite as independent as you had hoped but when things don't work as an OpenVino independent project, it's because of environment variable issues. But you have to start with simple baby steps first and get that working.
OpenVino does officially support CMake integration. So if you would like to write your own application you simply need to create a CMake project and just call find_package(InferenceEngine) inside (similarly to how it's done for the samples). And in this case all the includes and libraries are available by InferenceEngine_INCLUDE and _LIBRARIES correspondingly. But even in this case the OpenVino application writer should configure InferenceEngine_DIR accordingly (pointing to the folder with InferenceEngineConfig.cmake).
Hope this works for you ! Please post here should you have questions.
Thanks,
Shubha
Hi,
I also have the same issue. When you say
please set InferenceEngine_DIR to a CMake folder you built the dldt project from, for example
/inference-engine/build
Do you mean I should make InferenceEngine_DIR as an environment variable and set it to the build folder?
@mmbajo that is correct export InferenceEngine_DIR=/path/to/openvino/build/
, please refer to Add Inference Engine to Your Project section of the build instructions.
Closing this, feel free to reopen and ask additional questions related to this topic.
Win10+win32(vs2015)+openvino_2019.1.148 +i7-8750 I want to build a win32 project independently to test my deep learning model. But just after writing the following lines of code, there is a problem running, I don't know why, the related lib and dll I have added, this problem has plagued me for a week.
Openvino can run my converted model under cmd, but I can't load MKLDNNPlugind in a separate project.