Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Error while converting YOLOv3 model to IR

Dravecky__Andrej
Beginner
511 Views

Hi, 
I'm following this official guide to convert and run YOLOv3 with OpenVino.
when I try to run model optimizer on the .pb file like this:

python3 mo_tf.py
--input_model /path/to/yolo_v3.pb
--tensorflow_use_custom_operations_config $MO_ROOT/extensions/front/tf/yolo_v3.json
--batch 1

 

I get following error:

Traceback (most recent call last):
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/main.py", line 298, in main
    return driver(argv)
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/main.py", line 247, in driver
    is_binary=not argv.input_model_is_text)
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/pipeline/tf.py", line 136, in tf2nx
    class_registration.apply_replacements(graph, class_registration.ClassType.FRONT_REPLACER)
  File "/opt/intel/openvino_2019.3.376/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 299, in apply_replacements
    )) from err
Exception: Exception occurred during running replacer "REPLACEMENT_ID (<class 'extensions.front.tf.tensorflow_custom_operations_config_update.TensorflowCustomOperationsConfigUpdate'>)": The function 'update_custom_layer_attributes' must be implemented in the sub-class.

I've attached full DEBUG log of the error.
I'm using Ubuntu 18.04, kernel version 5.0.0
Any help would be much appreciated

0 Kudos
3 Replies
Sahira_Intel
Moderator
511 Views

Hi Andrej,

I have converted the Yolo v3 model and did not run into any errors. That should be the correct json file. Can you please attach the .pb file you are converting? 

I see that you are running the last version of OpenVINO, can you please upgrade to the latest version 2020.1 and try again? 

Best Regards,

Sahira 

0 Kudos
Dravecky__Andrej
Beginner
511 Views

Hi,
I've attached the model.
I am using convert_weights_pb.py from https://github.com/mystic123/tensorflow-yolo-v3 to create it from yolov3.weights downloaded from here https://pjreddie.com/media/files/yolov3.weights.

Thanks,

Andrej

0 Kudos
Dravecky__Andrej
Beginner
511 Views

Hello again,

It looks like clean reinstallation of openvino toolkit and all the plugins resolved the issue. Thanks for help.

Best regards,
Andrej

0 Kudos
Reply