This is a thin wrapper around the Tensorflow Object Detection API for easy installation and use. The original installation procedure contains multiple manual steps that make dependency management difficult. This repository creates a pip package that automate the installation so that you can install the API with a single pip install.
pip install tf-object-detection[tf]
Or for tensorflow with GPU support,
pip install tf-object-detection[tf-gpu]
All the scripts from tensorflow object detection APIs work out-of-box. You can find an example usages from the API's model_main.py.
import object_detection
#
# install [poetry](https://python-poetry.org)
#
# Download and setup all required dependencies required for tensorflow object
# detection library to work correctly.
#
$ poetry installTo rebuild the sdist and wheels, there are 2 issues to work around.
-
Poetry does not handle combining modules from different locations, which is what we are trying to do with the modules in the
tensorflow_modelssubproject. This is fixed by the following patch which hopefully will get merged in poetry-core, python-poetry/poetry-core#108 -
The build depends on the protobuf compiler which is installed with the protoc-wheel-0 dev-dependency. However this means that
poetry buildhas to run from within the development virtualenv that was set up withpoetry install. So build will only work if run aspoetry run poetry build.
pyproject.toml: The project configuration.protoc_compile.py: Helper script to compile protocol buffer wrappers.tensorflow_models: A git submodule pointing to the version of tensorflow object detection this thin wrapper is for.