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.

Unable to convert Caffe To IR Model

sp21
Beginner
529 Views

Hi, 

I have trained curve text detector Model for custom dataset. And I want to convert it in IR Model.

I am converting it on AWS Ubuntu system and I am getting the error as below:

 

sudo /opt/intel/openvino/deployment_tools/model_optimizer/mo.py --input_model AMAR_MODELS/ctd_tloc_iter_91000_bkup_2_11_CW.caffemodel --input_proto AMAR_MODELS/test_ctd_tloc.prototxt
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/ctd_tloc_iter_91000_bkup_2_11_CW.caffemodel
- Path for generated IR: /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/.
- IR output name: ctd_tloc_iter_91000_bkup_2_11_CW
- 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: 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: /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/test_ctd_tloc.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-408-gac8584cb7
[ FRAMEWORK ERROR ] Exception message: 3938:3 : Message type "mo_caffe.LayerParameter" has no field named "transpose_param".

Possible reasons:
1. /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/test_ctd_tloc.prototxt does not exist
2. /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/test_ctd_tloc.prototxt does not have a valid structure, for example, it was downloaded as html
3. /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/test_ctd_tloc.prototxt contains custom layers or attributes that are not supported
in Model Optimizer by default.

After you made sure that /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/test_ctd_tloc.prototxt has a valid structure and still see this issue, then
you need to generate a python parser for caffe.proto that was used when the model
was created.
Run "python3 generate_caffe_pb2.py --input_proto ${PATH_TO_CAFFE}/src/caffe/proto/caffe.proto"
For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #1.


[ FRAMEWORK ERROR ] 3938:3 : Message type "mo_caffe.LayerParameter" has no field named "transpose_param".
Model Optimizer is not able to parse /home/ubuntu/Image_analytics/CONVERSION_PROJECTS/AMAR_MODELS/test_ctd_tloc.prototxt

 

Can Any one please suggest the solution.

0 Kudos
2 Replies
Wan_Intel
Moderator
504 Views

Hi Sp21,

Thanks for reaching out to us.

 

I noticed that your Model Optimizer version is "2019.3.0-408-gac8584cb7". Could you please try the following methods to see whether the issue can be resolved?

 

  • Use the Model Optimizer from the latest Intel® Distribution of OpenVINO™ Toolkit. Intel® Distribution of OpenVINO™ Toolkit is available for download at here.
  • Add the layer description to the caffe.proto file and generate a parser for it if you are using custom layers. Refer to here for more details.



If the suggestion above cannot resolve the issue, could you please share your source model with us for further investigation?

 

 

Regards,

Wan

 

0 Kudos
Wan_Intel
Moderator
355 Views

Hi Sp21,

Thank you for your question.

 

If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.

 

 

Regards,

Wan


0 Kudos
Reply