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.
6571 ディスカッション

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

ahasan_
初心者
4,189件の閲覧回数

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 件の賞賛
1 解決策
Sahira_Intel
モデレーター
3,952件の閲覧回数

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 

元の投稿で解決策を見る

10 返答(返信)
Munesh_Intel
モデレーター
4,147件の閲覧回数

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

ahasan_
初心者
4,136件の閲覧回数
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?
Munesh_Intel
モデレーター
4,120件の閲覧回数

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

ahasan_
初心者
4,097件の閲覧回数

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

Sahira_Intel
モデレーター
4,075件の閲覧回数

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 

ahasan_
初心者
4,065件の閲覧回数

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

 

ahasan_
初心者
4,040件の閲覧回数

Hello Sahira,

Any progress on the issue?


dhpancha
ビギナー
3,966件の閲覧回数

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

Sahira_Intel
モデレーター
3,953件の閲覧回数

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 

Sahira_Intel
モデレーター
3,925件の閲覧回数

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


返信