Skip to main content

SynthPose: Clean Architecture Implementation

A robust, modular Python package for human pose estimation using RT-DETR and VitPose. This project has been refactored to follow Clean Architecture principles, making it suitable for research, extension, and integration into larger systems (e.g., Avalonia/C# apps).

Features

  • Clean Architecture: Separation of concerns into Domain, Application, Adapters, and Infrastructure layers.
  • State-of-the-Art Models:
    • Detection: RT-DETR (PekingU/rtdetr_r50vd_coco_o365)
    • Pose Estimation: VitPose (stanfordmimi/synthpose-vitpose-huge-hf or base)
  • Standardized Output: OpenPose-compatible JSON format.
  • Configurable: Support for YAML configuration and CLI arguments.
  • Type Safe: Fully typed codebase using Python type hints and Pydantic.

Architecture

The project is organized as follows:

  • domain/: Core business logic and entities (FrameData, Person, Keypoint). No external dependencies.
  • application/: Use cases and orchestration (VideoProcessor). Depends only on Domain.
  • adapters/: Implementations of interfaces (OpenCVVideoSource, RTDetrPersonDetector, VitPoseEstimator, OpenPoseResultWriter). Depends on external libraries (torch, cv2).
  • infrastructure/: Configuration and Entry points (CLI, Settings).

Installation

This project uses Poetry for dependency management.

# Install dependencies
poetry install

Usage

CLI

Run the processor via the synthpose command (defined in pyproject.toml):

# Basic usage
poetry run synthpose process path/to/video.mp4

# With options
poetry run synthpose process video.mp4 --mode base --device cpu

# Using a config file
poetry run synthpose process video.mp4 --config configs/default.yaml

Configuration

You can use a YAML file to configure the pipeline:

# configs/example.yaml
device: "cuda"
model_mode: "huge"
det_threshold: 0.3
vis_show_weight: true

Output

  • Video: {input_name}_output.mp4 (Visualized result)
  • JSON: pose/{input_name}_json/{input_name}_{frame_id}.json (Keypoints data)

Testing

poetry run pytest

License

MIT License

References

Metadata

Release files for synthpose 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synthpose 0.1.0
File Size Uploaded Provenance Actions
synthpose-0.1.0.tar.gz 10.9 kB Without provenance Details for synthpose-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synthpose 0.1.0
File Interpreter ABI Platform Actions
synthpose-0.1.0-py3-none-any.whl Python 3 none any Details for synthpose-0.1.0-py3-none-any.whl

Total release size: 25.8 kB

Release files / synthpose-0.1.0.tar.gz

Download URL synthpose-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cb3375996b23d4d0bf7415952a762f735b781bd96cd392ee152fbda33bd39620
BLAKE2b-256 checksum
How to use checksums
087ee0b5427a2d739710da0a5c672cb6b97c98b259be990ed719a96eae49018b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.5 Windows/11

Release files / synthpose-0.1.0-py3-none-any.whl

Download URL synthpose-0.1.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5e5044c70a223e79f88ff16a0f79621829dde1ee7fadfe4d98b1f5c7e530908
BLAKE2b-256 checksum
How to use checksums
87487b2c5b11bc1e63da11d96036c6cfa42575772a4dc4596eb56503ef742855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.5 Windows/11

Security for synthpose 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page