Ganesh Saraswat 3548b6c0a8 Fixed bug
Technically since we flipped using cv2.flip, we need to re flip in unity (otherwise get incorrect results if query landmarks in unity).
LEGACY BEHAVIOR: comment #define FLIP
CORRECT BEHAVIOR: leave everything as is
NO FLIP: comment cv2.flip() in python, comment FLIP here.
2023-10-02 08:09:52 -06:00
2023-09-02 21:42:06 -06:00
2023-10-02 08:09:52 -06:00
2023-06-03 20:23:10 -06:00
2023-06-03 20:12:45 -06:00
2023-06-04 15:09:11 -06:00

Multithreaded Unity Python MediaPipe Body/Pose

Overview

This is a project that tests Google MediaPipePose inside of Unity using Python bindings. Reading the WebCam and running the model occur on different threads. Basically, it's configurable full body tracking using a WebCam. What's more is that you can stay inside of a Python environment for all the mediapipe stuff (use all your usual libraries).
image showing waving

Installation

  1. Install Python and Unity (2021.3.17f1 was used, but any version close to that should be fine).
  2. pip install mediapipe
  3. Clone/download this repository.
  4. Run main.py using Python.
  5. Run the Unity project.
  6. Go back to the Unity view to see your body being tracked in real time.

Notes:

  • See global_vars.py for some basic configuration options to speed up/improve precision of the detection.
  • Wearing clothing that contrasts with a background helps a fair bit.
  • The architecture and performance has been greatly improved since my last project where I experimented with MediaPipeHands.
Description
Testing multithreaded body tracking inside of Unity using Google MediaPipe Pose Python bindings.
Readme MIT 1 MiB
Languages
C# 62.5%
Python 37.5%