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

converter.py breaks on raspbian on Raspberry Pi 3B

WDomo
Beginner
946 Views

=[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  'utf-8' codec can't decode byte 0xa1 in position 12206: invalid start byte======== Converting squeezenet1.0


Conversion command: python3 -- /opt/intel/openvino/deployment_tools/model_optimizer/mo.py --output_dir=/opt/intel/openvino/deployment_tools/Model_downloader/classification/squeezenet/1.0/caffe/FP32 --model_name=squeezenet1.0 --framework=caffe --data_type=FP32 '--input_shape=[1,3,227,227]' --input=data '--mean_values=data[104.0,117.0,123.0]' --output=prob --input_model=/opt/intel/openvino/deployment_tools/Model_downloader/classification/squeezenet/1.0/caffe/squeezenet1.0.caffemodel --input_proto=/opt/intel/openvino/deployment_tools/Model_downloader/classification/squeezenet/1.0/caffe/squeezenet1.0.prototxt

Model Optimizer arguments:
Common parameters:
    - Path to the Input Model:     /opt/intel/openvino/deployment_tools/Model_downloader/classification/squeezenet/1.0/caffe/squeezenet1.0.caffemodel
    - Path for generated IR:     /opt/intel/openvino/deployment_tools/Model_downloader/classification/squeezenet/1.0/caffe/FP32
    - IR output name:     squeezenet1.0
    - 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:     FP32
    - Enable fusing:     True
    - Enable grouped convolutions fusing:     True
    - Move mean values to preprocess section:     False
    - Reverse input channels:     False
Caffe specific parameters:
    - Path to Python Caffe* parser generated from caffe.proto:     /opt/intel/openvino/deployment_tools/model_optimizer/mo/front/caffe/proto
    - Enable resnet optimization:     True
    - Path to the Input prototxt:     /opt/intel/openvino/deployment_tools/Model_downloader/classification/squeezenet/1.0/caffe/squeezenet1.0.prototxt
    - Path to CustomLayersMapping.xml:     Default
    - Path to a mean file:     Not specified
    - Offsets for a mean file:     Not specified
Model Optimizer version:     2019.2.0-436-gf5827d4
[ ERROR ]  -------------------------------------------------
[ ERROR ]  ----------------- INTERNAL ERROR ----------------
[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  'utf-8' codec can't decode byte 0xa1 in position 12206: invalid start byte
[ ERROR ]  Traceback (most recent call last):
  File "/opt/intel/openvino/deployment_tools/model_optimizer/mo/main.py", line 302, in main
    return driver(argv)
  File "/opt/intel/openvino/deployment_tools/model_optimizer/mo/main.py", line 261, in driver
    custom_layers_mapping_path=custom_layers_mapping_path)
  File "/opt/intel/openvino/deployment_tools/model_optimizer/mo/pipeline/caffe.py", line 52, in driver
    caffe_pb2 = loader.import_caffe_pb2(caffe_proto_path)
  File "/opt/intel/openvino/deployment_tools/model_optimizer/mo/front/caffe/loader.py", line 35, in import_caffe_pb2
    caffe_pb2 = importlib.import_module("caffe_pb2")
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 857, in get_code
  File "<frozen importlib._bootstrap_external>", line 525, in _compile_bytecode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 12206: invalid start byte

[ ERROR ]  ---------------- END OF BUG REPORT --------------
[ ERROR ]  -------------------------------------------------

0 Kudos
10 Replies
WDomo
Beginner
946 Views

I am running Raspbian GNU/Linux 10 (buster)

Release 10

Codename buster

0 Kudos
Shubha_R_Intel
Employee
946 Views

Dear Domoney, William

I'm not aware of any converter.py within OpenVino (your command above shows mo.py)  but did you install your Model Optimizer Pre-requisites ? I believe that may be your problem.

If you google the error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 12206: invalid start byte

It's a common error discussed on Stack Overflow but the error itself has nothing to do with OpenVino or Model Optimizer. It has to do with  Python tools which Model Optimizer depends upon.

Thanks,

Shubha

 

0 Kudos
WDomo
Beginner
946 Views

Thanks Shubba

 

Model converter usage

The basic usage is to run the script like this:

./converter.py --all

This will convert all models into the Inference Engine IR format. Models that were originally in that format are ignored. Models in PyTorch's format will be converted in ONNX format first.

https://docs.openvinotoolkit.org/latest/_tools_downloader_README.html

 

I will reinstall python 3.7 and run the Install_prerequisites  script again

 

Kind regards

 

Frank

0 Kudos
Shubha_R_Intel
Employee
946 Views

Dear Domoney, William,

Wow. I guess you can really teach an old Intel dog new tricks. Thanks for correcting me regarding converter.py ! 

I will reinstall python 3.7 and run the Install_prerequisites  script again

I think the above is a great idea.

Let me know the status !

Thanks,

Shubha

0 Kudos
Shubha_R_Intel
Employee
946 Views

Dear Domoney, William,

Please try OpenVino 2019R3 for Raspberry PI !

https://download.01.org/opencv/2019/openvinotoolkit/R3/

Thanks,

Shubha

0 Kudos
WDomo
Beginner
946 Views

Looking good so far

 

I will play games with the optimizer tomorrow

Kind regards

 

Frank

0 Kudos
WDomo
Beginner
946 Views

So nearly there.   R3 on Raspberry pi almost works

 

Human pose estimation demo dies on "Corrupted size vs previous size on consolidation"

Kind regards

 

Frank

 

0 Kudos
WDomo
Beginner
946 Views

and the screenscrape

0 Kudos
Shubha_R_Intel
Employee
946 Views

Dear Domoney, William,

Thanks for letting us know ! I have filed a bug on this issue.

Shubha

0 Kudos
WDomo
Beginner
946 Views

Thanks

I did a demo on Raspberry Pi yesterday and will build a pool of applications from Open Model Zoo at an International  Conference in North Africa in a month.

 

I will rebuild from scratch and make sure everything works on Pi..  Human Pose Estimation on the PC as a real hit with the kids yesterday.

Kind regards

 

Frank

0 Kudos
Reply