| Name | pyxy3d JSON |
| Version |
0.3.12
JSON |
| download |
| home_page | |
| Summary | GUI based multicamera calibration that integrates with 2D landmark tracking to triangulate 3D landmark positions |
| upload_time | 2024-01-13 16:21:46 |
| maintainer | |
| docs_url | None |
| author | Mac Prible |
| requires_python | >=3.10,<3.12 |
| license | BSD-2-Clause |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
<div align="center">
# Open Source DIY Motion Capture
<img src = "pyxy3d/gui/icons/pyxy_logo.svg" width = "150">
[](https://pypi.org/project/pyxy3d/)
[](https://opensource.org/license/bsd-2-clause/)
[](https://pypi.org/project/pyxy3d/)
[](https://github.com/mprib/pyxy3d/commits)
[](https://github.com/mprib/pyxy3d/stargazers)
</div>
## About
Pyxy3D (*pixie-3D*) is intended to serve as the core software component of a low-cost DIY motion capture studio. It is a **py**thon package that integrates:
- multicamera calibration
- 2D (**x,y**) landmark tracking
- **3D** landmark triangulation.
It is GUI-based and open-sourced under the LGPLv3.
Landmark tracking is based on a Tracker abstract base class. Variations of Google's Mediapipe have been implemented to illustrate use of this base class and how these calculations will flow automatically through the processing pipeline. Implementing alternate tracking tools (such as MMPose and DeepLabCut) is on the development roadmap.
Please see our [docs](https://mprib.github.io/pyxy3d/) for details about installation, project setup, and general workflow.
---
### Demo Output
https://github.com/mprib/pyxy3d/assets/31831778/803a4ce8-4012-4da1-87b9-66c5e6b31c59
*The above was created using Pyxy3D, a 7 year old t440p laptop, and 4 webcams (~$25 each). This includes camera calibration, recording of synchronized frames (720p @ 24 fps), landmark detection, and point triangulation. Note that the webcam recording functionality is not in the current version, though will be restored in the future. Animated rig creation was done using an early stage Blender add-on project called [Rigmarole](https://github.com/mprib/rigmarole)*
---
## Quick Start
Please note that given the size of some core dependencies (OpenCV, Mediapipe, and PySide6 are among them) installation and initial launch can take a while.
### Basic Installation and Launch
#### Windows
```bash
# Open Command Prompt and navigate to directory that will hold venv
# this does not need to be the same as where your project workspace is held
cd path\to\your\project
# Create a virtual environment named 'env' using Python 3.10
"C:\Path\To\Python3.10\python.exe" -m venv .venv
# Activate the virtual environment
.\env\Scripts\activate
# Your virtual environment is now active.
# You can install using pip
pip install pyxy3d
# Launch from the command line
pyxy3d
```
#### MacOS/Linux
```bash
# Open Command Prompt and navigate to directory that will hold venv
# this does not need to be the same as where your project workspace is held
cd path/to/your/project
# Create a virtual environment named 'venv' using Python 3.10
/path/to/python3.10 -m venv .venv
# Activate the virtual environment
source .venv/bin/activate
# Your virtual environment is now active.
# You can install using pip
pip3 install pyxy3d
# Launch from the command line
pyxy3d
```
### Basic Steps
1. Once the GUI launches, navigate to File->New/Open Project and create a folder to hold your project
- A basic [project structure](https://mprib.github.io/pyxy3d/project_setup/) will be created here
2. Define a Charuco calibration board via the Charuco tab and print it out, fixing it to something flat
3. Record footage for the calibration according to the guidelines for the [intrinsic](https://mprib.github.io/pyxy3d/intrinsic_calibration/) and [extrinsic](https://mprib.github.io/pyxy3d/extrinsic_calibration/) calibrations.
4. Record synchronized motion capture trials
5. Store video files within the project folder and reload the workspace
6. Run autocalibration on all cameras within the Cameras tab
7. Run "Calibration Capture Volume" from the Workspace Tab
8. Set origin within the capture volume (optional but helpful)
9. Run post-processing on individual recordings to generate 3D trajectory output
## Key Features
### Calibration board creation
- Easy creation of `png` files for ChArUco calibration boards
- board definition can be changed across intrinsic and extrinsic calibration allowing greater flexibiltiy
### Intrinsic Camera Calibration
- Automated calculation of camera intrinsic properties from input video
- Optical Center
- Focal Length
- Lens Distortion
- Visualization of distortion model to ensure reasonableness
### Extrinsic Camera Calibration
- Automated bundle adjustment to estimate 6 DoF relative position of cameras
- Visualizer to inspect the estimates from the bundle adjustment
- Setting of the World Origin within the visualizer to simplify data processing
### 3D Tracking
- Tracker API for integrating alternate tracking methods
- 3 sample implementations with Google Mediapipe (Hands/Pose/Holistic)
- Automated application of landmark tracking to synchronized videos
- Triangulation of 3D landmark position based on calibrated cameras
- Gap-filling and butterworth filtering to smooth trajectory estimates
### Trajectory Output
- output to `.trc` file format for use in biomechanical modelling
- output to tidy `.csv` format with well-labelled headers for straightforward integration with other workflows
- companion project [Rigmarole](https://github.com/mprib/rigmarole) in development to facilitate creation of animated rigs in Blender
## Limitations
### Requires Frame Sync
The workflow currently requires you to provide your own synchronized frames or to provide [a file](project_setup.md#frame_time_historycsv) that specifies the time at which each frame was read so that pyxy3d can perform the synchronization itself. There are plans to manage this synchronization automatically through audio files, though that has not yet been implemented.
### Currently only using Mediapipe
Google's Mediapipe provides a relatively easy and efficient method for human subject tracking, though for many uses it is limiting. Pyxy3D has a general Tracker base class that is implemented in a few versions (Pose/Hands/Holistic). This has provided a proof of concept implementation of markerless tracking, though for more robust use the roadmap calls for integration with more powerful tools such as [MMPose](https://github.com/open-mmlab/mmpose) and [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut).
## Reporting Issues and Requesting Features
To report a bug or request a feature, please [open an issue](https://github.com/mprib/pyxy3d/issues). Please keep in mind that this is an open-source project supported by volunteer effort, so your patience is appreciated.
## General Questions and Conversation
Post any questions in the [Discussions](https://github.com/mprib/pyxy3d/discussions) section of the repo.
## Acknowledgments
This project was inspired by [FreeMoCap](https://github.com/freemocap/freemocap) (FMC), which is spearheaded by [Jon Matthis, PhD](https://jonmatthis.com/) of the HuMoN Research Lab. The FMC calibration and triangulation system is built upon [Anipose](https://github.com/lambdaloop/anipose), created by Lili Karushchek, PhD. Pyxy3D was originally envisioned as an alternative calibration tool to Anipose that would allow more granular estimation of intrinsics as well as visual feedback during the calibration process. Several lines of of the original Anipose triangulation code are used in this code base, though otherwise it was written from the ground up. I'm grateful to Dr. Matthis for his time developing FreeMoCap, discussing it with me, pointing out important code considerations, and providing a great deal of information regarding open-source project management.
## License
Pyxy3D is licensed under the permissive [BSD 2-Clause license](https://opensource.org/license/bsd-2-clause/). The triangulation function was adapted from the [Anipose](https://github.com/lambdaloop/anipose) code base which is also licensed under the BSD-2 Clause. A primary dependency of this project is PySide6 which provides the GUI front end. PySide6 is licensed under the [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.html). Pyxy3D does not modify the underlying source code of PySide6 which is available via [PyPI](https://pypi.org/project/PySide6/).
Raw data
{
"_id": null,
"home_page": "",
"name": "pyxy3d",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<3.12",
"maintainer_email": "",
"keywords": "",
"author": "Mac Prible",
"author_email": "prible@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e6/e5/a7835a1a98913919dcbb7323da96646585602d0e5cd4107f2cdbf12fa6e1/pyxy3d-0.3.12.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n# Open Source DIY Motion Capture\n\n<img src = \"pyxy3d/gui/icons/pyxy_logo.svg\" width = \"150\">\n\n[](https://pypi.org/project/pyxy3d/)\n[](https://opensource.org/license/bsd-2-clause/)\n[](https://pypi.org/project/pyxy3d/)\n[](https://github.com/mprib/pyxy3d/commits)\n[](https://github.com/mprib/pyxy3d/stargazers)\n</div>\n\n## About\nPyxy3D (*pixie-3D*) is intended to serve as the core software component of a low-cost DIY motion capture studio. It is a **py**thon package that integrates:\n\n- multicamera calibration\n- 2D (**x,y**) landmark tracking\n- **3D** landmark triangulation. \n\nIt is GUI-based and open-sourced under the LGPLv3.\n\nLandmark tracking is based on a Tracker abstract base class. Variations of Google's Mediapipe have been implemented to illustrate use of this base class and how these calculations will flow automatically through the processing pipeline. Implementing alternate tracking tools (such as MMPose and DeepLabCut) is on the development roadmap.\n\nPlease see our [docs](https://mprib.github.io/pyxy3d/) for details about installation, project setup, and general workflow.\n\n---\n### Demo Output\nhttps://github.com/mprib/pyxy3d/assets/31831778/803a4ce8-4012-4da1-87b9-66c5e6b31c59\n\n*The above was created using Pyxy3D, a 7 year old t440p laptop, and 4 webcams (~$25 each). This includes camera calibration, recording of synchronized frames (720p @ 24 fps), landmark detection, and point triangulation. Note that the webcam recording functionality is not in the current version, though will be restored in the future. Animated rig creation was done using an early stage Blender add-on project called [Rigmarole](https://github.com/mprib/rigmarole)*\n\n---\n\n## Quick Start\n\nPlease note that given the size of some core dependencies (OpenCV, Mediapipe, and PySide6 are among them) installation and initial launch can take a while. \n\n### Basic Installation and Launch\n#### Windows\n\n```bash\n# Open Command Prompt and navigate to directory that will hold venv\n# this does not need to be the same as where your project workspace is held\ncd path\\to\\your\\project\n\n# Create a virtual environment named 'env' using Python 3.10\n\"C:\\Path\\To\\Python3.10\\python.exe\" -m venv .venv\n\n# Activate the virtual environment\n.\\env\\Scripts\\activate\n\n# Your virtual environment is now active.\n# You can install using pip\npip install pyxy3d\n\n# Launch from the command line\npyxy3d\n```\n\n#### MacOS/Linux\n```bash\n# Open Command Prompt and navigate to directory that will hold venv\n# this does not need to be the same as where your project workspace is held\ncd path/to/your/project\n\n# Create a virtual environment named 'venv' using Python 3.10\n/path/to/python3.10 -m venv .venv\n\n# Activate the virtual environment\nsource .venv/bin/activate\n\n# Your virtual environment is now active.\n# You can install using pip\npip3 install pyxy3d\n\n# Launch from the command line\npyxy3d\n```\n\n### Basic Steps\n\n1. Once the GUI launches, navigate to File->New/Open Project and create a folder to hold your project\n - A basic [project structure](https://mprib.github.io/pyxy3d/project_setup/) will be created here\n2. Define a Charuco calibration board via the Charuco tab and print it out, fixing it to something flat\n3. Record footage for the calibration according to the guidelines for the [intrinsic](https://mprib.github.io/pyxy3d/intrinsic_calibration/) and [extrinsic](https://mprib.github.io/pyxy3d/extrinsic_calibration/) calibrations.\n4. Record synchronized motion capture trials\n5. Store video files within the project folder and reload the workspace\n6. Run autocalibration on all cameras within the Cameras tab\n7. Run \"Calibration Capture Volume\" from the Workspace Tab\n8. Set origin within the capture volume (optional but helpful)\n9. Run post-processing on individual recordings to generate 3D trajectory output\n\n## Key Features\n\n### Calibration board creation\n- Easy creation of `png` files for ChArUco calibration boards \n- board definition can be changed across intrinsic and extrinsic calibration allowing greater flexibiltiy\n\n### Intrinsic Camera Calibration\n- Automated calculation of camera intrinsic properties from input video\n - Optical Center\n - Focal Length\n - Lens Distortion\n\n- Visualization of distortion model to ensure reasonableness\n\n### Extrinsic Camera Calibration\n- Automated bundle adjustment to estimate 6 DoF relative position of cameras\n- Visualizer to inspect the estimates from the bundle adjustment\n- Setting of the World Origin within the visualizer to simplify data processing\n\n\n### 3D Tracking\n- Tracker API for integrating alternate tracking methods\n - 3 sample implementations with Google Mediapipe (Hands/Pose/Holistic)\n- Automated application of landmark tracking to synchronized videos\n- Triangulation of 3D landmark position based on calibrated cameras\n- Gap-filling and butterworth filtering to smooth trajectory estimates\n\n### Trajectory Output\n\n- output to `.trc` file format for use in biomechanical modelling\n- output to tidy `.csv` format with well-labelled headers for straightforward integration with other workflows\n- companion project [Rigmarole](https://github.com/mprib/rigmarole) in development to facilitate creation of animated rigs in Blender\n\n## Limitations\n\n### Requires Frame Sync\nThe workflow currently requires you to provide your own synchronized frames or to provide [a file](project_setup.md#frame_time_historycsv) that specifies the time at which each frame was read so that pyxy3d can perform the synchronization itself. There are plans to manage this synchronization automatically through audio files, though that has not yet been implemented.\n\n### Currently only using Mediapipe\n\nGoogle's Mediapipe provides a relatively easy and efficient method for human subject tracking, though for many uses it is limiting. Pyxy3D has a general Tracker base class that is implemented in a few versions (Pose/Hands/Holistic). This has provided a proof of concept implementation of markerless tracking, though for more robust use the roadmap calls for integration with more powerful tools such as [MMPose](https://github.com/open-mmlab/mmpose) and [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut).\n\n## Reporting Issues and Requesting Features\n\nTo report a bug or request a feature, please [open an issue](https://github.com/mprib/pyxy3d/issues). Please keep in mind that this is an open-source project supported by volunteer effort, so your patience is appreciated.\n\n## General Questions and Conversation\n\nPost any questions in the [Discussions](https://github.com/mprib/pyxy3d/discussions) section of the repo. \n\n\n## Acknowledgments\n\nThis project was inspired by [FreeMoCap](https://github.com/freemocap/freemocap) (FMC), which is spearheaded by [Jon Matthis, PhD](https://jonmatthis.com/) of the HuMoN Research Lab. The FMC calibration and triangulation system is built upon [Anipose](https://github.com/lambdaloop/anipose), created by Lili Karushchek, PhD. Pyxy3D was originally envisioned as an alternative calibration tool to Anipose that would allow more granular estimation of intrinsics as well as visual feedback during the calibration process. Several lines of of the original Anipose triangulation code are used in this code base, though otherwise it was written from the ground up. I'm grateful to Dr. Matthis for his time developing FreeMoCap, discussing it with me, pointing out important code considerations, and providing a great deal of information regarding open-source project management.\n\n## License\n\nPyxy3D is licensed under the permissive [BSD 2-Clause license](https://opensource.org/license/bsd-2-clause/). The triangulation function was adapted from the [Anipose](https://github.com/lambdaloop/anipose) code base which is also licensed under the BSD-2 Clause. A primary dependency of this project is PySide6 which provides the GUI front end. PySide6 is licensed under the [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.html). Pyxy3D does not modify the underlying source code of PySide6 which is available via [PyPI](https://pypi.org/project/PySide6/).\n",
"bugtrack_url": null,
"license": "BSD-2-Clause",
"summary": "GUI based multicamera calibration that integrates with 2D landmark tracking to triangulate 3D landmark positions",
"version": "0.3.12",
"project_urls": {
"repository": "https://github.com/mprib/pyxy3d"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "89276a32229b8e7b080017b899390f3b54aa7af3576bf0b9423e4c16ae8db791",
"md5": "9b29292491fe6abbca6386dbb8b28e26",
"sha256": "c2f7a2b0012216f630235ba0a8a1a95c34a14850b4f8b61003ead42a74d6bcc4"
},
"downloads": -1,
"filename": "pyxy3d-0.3.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9b29292491fe6abbca6386dbb8b28e26",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<3.12",
"size": 167754,
"upload_time": "2024-01-13T16:21:44",
"upload_time_iso_8601": "2024-01-13T16:21:44.249755Z",
"url": "https://files.pythonhosted.org/packages/89/27/6a32229b8e7b080017b899390f3b54aa7af3576bf0b9423e4c16ae8db791/pyxy3d-0.3.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e6e5a7835a1a98913919dcbb7323da96646585602d0e5cd4107f2cdbf12fa6e1",
"md5": "66a63286d95be97adb6af571c3298a4a",
"sha256": "31ad8f809a714e2e0c949435e3143b8287860a08f7fdaac3abfacf0b5bce303c"
},
"downloads": -1,
"filename": "pyxy3d-0.3.12.tar.gz",
"has_sig": false,
"md5_digest": "66a63286d95be97adb6af571c3298a4a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<3.12",
"size": 127414,
"upload_time": "2024-01-13T16:21:46",
"upload_time_iso_8601": "2024-01-13T16:21:46.264915Z",
"url": "https://files.pythonhosted.org/packages/e6/e5/a7835a1a98913919dcbb7323da96646585602d0e5cd4107f2cdbf12fa6e1/pyxy3d-0.3.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-13 16:21:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mprib",
"github_project": "pyxy3d",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyxy3d"
}