MediaPipe for Raspberry Pi released – No-code/low-code on-device machine learning solutions

Google has just released MediaPipe Solutions for no-code/low-code on-device machine learning for the Raspberry Pi (and an iOS SDK) following the official release in May for Android, web, and Python, but it’s been years in the making as we first wrote about the MediaPipe project back in December 2019.

The Raspberry Pi port is an update to the Python SDK and supports audio classification, face landmark detection, object detection, and various natural language processing tasks.

MediaPipe Studio Raspberry Pi 4

MediaPipe Solutions consists of three components:

  • MediaPipe Tasks (low-code) to create and deploy custom end-to-end ML solution pipelines using cross-platform APIs and libraries
  • MediaPipe Model Maker (low-code) to create custom ML models
  • MediaPipe Studio (no-code) webpage to create, evaluate, debug, benchmark, prototype, and deploy production-level solutions. You can try it out directly in your web browser at least on PC and I could quickly test the object detection on Ubuntu 22.04.

MediaPipe Tasks can be easily installed with pip on Raspberry Pi OS:


You’ll find examples for the Raspberry Pi and other platforms on GitHub, simply enter any of the available directories, and if Raspberry Pi is listed then you are in luck..

MediaPipe Examples

Some examples such as the face_detector are not supported by the Raspberry Pi at the time of writing, but most are including the face_landmarker and object_detection samples.

MediaPipe Object Detection Raspberry Pi

Installation and running the samples on a Raspberry Pi board with an official camera or a USB camera is pretty straightforward:


The setup script actually runs the pip command to install mediapipe so the very first command line in this post is not required…

raspberry pi object detection demo mediapipe tasks

As the program runs you should see boxes around detected objects with the name (persons/cup) and confidence in percent. Note the frame rate is rather low on Raspberry Pi hardware at around 2 fps. The program can be run with options to limit the number of detected objects and set the detection threshold:


“Low-code” here means about 150 lines of code to run object detection.

More details about MediaPipe Solutions can be found on the Google for Developers website as well as in the announcement which provides more details about the Python code for object detection running on the Raspberry Pi.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
1 Comment
oldest
newest
Sander
Sander
1 year ago

That webpage https://mediapipe-studio.webapps.google.com/studio/demo/object_detector , where you can play with detection, is very nice! Certainly after you set Score threshold to 40% or so.

Thanks.

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...