How to Correctly Install TensorFlow Object Detection API

Install TensorFlow Object Detection API on Windows 10 in 6 easy steps . Made by Ayush Thakur using Weights & Biases
Ayush Thakur
Here's a quick report on how you install TensorFlow Object Detection (TFOD) on Windows 10:
  1. First, enter: !git clone https://github.com/tensorflow/models.git
  2. Then: !git clone https://github.com/cocodataset/cocoapi.git
  3. Copy the pycocotools folder from cocoapi/PythonAPI to tensorflow/models/research directory.
  4. Then, download Protobuf:
    • From the protoc releases page download the latest protoc-*-*.zip. release (e.g. protoc-3.12.3-win64.zip for 64-bit Windows).
    • Extract the contents of the downloaded protoc-*-*.zip in a directory of your choice (e.g. C:\Program Files\Google Protobuf).
    • Open command prompt and cd to tensorflow\models\research.
    • Run “\protoc-3.4.0-win32\bin\protoc.exe” object_detection/protos/*.proto --python_out=.
    • To test if this worked properly, go to the object_detection/protos folder, and make sure there are .py files.
  5. Next, install Object Detection API:
    • Copy the setup.py file from tensorflow\research\object_detection\packages\tf2 to tensorflow\models\research\
    • Open command prompt and cd to tensorflow\models\research.
    • python -m pip install.
  6. To test the installation, try python object_detection/builders/model_builder_tf2_test.py within TensorFlow/models/research/.
Those 6 steps should be all you need to install TFOD on Windows 10. Thanks for reading!

References