Skip to content

ThanhNguyenDat/Install-Tensorflow-Object-Detection-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 

Repository files navigation

Install Tensorflow Object Detection API

Download and install Visuall Studio and check Desktop Development with C++.

Download and install Git.

Install necessary library.

Open Command Propt with Administrator with python > 3.5 (I used version 3.7) and tensorflow=2.4.1

    pip install -r requirements.txt

COCOAPI

    pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

A. You install and setup Tensorflow Object Detection API.

with Object Detection API with TensorFlow 2

  • 0. Create TF2_ObjDetect_API folder and open command propt in here image

  • 1. Download models of tensorflow api with:

      git clone https://github.com/tensorflow/models.git
    

in Tensorflow folder and cd models.

  • 2. You need to set variable PYTHONPATH in System variables.

image

  • 3. Protobuf Installation and Compilation.

    • Head to the protoc releases page

    • Download last release (e.g protoc-3.17.0-win64.zip) in the TF2_ObjDetect_API Folder.

    • Extract file here in the TF2_ObjDetect_API Folder and then rename Google Protobuf

    image

    • Add path directory Google Protobuf to your Path environment variable.

      note: The path will be set temporarily, to make the change permanent you have to set it in the “Advanced system settings” → “Environment Variables” tab. Restart The Cmd or PowerShell window for changes to take effect.

    image

    • Open new command propt, and cd into TF2_ObjDetect_API/models/research/ directory and run the following command:

      protoc object_detection/protos/*.proto --python_out=.`
      
  • 4. Build and install.

    Copy TF2_ObjDetect_API\models\research\object_detection\packages\tf2\setup.py into TF2_ObjDetect_API\models\research

    We choose one of two ways. (I used 4.2)

    • 4.1 run the following command from within TF2_ObjDetect_API\models\research:

      python setup.py built
      
      python setup.py install
      
    • 4.2 run the following command from within TF2_ObjDetect_API\models\research:

      python -m pip install .
      
  • 5. Test your Installation.

    • run the following command from within TF2_ObjDetect_API\models\research:

      python object_detection/builders/model_builder_tf2_test.py
      
    • If the result is as shown in the image below, then you are successful.

    image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published