Community
cancel
Showing results for 
Search instead for 
Did you mean: 
wang__xiujie
Beginner
80 Views

A Problem When Testing the Installation of NCS2

I am trying to use the NCS2 but cannot finish the installation. Using Ubunt 16.04.

Step 4: Test the Installation

Plug the neural compute stick into the USB port on your computer, and then run the following commands in a new terminal window:

When you run these examples for the first time, it might take a while because the scripts are installing software dependencies and compiling all the sample codes.

Select the image on the right to see the expected results.

cd ~/intel/computer_vision_sdk/deployment_tools/model_optimizer/install_prerequisites/
./install_prerequisites.sh

cd ~/intel/computer_vision_sdk/deployment_tools/demo
./demo_squeezenet_download_convert_run.sh -d MYRIAD

When running  ./demo_squeezenet_download_convert_run.sh -d MYRIAD, I met a error.

wang@wang-OptiPlex-7060:/opt/intel/computer_vision_sdk/deployment_tools/demo$ ./demo_squeezenet_download_convert_run.sh -d MYRIAD
target = MYRIAD
target_precision = FP16


###################################################



Downloading the Caffe model and the prototxt
Installing dependencies
Run sudo -E apt -y install build-essential python3-pip virtualenv cmake libpng12-dev libcairo2-dev libpango1.0-dev libglib2.0-dev libgtk2.0-dev libswscale-dev libavcodec-dev libavformat-dev libgstreamer1.0-0 gstreamer1.0-plugins-base
获取:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
命中:2 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                    
命中:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
获取:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
已下载 214 kB,耗时 27秒 (7,740 B/s)                                           
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 75 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
build-essential 已经是最新版 (12.1ubuntu2)。
libcairo2-dev 已经是最新版 (1.14.6-1)。
libpango1.0-dev 已经是最新版 (1.38.1-1)。
cmake 已经是最新版 (3.5.1-1ubuntu3)。
gstreamer1.0-plugins-base 已经是最新版 (1.8.3-1ubuntu0.2)。
libglib2.0-dev 已经是最新版 (2.48.2-0ubuntu4.1)。
libgstreamer1.0-0 已经是最新版 (1.8.3-1~ubuntu0.1)。
libgtk2.0-dev 已经是最新版 (2.24.30-1ubuntu1.16.04.2)。
libpng12-dev 已经是最新版 (1.2.54-1ubuntu1.1)。
libavcodec-dev 已经是最新版 (7:2.8.15-0ubuntu0.16.04.1)。
libavformat-dev 已经是最新版 (7:2.8.15-0ubuntu0.16.04.1)。
libswscale-dev 已经是最新版 (7:2.8.15-0ubuntu0.16.04.1)。
python3-pip 已经是最新版 (8.1.1-2ubuntu0.4)。
virtualenv 已经是最新版 (15.0.1+ds-3ubuntu1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 75 个软件包未被升级。
The directory '/home/wang/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/wang/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): pyyaml in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python3/dist-packages
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Run /opt/intel/computer_vision_sdk/deployment_tools/demo/../model_downloader/downloader.py --name "squeezenet1.1" --output_dir "/home/wang/openvino_models/FP16"


###############|| Start downloading models ||###############

...100%, 9 KB, 14609 KB/s, 0 seconds passed ========= squeezenet1.1.prototxt ====> /home/wang/openvino_models/FP16/classification/squeezenet/1.1/caffe/squeezenet1.1.prototxt

###############|| Start downloading weights ||###############

...100%, 4834 KB, 18 KB/s, 267 seconds passed ========= squeezenet1.1.caffemodel ====> /home/wang/openvino_models/FP16/classification/squeezenet/1.1/caffe/squeezenet1.1.caffemodel

###############|| Start downloading topologies in tarballs ||###############


###############|| Post processing ||###############

========= Changing input dimensions in squeezenet1.1.prototxt =========


###################################################

Configure Model Optimizer



INTEL_CVSDK_DIR environment variable is not set. Trying to run ./setvars.sh to set it. 
[setupvars.sh] OpenVINO environment initialized


###################################################

Install Model Optimizer dependencies

获取:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
命中:2 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                    
命中:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
获取:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
已下载 214 kB,耗时 5秒 (38.6 kB/s)
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 75 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
python3-venv 已经是最新版 (3.5.1-3)。
libgfortran3 已经是最新版 (5.4.0-6ubuntu1~16.04.10)。
python3-pip 已经是最新版 (8.1.1-2ubuntu0.4)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 75 个软件包未被升级。
The directory '/home/wang/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/wang/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): networkx>=1.11 in /usr/local/lib/python3.5/dist-packages (from -r /opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.12.0 in /usr/local/lib/python3.5/dist-packages (from -r /opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): protobuf==3.5.1 in /usr/local/lib/python3.5/dist-packages (from -r /opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): decorator>=4.3.0 in /usr/local/lib/python3.5/dist-packages (from networkx>=1.11->-r /opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python3/dist-packages (from protobuf==3.5.1->-r /opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): six>=1.9 in /usr/lib/python3/dist-packages (from protobuf==3.5.1->-r /opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3))
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[WARNING] All Model Optimizer dependencies are installed globally.
[WARNING] If you want to keep Model Optimizer in separate sandbox
[WARNING] run install_prerequisites.sh venv {caffe|tf|mxnet|kaldi|onnx}


###################################################

Convert a model with Model Optimizer



Target folder /home/wang/openvino_models/ir/squeezenet1.1/FP16 already exists. Skipping IR generation../demo_squeezenet_download_convert_run.sh: 行 181: If you want to convert a model again, remove the entire ${$ir_dir} folder. ${run_again}: 错误的替换


###################################################

Build Inference Engine samples



Target folder /home/wang/inference_engine_samples already exists. Skipping samples building.If you want to rebuild samples, remove the entire /home/wang/inference_engine_samples folder. Then run the script again



###################################################

Run Inference Engine classification sample

Run ./classification_sample -d MYRIAD -i /opt/intel/computer_vision_sdk/deployment_tools/demo/../demo/car.png -m /home/wang/openvino_models/ir/squeezenet1.1/FP16/squeezenet1.1.xml 

[ INFO ] InferenceEngine: 
	API version ............ 1.4
	Build .................. 17328
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /opt/intel/computer_vision_sdk/deployment_tools/demo/../demo/car.png
[ INFO ] Loading plugin

	API version ............ 1.4
	Build .................. 17328
	Description ....... myriadPlugin
[ INFO ] Loading network files:
	/home/wang/openvino_models/ir/squeezenet1.1/FP16/squeezenet1.1.xml
	/home/wang/openvino_models/ir/squeezenet1.1/FP16/squeezenet1.1.bin
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (787, 259) to (227, 227)
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
E: [xLink] [         0] dispatcherEventReceive:308	dispatcherEventReceive() Read failed -1 | event 0x7fcabb0feeb0 USB_CREATE_STREAM_REQ

E: [xLink] [         0] eventReader:254	eventReader stopped
E: [xLink] [         0] dispatcherEventSend:873	Write failed header -1 | event USB_CREATE_STREAM_RESP

E: [ncAPI] [         0] ncGraphAllocate:1227	Can't read input tensor descriptors of the graph, rc: X_LINK_ERROR
[ ERROR ] Failed to allocate graph: NC_ERROR
Error on or near line 215; exiting with status 1

I spent a whole day on it but didn't run it out, and I would thank you  so much if you can give me some help.

0 Kudos
1 Reply
Sreedhar_V_Intel
Employee
80 Views

Convert a model with Model Optimizer Target folder /home/wang/openvino_models/ir/squeezenet1.1/FP16 already exists. Skipping IR generation

 

It looks like you executed squeezenet on NCS1 earlier.

FP16 IR generation is skipped in your log. 

delete previous FP16 folder(/home/wang/openvino_models/ir/squeezenet1.1/FP16) and run again.

Thanks

Sreedhar

 

Reply