The Python quickstart package listed under TensorFlow Lite (https://www.tensorflow.org/lite/guide/python) describes how to install the TensorFlow Lite package for Raspberry Pi. However, there are several notable exceptions. Due to this, we have listed the entire process here:
- First and foremost, install the TensorFlow Lite interpreter. Raspberry Pi has ARM7 and Python3.7 installed, so run the following two commands in the Terminal:
$sudo su
$pip3 install tflite_runtime-1.14.0-cp37-cp37m-linux_armv7l.whl
- As per the official TensorFlow Lite documentation, some changes need to be made in the label_image.py file (https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/examples/python):
$import tflite_runtime.interpreter as tflite,
$interpreter = tf.lite.Interpreter(model_path=args.model_file)
Note that when those...