Hello,
I'm trying to run the Objection Detection Sample (object_detection.cpp) from the opencv repo. I'm using "faster_rcnn_inception_v2_coco_2018_01_28" model from open model zoo. But I'm experiencing error when I my code reaches net.forward()->...->initInfEngine().
Stack Trace:
opencv_world410d.dll!cv::dnn::DetectionOutputLayerImpl::initInfEngine(const std::vector<cv::ptr<cv::dnn::dnn4_v20190412::backendwrapper>,std::allocator<cv::ptr<cv::dnn::dnn4_v20190412::backendwrapper> > > & __formal) Line 956 C++
opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::Impl::initInfEngineBackend() Line 1679 C++ opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::Impl::initBackend() Line 1396 C++ opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::Impl::setUpNet(const std::vector<cv::dnn::dnn4_v20190412::layerpin,std::allocator<cv::dnn::dnn4_v20190412::layerpin> > & blobsToKeep_) Line 1255 C++
opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::forward(const cv::debug_build_guard::_OutputArray & outputBlobs, const std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > & outBlobNames) Line 2844 C++
Obj_demo.exe!main(int argc, char * * argv) Line 150 C++
OS: Windows 10
IDE: Visual Studio 2015
Opencv 4.1.0 (opencv-master)
Openvino 2019 R1
Test 1: crash
modelPath = frozen_inference_graph.pb from faster_rcnn_inception_v2_coco_2018_01_28.tar.gz
configPath = faster_rcnn_inception_v2_coco_2018_01_28.pbtxt
Test 2: Same as test1, except I put the model through Openvino's model optimizer. Still crashes.
python "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.087\deployment_tools\model_optimizer/mo_tf.py" --input_model=C:\models\faster_rcnn_inception_v2_coco_2018_01_28\frozen_inference_graph.pb --tensorflow_use_custom_operations_config "C:\Program Files (x86)\IntelSWTools\openvino_2019.1.087\deployment_tools\model_optimizer\extensions\front\tf\faster_rcnn_support.json" --tensorflow_object_detection_api_pipeline_config C:\models\faster_rcnn_inception_v2_coco_2018_01_28\pipeline.config
And then I feed the xml and bin to dnn:readnet()
Test3: Use DNN_BACKEND_OPENCV, works. (just for information)
net.setPreferableBackend(DNN_BACKEND_OPENCV);
Appreciate any help!