Benchmarking TensorFlow Lite on the New Raspberry Pi 4, Model B

Headline Results From Benchmarking

Benchmarking results in milli-seconds for MobileNet v1 SSD 0.75 depth model and the MobileNet v2 SSD model, both models trained using the Common Objects in Context (COCO) dataset with an input size of 300×300, for the new Raspberry Pi 4, Model B, running Tensor Flow (blue) and TensorFlow Lite (green).

Part I — Benchmarking

A More Detailed Analysis of the Results

Benchmarking results in milli-seconds for MobileNet v1 SSD 0.75 depth model and the MobileNet v2 SSD model, both trained using the Common Objects in Context (COCO) dataset with an input size of 300×300. Results for the Xnor.ai AI2GO platform are using their proprietary binary convolution network.
Inferencing time in milli-seconds for the for MobileNet v1 SSD 0.75 depth model (left hand bars) and the MobileNet v2 SSD model (right hand bars), both trained using the Common Objects in Context (COCO) dataset with an input size of 300×300. The (single) bars for the Xnor AI2GO platform use their proprietary binary weight model. All measurements on the Raspberry Pi 3, Model B+, are shown in yellow, measurements on the Raspberry Pi 4, Model B, are shown in red. Other stand-alone platforms that are not dependent on the Raspberry Pi are shown in green.

Summary

Part II — Methodology

Installing TensorFlow Lite on the Raspberry Pi

The new Raspberry Pi 4.
% ssh pi@raspberrypi.local
$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install git
$ sudo apt-get install libatlas-base-dev
$ sudo apt-get install python3-pip
$ git clone https://github.com/PINTO0309/Tensorflow-bin.git
$ cd Tensorflow-bin
$ mv tensorflow-1.14.0-cp35-cp35m-linux_armv7l.whl tensorflow-1.14.0-cp37-cp37m-linux_armv7l.whl
$ pip3 install --upgrade setuptools
$ pip3 install tensorflow-1.14.0-cp37-cp37m-linux_armv7l.whl
$ python3 -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
$ sudo apt-get install python3-opencv
$ pip3 install Pillow
$ pip3 install numpy

The Benchmarking Code

In Closing

Links to Previous Benchmarks

Links to Getting Started Guides

--

--

--

Scientist, Author, Hacker, Maker, and Journalist.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to build hierarchical classification for image recognition

The Most Innovative Things Happening With NLP

Understanding Concepts of AdaBoost Classifier

Let’s make a Spam Classifier using Naive Bayes algorithm | NLP Part-1

Deep Learning on a USB Stick

Robotic Assembly Using Deep Reinforcement Learning

Pytorch : Must to Learn on The Path to Data Scientist

Fall Detection with CNN architecture

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alasdair Allan

Alasdair Allan

Scientist, Author, Hacker, Maker, and Journalist.

More from Medium

Easy climate monitoring using a Raspberry Pi

Raspberry Pi Zero WH with an AHT20 Sensor attached and hooked up

Monitor your 3D printer remotely with a Raspberry Pi

Headless Raspberry PI’s on Tailscale: A cloud-like provisioning process

How Computers Can Run On Less Power