- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use opencv dnn module to perform object detection. I am using movidius neural compute stick with openvino toolkit.
Code is as below:
# load the DNN model
model = cv2.dnn.readNet(model=model_path, config=config_path, framework='TensorFlow')
model.setPreferableBackend(cv2.dnn.DNN_BACKEND_INFERENCE_ENGINE)
model.setPreferableTarget(cv2.dnn.DNN_TARGET_MYRIAD)
Getting an error message:
output = model.forward()
cv2.error: OpenCV(4.5.3-openvino) C:\jenkins\workspace\windows6296ace0\opencv\modules\dnn\src\ie_ngraph.cpp:738: error: (-2:Unspecified error) Failed to initialize Inference Engine backend (device = MYRIAD): Failed to allocate graph: NC_ERROR in function 'cv::dnn::InfEngineNgraphNet::initPlugin'
Could someone please help me resolve it. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @rohit12, that's rights, in case of OpenVINO backend in OpenCV DNN you have to supply model in IR form only
Regards,
Vladimir
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@rohit12 according to error message, runtime was not able to allocate network graph on device. Potentially your model might be too big to be loaded into NCS2 device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Vladimir_Dudnik ,
is it necessary that the model should always be in intermediate representation (IR) format that is .xml and .bin to execute it on NCS2?
In the above query I am passing .pb and .pbtxt files which is tensorflow format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi rohit12,
Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @rohit12, that's rights, in case of OpenVINO backend in OpenCV DNN you have to supply model in IR form only
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page