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'
Vikram Gupta
  • 121
  • 1
  • 6

2 Answers2

2

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

Ayaz Amin
  • 180
  • 3
  • 11
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.

Yanfeng Liu
  • 549
  • 5
  • 10
  • 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? – Iocust Oct 10 '19 at 08:14