Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5766 Discussions

Custom Yolov4 tiny model optimization troubleshoots

osivinyuk
Beginner
346 Views

python "C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\model_optimizer\mo.py" --input_model frozen_darknet_yolov4_model.pb --tensorflow_use_custom_operations_config yolo_v4_tiny.json --batch 1 --reverse_inC:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\model_optimizer\mo\main.py:89: SyntaxWarning: "is" with a literal. Did you mean "=="? if op is 'k': [ WARNING ] Use of deprecated cli option --tensorflow_use_custom_operations_config detected. Option use in the following releases will be fatal. Please use --transformations_config cli option instead Model Optimizer arguments: Common parameters: - Path to the Input Model: C:\!!!Optimization\OpenVINO-YOLOV4-master\frozen_darknet_yolov4_model.pb - Path for generated IR: C:\!!!Optimization\OpenVINO-YOLOV4-master\. - IR output name: frozen_darknet_yolov4_model - 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: None - Reverse input channels: True 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: C:\!!!Optimization\OpenVINO-YOLOV4-master\yolo_v4_tiny.json [ WARNING ] Failed to import Inference Engine Python API in: C:\Program Files (x86)\Intel\openvino_2021.3.394\python\python3.9 [ WARNING ] [WinError 2] Не удается найти указанный файл: 'C:\\Program Files (x86)\\Intel\\openvino_2021.3.394\\python\\python3.9\\openvino\\libs' [ WARNING ] Failed to import Inference Engine Python API in: C:\Program Files (x86)\Intel\openvino_2021.3.394\python\python3.9 [ WARNING ] [WinError 2] Не удается найти указанный файл: 'C:\\Program Files (x86)\\Intel\\openvino_2021.3.394\\python\\python3.9\\openvino\\libs' [ WARNING ] Could not find the Inference Engine Python API. At this moment, the Inference Engine dependency is not required, but will be required in future releases. [ WARNING ] Consider building the Inference Engine Python API from sources or try to install OpenVINO (TM) Toolkit using "install_prerequisites.sh" Model Optimizer version: 2021.3.0-2787-60059f2c755-releases/2021/3 2021-04-02 20:02:43.589957: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll

[ ERROR ] Cannot infer shapes or values for node "detector/yolo-v4-tiny/Tile/YoloRegion". [ ERROR ] index 2 is out of bounds for axis 0 with size 2 [ ERROR ] [ ERROR ] It can happen due to bug in custom shape infer function <function RegionYoloOp.regionyolo_infer at 0x0000029D4D8F35E0>. [ 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 ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "detector/yolo-v4-tiny/Tile/YoloRegion" node. For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?q...)

 

I have this error - how could i sovle it?

Thank you

0 Kudos
2 Replies
Zulkifli_Intel
Moderator
312 Views

Hello Oleg Syvyniuk,

 

Thank you for reaching out.

 

I successfully converted a yolo-v4-tf model from Open Model Zoo by using the following MO command:

python mo_tf.py --input_model="C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\open_model_zoo\tools\downloader\public\yolo-v4-tf\yolo-v4.pb" --output_dir="C:\Program Files (x86)\Intel\openvino_2021.3.394\deployment_tools\open_model_zoo\tools\downloader\public\yolo-v4-tf" --data_type=FP32 --model_name=yolo-v4-tf --input_shape=[1,608,608,3] --input=image_input --scale_values=image_input[255] --reverse_input_channels


Can you give it a try and see if it is able to convert the model or not.


For your information Python 3.9 is not officially validated by OpenVINO. 


Regards,

Zulkifli





Zulkifli_Intel
Moderator
283 Views

Hello Oleg Syvyniuk,


This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question


Regards,

Zulkifli




Reply