Skip to main content

A toolkit for realtime video classification tasks.

Project description

StreamPoseML

An End-to-End Open-Source Web Application and Python Toolkit for Real-Time Video Pose Classification and Machine Learning

License: MIT Supported Platforms DOI Documentation Status

Overview

StreamPoseML is an open-source toolkit for creating real-time, video-based classification applications using body pose data. It provides both a Python package and a web application to help you:

  1. Process Video Data - Extract pose keypoints from videos using MediaPipe
  2. Build Datasets - Merge keypoint data with annotations and generate features
  3. Train Models - Train and evaluate machine learning models for pose classification
  4. Deploy Applications - Run real-time classification in web browsers or Python environments

Documentation

Full documentation is available at streamposeml.readthedocs.io

  • Getting Started Guide - Installation and basic usage
  • API Reference - Detailed class and method documentation
  • Workflow Tutorials - Step-by-step instructions for common tasks
  • Web Application Guide - Running and customizing the web application

Components

The StreamPoseML project consists of two main parts:

  1. Python Package (stream_pose_ml/)

    • Available on PyPI: pip install stream-pose-ml or uv add stream-pose-ml
    • Core tools for video processing, pose extraction, dataset creation, and model training
    • Can be used independently in your Python projects
  2. Web Application (Docker-based)

    • React frontend for webcam capture and visualization
    • Flask API backend for model serving
    • MLflow integration for standardized model deployment
    • Ready-to-use Docker images available on DockerHub

Quick Start

Python Package

# Install the package
pip install stream-pose-ml
# Or with uv (recommended for development)
uv add stream-pose-ml

# Import core modules
import stream_pose_ml.jobs.process_videos_job as pv
import stream_pose_ml.jobs.build_and_format_dataset_job as data_builder
import stream_pose_ml.learning.model_builder as mb

Web Application

# Clone the repository
git clone https://github.com/mrilikecoding/StreamPoseML.git
cd StreamPoseML

# Start using pre-built images
make start

# Or start with local code (development mode)
make start-dev

# When finished
make stop

Key Features

  • MediaPipe Integration - Uses MediaPipe's BlazePose for efficient pose detection
  • Feature Engineering - Generates angles, distances, and normalized measurements from raw keypoints
  • Annotation Support - Merges video keypoints with external annotation files
  • Flexible Dataset Creation - Various segmentation strategies for time-series data
  • Model Building Utilities - Convenience methods for training and evaluation
  • Real-time Classification - Browser-based pose classification with webcam input
  • MLflow Integration - Standardized model serving and deployment

Example Use Case

StreamPoseML was built while conducting studies of Parkinson's Disease patients in dance therapy settings. This research was done with support from the McCamish Foundation.

Development

A comprehensive developer guide is available in the documentation. Key commands:

# Install in development mode
uv sync --extra dev

# Run tests
make test
make test-core  # Package tests only
make test-api   # API tests only

# Start application (development mode)
make start-dev

# Show all available commands
make help

Publications

Research using StreamPoseML:

  1. Closed-loop Neuromotor Training System Pairing Transcutaneous Vagus Nerve Stimulation with Video-based Real-time Movement Classification
    https://www.medrxiv.org/content/10.1101/2025.05.23.25327218v1

  2. StreamPoseML: An End-to-End Open-Source Web Application and Python Toolkit for Real-Time Video Pose Classification and Machine Learning
    https://joss.theoj.org/papers/10.21105/joss.06392

Citing

If you use StreamPoseML in your work or research, please cite:

@software{streamposeml2023,
  author = {Green, Nate},
  title = {StreamPoseML: Toolkit for Real-Time Video Pose Classification},
  url = {https://github.com/mrilikecoding/StreamPoseML},
  doi = {10.5281/zenodo.14298482},
  year = {2023}
}

See paper.md for more details.

Contribute to StreamPoseML

We're actively seeking contributors! Whether you're fixing bugs, adding features, improving documentation, or sharing your use cases, your contribution matters.

Ways to Contribute

  • Code: Fix bugs, implement new features, or improve performance
  • Documentation: Help improve or translate documentation
  • Testing: Create tests or report bugs
  • Examples: Share your use cases or implementation examples
  • Research: Cite us in your research or suggest new features based on research needs

Check our contribution guidelines and open issues to get started. New contributors are welcome - we've labeled some issues as "good first issue" to help you begin!

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

stream_pose_ml-0.3.1.tar.gz (16.0 MB view details)

Uploaded Source

Built Distribution

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

stream_pose_ml-0.3.1-py3-none-any.whl (947.8 kB view details)

Uploaded Python 3

File details

Details for the file stream_pose_ml-0.3.1.tar.gz.

File metadata

  • Download URL: stream_pose_ml-0.3.1.tar.gz
  • Upload date:
  • Size: 16.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for stream_pose_ml-0.3.1.tar.gz
Algorithm Hash digest
SHA256 613c40312458c9dc27ac6ef08782091fff1f71016673cf9752bcef63abd97922
MD5 a4f048e3366500cd287f9e1b2900aebd
BLAKE2b-256 236fcac35d25cd2782e288649a7b79fde8123b2796b7e36f123cdd2cae2cd3a4

See more details on using hashes here.

File details

Details for the file stream_pose_ml-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: stream_pose_ml-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 947.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for stream_pose_ml-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd858409f1e1ba72bcb5085598630c8b77a1297dc74fe002c756be1d50d179c3
MD5 4caac8a94868382c0211ea52446594cf
BLAKE2b-256 1daed1ed2981539ce3365bc01f6a161000a812fc89ca8dd2b87315a3b9e3d905

See more details on using hashes here.

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