Skip to main content

Transform human movement into generative art. Track body poses from video and create SVG visualizations of motion trajectories

Project description

choreopath

Transform human movement into generative art. A Python tool that uses MediaPipe to track body poses from video and creates SVG visualizations of motion trajectories - perfect for pen plotters, laser cutters, and digital art.

Features

  • Track 33 body landmarks using MediaPipe Pose
  • Process video files with OpenCV to extract tracking data
  • Export tracking data to CSV with coordinates and visibility scores
  • Generate SVG visualizations with hierarchical body part grouping, ready to be used in Inkscape
  • Analyze tracking data quality with detailed reports
  • Create animated visualizations of pose tracking
  • Command-line interface

Installation

choreopath is pushed to Pypi at each new release. You can pip install choreopath to install it. Beware though, some versions of Python are incompatible with it as MediaPipe isn't currently available for Python >=3.13.

Instead, it is suggested to use uv and run choreopath like this:

uvx --python 3.12 choreopath

Usage

Track poses from video

choreopath track video.mp4 tracking_data.csv

Track with custom confidence thresholds

choreopath track video.mp4 tracking_data.csv --min-detection-confidence 0.7 --min-tracking-confidence 0.7

Generate SVG visualization

choreopath draw tracking_data.csv output.svg

Generate SVG with custom dimensions

choreopath draw tracking_data.csv output.svg --width 1920 --height 1080 --min-visibility 0.7

Generate an overlay video

choreopath overlay video.mp4 video-overlay.mp4

Analyze tracking data

choreopath analyze tracking_data.csv --animation output.mp4 --fps 30

Origin Story

This project was created when working on a generative art project. I used generated videos of dancers to create SVG that I could then plot using a pen plotter.

See example files:

original video overlay video animated tracking data examples/fall-recovery-4.svg

Development

  • Use uv
  • Run smoke test by using make smoke-test

Changelog

See CHANGELOG.md.

License

This software is under a MIT license. See LICENSE.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

choreopath-1.2.0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

choreopath-1.2.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file choreopath-1.2.0.tar.gz.

File metadata

  • Download URL: choreopath-1.2.0.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for choreopath-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3e9d4dd8879f0bb5326996a4b9f3709e8a4bfd172747a1a115408c0fd823555b
MD5 8e1eb30442270fcd8ae4ba55627bf46c
BLAKE2b-256 cbaddab125a610e84ba37d78e2eeb8658f5706f09176696b4d3b33aab9d06969

See more details on using hashes here.

Provenance

The following attestation bundles were made for choreopath-1.2.0.tar.gz:

Publisher: publish.yml on marcw/choreopath

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file choreopath-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: choreopath-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for choreopath-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7dcc964b2186f43dd3470706bbb1674e8f2451faf6b85065f0d64172603966c1
MD5 ac867e3fc74a5bb8eb409437e7e234d5
BLAKE2b-256 9ae426cc0d867fa6550f018544f9de4c27ee4eeec63bdd8f413206026f34c8fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for choreopath-1.2.0-py3-none-any.whl:

Publisher: publish.yml on marcw/choreopath

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page