PINTO0309 / OpenVINO-YoloV3

YoloV3/tiny-YoloV3+RaspberryPi3/Ubuntu LaptopPC+NCS/NCS2+USB Camera+Python+OpenVINO
https://qiita.com/PINTO
Apache License 2.0
538 stars 167 forks source link

Convert Tensorflow model to OpenVINO model problem #47

Closed winnie840202 closed 5 years ago

winnie840202 commented 5 years ago

[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
(/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 commented 5 years ago

Please reinstall Tensorflow v1.12.0 and try converting again.

winnie840202 commented 5 years ago

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:

Thank you.

winnie840202 commented 5 years ago

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.