Developers
August 7, 2020

Introducing Object Detection API for TensorFlow 2

TensorFlow still supports TF1 but encourages users to migrate to TF2 by its expanded capabilities.

Today we will talk about the release of the TensorFlow Object Detection API. This release supports TensorFlow 2. The release was previously mentioned in the TensorFlow Dev Summit.

Over the last year, TensorFlow has been working to migrate the TF Object Detection API to be compatible with TF2. It is recommended to follow the Object Detection API in GitHub, as the updates are in real-time.

This release includes many things such as:

Tight Keras integration, access to distribution strategies, easy debugging with eager execution, New binaries for train export that are eager mode compatible.

A suite of TF2 compatible models, including migrations of the most popular TF1 models. New architectures that maintain TF2 implementations, CenterNet, which is a simple and effective architecture based on the recent Objects as Points.

COCO trained weights for all of the models provided as TF2 object-based checkpoints. Access to Distribution strategies (works for distributed training). Changing from asynchronous training in TF1 to synchronous training as the main strategy. Support for keypoint estimation, and data augmentation.

As we can see, the release doesn't come with one only update or benefit compared to the previous version, it's something to pay attention to.  

If you want to start taking a look, you can check out the new Collaboration demos. The is one for inference and another one for few-shot training. There's also a tutorial that shows how to train a rubber ducky detector.

TF has one goal in mind, and that is to expose all the benefits of TF2 and Keras, showing the broad support still given to TF1 as it counts with the majority of TF users. The transition of the user base from TF1 to TF2 will take time and will be gradual but certain.

Users in the codebase belong to three categories

  1. New users who leverage new features and models
  2. TF1 users that migrate to TF2
  3. TF1 users who don't migrate yet

TensorFlow has developed a couple of strategies to support the three categories of users.

  1. Refactor core and architecture to work in TF1 and TF2. As most of the codebase is shared across both, TF has prioritized an agnostic code that can run for both.
  2. Feature extractors being specific to TF1 or TF2. The TF1 backbones are still maintained and implemented in tf-slim. The TF2 backbones are introduced and able to be implemented in Keras.
  3. Instead of re-implementing backbone architectures in Keras, TF leverages a community maintained existing backbone implementation. The models are dependent on the Keras Application Collection.
  4. increase the unit test coverage covering GPU/TPU, TF1 and TF2. TF has to ensure functionality on multiple platforms. TF has designed a new and flexible unit testing framework that works with API functions.
  5. No changes have been applied to the frontend config language. To migrate from TF1 to TF2 easily for users, the models that are using APIs produce the equivalent model architectures in both TF1 and TF2.

This release facilitates the TF ecosystem by making the TF2 compatible and easier to use. In the next few months, the team will continue to migrate large codebases from TF1 to TF2, with the intent of making the user base migrate too. Coming soon… a unified computer vision library. 

In conclusion, TensorFlow has released the Object Detection API that works for TensorFlow2. TF is making all the possible efforts to convince the majority of the user base that is using TF1 to migrate to TF2. How is TF doing this? Well, first of all, they are not forcing it, they continue to give support to TF1. But they offer new services for example tight Keras integration, access to distribution strategies, easy debugging with eager execution, new binaries for train export that are eager mode compatible.

A suite of TF2 compatible models, including migrations of the most popular TF1 models. New architectures that maintain TF2 implementations, CenterNet, which is a simple and effective architecture based on the recent Objects as Points. There are three categories of users in the codebase. New users who leverage new features and models, TF1 users that migrate to TF2, and TF1 users who don’t migrate yet but will probably migrate in the future.

TagsTensorFlow 2GoogleObject Detection API
Lucas Bonder
Technical Writer
Lucas is an Entrepreneur, Web Developer, and Article Writer about Technology.

Related Articles

Back
DevelopersAugust 7, 2020
Introducing Object Detection API for TensorFlow 2
TensorFlow still supports TF1 but encourages users to migrate to TF2 by its expanded capabilities.

Today we will talk about the release of the TensorFlow Object Detection API. This release supports TensorFlow 2. The release was previously mentioned in the TensorFlow Dev Summit.

Over the last year, TensorFlow has been working to migrate the TF Object Detection API to be compatible with TF2. It is recommended to follow the Object Detection API in GitHub, as the updates are in real-time.

This release includes many things such as:

Tight Keras integration, access to distribution strategies, easy debugging with eager execution, New binaries for train export that are eager mode compatible.

A suite of TF2 compatible models, including migrations of the most popular TF1 models. New architectures that maintain TF2 implementations, CenterNet, which is a simple and effective architecture based on the recent Objects as Points.

COCO trained weights for all of the models provided as TF2 object-based checkpoints. Access to Distribution strategies (works for distributed training). Changing from asynchronous training in TF1 to synchronous training as the main strategy. Support for keypoint estimation, and data augmentation.

As we can see, the release doesn't come with one only update or benefit compared to the previous version, it's something to pay attention to.  

If you want to start taking a look, you can check out the new Collaboration demos. The is one for inference and another one for few-shot training. There's also a tutorial that shows how to train a rubber ducky detector.

TF has one goal in mind, and that is to expose all the benefits of TF2 and Keras, showing the broad support still given to TF1 as it counts with the majority of TF users. The transition of the user base from TF1 to TF2 will take time and will be gradual but certain.

Users in the codebase belong to three categories

  1. New users who leverage new features and models
  2. TF1 users that migrate to TF2
  3. TF1 users who don't migrate yet

TensorFlow has developed a couple of strategies to support the three categories of users.

  1. Refactor core and architecture to work in TF1 and TF2. As most of the codebase is shared across both, TF has prioritized an agnostic code that can run for both.
  2. Feature extractors being specific to TF1 or TF2. The TF1 backbones are still maintained and implemented in tf-slim. The TF2 backbones are introduced and able to be implemented in Keras.
  3. Instead of re-implementing backbone architectures in Keras, TF leverages a community maintained existing backbone implementation. The models are dependent on the Keras Application Collection.
  4. increase the unit test coverage covering GPU/TPU, TF1 and TF2. TF has to ensure functionality on multiple platforms. TF has designed a new and flexible unit testing framework that works with API functions.
  5. No changes have been applied to the frontend config language. To migrate from TF1 to TF2 easily for users, the models that are using APIs produce the equivalent model architectures in both TF1 and TF2.

This release facilitates the TF ecosystem by making the TF2 compatible and easier to use. In the next few months, the team will continue to migrate large codebases from TF1 to TF2, with the intent of making the user base migrate too. Coming soon… a unified computer vision library. 

In conclusion, TensorFlow has released the Object Detection API that works for TensorFlow2. TF is making all the possible efforts to convince the majority of the user base that is using TF1 to migrate to TF2. How is TF doing this? Well, first of all, they are not forcing it, they continue to give support to TF1. But they offer new services for example tight Keras integration, access to distribution strategies, easy debugging with eager execution, new binaries for train export that are eager mode compatible.

A suite of TF2 compatible models, including migrations of the most popular TF1 models. New architectures that maintain TF2 implementations, CenterNet, which is a simple and effective architecture based on the recent Objects as Points. There are three categories of users in the codebase. New users who leverage new features and models, TF1 users that migrate to TF2, and TF1 users who don’t migrate yet but will probably migrate in the future.

TensorFlow 2
Google
Object Detection API
About the author
Lucas Bonder -Technical Writer
Lucas is an Entrepreneur, Web Developer, and Article Writer about Technology.

Related Articles