Support for Tensorflow 2.0 in Object Detection API
Asked Answered
R

2

10

I am using TF Object Detection API for training a model that I will eventually deploy using tf-serving. I plan to take the output of this network (at intermediate CNN layers) and build additional networks for other functionality besides object detection. I plan to develop new networks in TF 2.0. However, for this to work smoothly, (I suspect) that Object Detection API will need to be updated to support TF-2.0.

Is there a plan to update the TF OD API to TF 2.0?

I tried running the model_builder_test and it failed as shown below, because tensorflow 2.0 doesn't support contrib anymore.

Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 23, in <module>
    from object_detection.builders import model_builder
  File "/models/research/object_detection/builders/model_builder.py", line 19, in <module>
    from object_detection.builders import box_predictor_builder
  File "/models/research/object_detection/builders/box_predictor_builder.py", line 18, in <module>
    from object_detection.core import box_predictor
  File "/research/object_detection/core/box_predictor.py", line 35, in <module>
    slim = tf.contrib.slim
AttributeError: module 'tensorflow' has no attribute 'contrib'
Rumormonger answered 16/4, 2019 at 19:14 Comment(0)
B
2

Tensorflow 2.0 is still in Alpha. Fortunately, support for Tensorflow 2.0 will eventually be added. See this issue

Bent answered 27/4, 2019 at 15:52 Comment(0)
F
1

Yes there is a plan to migrate the Object Detection API to TF2.0, but it will take months. In the meantime please use TF1.x for the API.

Flathead answered 9/8, 2019 at 18:47 Comment(1)
Following the official release of TF 2.0 this month, I was wondering if anyone is aware of any updates on the migration of Object Detection API to TF2.0?Subdued

© 2022 - 2024 — McMap. All rights reserved.