PythonAPI MultiStick - PINTO0309/MobileNet-SSD-RealSense GitHub Wiki

1. Python API Reference

https://software.intel.com/en-us/articles/OpenVINO-InferEngine#inpage-nav-12
https://software.intel.com/en-us/articles/transitioning-from-intel-movidius-neural-compute-sdk-to-openvino-toolkit#inpage-nav-9

1.1 Multi Stick

https://software.intel.com/en-us/forums/computer-vision/topic/798625
https://software.intel.com/en-us/forums/computer-vision/topic/801648
https://github.com/yuanyuanli85/open_model_zoo/blob/ncs2/demos/python_demos/multiple_device_ncs2_async.py

1.2 Python + MultiStick

plugin = IEPlugin(device = "MYRIAD")
plugin.set_config({"KEY_VPU_FORCE_RESET": "NO"})

plugin = IEPlugin(device = "MYRIAD")
plugin.set_config({"VPU_FORCE_RESET": "NO"})

1.3 Init requests (2 sticks)

self.net = IENetwork.from_ir(model=model_xml, weights=model_bin)
self.exec_net = self.plugin.load(network=self.net, num_requests=2)

1.4 Switch async (2 sticks)

".wait(-1)" is synchronous processing.

self.exec_net.start_async(request_id=self.next_request_id, inputs={input_blob: image})
if self.exec_net.requests[self.current_request_id].wait(-1) == 0:
    res = self.exec_net.requests[self.current_request_id].outputs[out_blob]
    ・・・
# exchange request id
self.current_request_id, self.next_request_id = self.next_request_id, self.current_request_id