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

Does openvino support custom trained Tensorflow Models

A__Siva
Beginner
1,084 Views

Does openvino support custom trained Tensorflow Models ?

Took below two tensorflow models, Validated Openvino Conversion on base model. Custom trained it, Exported the frozen graph. Tried conversion of it. It failed.

Custom Single class model failed for both

http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_coco_2018_01_28.tar.gz
http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_v2_coco_2018_01_28.tar.gz


Detailed Error Attached here -https://software.intel.com/en-us/forums/computer-vision/topic/809546
Git thread - https://github.com/opencv/dldt/issues/28

Sample Error - 
[ ERROR ]  Exception occurred during running replacer "ObjectDetectionAPIDetectionOutputReplacement" (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIDetectionOutputReplacement'>): Found the following nodes '[]' with name 'crop_proposals' but there should be exactly 1. Looks like ObjectDetectionAPIProposalReplacement replacement didn't work.
[ 2019-05-14 15:41:02,933 ] [ DEBUG ] [ main:318 ]  Traceback (most recent call last):
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 167, in apply_replacements
    replacer.find_and_replace_pattern(graph)
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\front\tf\replacement.py", line 89, in find_and_replace_pattern
    self.replace_sub_graph(graph, match)
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\front\common\replacement.py", line 131, in replace_sub_graph
    new_sub_graph = self.generate_sub_graph(graph, match)  # pylint: disable=assignment-from-no-return
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\extensions\front\tf\ObjectDetectionAPI.py", line 581, in generate_sub_graph
    format(proposal_nodes_ids))
mo.utils.error.Error: Found the following nodes '[]' with name 'crop_proposals' but there should be exactly 1. Looks like ObjectDetectionAPIProposalReplacement replacement didn't work.

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

Traceback (most recent call last):
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\main.py", line 312, in main
    return driver(argv)
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\main.py", line 263, in driver
    is_binary=not argv.input_model_is_text)
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\pipeline\tf.py", line 127, in tf2nx
    class_registration.apply_replacements(graph, class_registration.ClassType.FRONT_REPLACER)
  File "C:\Intel\openvino_2019.1.133\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 184, in apply_replacements
    )) from err
mo.utils.error.Error: Exception occurred during running replacer "ObjectDetectionAPIDetectionOutputReplacement" (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIDetectionOutputReplacement'>): Found the following nodes '[]' with name 'crop_proposals' but there should be exactly 1. Looks like ObjectDetectionAPIProposalReplacement replacement didn't work.

Intel Team, Please confirm if custom trained tensorflow models porting are supported ? Please provide point of contact for support / escalation / help in fixing it. Please do check the logs, pipeline config let us know how to fix it ?

 

0 Kudos
1 Solution
Shubha_R_Intel
Employee
1,084 Views

Dear A. Siva,

Glad to help. Keep on truckin' and thanks for using OpenVino !

Shubha

View solution in original post

0 Kudos
9 Replies
Shubha_R_Intel
Employee
1,084 Views

Dearest A, Siva,

Sorry that you experienced this and it is a known bug. I have already filed a bug on this issue.

Please see the below forum post for details:

https://software.intel.com/en-us/forums/computer-vision/topic/808548

Thanks for your patience  !

Shubha

 

0 Kudos
A__Siva
Beginner
1,084 Views

Thank you for the response. Please give fix at the earliest. Please keep us posted. We need it urgently!!

0 Kudos
Shubha_R_Intel
Employee
1,084 Views

Dear Siva:

I have a fix for you. Unzip the attached and drop the *.json files into C:\Program Files (x86)\IntelSWTools\openvino_2019.1.133\deployment_tools\model_optimizer\extensions\front\tf (or the Linux variant). Try it again. This time it will work !

Thanks,

Shubha

0 Kudos
A__Siva
Beginner
1,084 Views

I was able to convert :) Appreciated. I have to try it out on the app with the changes and get back. Thanks for the quick support. Appreciated.

0 Kudos
A__Siva
Beginner
1,084 Views

I was able to convert :) Appreciated. I have to try it out on the app with the changes and get back. Thanks for the quick support. Appreciated.

0 Kudos
Shubha_R_Intel
Employee
1,085 Views

Dear A. Siva,

Glad to help. Keep on truckin' and thanks for using OpenVino !

Shubha

0 Kudos
A__Siva
Beginner
1,084 Views

Hi Intel Team, Would it be possible to get updated json for ssd_mobilenet_v2_coco.

For other models https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md modified json would you be releasing anytime soon ?

0 Kudos
Shubha_R_Intel
Employee
1,084 Views

Dear A, Siva,

Fair enough question. But have you tried generating IR for a custom-trained  ssd_mobilenet_v2_coco ? Does it fail ? 

Let me know,

Shubha

 

0 Kudos
A__Siva
Beginner
1,084 Views

Sorry for delay, I tried with ssd_v2_support.json it worked. Thanks!!!

0 Kudos
Reply