Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Truong__Dien_Hoa
New Contributor II
380 Views

Can not create 2 MYRIAD inference engines with different model

Jump to solution

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
380 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
381 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

Shubha_R_Intel
Employee
380 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
380 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
380 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