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.

Error on converting yolov3_tiny to IR file

Wang__Ting
Beginner
261 Views

Hello,

I'm trying to convert yolov3_tiny to IR file with the model optimizer of openvino toolkit. We typed the commands as followed:

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 1

The commands above could be found on https://docs.openvinotoolkit.org/2019_R1/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert...

And the following errors happened:

122077210_979414252555732_1043871573454370899_n.png

We have converted our yolov3_tiny model to .pb file, following the manuals for openvino toolkit 2019R1, but errors still happened. Should be change our openvino version to the higher one or should we try other methods to avoid the error?

Regards,

Ting Wang

0 Kudos
3 Replies
Wang__Ting
Beginner
245 Views

I forgot to attach our .json file in the question description. Here is our code in yolo_v3_tiny.json.

[
{
"id": "TFYOLOV3",
"match_kind": "general",
"custom_attributes": {
"classes": 9,
"anchors": [10, 14, 23, 27, 37, 58, 81, 82, 135, 169, 344, 319],
"coords": 4,
"num": 6,
"masks": [[3, 4, 5], [0, 1, 2]],
"entry_points": ["detector/yolo-v3-tiny/Reshape", "detector/yolo-v3-tiny/Reshape_4"]
}
}
]

Regards,

Ting Wang

Iffa_Intel
Moderator
209 Views

Greetings,

 

I tried converting the yolov3 Tiny model using Openvino 2020.4 and it is successful.

I used the command to freeze the model :

python convert_weights_pb.py --class_names coco.names --data_format NHWC --weight_file yolov3-tiny.weights –tiny

as in here: 

https://docs.openvinotoolkit.org/2020.4/openvino_docs_MO_DG_prepare_model_convert_model_tf_specific_...

 

Next, I used the command: 

python mo_tf.py --input_model C:\Users\A221LPEN\Desktop\yolov3TF2\yolov3Tiny\tensorflow-yolo-v3-master\tensorflow-yolo-v3-master\frozen_darknet_yolov3_model.pb --tensorflow_use_custom_operations_config C:\Users\A221LPEN\Desktop\yolov3TF2\yolov3Tiny\tensorflow-yolo-v3-master\tensorflow-yolo-v3-master\yolo_v3_tiny.json --batch 1

Which convert the model to IR.

The results are as per attached.

Note: it's important to know whether your model had been freeze or not and I do recommend for you to use a newer Openvino version.

 

Sincerely,

Iffa

 

Iffa_Intel
Moderator
173 Views

Greetings,


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


Sincerely,

Iffa


Reply