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.
5966 Discussions

Can not create 2 MYRIAD inference engines with different model

Truong__Dien_Hoa
New Contributor II
639 Views

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 ?

 

0 Kudos
1 Solution
Truong__Dien_Hoa
New Contributor II
637 Views

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

View solution in original post

4 Replies
Truong__Dien_Hoa
New Contributor II
638 Views

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

Shubha_R_Intel
Employee
637 Views

Dear Truong, Dien Hoa,

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

Thanks for using OpenVino !

Shubha

 

Alberto_Torin
Beginner
637 Views

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?

Campalo__Fardo
Beginner
637 Views

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".

Reply