Can not create 2 MYRIAD inference engines with different model

Can not create 2 MYRIAD inference engines with different model

Hi, I'm trying to run multiple models in one application using MYRIAD device. However, when I have already one engine, I can not create new one. I got RuntimeError: Can not init USB device: NC_ERROR

The error is at:  plugin.load(network=net, num_requests=self.number_req)

I then try with the GPU and don't see the error.

Anyone know where the problem come from and how to fix it ?

Thank you in advance,

[More info]

- I use Intel® Movidius™ VPU which is attached to an UP board.

- I'm coding in Python. I tried to run the sample security_barrier demo with MYRIAD (because it also load multiple models) and got no error. The code is written in C++ so I don't know if we have problem with the Python API ?


5 posts / 0 new

Best Reply

I think I find the error. It is because I use different object for MYRIAD plugin.

I works ok as below:

exec_net = plugin.load(network=net)

exec_net2 = plugin.load(network=net2)


If we try to create an exec_net with different plugin then we get the error:

exec_net = plugin2.load(network=net2)

RuntimeError: Can not init USB device: NC_ERROR


I will try to check if it runs ok

Dear Truong, Dien Hoa,

Glad you figured it out and thanks for posting your findings here.

Thanks for using OpenVino !



I was facing a similar issue and I was able to solve it thanks to Dien Hoa Truong's reply. 

However, I'm using the 2020.2 release, and the IEPlugin class is now deprecated. Which is the correct way to handle multiple models on a single Myriad device with the latest release?

Is there any sample code using opencv (I mean, using cv2.dnn.readnet function) to load two networks on the same NCS2?

Moreover, I have the same question as "Torin, Alberto".

Leave a Comment

Please sign in to add a comment. Not a member? Join today