Skip to main content

YOLO-based human pose detection and visualization tool

Project description

YOLO Poser

A Python package for human pose detection and visualization using YOLO.

Installation

pip install yolo-poser

Usage

Command Line

yolo-poser input_video.mp4 --output output.mp4 --output-format h264

Python API

from yolo_poser import process_video
process_video(
    input_path="input.mp4",
    output_path="output.mp4",
    output_format="h264",
    debug=True
)

Web API

To use the HTTP API, first install with API dependencies:

pip install "yolo-poser[api]"

Start the API server:

yolo-poser-api [--host HOST] [--port PORT]

For example:

yolo-poser-api --host 127.0.0.1 --port 9000

Or programmatically:

from yolo_poser.api import app
import uvicorn

uvicorn.run(app, host="127.0.0.1", port=9000)

The API provides endpoints for:

  • Processing videos from URLs: POST /detect/url
  • Processing uploaded video files: POST /detect/file
  • Health check: GET /health

See the API documentation at http://localhost:8000/docs when running the server.

Features

  • Human pose detection using YOLO
  • Support for multiple output formats (MJPEG, H264, WebM)
  • Smooth keypoint tracking
  • Debug mode with performance metrics
  • Configurable visualization options

Requirements

  • Python 3.8+ (<3.13)
  • PyTorch
  • Ultralytics
  • OpenCV
  • NumPy

Development

Continuous Integration

This project uses GitHub Actions for continuous integration and deployment:

  • Every push to the main branch triggers a test build that publishes to TestPyPI
  • Tagged releases (e.g. v0.1.0) trigger a build that publishes to PyPI

To release a new version:

  1. Update the version in src/yolo_poser/__init__.py
  2. Commit the changes
  3. Create and push a tag:
git tag v0.1.0
git push origin v0.1.0

The GitHub Action will automatically build and publish the new version to PyPI.

Local Development

  1. Clone the repository:
git clone https://github.com/tomdyson/yolo-poser.git
cd yolo-poser
  1. Install in development mode:
pip install -e .

License

MIT License

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

yolo_poser-0.1.12.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

yolo_poser-0.1.12-py3-none-any.whl (5.6 MB view details)

Uploaded Python 3

File details

Details for the file yolo_poser-0.1.12.tar.gz.

File metadata

  • Download URL: yolo_poser-0.1.12.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for yolo_poser-0.1.12.tar.gz
Algorithm Hash digest
SHA256 44229463bee11dcd8d5d9921927316364d062f56810fff627f73093f33937043
MD5 3fddc1ffadbf0aac114ec82dc0d72981
BLAKE2b-256 4e8ca9fe7eafe4b6b790b5b18d4d350c65ad7d55953e99d3f4308afc8cad127e

See more details on using hashes here.

File details

Details for the file yolo_poser-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: yolo_poser-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 5.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for yolo_poser-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 f0eb4b886c11b937e5cef4ede7a6a0c03d0b09863fc1b24566cb3cd54d8f0231
MD5 aed938fa4f3fc8b7ddc9aabde782c873
BLAKE2b-256 b5695b214c6732be7bdd227d58330d1234de7a86ad2d264f1b8d9eaa14b4d983

See more details on using hashes here.

Supported by

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