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:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

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

One Reply to “MediaPipe for Raspberry Pi released – No-code/low-code on-device machine learning solutions”

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC