gbr1 / ros_openvino

A ROS package to wrap openvino inference engine and get it working with Myriad and GPU
https://gbr1.github.io
GNU Affero General Public License v3.0
57 stars 13 forks source link

AttributeError: 'MultiDiGraph' object has no attribute 'node' #3

Closed songshan0321 closed 5 years ago

songshan0321 commented 5 years ago

I have followed your instruction to install everything. But when I run squeezenet demo as follows:

sudo ./demo_squeezenet_download_convert_run.sh -d MYRIAD

I got AttributeError: 'MultiDiGraph' object has no attribute 'node' when optimizing the model:

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

Convert a model with Model Optimizer

Run python3 /opt/intel//computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo.py --input_model /home/shan/openvino_models/models/FP16/classification/squeezenet/1.1/caffe/squeezenet1.1.caffemodel /home/shan/openvino_models/ir/FP16//classification/squeezenet/1.1/caffe --data_type FP16

Model Optimizer arguments:
Common parameters:
    - Path to the Input Model:  /home/shan/openvino_models/models/FP16/classification/squeezenet/1.1/caffe/squeezenet1.1.caffemodel
    - Path for generated IR:    /home/shan/openvino_models/ir/FP16//classification/squeezenet/1.1/caffe
    - IR output name:   squeezenet1.1
    - Log level:    ERROR
    - 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:  FP16
    - Enable fusing:    True
    - Enable grouped convolutions fusing:   True
    - Move mean values to preprocess section:   False
    - Reverse input channels:   False
Caffe specific parameters:
    - Enable resnet optimization:   True
    - Path to the Input prototxt:   /home/shan/openvino_models/models/FP16/classification/squeezenet/1.1/caffe/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:    1.5.12.49d067a0
[ ERROR ]  -------------------------------------------------
[ ERROR ]  ----------------- INTERNAL ERROR ----------------
[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  'MultiDiGraph' object has no attribute 'node'
[ ERROR ]  Traceback (most recent call last):
  File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/main.py", line 325, in main
    return driver(argv)
  File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/main.py", line 279, in driver
    custom_layers_mapping_path=custom_layers_mapping_path)
  File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/pipeline/caffe.py", line 74, in driver
    graph, original_shapes = loader.caffe_pb_to_nx(proto, model)
  File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/front/caffe/loader.py", line 314, in caffe_pb_to_nx
    if len(node.out_nodes()) == 0:
  File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/graph/graph.py", line 313, in out_nodes
    assert self.has('kind')
  File "/opt/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/mo/graph/graph.py", line 273, in has
    return k in self.graph.node[self.node]
AttributeError: 'MultiDiGraph' object has no attribute 'node'

[ ERROR ]  ---------------- END OF BUG REPORT --------------
[ ERROR ]  -------------------------------------------------
Error on or near line 199; exiting with status 1
gbr1 commented 5 years ago

Hi, I think it is an issue relative to OpenVINO setup and not on this package. Are you using an x86 architecture? Raspberry PI is not fully supported.

songshan0321 commented 5 years ago

Hi, I think it is an issue relative to OpenVINO setup and not on this package. Are you using an x86 architecture? Raspberry PI is not fully supported.

Yes, I'm using x86_64 architecture, Ubuntu 16.04. I can run your package with pre-optimized model, just cannot optimize any model on my own. Thanks for your reply anyways.

gbr1 commented 5 years ago

@songshan0321 I have just worked on this! Check new instructions here: https://github.com/gbr1/ros_openvino/wiki/Fast-setup-for-Myriad-based-devices So your case of study is included :)