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.

Illegal instruction error runnig model optimizer

FPART1
Beginner
1,028 Views

Dear all,

I'm getting error trying to optimize a model downloaded from OpenVino modelzoo, please find message below:

$ sudo python3 mo_tf.py --input_model /home/felipe/Desktop/projeto/inception-resnet-v2-tf/inception_resnet_v2.pb --log_level DEBUG
[ 2020-04-14 21:32:07,018 ] [ DEBUG ] [ main:118 ]  Namespace(batch=None, blobs_as_inputs=True, data_type='float', disable_fusing=None, disable_gfusing=None, disable_nhwc_to_nchw=False, disable_resnet_optimization=False, disable_weights_compression=False, enable_concat_optimization=False, extensions='/opt/intel/openvino_2020.2.120/deployment_tools/model_optimizer/extensions', finegrain_fusing=None, framework='tf', freeze_placeholder_with_value=None, generate_deprecated_IR_V2=False, generate_deprecated_IR_V7=False, generate_experimental_IR_V10=True, input=None, input_checkpoint=None, input_meta_graph=None, input_model='/home/felipe/Desktop/projeto/inception-resnet-v2-tf/inception_resnet_v2.pb', input_model_is_text=False, input_shape=None, keep_quantize_ops_in_IR=True, keep_shape_ops=False, log_level='DEBUG', mean_values=(), model_name=None, move_to_preprocess=False, output=None, output_dir='/opt/intel/openvino_2020.2.120/deployment_tools/model_optimizer/.', progress=False, reverse_input_channels=False, saved_model_dir=None, saved_model_tags=None, scale=None, scale_values=(), silent=False, stream_output=False, tensorboard_logdir=None, tensorflow_custom_layer_libraries=None, tensorflow_custom_operations_config_update=None, tensorflow_object_detection_api_pipeline_config=None, tensorflow_use_custom_operations_config=None, transformations_config=None)
[ 2020-04-14 21:32:07,018 ] [ DEBUG ] [ main:119 ]  Model Optimizer started
[ 2020-04-14 21:32:07,018 ] [ DEBUG ] [ main:134 ]  Output model name would be inception_resnet_v2{.xml, .bin}
Model Optimizer arguments:
Common parameters:
    - Path to the Input Model:     /home/felipe/Desktop/projeto/inception-resnet-v2-tf/inception_resnet_v2.pb
    - Path for generated IR:     /opt/intel/openvino_2020.2.120/deployment_tools/model_optimizer/.
    - IR output name:     inception_resnet_v2
    - Log level:     DEBUG
    - Batch:     Not specified, inherited from the model
    - Input layers:     Not specified, inherited from the model
    - Output layers:     Not specified, inherited from the model
    - Input shapes:     Not specified, inherited from the model
    - Mean values:     Not specified
    - 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
TensorFlow specific parameters:
    - Input model in text protobuf format:     False
    - Path to model dump for TensorBoard:     None
    - List of shared libraries with TensorFlow custom layers implementation:     None
    - Update the configuration file with input/output node names:     None
    - Use configuration file used to generate the model with Object Detection API:     None
    - Use the config file:     None
Model Optimizer version:     2020.2.0-60-g0bc66e26ff
Illegal instruction

I tried to upgrade OpenVino to the latest version, but the error persists. After the upgrade I run the installation check script which was able to optimize the demo model:

========= Converting squeezenet1.1 to IR (FP16)
Conversion command: /home/felipe/.virtualenvs/cv/bin/python3 -- /opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo.py --framework=caffe --data_type=FP16 --output_dir=/home/felipe/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=/home/felipe/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel --input_proto=/home/felipe/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt

Model Optimizer arguments:
Common parameters:
    - Path to the Input Model:     /home/felipe/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel
    - Path for generated IR:     /home/felipe/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:     False
    - Reverse input channels:     False
Caffe specific parameters:
    - Path to Python Caffe* parser generated from caffe.proto:     /opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/front/caffe/proto
    - Enable resnet optimization:     True
    - Path to the Input prototxt:     /home/felipe/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:     2019.3.0-375-g332562022
[ WARNING ]  
Detected not satisfied dependencies:
    protobuf: installed: 3.10.0, required: 3.6.1

Please install required versions of components or use install_prerequisites script
/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites_caffe.sh
Note that install_prerequisites scripts may install additional components.

[ SUCCESS ] Generated IR model.
[ SUCCESS ] XML file: /home/felipe/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml
[ SUCCESS ] BIN file: /home/felipe/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.bin
[ SUCCESS ] Total execution time: 8.56 seconds.

Could you please advice what is wrong?

My environment is:

Ubuntu 18.04 LTS

Python 3.6

Tensorflow 1.12

CUDA 10

OpenVino 2020.2

 

Thanks in advance,

Felipe

 

 

0 Kudos
4 Replies
JAIVIN_J_Intel
Employee
1,028 Views

Hi Felipe,

Use the --input_shape parameter with Model Optimizer command. You may run Model Optimizer with the --help option to know more about the notation for input shapes.

You may also refer the inception-resnet-v2-tf model description.

Regards,

Jaivin

0 Kudos
FPART1
Beginner
1,028 Views

Hi Jaivin,

Thanks for the reply, actually there was a issue in my environment preventing Model Optimizer to run properly. I believe this happened due to Keras installation which corrupted my TensorFlow backend.

I've set up na fresh environment so the ilegal instruction is no longer happeing.

Thanks,

Felipe

 

 

0 Kudos
lyumax
Novice
867 Views

if it's not difficult, can you explain in more detail how you got rid of this problem?
You reinstalled OpenVINO or what?


Thank you for answer.

 

0 Kudos
JAIVIN_J_Intel
Employee
1,028 Views

Hi Felipe,

Thank you for sharing the information with the OpenVINO Community!

Regards,

Jaivin

0 Kudos
Reply