Want to up your robotics game and give it the ability to detect objects? Maybe implement a security camera that can see and identify certain items? Now that the Raspberry Pi is fast enough to do machine learning, adding these features is fairly straightforward.
This guide will show you the steps to get TensorFlow 2 and TensorFlow Lite running on your Raspberry Pi 4 along with an object detection demo.
There are two main setup paths to choose from. The first option is with a PiTFT if you want to have a larger display. The second option is with the BrainCraft HAT, which has a built-in display and audio along several other components such as DotStar LEDs, a Joystick, and ports.
To start with, you will need a Raspberry Pi 4. Since TensorFlow object detection is processing intensive, we recommend at least the 4GB model.
You will need a camera for the Raspberry Pi to see with.
If you want to get a HAT that has everything you need besides the camera including display, sound, and cooling, you'll want to pick up the BrainCraft HAT.
You will also need a display so you can see what it's detecting. You can use any of our displays with the Raspberry Pi, but the 3.5" display is our biggest.
But our other PiTFT's will also work just fine
Since the Raspberry Pi 4 tends to run a little hot, we recommend the Pimoroni Fan SHIM.
Or this mini 5V fan
Or tall heatsink
In order to fit the fan/heatsink along with the display, you will need a GPIO stacking header.
The flex cable that comes with the camera is a bit on the short side, so you may want a longer cable as well.