Live object detection on a Pi, step by step

Nov 09, 2026 Last reply: 1 day ago 3 Replies
Jump to replies (3)

The number that jumped out at me first: the live detection runs at roughly 1.1 to 1.3 frames per second on the Pi 3. That sounds slow on paper, but watching the demo feed, the boxes and labels track household objects well enough that it still feels real-time. The maker's own accuracy estimate of about 75 percent seems fair for a board this size, and honestly that figure feels more trustworthy than a vague claim of smooth performance.



The guide is organised into six numbered steps shown in a terminal on the desktop, which keeps the whole process easy to follow. It starts with an APT update and distribution upgrade, then installs TensorFlow from a pre-built ARM-compatible wheel file, tensorflow-1.8.0-cp35-none-linux_armv7l.whl, along with libraries like Pillow, lxml, Jupyter, Matplotlib and Cython. OpenCV goes in next via pip3, then Protobuf 3.6.0 gets compiled from source with autotools, building both the C++ core and Python bindings. The final steps handle the models repository directory structure, appending the research and slim folders to PYTHONPATH in .bashrc, compiling the detection proto files, and running Object_detection_picamera.py on the live feed.



A few choices here stand out to me. Using the ssdlite_mobilenet_v2_coco model from the Detection Model Zoo is a sensible pick for limited hardware, in my view. The camera module sits on top of a white case, and a USB webcam can be swapped in as an alternative, which gives people flexibility with kit they already own. The maker also notes the setup should work on a Pi 2, not just the Pi 3 Model B shown.



Two open points are worth knowing before starting. The maker says detection does not work very well in low light, and TensorFlow's example code has no logging of detected objects, so anyone wanting a record of what was spotted has to write that themselves. There is also a bonus demo at the end with a custom-trained model picking out individual playing cards, plus a preview of a cat flap monitor that texts when a pet is detected.



Project by Edje Electronics. Watch it on their YouTube channel:

formatting link


Compiling Protobuf 3.6.0 from source with autotools rather than trying a shortcut seems like the smart call to me. It is the step most guides skip and the one that usually breaks, so building the C++ core and Python bindings properly probably saves people hours of cryptic errors. It costs time during setup, but the trade-off looks worth it.

I am curious about the FPS counter showing 0.95 in one shot while the stated range is 1.1 to 1.3. Was that lower reading taken with a USB webcam instead of the Pi camera module, or does the rate just vary depending on what is in the frame? Knowing how much it fluctuates would help me judge what to expect.

Since the maker mentioned that people have had success training detection models on IR images, a nice variation would be pairing this exact setup with an infrared camera and an IR lamp. That would attack the low-light weakness directly while keeping the same six-step pipeline, the same wheel install, and the same ssdlite_mobilenet_v2_coco model untouched.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required