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

Intel Neural Compute Stick 2 Windows 10

DEV-Muppet
Novice
4,407 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
4,218 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

7 Replies
Peh_Intel
Moderator
4,258 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

 

0 Kudos
DEV-Muppet
Novice
4,237 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

 

 

 

0 Kudos
Peh_Intel
Moderator
4,219 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
4,198 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!

bouachalazhar
Beginner
2,705 Views

I follow instructions but when I run :

core = Core()
available_devices = core.available_devices
print("Dispositifs disponibles : ", available_devices)

I can detect CPU and GPU only. My NCS2 was connected and detected by my Asus ZenBook, Windows 11 Intel i7 EVO, Intel Iris Xe graphics.

0 Kudos
Peh_Intel
Moderator
4,165 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


0 Kudos
bouachalazhar
Beginner
2,700 Views

Hi, I can't use NCS2 on my Asus ZenBook and I don't know why.

 

NCS2 doesn't detect : 

 


Lazhar Bouacha@PC-LAZHAR MINGW64 ~
$ "C:\Program Files (x86)\Intel\openvino_2022.3.0\setupvars.bat"
Python 3.10.10
[setupvars.bat] OpenVINO environment initialized

Lazhar Bouacha@PC-LAZHAR MINGW64 ~
$ python "C:\Program Files (x86)\Intel\openvino_2022.3.0\samples\python\hello_query_device\hello_query_device.py" -d MYRIAD
[ INFO ] Available devices:
[ INFO ] CPU :
[ INFO ]        SUPPORTED_PROPERTIES:
[ INFO ]                AVAILABLE_DEVICES:
[ INFO ]                RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
[ INFO ]                RANGE_FOR_STREAMS: 1, 8
[ INFO ]                FULL_DEVICE_NAME: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
[ INFO ]                OPTIMIZATION_CAPABILITIES: WINOGRAD, FP32, FP16, INT8, BIN, EXPORT_IMPORT
[ INFO ]                CACHING_PROPERTIES: {}
[ INFO ]                CACHE_DIR:
[ INFO ]                NUM_STREAMS: 1
[ INFO ]                AFFINITY: Affinity.NONE
[ INFO ]                INFERENCE_NUM_THREADS: 0
[ INFO ]                PERF_COUNT: False
[ INFO ]                INFERENCE_PRECISION_HINT: <Type: 'float32'>
[ INFO ]                PERFORMANCE_HINT: PerformanceMode.UNDEFINED
[ INFO ]                PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ]
[ INFO ] GPU :
[ INFO ]        SUPPORTED_PROPERTIES:
[ INFO ]                AVAILABLE_DEVICES: 0
[ INFO ]                RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 2, 1
[ INFO ]                RANGE_FOR_STREAMS: 1, 2
[ INFO ]                OPTIMAL_BATCH_SIZE: 1
[ INFO ]                MAX_BATCH_SIZE: 1
[ INFO ]                CACHING_PROPERTIES: {'GPU_UARCH_VERSION': 'RO', 'GPU_EXECUTION_UNITS_COUNT': 'RO', 'GPU_DRIVER_VERSION': 'RO', 'GPU_DEVICE_ID': 'RO'}
[ INFO ]                DEVICE_ARCHITECTURE: GPU: v12.0.0
[ INFO ]                FULL_DEVICE_NAME: Intel(R) Iris(R) Xe Graphics (iGPU)
[ INFO ]                DEVICE_UUID: UNSUPPORTED TYPE
[ INFO ]                DEVICE_TYPE: Type.INTEGRATED
[ INFO ]                DEVICE_GOPS: UNSUPPORTED TYPE
[ INFO ]                OPTIMIZATION_CAPABILITIES: FP32, BIN, FP16, INT8
[ INFO ]                GPU_DEVICE_TOTAL_MEM_SIZE: UNSUPPORTED TYPE
[ INFO ]                GPU_UARCH_VERSION: 12.0.0
[ INFO ]                GPU_EXECUTION_UNITS_COUNT: 96
[ INFO ]                GPU_MEMORY_STATISTICS: UNSUPPORTED TYPE
[ INFO ]                PERF_COUNT: False
[ INFO ]                MODEL_PRIORITY: Priority.MEDIUM
[ INFO ]                GPU_HOST_TASK_PRIORITY: Priority.MEDIUM
[ INFO ]                GPU_QUEUE_PRIORITY: Priority.MEDIUM
[ INFO ]                GPU_QUEUE_THROTTLE: Priority.MEDIUM
[ INFO ]                GPU_ENABLE_LOOP_UNROLLING: True
[ INFO ]                CACHE_DIR:
[ INFO ]                PERFORMANCE_HINT: PerformanceMode.UNDEFINED
[ INFO ]                COMPILATION_NUM_THREADS: 8
[ INFO ]                NUM_STREAMS: 1
[ INFO ]                PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ]                INFERENCE_PRECISION_HINT: <Type: 'undefined'>
[ INFO ]                DEVICE_ID: 0
[ INFO ]

Lazhar Bouacha@PC-LAZHAR MINGW64 ~
$ pip show openvino_*
WARNING: Package(s) not found: openvino_env, openvino_notebooks

Lazhar Bouacha@PC-LAZHAR MINGW64 ~
$ pip show openvino openvino-dev
Name: openvino
Version: 2022.3.0
Summary: OpenVINO(TM) Runtime
Home-page: https://docs.openvino.ai/latest/index.html
Author: Intel(R) Corporation
Author-email: openvino_pushbot@intel.com
License: OSI Approved :: Apache Software License
Location: c:\users\lazhar bouacha\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: numpy
Required-by: openvino-dev
---
Name: openvino-dev
Version: 2022.3.0
Summary: OpenVINO(TM) Development Tools
Home-page: https://docs.openvino.ai/latest/index.html
Author: Intel® Corporation
Author-email: openvino_pushbot@intel.com
License: OSI Approved :: Apache Software License
Location: c:\users\lazhar bouacha\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: addict, defusedxml, jstyleson, networkx, networkx, numpy, numpy, opencv-python, openvino, openvino-telemetry, pandas, pillow, pyyaml, requests, scipy, texttable, tqdm
Required-by:

 

System :

 

Edition	Windows 11 Home
Version	22H2
Installed on	<u+200e>02/<u+200e>12/<u+200e>2022
OS build	22624.1537
Experience	Windows Feature Experience Pack 1000.22641.1000.0
dition Windows 11 Hom

 nbsp;n Windows 11 Hom

nbsp;n Windows 11 Hom

Device :Windows 11 Home Versi nbsp; :Windows 11 Hom

nbsp; :Windows 11 Hom

 nbsp; :Windows 11 Hom

nbsp; :Windows 11 Hom
Device name	PC-LAZHAR
Processor	11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz   2.80 GHz
Installed RAM	32.0 GB (31.7 GB usable)
Device ID	15301EF2-874A-4D57-937E-D5F4283457C6
Product ID	00342-20906-60051-AAOEM
System type	64-bit operating system, x64-based processor
Pen and touch	No pen or touch input is available for this display

 

 

NCS2 not detected on VS CodeNCS2 not detected on VS CodeOpenVINO RuntimeOpenVINO Runtime

0 Kudos
Reply