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.1.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.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: choreopath-1.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 6f4b5256170698ebf5b7b8ce82d15d1f10ac035c70abb36ef5068a0cf39eb33a
MD5 0da1b1a65074b864ca9680d89fdb5e7f
BLAKE2b-256 d743539919bfff6d7f0b8741a589ed67e6ab58a57a67474bc1fbeb6337b6a098

See more details on using hashes here.

Provenance

The following attestation bundles were made for choreopath-1.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: choreopath-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03d6cc2bd87619bef63ad7292ad81e58953c3d4d6e4980861b32cdf14b1ba79f
MD5 490caf3b9d9d579fa956acfee7bbfabb
BLAKE2b-256 7b741b032987789f0457449a1179ea696b59668b19623ba6182f0fd4d4e91b0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for choreopath-1.1.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