After installing and successfully run the OpenVino demos in my PC I start implementing a basic application in Qt with this library. I made the linking as Intel's documentation describes and the application successfully compiled.
auto plugin = PluginDispatcher({L""}).getPluginByDevice("CPU");
auto netBuilder = new CNNNetReader();
netBuilder->ReadNetwork("../TestModel/squeezenet1.1.xml");
netBuilder->ReadWeights("../TestModel/squeezenet1.1.bin");
auto network = netBuilder->getNetwork();
netBuilder->getNetwork().setBatchSize(1);
The application pops an exception when debugger reach getPluginByDevice call (getSuitablePlugin method from ie_plugin_dispacher.hpp (line 73)).
I am using MSVC2017 64bit with Qt 5.11.1 in a Windows 10 machine. The .pro file library call is:
#OpenVino
INCLUDEPATH += $$PWD/inference_engine/include
LIBS += -L$$PWD/inference_engine/lib/intel64/Release
LIBS += -linference_engine -llibiomp5md
Is anyone experienced the same or has an idea what's going on?
Thanks in advance,
Thanasis
The release libraries were causing the problem. When I switched to the debug ones (inference_engined.lib insted of inference_engine.lib) the application run successfully.
EDIT
I paste the code from .pro file in case someone face the same problem.
#OpenVino
INCLUDEPATH += $$PWD/inference_engine/include
CONFIG(release, debug|release):BuildVar=release
CONFIG(debug, debug|release):BuildVar=debug
equals(BuildVar,debug) {
message(Debug Mode)
LIBS += -L$$PWD/inference_engine/lib/intel64/Debug
LIBS += -linference_engined
}
equals(BuildVar,release) {
message(Release Mode)
LIBS += -L$$PWD/inference_engine/lib/intel64/Release
LIBS += -linference_engine
}