Attitude detection

1. Introduction

MediaPipe is an open source data stream processing machine learning application development framework developed by Google. It is a graph-based data processing pipeline for building and using multiple forms of data sources, such as video, audio, sensor data, and any time series data. MediaPipe is cross-platform and can run on embedded platforms (Raspberry Pi, etc.), mobile devices (iOS and Android), workstations and servers, and supports mobile GPU acceleration. MediaPipe provides cross-platform, customizable ML solutions for real-time and streaming media.

The core framework of MediaPipe is implemented in C++ and provides support for languages such as Java and Objective C. The main concepts of MediaPipe include Packet, Stream, Calculator, Graph and Subgraph.

2. MediaPipe Pose

MediaPipe Pose is an ML solution for high-fidelity body pose tracking,Using BlazePose research, 33 3D coordinates and full background segmentation masks are inferred from RGB video frames. This research also provides motivation for the ML Kit pose detection API.

The landmark model in MediaPipe poses predicts the positions of 33 pose coordinates (see figure below).

image-20231016095802066

3. Posture detection

3.1 Start up

After entering the Raspberry Pi 5 desktop, open a terminal and run the following command to start the container corresponding to Dofbot:

Input command:

image-20231016100146613

3.2 Source code

Code path:~/yahboomcar_ws/src/yahboomcar_mediapipe/scripts