Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file

PiperOrigin-RevId: 335521712
5 contributors

Users who have contributed to this file

@vighneshbirodkar @tombstone @srjoglekar246 @a-googler @kmindspark

Object Detection API with TensorFlow 2


Python 3.6 TensorFlow 2.2 Protobuf Compiler >= 3.0


You can install the TensorFlow Object Detection API either with Python Package Installer (pip) or Docker. For local runs we recommend using Docker and for Google Cloud runs we recommend using pip.

Clone the TensorFlow Models repository and proceed to one of the installation options.

git clone

Docker Installation

# From the root of the git repository
docker build -f research/object_detection/dockerfiles/tf2/Dockerfile -t od .
docker run -it od

Python Package Installation

cd models/research
# Compile protos.
protoc object_detection/protos/*.proto --python_out=.
# Install TensorFlow Object Detection API.
cp object_detection/packages/tf2/ .
python -m pip install --use-feature=2020-resolver .
# Test the installation.
python object_detection/builders/

Quick Start


Training and Evaluation

To train and evaluate your models either locally or on Google Cloud see instructions.

Model Zoo

We provide a large collection of models that are trained on COCO 2017 in the Model Zoo.