Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6573 讨论

Can not create 2 MYRIAD inference engines with different model

Truong__Dien_Hoa
新分销商 II
2,431 次查看

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 项奖励
1 解答
Truong__Dien_Hoa
新分销商 II
2,429 次查看

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

在原帖中查看解决方案

0 项奖励
4 回复数
Truong__Dien_Hoa
新分销商 II
2,430 次查看

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

0 项奖励
Shubha_R_Intel
2,429 次查看

Dear Truong, Dien Hoa,

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

Thanks for using OpenVino !

Shubha

 

0 项奖励
Alberto_Torin
初学者
2,429 次查看

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?

0 项奖励
Campalo__Fardo
初学者
2,429 次查看

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

0 项奖励
回复