With the recent release in TensorFlow lite for the Raspberry pi, previously slow model prediction rates on embedded systems has been vastly improved. Small single-board computers such as the Raspberry Pi has consequentially become more viable as devices to be used for machine learning. This is true especially when coupled with model compression techniques such as post-quantisation and model pruning.
I have encountered many countless pitfalls when I was attempting to install TF 2 onto my Raspberry and I foresee many might too, as such I came up with this article to provide a clear work-able step guide.
For more info: https://www.tensorflow.org/lite/performance/post_training_quantization
TLDR: Read Get Things Started.
Raspberry Pi Model: Raspberry 3/4 (tested on 3B)
Raspberry Version: Debian Buster (Debian 10)
Python Version: 3.7 (Default python 3.7.3 with a fresh Raspberry Image)
Installation Attempts:
Debian Stretch 9
python 2.7 (unable to install TF2)
python 3.5.3 (Failure)
python 3.6 (Error: Tensorflow.python.platform not found)
python 3.7 (**GLIBC_2.27 **not found)
Tensorflow 2 requires the GNU C library (otherwise known as GLIBC)
to be ≥ 2.27 however the highest **GLIBC **version for Debian Stretch is 2.24.
As such Debian Stretch was found to be un-usable.
For more info: https://github.com/PINTO0309/Tensorflow-bin/#usage:
Verdict: Debian Stretch cannot support Tensorflow 2.
#embedded-systems #ai #machine-learning #tensorflow-lite #raspberry-pi #tensorflow