top of page

Real-time object detection on Raspberry Pi 4b using Tensorflow Lite

Updated: Jul 5, 2024

Last month I purchased my first Raspberry Pi, which is a 4b. this Monday I finally got around to doing something with it. I followed this tutorial to successfully implement real-time object detection based on artificial intelligence: (2) Raspberry Pi LESSON 63: Object Detection on Raspberry Pi Using Tensorflow Lite - YouTube


Here is the fiinal effect. I don't have professional filming equipment so the image looks a little shaky. Please forgive me about this.



Please note: This tutorial has been published for a while now, so we are now facing some updated versions that are not exactly the same as the ones shown in the tutorial. For example the debian system has been updated from the Bullseye version mentioned in the tutorial to the Bookworm version. Also tflite_support has been updated from 0.4.3 as shown in the tutorial to 0.4.4. Please be careful to download the exact same version as the tutorial to get consistent results. Otherwise you will encounter bugs.

the code used in terminal to change 0.4.4 into 0.4.3:

python -m pip install --upgrade tflite-support==0.4.3


Edit two days later: I've implemented the function to broadcast the recognized objects in speech on top of the object recognition feature above, so that it might be useful for visually impaired people. The tutorial that I followed: text to speech object detection | tensorflow-lite object detection | raspberry pi 4 tensorflow-lite - YouTube


Edit on 17/3/2024: In the text to speech (TTS) tutorial I mentioned above, the instructor uses GTTS, which requires internet access to google servers to make it work. But I would like my device to operate out of the control of the network. So I use Festival, a TTS engine that runs locally. In the end, it works perfectly.


A screenshot of the code I ran in the terminal to install Festival

A screenshot of the code that references Festival in the main program


15 views0 comments

Recent Posts

See All
bottom of page