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

AssertionError: Demo supports only topologies with the following input keys: im_info, im_data

ahasan_
Novice
2,350 Views

I am using instance_segmentation_demo.py for my custom mask rcnn model which is initially trained by TensorFlow API and then converted using mo_tf.py. There was no error during the conversion but while trying the inference with instance_segmentation_demo.py , I am getting an error: 'Demo supports only topologies with the following input keys: {}'.format(', '.join(required_input_keys))'.

AssertionError: Demo supports only topologies with the following input keys: im_info, im_data

command: python instance_segmentation_demo/instance_segmentation_demo.py -m D:/Mask_Robot_neural_stick2/frozen_inference_graph.xml --label D:/Mask_Robot_neural_stick2/frozen_inference_graph.labels --images 1.png

environment : Windows 10

I am using the latest version of the OpenVINO and i have attached the image and xml file of my model.

0 Kudos
1 Solution
Sahira_Intel
Moderator
2,113 Views

Hi Ahasan,

I would like to apologize for the delay in my response. 

The instance_segmentation_demo.py demo is intended to only be used with pre-trained models. The demo expects the model to have the input types specified in the error messages: im_info, im_data

Your custom model does not have that input type, so the demo would not work with that model.

I hope this information is helpful. Please let me know if you have any further questions.

Best Regards,

Sahira 

View solution in original post

0 Kudos
10 Replies
Munesh_Intel
Moderator
2,308 Views

Hi Ahasan,

Instance Segmentation python demo application expects an instance segmentation model in the Intermediate Representation (IR) format with the following two input constraints:

  • im_data for input image, and 
  • im_info for meta-information about the image (actual height, width and scale).

More information is available at the following page:

https://docs.openvinotoolkit.org/2020.3/_demos_python_demos_instance_segmentation_demo_README.html

 

Regards,

Munesh

0 Kudos
ahasan_
Novice
2,297 Views
I have converted the model already and uploaded the xml file as reference in my question. I have also checked the link that you have suggested but not really sure where I am doing it wrong. Could please be more specific and help me to find the problem by looking at my attached files?
0 Kudos
Munesh_Intel
Moderator
2,281 Views

Hi Ahasan,

 

I’ve validated the Instance Segmentation Python Demo successfully using instance-segmentation-security-0050.xml model for camera input, as shown in the following OpenVINO demo page.

 

https://docs.openvinotoolkit.org/2020.3/_demos_python_demos_instance_segmentation_demo_README.html

 

We suspect that your issue is due to model conversion. Thus, for Mask RCNN model, we recommend that you redo the conversion by using the correct .json file (select according to your TensorFLow Object Detection API version), available at the following page:

 

https://docs.openvinotoolkit.org/2020.3/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Object_Detection_API_Models.html#how_to_convert_a_model

 

If you are still seeing the same error after redoing the conversion, we would require you to share your full model with us, including binary files (.bin) as well, for us to validate on our end. Additionally, we would require you to share more information about your model, such as the layers in use, command given to Model Optimizer to convert your trained model to Intermediate Representation (IR), and also environment details (versions of TensorFlow, Python, etc.)

 

Regards,

Munesh

0 Kudos
ahasan_
Novice
2,258 Views

Hello Munesh,

I have tried once again and the result is same. The generation of IR is successful as you can see in the image below but it doesn't work.tf_to_ir_success.JPG

The command I am using to generate the IR representation :

python mo_tf.py --input_model frozen_inference_graph.pb --transformations_config extensions/front/tf/mask_rcnn_support_api_v1.15.json --tensorflow_object_detection_api_pipeline_config=pipeline.config --input_shape [1,420,640,3]

All the related files (xml, .bin, .pb, .config) can be downloaded :

https://drive.google.com/file/d/1kTStRqNpDYkaAx40RJVSrAKlJ80q2Sj1/view?usp=sharing 

python version : 3.7.3

tensorflow version :  1.15.3

0 Kudos
Sahira_Intel
Moderator
2,236 Views

Hi Ahasan,

We are currently looking into this issue and will get back to you as soon as we find a solution.

Thank you,

Sahira 

0 Kudos
ahasan_
Novice
2,226 Views

Hello Sahira, 

That would be really nice of you. My project is stuck because of this. I need to do it with OpenVINO and neural stick 2. 

Best Regards,

Ahasan Ulla

 

0 Kudos
ahasan_
Novice
2,201 Views

Hello Sahira,

Any progress on the issue?


0 Kudos
dhpancha
Beginner
2,127 Views

Hi,

I just want to add onto the previous post that I am also encountered the same error (see attached) when running a converted model from tensorflow. I converted the mask_rcnn_inception_v2_coco_2018_01_28 model and got the same issue. Thanks.

dhpancha

0 Kudos
Sahira_Intel
Moderator
2,114 Views

Hi Ahasan,

I would like to apologize for the delay in my response. 

The instance_segmentation_demo.py demo is intended to only be used with pre-trained models. The demo expects the model to have the input types specified in the error messages: im_info, im_data

Your custom model does not have that input type, so the demo would not work with that model.

I hope this information is helpful. Please let me know if you have any further questions.

Best Regards,

Sahira 

0 Kudos
Sahira_Intel
Moderator
2,086 Views

Hi Ahasan,


As we have not received a reply from you, we will be closing this case. If you have any questions, please open a new thread.


Thank you,

Sahira


0 Kudos
Reply