A library that calculates joint rotations from mediapipe pose data
Project description
upose
upose is a library that calculates joint rotations from mediapipe pose data.
Installation
pip install upose
Usage
from upose import UPose
pose_tracker = UPose(source="mediapipe",flipped=True)
pose_tracker.newFrame(mediapipe_results)
pose_tracker.computeRotations()
# Get rotations:
pelvis_rotation = pose_tracker.getPelvisRotation()
pelvis_rotation["world"] #is world rotation
pelvis_rotation["local"] #is local rotation
pelvis_rotation["euler"] #is local rotation in Euler angles [x,y,z] that can be applied in zxy order to get the local rotation
pelvis_rotation["visibility"] #is visibility of the joint between [0,1], where 1 means visible joint
# Same for other rotations:
torso_rotation = pose_tracker.getTorsoRotation()
left_shoulder_rotation = pose_tracker.getLeftShoulderRotation()
right_shoulder_rotation = pose_tracker.getRightShoulderRotation()
left_elbow_rotation = pose_tracker.getLeftElbowRotation()
right_elbow_rotation = pose_tracker.getRightElbowRotation()
left_hip_rotation = pose_tracker.getLeftHipRotation()
right_hip_rotation = pose_tracker.getRightHipRotation()
left_knee_rotation = pose_tracker.getLeftKneeRotation()
right_knee_rotation = pose_tracker.getRightKneeRotation()
# You can also get major body angles:
print("Pelvis Angle:", pose_tracker.getPelvisAngle())
print("Left Elbow Angle:", pose_tracker.getLeftElbowAngle())
print("Right Elbow Angle:", pose_tracker.getRightElbowAngle())
print("Left Knee Angle:", pose_tracker.getLeftKneeAngle())
print("Right Knee Angle:", pose_tracker.getRightKneeAngle())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
upose-0.1.0.tar.gz
(6.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
upose-0.1.0-py3-none-any.whl
(6.2 kB
view details)
File details
Details for the file upose-0.1.0.tar.gz.
File metadata
- Download URL: upose-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
921c32cf394db6f385878cc48037819f323ac2e22ebb444da0d4c6244e5a0a41
|
|
| MD5 |
c5a00c7ec9b8a6621a756fe137c9c60c
|
|
| BLAKE2b-256 |
b5be9c444605cf50d7f98d9e252f33ac67a8eb6b93498f6c1f116f4055af19b3
|
File details
Details for the file upose-0.1.0-py3-none-any.whl.
File metadata
- Download URL: upose-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e542f25df1e977eb56254777e148f029bfa21e05c5a3d10dfd9c263b261f6f7
|
|
| MD5 |
a5f8ececdcf1a6130980939efc283b45
|
|
| BLAKE2b-256 |
7b5eea8f0f4e9fe0678407f4da2578a0ec7736dbb7f525417ac55d9891aa46ad
|