Skip to main content

LASA Handwriting dataset for Python3

Project description

pyLASAHandwritingDataset

Ruff

LASA Handwriting dataset for Python3

This package provides a typed, lightweight Python interface for loading and accessing the dataset.

Installation

Install the package from PyPI:

# Using uv
uv add pylasahandwritingdataset

# Or with pip
pip3 install pylasahandwritingdataset

To install from the latest commit:

uv add git+https://github.com/AshrithSagar/pyLASAHandwritingDataset.git@main

Usage

import pyLASAHandwritingDataset as lasa

# List available motions
motions = lasa.DataSet.handwriting_motions()
print(motions)  # ('Angle', 'BendedLine', 'CShape', 'DoubleBendedLine', 'GShape', 'JShape', 'JShape_2', 'Khamesh', 'LShape', 'Leaf_1', 'Leaf_2', 'Line', 'Multi_Models_1', 'Multi_Models_2', 'Multi_Models_3', 'Multi_Models_4', 'NShape', 'PShape', 'RShape', 'Saeghe', 'Sharpc', 'Sine', 'Snake', 'Spoon', 'Sshape', 'Trapezoid', 'WShape', 'Worm', 'Zshape', 'heee')

# Load a motion pattern
pattern = lasa.DataSet["GShape"]
print(pattern.name)  # "GShape"
print(pattern.dt)
print(len(pattern.demos))  # 7

# Access demonstrations
demo = pattern.demos[0]
t   = demo.t    # shape (1, 1000)
pos = demo.pos  # shape (2, 1000)
vel = demo.vel  # shape (2, 1000)
acc = demo.acc  # shape (2, 1000)

# For typing specification, the motion names are also available in
from pyLASAHandwritingDataset import (
    HandwritingMotion,  # Any handwriting motion: single pattern or multi-model
    SinglePatternMotion,  # Any single pattern handwriting motion
    MultiModelMotion,  # Any multi-model handwriting motion
    #
    ALL_HANDWRITING_MOTIONS,  # A tuple of all handwriting motions
    ALL_SINGLE_PATTERN_MOTIONS,  # A tuple of all single pattern handwriting motions
    ALL_MULTI_MODEL_MOTIONS,  # A tuple of all multi-model handwriting motions
    #
    is_handwriting_motion,  # A TypeGuard to check whether a `str` is a handwriting motion
    is_multi_model_motion,  # A TypeGuard to check whether a `str` is a multi-model handwriting motion
    is_single_pattern_motion,  # A TypeGuard to check whether a `str` is a single pattern handwriting motion
)

For documentation, refer to the original dataset repo's README.

References

Acknowledgement

If you use this dataset in research, please cite the original author:

S. M. Khansari-Zadeh and A. Billard, "Learning Stable Non-Linear Dynamical
Systems with Gaussian Mixture Models", IEEE Transaction on Robotics, 2011.

License

The LASA Handwriting Dataset is free for non-commercial academic use.

Please refer to the original dataset repository for licensing 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

pylasahandwritingdataset-0.2.0.tar.gz (81.5 kB view details)

Uploaded Source

Built Distribution

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

pylasahandwritingdataset-0.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file pylasahandwritingdataset-0.2.0.tar.gz.

File metadata

  • Download URL: pylasahandwritingdataset-0.2.0.tar.gz
  • Upload date:
  • Size: 81.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pylasahandwritingdataset-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7825418258fa99f1bbb8c3e52c885ef71aac2f2af6e643b00436653f6dd635d1
MD5 a28120249d87d481618c2427cf544526
BLAKE2b-256 e236c2556d1e7445fcddcac3ba5e54609dc483307b3d41c3566965a4e7d45920

See more details on using hashes here.

File details

Details for the file pylasahandwritingdataset-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pylasahandwritingdataset-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pylasahandwritingdataset-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e40544faff5cb96441c576b6d42e6207fb90a684aa6a96237a325270c28bdb1
MD5 ccbbedc0771c161caa8f0c307630bbe1
BLAKE2b-256 596871d34e48d32515454c5ebaedbf459b207a7d43555f2a122f464c005e9b5c

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