Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.

Two models in a neural compute stick2

idata
Community Manager
766 Views

I'm working on implementing inference codes of two models which are optimized by OpenVINO with one neural compute stick2.

 

I wrote some codes referring python sample codes which are provided with OpenVINO. The directory is like this /intel/openvino/inference_engine/samples/python_samples

 

1 detector_bin = os.path.splitext(detector_path)[0] + ".bin"

 

2 plugin_detector = IEPlugin(device="MYRIAD")

 

3 net_detector = IENetwork(model=detector_path, weights=detector_bin)

 

4 self.detector = plugin_detector.load(network=net_detector)

 

5

 

6 skeleton_bin = os.path.splitext(skeleton_path)[0] + ".bin"

 

7 plugin_skeleton = IEPlugin(device="MYRIAD")

 

8 net_skeleton = IENetwork(model=skeleton_path, weights=skeleton_bin)

 

9 self.skeleton = plugin_skeleton.load(network=net_skeleton)

 

[Error messages]

 

self.skeleton = plugin_skeleton.load(network=net_skeleton)

 

File "ie_api.pyx", line 395, in openvino.inference_engine.ie_api.IEPlugin.load

 

File "ie_api.pyx", line 406, in openvino.inference_engine.ie_api.IEPlugin.load

 

RuntimeError: Can not init USB device: NC_ERROR

 

In the first part 1~4 where the first model is being mounted, there is no problem.

 

But in the second part 6~9 where the second model is being mounted, it causes an error.

 

Is there any way to mount two models at the same time in a neural compute stick2 ???

 

P.S

 

I googled it and I found this discussion. https://ncsforum.movidius.com/discussion/795/can-i-run-more-than-one-models-with-one-stick

 

In that discussion, Tome_at_Intel gave a link. https://github.com/movidius/ncappzoo/blob/ncsdk2/apps/birds/birds.py

 

But I am familiar with OpenVINO. Isn't there a sample code for using two models in a neural compute stick2 with OpenVINO??

 

Thank you for reading my questions!

0 Kudos
2 Replies
idata
Community Manager
319 Views

Hi @SamuelShin

 

Yes, OpenVINO has samples that run multiple models one 1 NCS sequentially. The interactive_face_detection_demo is one sample that can handle multiple models. We also have more sample programs that handle multiple models. Take a look at them here. Here is a python example created by one of our NCS community members that loads multiple models one one NCS.

 

Please let me know if you have any further questions!

 

Sincerely,

 

Sahira
idata
Community Manager
319 Views

Thank you so much @Sahira_at_Intel

 

I solved the problem referring the python example you mentioned.

 

And I got to know that my codes were flawed because I made IEPlugin(device="MYRIAD") instance again at line 7 in my codes.

 

If I change the line 7 like "plugin_skeleton = plugin_detector",

 

the above codes run well.

 

Anyway, thank you again @Sahira_at_Intel

 

Best regards,

 

Samuel Shin
Reply