
Setting up an environment suitable for the project
You don't need any specialized environment in order to run the project, though we warmly suggest installing Anaconda conda and creating a separated environment for the project. The instructions to run if conda is available on your system are as follows:
conda create -n TensorFlow_api python=3.5 numpy pillow
activate TensorFlow_api
After activating the environment, you can install some other packages that require a pip install command or a conda install command pointing to another repository (menpo, conda-forge):
pip install TensorFlow-gpu
conda install -c menpo opencv
conda install -c conda-forge imageio
pip install tqdm, moviepy
In case you prefer another way of running this project, just consider that you need numpy, pillow, TensorFlow, opencv, imageio, tqdm, and moviepy in order to run it successfully.
For everything to run smoothly, you also need to create a directory for your project and to save in it the object_detection directory of the TensorFlow object detection API project (https://github.com/tensorflow/models/tree/master/research/object_detection).
You can simply obtain that by using the git command on the entire TensorFlow models' project and selectively pulling only that directory. This is possible if your Git version is 1.7.0 (February 2012) or above:
mkdir api_project
cd api_project
git init
git remote add -f origin https://github.com/tensorflow/models.git
These commands will fetch all the objects in the TensorFlow models project, but it won't check them out. By following those previous commands by:
git config core.sparseCheckout true
echo "research/object_detection/*" >> .git/info/sparse-checkout
git pull origin master
You will now have only the object_detection directory and its contents as checked out on your filesystem and no other directories or files present.
Just keep in mind that the project will need to access the object_detection directory, thus you will have to keep the project script in the very same directory of object_detection directory. In order to use the script outside of its directory, you will need to access it using a full path.