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
)

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.1.2.tar.gz (81.3 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.1.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylasahandwritingdataset-0.1.2.tar.gz
  • Upload date:
  • Size: 81.3 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.1.2.tar.gz
Algorithm Hash digest
SHA256 c9007c68312d10b41bd3af57ff03d203b3c48745d0d05f570873634832b9748d
MD5 f3a536853025b41e62280f8cfa69eab9
BLAKE2b-256 b9a6816e493873d7f29260c20f2efc3d1e25a043900eba072e3c4fcccf092761

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylasahandwritingdataset-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d7042610bc0aeb44ed9d589b67acd704ea3c09ae0ba6fb75ef2eb6b42a9d86
MD5 c9748824a98d87d3043e11c1b8eb6bf4
BLAKE2b-256 2310c5a3110f3e0652a056e403fe6fbf7c1fd4dcb0c3ecd9235b3273a8a580e9

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