Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Convert Tensorflow model to OpenVINO model problem #47

Closed
winnie840202 opened this issue Jun 19, 2019 · 3 comments
Closed

Convert Tensorflow model to OpenVINO model problem #47

winnie840202 opened this issue Jun 19, 2019 · 3 comments

Comments

@winnie840202
Copy link

[Required] Your device (RaspberryPi3, LaptopPC, or other device name):
PC
[Required] Your device's CPU architecture (armv7l, x86_64, or other architecture name):
Intel I7-9700K
[Required] Your OS (Raspbian, Ubuntu1604, or other os name):
Ubuntu 16.04
[Required] Details of the work you did before the problem occurred:

When convert the YoloV3 model to Tensorflow model,It's seems

to successful.But,When I want to go to next step,convert the Tensorflow model to
OpenVINO model.And than,the issue was occurred.


[Required] Error message:

sudo python3 /opt/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo_tf.py --
input_model pbmodels/voc_weights_20190620.pb --output_dir lrmodels/YoloV3/FP32/ --
data_type FP32 --batch 1 --tensorflow_use_custom_operations_config
yolo_v3_changed_voc_20190620.json

Model Optimizer arguments:

Common parameters:

- Path to the Input Model: /home/e312/OpenVINO-
YoloV3/pbmodels/voc_weights_20190620.pb

- Path for generated IR: /home/e312/OpenVINO-YoloV3/lrmodels/YoloV3/FP32/

- IR output name: voc_weights_20190620

- Log level: ERROR

- Batch: 1

- 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

- Offload unsupported operations: 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

- Operations to offload: None

- Patterns to offload: None

- Use the config file: /home/e312/OpenVINO-
YoloV3/yolo_v3_changed_voc_20190620.json

Model Optimizer version: 1.5.12.49d067a0

[ ERROR ] List of operations that cannot be converted to IE IR:

[ ERROR ] LeakyRelu (72)

[ ERROR ] detector/darknet-53/Conv/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_1/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_2/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_3/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_4/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_5/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_6/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_7/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_8/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_9/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_10/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_11/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_12/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_13/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_14/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_15/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_16/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_17/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_18/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_19/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_20/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_21/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_22/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_23/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_24/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_25/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_26/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_27/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_28/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_29/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_30/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_31/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_32/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_33/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_34/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_35/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_36/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_37/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_38/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_39/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_40/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_41/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_42/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_43/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_44/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_45/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_46/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_47/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_48/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_49/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_50/LeakyRelu

[ ERROR ] detector/darknet-53/Conv_51/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_1/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_2/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_3/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_4/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_7/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_8/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_9/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_10/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_11/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_12/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_13/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_15/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_16/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_17/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_18/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_19/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_20/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_21/LeakyRelu

[ ERROR ] detector/yolo-v3/Conv_5/LeakyRelu

[ ERROR ] Part of the nodes was not translated to IE. Stopped.

For more information please refer to Model Optimizer FAQ
(<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #24.




[Required] Overview of problems and questions:



Please help me to solve this problem!Thank you.

@PINTO0309
Copy link
Owner

Please reinstall Tensorflow v1.12.0 and try converting again.

@winnie840202
Copy link
Author

Please reinstall Tensorflow v1.12.0 and try converting again.

First,thank for your reply.

I use this command : pip3 install tensorflow==1.12.0
When I converting it,the ERROR appear again.
sudo python3 /opt/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo_tf.py
--input_model pbmodels/voc_weights_20190620.pb
--output_dir lrmodels/YoloV3/FP32/
--data_type FP32
--batch 1
--tensorflow_use_custom_operations_config yolo_v3_changed_voc_20190620.json
Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /home/e312/OpenVINO-YoloV3/pbmodels/voc_weights_20190620.pb
- Path for generated IR: /home/e312/OpenVINO-YoloV3/lrmodels/YoloV3/FP32/
- IR output name: voc_weights_20190620
- Log level: ERROR
- Batch: 1
- 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
- Offload unsupported operations: 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
- Operations to offload: None
- Patterns to offload: None
- Use the config file: /home/e312/OpenVINO-YoloV3/yolo_v3_changed_voc_20190620.json
Model Optimizer version: 1.5.12.49d067a0
[ ERROR ] Cannot infer shapes or values for node "detector/darknet-53/Conv/LeakyRelu".
[ ERROR ] Op type not registered 'LeakyRelu' in binary running on e312-System-Product-Name. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function tf_native_tf_node_infer at 0x7fe25597f158>.
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.
[ ERROR ] Stopped shape/value propagation at "detector/darknet-53/Conv/LeakyRelu" node.
For more information please refer to Model Optimizer FAQ (<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #38.

Thank you.

@winnie840202
Copy link
Author

Please reinstall Tensorflow v1.12.0 and try converting again.

Thank you.
I found a mistake.
When I reinstall Tensorflow v1.12.0.
I do not reconvert YoloV3 to Tensorflow weights.
So, When I convert the .pb file to generate .bin and .xml file always failed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants