Technology Sharing

Using Python OpenCV to implement posture estimation--20240705

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Posture estimation is implemented using Opencv+Mediapipe
What is Mediapipe?
Mediapipe is a framework mainly used to build multimodal audio, video or any time series data. With the help of MediaPipe framework, you can build impressive ML pipelines such as TensorFlow, TFLite and other inference models and media processing functions.

安装命令:
pip install mediapipe
  • 1
  • 2

If it is not installed, please execute this command.

Human pose estimation from video or real-time feed plays a vital role in various fields such as full-body gesture control, quantified physical exercise, and sign language recognition.

For example, it can be used as a basic model for fitness, yoga and dance applications. It has found its main role in augmented reality.

Media Pipe Pose is a framework for high-fidelity human pose tracking that takes input from RGB video frames and infers 33 3D landmarks for the entire human body. This method outperforms current state-of-the-art methods that rely mainly on powerful desktop environments for reasoning and achieves very good results in real time.
The model can predict 33 key points, as shown below:
insert image description here
The specific implementation code is as follows:

import cv2
import mediapipe as mp
import time
  • 1
  • 2