Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AlbertA0789
Beginner
173 Views

FAILED: squeezenet1.1 Error on or near line 178; exiting with status 1 in linux ubuntu focal

I happens when I am verifying the installations by running the demo Image Classification verification script by typing :

sudo -H ./demo_squeezenet_download_convert_run.sh

On the other hand I do succeed at running the Inference pipeline verification script.

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

target_precision = FP16
[setupvars.sh] OpenVINO environment initialized


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

 

Downloading the Caffe model and the prototxt
Installing dependencies
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_14.x focal InRelease
Hit:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:4 https://download.docker.com/linux/ubuntu focal InRelease
Hit:5 http://id.archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://id.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://id.archive.ubuntu.com/ubuntu focal-backports InRelease
Ign:9 https://vizi-ppa.goto50.ai/ubuntu stable InRelease
Hit:10 https://vizi-ppa.goto50.ai/ubuntu stable Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
Run sudo -E apt -y install build-essential python3-pip virtualenv cmake libcairo2-dev libpango1.0-dev libglib2.0-dev libgtk2.0-dev libswscale-dev libavcodec-dev libavformat-dev libgstreamer1.0-0 gstreamer1.0-plugins-base

Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.16.3-1ubuntu1).
gstreamer1.0-plugins-base is already the newest version (1.16.2-4).
libcairo2-dev is already the newest version (1.16.0-4ubuntu1).
libgstreamer1.0-0 is already the newest version (1.16.2-2).
libpango1.0-dev is already the newest version (1.44.7-2ubuntu4).
libgtk2.0-dev is already the newest version (2.24.32-4ubuntu4).
virtualenv is already the newest version (20.0.17-1).
build-essential is already the newest version (12.8ubuntu1.1).
libglib2.0-dev is already the newest version (2.64.6-1~ubuntu20.04.1).
libavcodec-dev is already the newest version (7:4.2.4-1ubuntu0.1).
libavformat-dev is already the newest version (7:4.2.4-1ubuntu0.1).
libswscale-dev is already the newest version (7:4.2.4-1ubuntu0.1).
python3-pip is already the newest version (20.0.2-5ubuntu1.1).
The following packages were automatically installed and are no longer required:
docker-ce-rootless-extras slirp4netns
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpng-dev is already the newest version (1.6.37-2).
The following packages were automatically installed and are no longer required:
docker-ce-rootless-extras slirp4netns
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 1)) (5.3.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.22.0)
Run python3 /home/hp/intel/openvino_2021.2.185/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name squeezenet1.1 --output_dir /root/openvino_models/models --cache_dir /root/openvino_models/cache

################|| Downloading squeezenet1.1 ||################

========== Retrieving /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt from the cache

========== Retrieving /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel from the cache

========== Replacing text in /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt

 

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

Install Model Optimizer dependencies

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_14.x focal InRelease
Hit:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:4 https://download.docker.com/linux/ubuntu focal InRelease
Ign:5 https://vizi-ppa.goto50.ai/ubuntu stable InRelease
Hit:6 https://vizi-ppa.goto50.ai/ubuntu stable Release
Hit:8 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:9 http://id.archive.ubuntu.com/ubuntu focal InRelease
Hit:10 http://id.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:11 http://id.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-venv is already the newest version (3.8.2-0ubuntu2).
python3-pip is already the newest version (20.0.2-5ubuntu1.1).
The following packages were automatically installed and are no longer required:
docker-ce-rootless-extras slirp4netns
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (21.0.1)
Requirement already satisfied: networkx>=1.11 in /usr/local/lib/python3.8/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1)) (2.5)
Requirement already satisfied: numpy>=1.14.0 in /usr/local/lib/python3.8/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 2)) (1.18.5)
Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.8/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3)) (3.15.1)
Requirement already satisfied: test-generator==0.1.1 in /usr/local/lib/python3.8/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 4)) (0.1.1)
Requirement already satisfied: defusedxml>=0.5.0 in /usr/local/lib/python3.8/dist-packages (from -r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 5)) (0.6.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from test-generator==0.1.1->-r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 4)) (1.14.0)
Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.8/dist-packages (from networkx>=1.11->-r /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1)) (4.4.2)
[WARNING] All Model Optimizer dependencies are installed globally.
[WARNING] If you want to keep Model Optimizer in separate sandbox
[WARNING] run install_prerequisites.sh "{caffe|tf|tf2|mxnet|kaldi|onnx}" venv


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

Convert a model with Model Optimizer

Run python3 /home/hp/intel/openvino_2021.2.185/deployment_tools/open_model_zoo/tools/downloader/converter.py --mo /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/mo.py --name squeezenet1.1 -d /root/openvino_models/models -o /root/openvino_models/ir --precisions FP16

========== Converting squeezenet1.1 to IR (FP16)
Conversion command: /usr/bin/python3 -- /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/mo.py --framework=caffe --data_type=FP16 --output_dir=/root/openvino_models/ir/public/squeezenet1.1/FP16 --model_name=squeezenet1.1 '--input_shape=[1,3,227,227]' --input=data '--mean_values=data[104.0,117.0,123.0]' --output=prob --input_model=/root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel --input_proto=/root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt

Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel
- Path for generated IR: /root/openvino_models/ir/public/squeezenet1.1/FP16
- IR output name: squeezenet1.1
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: data
- Output layers: prob
- Input shapes: [1,3,227,227]
- Mean values: data[104.0,117.0,123.0]
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP16
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: None
- Reverse input channels: False
Caffe specific parameters:
- Path to Python Caffe* parser generated from caffe.proto: /home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/mo/front/caffe/proto
- Enable resnet optimization: True
- Path to the Input prototxt: /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt
- Path to CustomLayersMapping.xml: Default
- Path to a mean file: Not specified
- Offsets for a mean file: Not specified
Model Optimizer version: 2021.2.0-1877-176bdf51370-releases/2021/2
FAILED:
squeezenet1.1
Error on or near line 178; exiting with status 1

0 Kudos
10 Replies
Zulkifli_Intel
Moderator
141 Views

Hello AlbertA0789,

 

Thank you for contacting us.

 

Please try these steps. 

 

Install the dependencies.

dependencies directory:

cd /opt/intel/openvino_2021/install_dependencies

Run the script:

sudo -E ./install_openvino_dependencies.sh

 

Set the environment variable:

source /opt/intel/openvino_2021/bin/setupvars.sh

 

Install the prerequisites:

Go to the Model Optimizer prerequisites directory:

cd /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites

Run the script:

sudo ./install_prerequisites_caffe.sh

 

Now you are ready to use the model optimizer.

 python3 mo.py --input_model /<path_to_squeezenet1.1_caffemodel>/squeezenet1.1.caffeemodel --data_type=FP16

 

Run the demo

 sudo -H ./demo_squeezenet_download_convert_run.sh

 

Regards,

Zulkifli

AlbertA0789
Beginner
133 Views

Hi Thank you for replying,

I try this already, but instead this one give me error when i am trying to do this comment --> python3 mo.py --input_model /home/hp/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffeemodel --data_type=FP16

The error is as below :

python3: can't open file 'mo.py': [Errno 2] No such file or directory

Tags (1)
Zulkifli_Intel
Moderator
121 Views

Hello Albert,

 

Go to model optimizer directory by:

cd /opt/intel/openvino_2021.2.185/deployment_tools/model_optimizer

Run the code:

python3 mo.py --input_model /<path_to_squeezenet1.1_caffemodel>/squeezenet1.1.caffeemodel --data_type=FP16

In my case it will be:

python3 mo.py --input_model /opt/intel/openvino_2021.2.185/deployment_tools/open_model_zoo/tools/downloader/public/squeezenet1.1/squeezenet1.1.caffeemodel --data_type=FP16

 

Go to demo directory by:

cd /opt/intel/openvino_2021.2.185/deployment_tools/demo/

run the demo:

 sudo -H ./demo_squeezenet_download_convert_run.sh

 

See if this can help to solve the issue.

 

Regards,

Zulkifli

 

 

 

 

 

AlbertA0789
Beginner
116 Views

Hi zulkifli,

Thank you for replying, but i still get the exact same error which is :

FAILED:
squeezenet1.1
Error on or near line 178; exiting with status 1

Please help. Thank you

Zulkifli_Intel
Moderator
108 Views

Hello Albert,

 

Help me to check in this directory: "/root/openvino/ir/public/squeezenet1.1/FP16", whether it has these files,

  • squeezenet1.1.bin
  • squeezenet1.1.labels
  • squeezenet1.1.mapping
  • squeezenet1.1.xml

 

Regards,

Zulkifli

 

AlbertA0789
Beginner
105 Views

Hi Zulkifli,

There is no file at all inside /root/openvino/ir/public/squeezenet1.1

Zulkifli_Intel
Moderator
101 Views

Hello Albert,

 

Please run this code and see does it create the file or not,

python3 ./mo.py --input_model /<path_to_squeezenet1.1_caffemodel>/squeezenet1.1.caffeemodel --data_type FP16 --output_dir /root/openvino/ir/public/squeezenet1.1

 

Regards,

Zulkifli

 

AlbertA0789
Beginner
76 Views

Hi Zulkifli,

After I try to execute the command it give me this error:

[ ERROR ]
Detected not satisfied dependencies:
test-generator: not installed, required: == 0.1.1

Please install required versions of components or use install_prerequisites script
/home/hp/intel/openvino_2021.2.185/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites_caffe.sh
Note that install_prerequisites scripts may install additional components.
[ ERROR ] check_requirements exit with return code 1

So I try to reinstall the install_prerequisites_caffe.sh again, and I just notice that there seems to have this warning :

[WARNING] All Model Optimizer dependencies are installed globally.
[WARNING] If you want to keep Model Optimizer in separate sandbox
[WARNING] run install_prerequisites.sh "{caffe|tf|tf2|mxnet|kaldi|onnx}" venv

 

Thank you for helping

Zulkifli_Intel
Moderator
49 Views

Hello Albert.


Please install all the prerequisites:

Go to the Model Optimizer prerequisites directory:

cd <install_directory>/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites

Run the script:

sudo ./install_prerequisites.sh


Also, please install the test-generator by running this code:

pip3 install test-generator


Then rerun the demo.


Regards,

Zulkifli





AlbertA0789
Beginner
40 Views

Hi Zulkifli,

Thanks for responding. I have try all of it but when I run the model it still give exact same error which is :

FAILED:
squeezenet1.1
Error on or near line 178; exiting with status 1