Giter VIP home page Giter VIP logo

multi-pose-landmark-mediapipe's Introduction

Multi Pose Landmark MediaPipe

MediaPipe multi pose detection example. The graph has been adapted from the HandLandmarkTrackingCpu example by mediapipe. This is a proof of concept and is provided for educational purposes only.

Source: Allan Mas

Install & Run

Currently, this is only tested on Windows and macOS. It's recommended to use Python3 (>=3.7) and a virtual environment.

python install -r requirements.txt

To run an example use the basic python command to start up the script.

# start pose detection with webcam
python pose.py

# pose detection with single image
python pose.py --image images/pexels-allan-mas-5368956.jpg

There is also a pre-compiled pose detection graph which includes the detection to ROI conversion. It is possible to run the example with the following command:

python detection.py

Build

To build the graphs, download the mediapipe repository (>=0.8.7) and set the path to this repository as well as to the mediapipe repo in the build_custom_graphs.sh. After that run the build_custom_graphs.sh script and let it compile. If you need help to setup your development environment, have a look at Building MediaPipe Python Package.

Problems and Challenges

Pose ROI

The roi, which is detected either by the pose detection or the landmark to pose roi node, is quite large for a person. The overlap of different pose rois leads to difficulties in tracking. This is because the node was made for single pose detection. It is possible to increase the min-similarity-threshold parameter to let multiple overlapping pose not be count as one. If another pose detection would be applied, which is way more close to the landmarks detected, this could already solve the problem.

MediaPipe Solution

The solution_base file has been copied into mpx/solution_base.py to adapt the path, where the resources are loaded and set the _input_stream_type_info manually due to a not registered type error which could not be resolved for now.

Landmark Smoothing

At the moment the landmark filter is not implemented into the graph because of difficulties to map filter to pose.

Graphs

Pose Detection with ROI CPU

Multi Pose Landmark Tracking CPU

About

MIT License - Copyright (c) 2022 Florian Bruggisser

Based on mediapipe-osc.

multi-pose-landmark-mediapipe's People

Contributors

cansik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

noobdevelop0512

multi-pose-landmark-mediapipe's Issues

Person landmark

Is the coordinate landmark point in person one and person two different?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.