How To Install Tensorflow On The Raspberry Pi

May 19, 2018, 6:07 p.m. By: Kirti Bakshi

Tensorflow to Raspberry Pi

In this video below you will be explained on how to install Google's Machine Learning Framework: Tensorflow on the Raspberry Pi. By following the instructions that are briefly mentioned in the below video you will be able to make the use of Tensorflow on your Raspberry Pi for Machine Learning Applications such as using Image classification in order to identify the type of animal in the picture.

The sequel to the video will show its viewers on how to set up object detection on the Raspberry Pi to detect and identify various objects and live video feeds. The Instructions mentioned in the below video have been taken from San J Abraham on GitHub to which the link has been mentioned in the end of this article. Since the guide hasn't been updated in quite a while so there are several changes that are required to be made in order to get things to work with the more recent versions of the installation tools.

In order to get Tensorflow working on the Raspberry Pi there will be a need to compile it from source making the use of Basil and then install it. Basil and Tensorflow both can take several hours to build so the whole process is to take about 10 hours. However, it only takes about an hour to gather packages and get up everything set up for the builds. The long builds can be left to run overnight while you are at work or school. Your Raspberry Pi should have the following:

  • An SD card that is at least 16GB with several GB's of free space available in it.

  • Also, you will need a blank USB flash drive that has at least one GB of free storage space present.

There are Five steps in total in the video as follows:

  • Updating of the Raspberry Pi and then the installation of all the packages that are necessary

  • Setting up of the flash drive for additional swap space

  • Compilation and installation of Bazel

  • Compilation and Installation Tensorflow

  • Finally, Testing of your Installation.

For this tutorial, the Raspberry Pi model 3B with a fresh installation of raspbian stretch version 9 has been made use of. Also, the viewer can see the instructions on how to install the latest version of raspbian on the website.

This tutorial is also supposed to work on a Pi model 3B+ or a model 2. Tensorflow itself will be built as well as installed for Python 3 rather than Python 2.7.

For a detailed information on the steps and more related to the same, One can go through the links mentioned below:

For More Information: GitHub

How to Install TensorFlow on the Raspberry Pi:

Video Source: Edje Electronics