Saturday, 18 August 2018

Setting up TensorFlow Object Detection on Mac OSX

This is more notes for me rather than anything considered.

Basically follow:
https://www.tensorflow.org/install/install_mac

but there are some caveats that I needed to do in order to get it working.

Basically `protoc` wasn't setup... how to install?


wget https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-osx-x86_64.zip
unzip protoc-3.6.1-osx-x86_64.zip
cp bin/protoc /usr/local/bin/protoc
Have a look at the readme:
Ensure you pip install the lot
pip install --user Cython
    pip install --user contextlib2
    pip install --user pillow
    pip install --user lxml
    pip install --user jupyter
    pip install --user matplotlib
Now download the object detection model
git clone https://github.com/tensorflow/models.git
cd models/research
protoc object_detection/protos/*.proto --pyhton_out=.
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
cd object_detection
jupyter notebook
Now you should be ready to follow the notebook instructions. Super fast and super easy