Quick installation and example

Perform the following steps to install and run an object detection inference:

  1. In your TensorFlow source root you created in Chapter 1,Getting Started with Mobile TensorFlow, get the TensorFlow models repo, which contains the TensorFlow Object Detection API as one of its research models:
git clone https://github.com/tensorflow/models
  1. Install the matplotlib, pillow, lxml, and jupyter libraries. On Ubuntu or Mac, you can run:
sudo pip install pillowsudo pip install lxmlsudo pip install jupytersudo pip install matplotlib
  1. Go to the models/research directory, then run the following command:
protoc object_detection/protos/*.proto --python_out=.

This will compile all the Protobufs in the object_detection/protos ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.