Single camera biomechanics library
Project description
MonoMech
MonoMech is a notebook-first Python library for monocular biomechanics and OpenSim workflows.
It supports two main entry paths:
-
Video-first
- video -> 2D pose -> 3D world pose -> 3D global pose -> CSV / TRC -> OpenSim scale / IK / ID
-
Marker-first
- existing TRC / marker table -> smoothing / gap filling -> OpenSim scale / IK / ID
Install
pip install monomech
For MediaPipe-based pose estimation:
pip install "monomech[pose]"
For notebooks and plotting:
pip install "monomech[notebook]"
OpenSim
OpenSim is not installed through PyPI by this package. Install it in your conda environment first, then install monomech.
Example:
conda install -c opensim-org opensim
pip install monomech
Design principles
- notebook-friendly result objects
- strong smoothing and gap-filling options
- model-aware TRC export
- OpenSim wrappers that work with either MonoMech-generated TRCs or lab marker TRCs
- explicit quality-control metadata
Quick example
import monomech as mm
trial = mm.load_video("trial.mp4")
pose2d = trial.estimate_pose2d()
pose3d_world = trial.estimate_pose3d_world()
pose3d_global = trial.estimate_pose3d_global()
pose3d_global.to_trc("trial.trc", model_path="model.osim")
scale = trial.run_opensim_scale(model_path="model.osim", trc_path="trial.trc")
ik = trial.run_opensim_ik(model_path=scale.scaled_model_path, trc_path="trial.trc")
See the examples/ folder for full notebooks.
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 monomech-0.15.0.tar.gz.
File metadata
- Download URL: monomech-0.15.0.tar.gz
- Upload date:
- Size: 28.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90226129dabbb788656a96910499eea6b1bc8f33ed7d5e259b486ba0386cc958
|
|
| MD5 |
bf7e5d2618ce607f3a56646505dda4a0
|
|
| BLAKE2b-256 |
83f75ec1e663f80e1b6fe327e7019a7c73e7f0fd329cdd364ed83537bc0d8a3d
|
File details
Details for the file monomech-0.15.0-py3-none-any.whl.
File metadata
- Download URL: monomech-0.15.0-py3-none-any.whl
- Upload date:
- Size: 28.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
865384b50a6eb2975890dd89e4ffdb0688f7989affe021751e1b643f30ec036d
|
|
| MD5 |
d87c00a508694aa99b2e799061dcb43c
|
|
| BLAKE2b-256 |
b4355f58b3954e01ab24267f479c4988fbc3adfc1bb57697cdbc87acdb0dd494
|