Models: Object Detection API Demo: Instance Segmentation example doesn't work

Created on 16 Jul 2020  路  3Comments  路  Source: tensorflow/models

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [x] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • [x] I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • [x] I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/object_detection_tutorial.ipynb

2. Describe the bug

The last section of the colab notebook is supposed to show inference using a pretrained Mask-RCNN. However, it throws the following errors:


AttributeError Traceback (most recent call last)
in ()
----> 1 masking_model.output_shapes

AttributeError: 'AutoTrackable' object has no attribute 'output_shapes'

and,


TypeError Traceback (most recent call last)
in ()
1 for image_path in TEST_IMAGE_PATHS:
----> 2 show_inference(masking_model, image_path)

2 frames
/usr/local/lib/python3.6/dist-packages/object_detection/utils/ops.py in reframe_box_masks_to_image_masks(box_masks, >boxes, image_height, image_width, resize_method)
823 as box_masks.
824 """
--> 825 resize_method = 'nearest' if box_masks.dtype == tf.uint8 else resize_method
826 # TODO(rathodv): Make this a public function.
827 def reframe_box_masks_to_image_masks_default():

TypeError: data type not understood

3. Steps to reproduce

Run the colab.

research awaiting response bug

Most helpful comment

Hi, I have created a pull request fixing the issue. Please check it. Thanks.

All 3 comments

I have tried in colab with TF version 2.2 and was able to reproduce the issue.Please, find the gist here.Thanks!

Hi, I have created a pull request fixing the issue. Please check it. Thanks.

Awesome, thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings