- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone.
I am making my own program with OpenVINO and MFC but when I want to load the model to the plugin (in Release mode) :
_executable_network = _plugin.LoadNetwork(_network, {});
I get a lot of exceptions :
Is there a way to fix this ?
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daraen,
These kinds of exceptions can happen for any reason. Here's what i recommend.
Clone our open source repo:
https://github.com/opencv/dldt
Follow the below README to build a debug version of IE:
https://github.com/opencv/dldt/blob/2019/inference-engine/README.md
If you step through the IE source code, you will find out exactly why the exception is happening. Make sure you build your IR using the model optimizer from the dldt also.
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(Edit : I fixed the issue by downloading 'Ade' and putting in inference-engine/thirdparty/ade)
Hello Shubha,
Thank you for your reply.
I downloaded the source code and followed the instructions from the README but I have a problem with the step 5 asking me to use cmake.
Here's a part of the problem given by the console :
CMake Error at thirdparty/fluid/modules/gapi/cmake/standalone.cmake:2 (find_package): By not providing "Findade.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ade", but CMake did not find one. Could not find a package configuration file provided by "ade" (requested version 0.1.0) with any of the following names: adeConfig.cmake ade-config.cmake Add the installation prefix of "ade" to CMAKE_PREFIX_PATH or set "ade_DIR" to a directory containing one of the above files. If "ade" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): thirdparty/fluid/modules/gapi/CMakeLists.txt:4 (include) -- Configuring incomplete, errors occurred! See also "C:/Users/TC/Desktop/repo/dldt-2019/inference-engine/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/TC/Desktop/repo/dldt-2019/inference-engine/build/CMakeFiles/CMakeError.log".
I use the 19.0 version of Intel C++ Compiler (given by the Intel System Studio Community Licence I downloaded before).
Do you have a way to fix this issue ?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daraen, use the below command. Change the 18.0 to a 19.0. Yes it works, I use ICC 19.0 too. Make sure you run these commands from the Compiler 19.0 ...Visual Studio Environment though. This ensures that all the ICC environment variables are set. It's basically a DOS Shell with ICC environment variables set. Go to Start and search for Compiler, you will see it.
cmake -G "Visual Studio 15 2017 Win64" -T "Intel C++ Compiler 19.0" ^ -DCMAKE_BUILD_TYPE=Release ^ -DICCLIB="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib" ..
If you run into further issues to the following:
delete everything under inference-engine/build
Set OpenCV_DIR="" (basically set the OpenCV_DIR environment variable to an empty string)
Make sure that the wget executable and its dependencies are in your PATH
Start from scratch (run the cmake command from the README)
Build (make -j16 on Ubuntu)
Those steps should work for you. Thanks for using OpenVino !
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Shubha,
Thank you for your reply.
Now I have the build given by the cmake command but I don't know what I'm supposed to do.
Can you guide me ?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dearest Daraen,
Congratulations ! You have made great progress. Remember, how do you run classification_sample.exe from a Command Shell ? Remember those command-line arguments because you will use them within Visual Studio.
For debugging C++ samples and IE using Visual Studio:
1) open VStudio x64 Native Tools Command Prompt
2) Run the batch file setupvars.bat
3) Run devenv /UseEnv which brings up Visual Studio
For Inference Engine, of course use Visual Studio. To debug Inference Engine code (modify code, add cout statements to see what’s going on, recompile, etc…)
Build a DEBUG version of dldt (open source) IE using these steps:
https://github.com/opencv/dldt/blob/2018/inference-engine/README.md
You have already done this ! Congrats !
The dldt inference engine falls a little behind the non-open source version so sometimes you get this error when you run one of the dldt (open source) samples with IR built using the non-open source, so check that first:
[ ERROR ] Error reading network: cannot parse future versions: 5 - it means you use some newest version of the IR but the inference engine is still old.
To avoid this problem try generating IR with the dldt version of model optimizer also rather than use IR that was generated with the non-open source version. Sometimes that doesn’t always help though.
Please read this github issue for further details on this error:
https://github.com/opencv/open_model_zoo/issues/71
Also don’t forget, when you use Visual studio you must create DEBUG Builds and set command-line arguments in the debugger (just as you would when you run the exe from a DOS shell).
How do you set command-line arguments in Visual Studio Debugger ?
If you follow these steps and have built your app as debug also, if you step through the code in your app, you will also step through the code within IE and determine the cause of your exceptions. Choose one of the samples here and modify it, or create a new sample by copying an existing one into a new folder (with a different name) and rebuild IE as DEBUG:
https://github.com/opencv/dldt/tree/2019/inference-engine/samples
And step through your code. That should do it. Trust me, I have done this before myself !
Best of luck. Please post your results here.
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Shubha.
Thank you for your reply,
I tried to generate a sample with VS in Debug mode but I get an issue saying that VS couldn't locate "icl.exe".
Maybe you have an idea to fix this ?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I used Debug mode and moved point to point to find where the issue is.
I found this (ie_plugin_cpp.hpp file, the CALL_STATUS_FNC define give the issue) :
ExecutableNetwork LoadNetwork(CNNNetwork network, const std::map<std::string, std::string> &config) { IExecutableNetwork::Ptr ret; CALL_STATUS_FNC(LoadNetwork, ret, network, config); if (ret.get() == nullptr) THROW_IE_EXCEPTION << "Internal error: pointer to executable network is null"; return ExecutableNetwork(ret); }
Here's CALL_STATUS_FNC define (ie_exception_conversion.hpp) :
#define CALL_STATUS_FNC(function, ...)\ ResponseDesc resp;\ auto res = actual->function(__VA_ARGS__, &resp);\ if (res != OK) InferenceEngine::details::extract_exception(res, resp.msg);
Maybe you have an idea ?
Thank you and have a nice day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daraen:
Please see my answer to your other forum post here:
https://software.intel.com/en-us/forums/computer-vision/topic/808636
If you put your app under here :
https://github.com/opencv/dldt/tree/2019/inference-engine/samples
And rebuild IE with cmake --build . --config Debug (or build the generated VS Solution as Debug) you should be able to build IE and your sample as Debug. If you build your app by starting with one of the samples, you will not have all these issues regarding finding various DLLs. Start from a sample (copy a sample folder into a new folder, rename it to your app) and make changes incrementally, you should not have these issues.
The below post should help you (take a look at how all the paths are defined in the CMakefiles).
https://software.intel.com/en-us/forums/computer-vision/topic/806679
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Shubha,
Thank you for your reply.
When I'm launching my application (from the dldt and built thanks to a CMakefiles as mentionned) or a sample from the dldt, I got an issue saying that "icl.exe" is not found.
Maybe I have to put a reference in the projet but I don't know where. Maybe I have forgotten a step during the building of the dldt ?
Thank you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page