Since I took OpenVINO hands-on, I was addicted to it when I tried to run it on my home PC, so I will make a note of it. Hands-on was done with Raspberry Pi + Neural Compute Stick. (Because Intel CPU is required) I followed the procedure with reference to this site Deep learning starting with OpenVINO, but I was worried about runtime errors with real-time face detection. I hope it will be a solution for those who are similarly addicted to it.
OpenVINO is a toolkit for easily enabling computer vision and deep learning inference in visual applications at the edge. OpenVINO toolkit
There is an error in the OpenVINO library. I searched on StackOverflow etc., but none of them solved it.
{'data': <openvino.inference_engine.ie_api.InputInfo object at 0x1054d3578>}
<openvino.inference_engine.ie_api.IEPlugin object at 0x1054d34a8>
Traceback (most recent call last):
File "sample.py", line 19, in <module>
exec_net = plugin.load(network=net)
File "ie_api.pyx", line 547, in openvino.inference_engine.ie_api.IEPlugin.load
File "ie_api.pyx", line 557, in openvino.inference_engine.ie_api.IEPlugin.load
RuntimeError: Unsupported primitive of type: PriorBoxClustered name: fc7_mbox_priorbox
The place where the error is occurring is plugin.load (). The model file path is correct and the file exists. (I checked many times) There was a statement that you should use the FP32 version on your PC, but the error did not change even with the FP16 version.
#Model loading
net = IENetwork(model='FP32/face-detection-retail-0004.xml', weights='FP32/face-detection-retail-0004.bin')
exec_net = plugin.load(network=net)
When using the CPU, add_cpu_extension () required an additional library.
#Specifying the target device
plugin = IEPlugin(device="CPU")
plugin.add_cpu_extension('/opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libcpu_extension.dylib')
Set the path according to your environment. If you build the environment according to the procedure, you will get the above path.
To use the built-in camera on your MacBook, refer to the following. Capture video from Mac built-in camera with python
cap = cv2.VideoCapture(0)
The runtime error of OpenVINO has been resolved, and real-time recognition using the camera is now possible. First of all, I would like to try various things using the prepared model.
Recommended Posts