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.

Intel Neural Compute Stick 2 Windows 10

DEV-Muppet
Novice
1,494 Views

i just recently purchased the Intel Movidius Neural Compute Stick 2.

I did not know there were major API changes recently when buying it. I am new to AI and ML.

Completely new.

 

I have gotten the jupyter notebooks running. I believe I was also able to run the hello_classification sample in python. I have Anaconda 3 on my system, all the prerequisites.

 

My question is : how do I run openVino using the compute stick 2 instead of my PC hardware?

I try to add the flag to a command, and i get an error.

>>>python hello_classification.py  ./public/alexnet/FP16/alexnet.xml banana.jpg CPU

works fine but 

>>>python hello_classification.py ./public/alexnet/FP16/alexnet.xml banana.jpg MYRIAD

throwns an error : 

-------------------------------------------------------------

[ INFO ] Creating OpenVINO Runtime Core
[ INFO ] Reading the model: ./public/alexnet/FP16/alexnet.xml
[ INFO ] Loading the model to the plugin
Traceback (most recent call last):
File "C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python\hello_classification\hello_classification.py", line 115, in <module>
sys.exit(main())
File "C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python\hello_classification\hello_classification.py", line 81, in main
compiled_model = core.compile_model(model, device_name)
File "C:\ProgramData\Anaconda3\envs\ovr_env\lib\site-packages\openvino\runtime\ie_api.py", line 266, in compile_model
super().compile_model(model, device_name, {} if config is None else config)
RuntimeError: Cannot load library 'openvino_intel_myriad_plugin.dll': 126 from cwd: C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python\hello_classification

---------------------------------------------------

 

It appears as if this project has changed pretty much.

I looked for plugins and drivers to install, but could not find anything according to windows. There is openVino/runtime/3rdparty/myriad/drivers/mxlink.info but i cannot find info on exactly what it is.

 

if I run 

>>>>

ie = Core()

devices = ie.available_devices

for device in devices:
device_name = ie.get_property(device_name=device, name="FULL_DEVICE_NAME")
print(f"{device}: {device_name}")

>>>>>>

I get :

CPU: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
GPU: Intel(R) HD Graphics 6000 (iGPU)

 

So I assume my PC can run the openVino toolkit and run some inference.

MY PC is pretty old and my NCS2 is new, so I'd like to figure out how to get it working. 

Any tips or tutorials?

Thanks

0 Kudos
1 Solution
Peh_Intel
Moderator
1,305 Views

Hi DEV-Muppet,


Intel® Neural Compute Stick 2 (NCS 2) is a plug-and-play device, which means it uses the general WinUsb Device.

 

Thanks for sharing all the screenshots. I believe you had installed OpenVINO™ in two ways, from PyPI(C:\ProgramData\Anaconda3\envs\openvino_env\lib\site-packages\openvino) and installer (C:\Program Files (x86)\Intel\openvino_2022.1.0.643).  

 

Based on your fifth screenshot, the runtime error occurred due to the ie_api.py (OpenVINO™ from PyPI) failed to load model to plugin.

 

OpenVINO™ Runtime package install from PyPI only includes a set of libraries for Intel® CPU and Intel® GPU hardware. You can notice that these two files (openvino_intel_myriad_plugin.dll file and usb-ma2x8x.mvcmd) are not available in the directory: C:\ProgramData\Anaconda3\envs\openvino_env\lib\site-packages\openvino\libs

 

You can copy those two files to the directory above. The demo should work at this time.

 

Another way to resolve is to use OpenVINO™ runtime which is installed from installer.

But you need to run the setupvars.bat in C:\Program Files (x86)\Intel\openvino_2022.1.0.643 before running the demo and have to run the setupvars.bat for every new terminal.

 

 

Regards,

Peh


View solution in original post

5 Replies
Peh_Intel
Moderator
1,345 Views

Hi DEV-Muppet,

 

Thanks for reaching out to us.

 

I was able to run the sample application with Intel Movidius Neural Compute Stick 2 from my end.

 

I tried to duplicate your issue and only received the same error as you when I removed the openvino_intel_myriad_plugin.dll file which located in C:\Program Files (x86)\Intel\openvino_2022.1.0.643\runtime\bin\intel64\Release.

 

Please have a check with the files in that directory. Besides, I also upload the openvino_intel_myriad_plugin.dll file and usb-ma2x8x.mvcmd here.

 

 

Regards,

Peh

 

DEV-Muppet
Novice
1,324 Views

Thank you for your response.

 

I checked C:\Program Files (x86)\Intel\openvino_2022.1.0.643\runtime\bin\intel64\Release

and the files were there.

 

I believe the issue I am having is that : Windows does not have the Intel Neural Network Stick 2 drivers installed. When I look at the device under device manager, it only shows as a winusb device.

 

I unplugged my NCS2 from usb and ran 

>>>python hello_classification.py  ./public/alexnet/FP16/alexnet.xml banana.jpg CPU

and it works fine

 

if I plug in the NCS2 into the USB and run 

>>>python hello_classification.py  ./public/alexnet/FP16/alexnet.xml banana.jpg MYRIAD

I get the same error :

-------------------------------------------------------

 [ INFO ] Creating OpenVINO Runtime Core
[ INFO ] Reading the model: ./public/alexnet/FP16/alexnet.xml
[ INFO ] Loading the model to the plugin
Traceback (most recent call last):
File "C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python\hello_classification\hello_classification.py", line 115, in <module>
sys.exit(main())
File "C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python\hello_classification\hello_classification.py", line 81, in main
compiled_model = core.compile_model(model, device_name)
File "C:\ProgramData\Anaconda3\envs\openvino_env\lib\site-packages\openvino\runtime\ie_api.py", line 266, in compile_model
super().compile_model(model, device_name, {} if config is None else config)
RuntimeError: Cannot load library 'openvino_intel_myriad_plugin.dll': 126 from cwd: C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python\hello_classification

------------------------------------------------------------

 

I moved the original DLL and mvcmd files in the /Release folder and replaced them with the files you provided, 

openvino_intel_myriad_plugin.dll, usb-ma2x8x.mvcmd

and the command still didn't work and gave me the same error.

 

I could be wrong,but I believe the Operating System Does not recognize the NCS2 device. Checking the device manager shows the NCS2 as a general winusb device.

I have attached screenshots to show the issue.

Do I need drivers for windows? Is there an extra step to get the MYRIAD plugin to work?

I have the device plugged into the USB 3 port on an inspiron 5558

 

 

 

Peh_Intel
Moderator
1,306 Views

Hi DEV-Muppet,


Intel® Neural Compute Stick 2 (NCS 2) is a plug-and-play device, which means it uses the general WinUsb Device.

 

Thanks for sharing all the screenshots. I believe you had installed OpenVINO™ in two ways, from PyPI(C:\ProgramData\Anaconda3\envs\openvino_env\lib\site-packages\openvino) and installer (C:\Program Files (x86)\Intel\openvino_2022.1.0.643).  

 

Based on your fifth screenshot, the runtime error occurred due to the ie_api.py (OpenVINO™ from PyPI) failed to load model to plugin.

 

OpenVINO™ Runtime package install from PyPI only includes a set of libraries for Intel® CPU and Intel® GPU hardware. You can notice that these two files (openvino_intel_myriad_plugin.dll file and usb-ma2x8x.mvcmd) are not available in the directory: C:\ProgramData\Anaconda3\envs\openvino_env\lib\site-packages\openvino\libs

 

You can copy those two files to the directory above. The demo should work at this time.

 

Another way to resolve is to use OpenVINO™ runtime which is installed from installer.

But you need to run the setupvars.bat in C:\Program Files (x86)\Intel\openvino_2022.1.0.643 before running the demo and have to run the setupvars.bat for every new terminal.

 

 

Regards,

Peh


DEV-Muppet
Novice
1,285 Views

THANK YOU SO MUCH!!!

❤❤❤

I tried everything each way. I see what happened, I installed via w_openvino_toolkit_p_2022.1.0.643_offline.exe

and I installed via anaconda : openvino_env python environment : 

     pip install openvino-dev[caffe,kaldi,mxnet,pytorch,onnx,tensorflow2]==2022.1.0

 

and got the two confused. I tried many different things over several hours. by the time I posted this question here I had already tried alot of various commands and configurations.

 

I now understand better how this works. I moved the files to 

      C:\ProgramData\Anaconda3\envs\openvino_env\Lib\site-packages\openvino\libs\ 

           openvino_intel_myriad_plugin.dll, usb-ma2x8x.mvcmd

     ...and the anaconda version of openVino works with the MYRIAD NCS2

 

I had to upgrade numpy and install opencv2 in order to get the raw windows command line (is this the runtime version?) "hello_classification demo" to work properly.

 

I watched many of the intel openvino youtube videos repeatedly. I bought this NCS2 and watched the tech company's videos too. All of them were for the previous versions of openVino. PHP and web development is my skill. I am familiar enough with Python to run a little bit of anaconda and NLTK. I have no experience whatsoever in AI - until just now today!

 

With your help the Myriad NCS2 device ran the first demo successfully with no error. I have no idea what I am doing yet but i do know that a successful effort is possible.

 

I will return if I am stumped on another problem in the future.

 

Thanks!

Peh_Intel
Moderator
1,252 Views

Hi DEV-Muppet,

 

There are some requirements need to be installed before running the samples.

 

You can run the command below to install numpy and OpenCV:

pip install -r “C:\Program Files (x86)\Intel\openvino_2022.1.0.643\samples\python

\requirements.txt”

 

Thank you for confirming the issue is resolved. I'm glad too that I was able to help. 

 

This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Peh


Reply