Skip to main content

Willow 5 Runtime: Action Recognition, Retargeting, & Edge Evaluator

Project description

Willow 5 Runtime SDK

The official Python SDK for Willow Dynamics.

This SDK acts as the bridge between the Willow Cloud Oracle and your local environment. It enables Zero-Shot Action Recognition, Kinematic Retargeting, and Physics Evaluation on edge devices, cloud pipelines, and simulation clusters.

It is designed to be dependency-light (No AWS/Boto3 required) and privacy-first (Models run in ephemeral RAM).


Installation

pip install willow-runtime

1. Quick Start: Model Provisioning

Securely fetch your proprietary action models from the Willow Cloud.

from willow import WillowClient

# Initialize with your API Key
client = WillowClient(api_key="YOUR_WILLOW_API_KEY")

# Option A: Stream directly to RAM (Secure / Cloud / Ephemeral)
# The model never touches the physical disk.
model = client.get_model("tactical-reload-v1")

# Option B: Download to Disk (Offline / Edge / Air-Gapped)
client.download_model("tactical-reload-v1", "./models/reload.int8")

2. Usage: Active Streaming (Real-Time)

Best for Robotics, Webcams, or Smart Gyms where frames arrive one by one. The step() method manages an internal sliding window buffer for zero-latency triggering.

from willow import WillowClient, WillowDetector

# 1. Load Model
client = WillowClient(api_key="YOUR_API_KEY")
model = client.get_model("tactical-reload-v1")
detector = WillowDetector(model)

# 2. The Real-Time Loop
# Assume 'get_next_frame()' returns a (75, 3) numpy array of skeletal data
while True:
    current_skeleton, timestamp_ms = get_next_frame()
    
    # .step() executes in <2ms on modern CPUs
    event = detector.step(current_skeleton, timestamp_ms)
    
    if event:
        print(f"!!! ACTION DETECTED !!!")
        print(f"Timestamp: {event['end_ms']}ms | Confidence: {event['confidence']:.2f}")
        
        # Trigger Actuator / Robot / UI here

3. Usage: Batch Analysis (Passive)

Best for Data Science, Historical Video Processing, or Cloud ETL pipelines.

from willow import WillowClient, WillowDetector
import numpy as np

# 1. Load Model
client = WillowClient(api_key="YOUR_API_KEY")
model = client.get_model("golf-swing-v4")
detector = WillowDetector(model)

# 2. Load Data (e.g., from an uploaded video file processed by MediaPipe)
# Shape: (Frames, 75, 3)
full_sequence = np.load("recording_data.npy") 
timestamps = [t * 33 for t in range(len(full_sequence))]

# 3. Detect All Occurrences
matches = detector.detect(full_sequence, timestamps)

print(f"Found {len(matches)} events:")
for m in matches:
    print(f" - {m['start_ms']}ms to {m['end_ms']}ms (Conf: {m['confidence']:.2f})")

4. Usage: Sim-to-Real & Robotics

Best for Reinforcement Learning (RL), NVIDIA Isaac Sim, and Humanoid Teleoperation. Bridges the gap between Computer Vision coordinates and Robotics standards.

from willow import CoordinateBridge, KinematicRetargeter

# 1. Convert Coordinate Space
# MediaPipe (Y-Down) -> ROS/Isaac Sim (Z-Up)
ros_ready_sequence = CoordinateBridge.to_ros_z_up(raw_skeleton_sequence)

# 2. Extract Joint Angles for RL Training
# Returns dictionary of 1D angle arrays (e.g., "right_elbow_flexion")
joint_angles = KinematicRetargeter.extract_joint_angles(ros_ready_sequence)

print(f"Extracted {len(joint_angles)} joint features for simulation training.")

License

MIT License. Copyright (c) 2025 Willow Dynamics.

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

willow_runtime-5.1.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

willow_runtime-5.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file willow_runtime-5.1.0.tar.gz.

File metadata

  • Download URL: willow_runtime-5.1.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for willow_runtime-5.1.0.tar.gz
Algorithm Hash digest
SHA256 0fc56b28bda0a06d85b4c002dc3cac7c339b6c298c531dc3960c19d97bd3e4d4
MD5 7c6cd028ad50369094d2917fc7544d4f
BLAKE2b-256 524571f2420b1a47649ae00c266d3c88311c37c10fab4847d52bb81e9f679f56

See more details on using hashes here.

File details

Details for the file willow_runtime-5.1.0-py3-none-any.whl.

File metadata

  • Download URL: willow_runtime-5.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for willow_runtime-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58debf57d0420864b1e92b3805bd0aca88419edbff7268463a358f08b22b50e1
MD5 32537042df7e7a2dc7b9fdc09a6d6d4b
BLAKE2b-256 b041a8b488966ecf751a7321239b73f929a6d1f61ad4ceab511c04d616b4ed19

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