Models: object_detection not supported in TF 2

Created on 30 Jun 2020  路  4Comments  路  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/tree/master/research/object_detection

2. Describe the bug

The object_detection API isn't supported under TensorFlow 2, which is a problem in general. In my specific case, I'm trying to create an object detection model and use tflite to deploy it on mobile, but due to this bug in tflite I'm stuck using tf-nightly. However, I also depend on the object_detection API, which is stuck on TF 1.x.

3. Steps to reproduce

  1. Create a model using the object_detection API (TensorFlow 1.15).
  2. Try to convert that model to a mobile format using tflite (TensorFlow 2). It will fail to convert (presumably due to mismatched TF versions).

4. Expected behavior

I should be able to use the object_detection API with the latest TensorFlow releases.

5. Additional context

N/A

6. System information

N/A

research bug

Most helpful comment

Hello, we have a major update: https://blog.tensorflow.org/2020/07/tensorflow-2-meets-object-detection-api.html
Please check out the features supported.

All 4 comments

Hi, the team has recent code updates to be more compatible with TF 2.x. Which model is the incompatible one you use? Thanks

@saberkun I'm just trying to use the object_detection library, for example:

from object_detection import model_lib

It's not even packaged in the latest pypi releases.

Hello, we have a major update: https://blog.tensorflow.org/2020/07/tensorflow-2-meets-object-detection-api.html
Please check out the features supported.

@saberkun looks fantastic, thank you!!

Was this page helpful?
0 / 5 - 0 ratings