Summary
How to convert YoloV3 Tiny model to IR format.
Description
- Followed the commands in Converting YOLO* Models to the Intermediate Representation (IR) to convert Yolo V3-Tiny model to IR format.
- Encountered error:
Error: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "detector/yolo-v3-tiny/Conv_12/BiasAdd/YoloRegion" node.
Resolution
Upgrade to OpenVINO™ 2020.4.
Refer to Converting YOLO* Models to the Intermediate Representation (IR) to find the commands to freeze the model and convert it to IR format:
- Freeze the model:
python convert_weights_pb.py --class_names coco.names --data_format NHWC --weight_file yolov3-tiny.weights –tiny - Convert the frozen model to IR format:
python3 mo_tf.py --input_model /path/to/yolo_v3_tiny.pb --tensorflow_use_custom_operations_config $MO_ROOT/extensions/front/tf/yolo_v3_tiny.json --batch 1where:
- --batch defines shape of model input. In the example, --batch is equal to 1, but you can also specify other integers larger than 1.
- --tensorflow_use_custom_operations_config adds missing Region layers to the model. In the IR, the Region layer has name RegionYolo.