Article ID: 000059310 Content Type: Error Messages Last Reviewed: 05/20/2022

Unable to Convert Custom YOLOv4* Model to Intermediate Representation (IR) Format

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Model optimizer command to convert YOLOv4* model to Intermediate Representation (IR) format

Description
  • Converted custom YOLOv4* model into Intermediate Representation (IR) with the command:

    python mo_tf.py --input_model frozen_darknet_yolov4_model.pb --tensorflow_use_custom_operations_config yolo_v4_tiny.json --batch 1 --reverse_input_channels

  • Received error: Cannot infer shapes or values for node "detector/yolo-v4-tiny/Tile/YoloRegion".
Resolution

Add scale value and input shape parameters in command line for the Model Optimizer to convert YOLOv4 model into IR:

python mo_tf.py --input_model=<Installed_directory>\Intel\openvino_2021.3.394\deployment_tools\open_model_zoo\tools\downloader\public\yolo-v4-tf\yolo-v4.pb --output_dir="<path/to/save/>" --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

Additional information

The conversion of the YOLOv4 model is now available in the OpenVINO™ toolkit 2021.4.

Related Products

This article applies to 2 products