Pose estimation for rehabilitation exercises
Project description
DeepRehab Pose
Pose estimation for rehabilitation exercises.
Overview
DeepRehab Pose is a Python package that provides pose estimation capabilities for rehabilitation exercises. It uses MediaPipe to detect body landmarks in video files and can be used to analyze patient movements during physical therapy sessions.
Features
- Extract body landmarks from video files
- Process video frames to identify 33 body points
- Handle invalid or corrupted video files
- Return structured landmark data for further analysis
Installation
To install the package in development mode:
pip install -e .
To install from source:
python -m build
pip install dist/deeprehab_pose-0.1.0-py3-none-any.whl
Usage
from deeprehab_pose import extract_landmarks, InvalidVideoError
try:
# Extract landmarks from a video file
landmarks = extract_landmarks("path/to/video.mp4")
# Process the landmarks
for frame_index, frame_landmarks in enumerate(landmarks):
print(f"Frame {frame_index}: {len(frame_landmarks)} landmarks detected")
except InvalidVideoError as e:
print(f"Error processing video: {e}")
API
Main Functions
extract_landmarks(video_path)- Extract body landmarks from a video fileInvalidVideoError- Exception raised for invalid video files
Data Classes
Landmark- Represents a body landmark with x, y, z coordinates and visibility
Testing
Run the tests with:
python -m pytest src/deeprehab_pose/test_pose.py
License
MIT
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
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
File details
Details for the file deeprehab_pose-0.1.0.tar.gz.
File metadata
- Download URL: deeprehab_pose-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7988856516a8e476fbc0e2f02e32b7c4d419be4915d96e11c81f1dbc00953709
|
|
| MD5 |
6282857185fd1215e99e1aa960085968
|
|
| BLAKE2b-256 |
b0de7808ed54ebbc84054f14ae9f368aaf39e8b6e41c924d4343295e68a4d76e
|
File details
Details for the file deeprehab_pose-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deeprehab_pose-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfc9d17b38ad008df25f5c2c15ed24dd041d0abbf1fc768285f98bab5ebb5dbb
|
|
| MD5 |
4912d5bd25418daf0b2572276ae65f95
|
|
| BLAKE2b-256 |
ca5da15d13d6fc97197d5a4a0159b72db6929b0408affa0317c8be4daef50174
|