RuntimeError: Failed to allocate graph: MYRIAD device is not opened
验证blob文件的正确性的时候【验证blob文件,文末贴上】,openvino出现了错误,对于错误,找到主要错误:
E: [ncAPI] [ 675891] [python] getFirmwarePath:654 Firmware not found in: /home/shamus/anaconda3/envs/blob/lib/python3.7/site-packages/openvino/libs/usb-ma248x.mvcmd
E: [ncAPI] [ 675891] [python] ncDeviceOpen:919 Can't get firmware, error: NC_ERROR
Traceback (most recent call last):
File "/home/shamus/yuxueshan/NEW/depthai_DDSix_4/conver/check_blob_test.py", line 30, in <module>
exec_net, input_blob = get_net(model_blob)
File "/home/shamus/yuxueshan/NEW/depthai_DDSix_4/conver/check_blob_test.py", line 13, in get_net
exec_net = ie.import_network(model_blob, device_name=device_name)
File "ie_api.pyx", line 463, in openvino.inference_engine.ie_api.IECore.import_network
File "ie_api.pyx", line 494, in openvino.inference_engine.ie_api.IECore.import_network
RuntimeError: Failed to allocate graph: MYRIAD device is not opened.
大体来说,就是找不到usb-ma248x.mvcmd文件,(当然前提是:myriad的库装了)
解决方案:
找到文件的位置【我之前是挨个找的】
如果你的openvino安装的时候用的普通用户,位置是在usr/local/intel/openvino_2022/runtime/lib/intel64/usb-ma2x8x.mvcmd:
复制文件,到你现在环境(一般都是虚拟环境下的安装的openvino库中)
【~/anaconda3/envs/blob/lib/python3.7/site-packages/openvino/libs】
然后重新运行程序:(Victory~)【当然是王者男孩发出的开心】
答应大家的验证blob文件正确性的代码【当然你得对应作出修改,直接复制粘贴肯定达咩的】
"""
IR--->blob
https://aistudio.baidu.com/aistudio/projectdetail/2358719
"""
from openvino.inference_engine import IECore
import numpy as np
model_blob = r'/home/shamus/yuxueshan/check.blob'
def