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.
6403 Discussions

MO of EfficientDet models trained from the Tensorflow object detection zoo.

milani__peter1
New Contributor I
1,451 Views

I see that there are examples of conversions of EfficientDet models from google/automl repository, including specification of existing transformations supporting the automl versions of the implementation.

I have tried to convert an efficientdet model trained using the object detection zoo, however the transformations fail with

[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] Exception occurred during running replacer "AutomlEfficientDet (<class 'extensions.front.tf.AutomlEfficientDet.EfficientDet'>)": The node with name "convert_image" is not found in the graph. This node should provide scaled image output and is specified in the json file.
[ ERROR ] Traceback (most recent call last):
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 288, in apply_transform
for_graph_and_each_sub_graph_recursively(graph, replacer.find_and_replace_pattern)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/middle/pattern_match.py", line 58, in for_graph_and_each_sub_graph_recursively
func(graph)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/front/tf/replacement.py", line 48, in find_and_replace_pattern
self.transform_graph(graph, desc._replacement_desc['custom_attributes'])
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/extensions/front/tf/AutomlEfficientDet.py", line 72, in transform_graph
assert preprocessing_input_node_id in graph.nodes, 'The node with name "{}" is not found in the graph. This ' \
AssertionError: The node with name "convert_image" is not found in the graph. This node should provide scaled image output and is specified in the json file.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/main.py", line 297, in main
ret_code = driver(argv)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/main.py", line 264, in driver
ret_res = emit_ir(prepare_ir(argv), argv)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/main.py", line 233, in prepare_ir
graph = unified_pipeline(argv)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/pipeline/unified.py", line 25, in unified_pipeline
class_registration.apply_replacements(graph, [
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 338, in apply_replacements
apply_replacements_list(graph, replacers_order)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 324, in apply_replacements_list
apply_transform(
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/utils/logger.py", line 124, in wrapper
function(*args, **kwargs)
File "/opt/intel/openvino_2021.2.200/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 312, in apply_transform
raise Exception('Exception occurred during running replacer "{} ({})": {}'.format(
Exception: Exception occurred during running replacer "AutomlEfficientDet (<class 'extensions.front.tf.AutomlEfficientDet.EfficientDet'>)": The node with name "convert_image" is not found in the graph. This node should provide scaled image output and is specified in the json file.

[ ERROR ] ---------------- END OF BUG REPORT --------------
[ ERROR ] -------------------------------------------------

It appears there are some nodes that are slightly differently named in the Tensorflow object detection zoo versus the automl implementation.

Is there any chance of support for tensorflow object detection zoo efficientdet models.

cheers

Peter

0 Kudos
4 Replies
Zulkifli_Intel
Moderator
1,418 Views

Hello Peter,

Thank you for contacting us.

EfficientDet models from TensorFlow Object Detection Zoo is not officially supported and have not been validated officially by OpenVINO.

As for now, only EfficientDet models from Open Model Zoo and automl/efficientdet repository are supported by OpenVINO.

I would suggest you try converting your model using conversion parameters of Efficientdet-D0 TensorFlow version, which is a public model available in Open Model Zoo.

The conversion parameters to be used for Model Optimizer conversion using Efficientdet-D0 TensorFlow version are available at the following link:

https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/efficientdet-d0-tf/model...

 

As for your query regarding support for TensorFlow Object Detection Zoo EfficientDet Models, let me check with developers’ team and get back to you.

 

Regards,

Zulkifli 

0 Kudos
milani__peter1
New Contributor I
1,404 Views

Thanks,

I need some help identifying the correct node in the automl.json transformation file. as stated in the error message, convert_image  tensor name is not found in the tensorflow model detection zoo (TFMDZ) model I am using.

It seems from the error message this is the input which does all the normalisation and offseting of the image before feeding to the automl graph, the TFMDZ input tensor is called 'input_tensor'. Unfortunately I dont have the whole graph structure to ensure i can replace this 'convert_image' tensor with the correct name. 

cheers

Peter

0 Kudos
Zulkifli_Intel
Moderator
1,384 Views

Hello Peter,

The current error message that you encountered in the respective model transformation was due to TF2 architecture is yet to be validated by OpenVINO.

Our development team are well-aware on such requirements and had performed necessary improvements to make this work in our future versions releases for better TF2 modelling coverage.

 

Regards,

Zulkifli 

0 Kudos
Zulkifli_Intel
Moderator
1,331 Views

Hi Peter,


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


0 Kudos
Reply