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:
- Update the version in
src/yolo_poser/__init__.py
- Commit the changes
- 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
- Clone the repository:
git clone https://github.com/tomdyson/yolo-poser.git
cd yolo-poser
- Install in development mode:
pip install -e .
License
MIT License
Project details
Release history Release notifications | RSS feed
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.16.tar.gz
(5.6 MB
view hashes)
Built Distribution
Close
Hashes for yolo_poser-0.1.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeb87f537b84593f12cc0d59475e960a47d15467988c9fc5bcdab1f7dd2c45f8 |
|
MD5 | e96ed28ee637068303d80af3b4e095ac |
|
BLAKE2b-256 | 00263122e193203d6c29d461e39f23455ecddc7a77fbe0d8c40ddb44e132672f |