Skip to main content

LASA Handwriting dataset loader and other tools for Python.

Project description

PyLasaDataset PyPI CI

LASA Handwriting dataset loader and other tools for Python (3.9+).

The raw dataset is downloaded automatically from the official epfl-lasa/LASAHandwritingDataset repository the first time it is used, and cached locally (default: ~/.cache/pyLasaDataset; override with the PYLASADATASET_DATA_DIR environment variable).

Installation

pip install pylasadataset

Or directly from source:

pip install git+https://github.com/justagist/pylasadataset

Usage

import pyLasaDataset as lasa

# DataSet object has all the LASA handwriting data files
# as attributes, eg:
angle_data = lasa.DataSet.Angle
sine_data = lasa.DataSet.Sine

# List all available patterns:
print(lasa.DataSet.names)

# Each Data object has attributes dt and demos (For documentation,
# refer original dataset repo:
# https://github.com/epfl-lasa/LASAHandwritingDataset/blob/master/Readme.txt)
dt = angle_data.dt
demos = angle_data.demos # list of 7 Demo objects, each corresponding to a
                         # repetition of the pattern

# Each Demo object in demos list will have attributes pos, t, vel, acc
# corresponding to the original .mat format described in
# https://github.com/epfl-lasa/LASAHandwritingDataset/blob/master/Readme.txt
demo_0 = demos[0]
pos = demo_0.pos # np.ndarray, shape: (2,1000)
vel = demo_0.vel # np.ndarray, shape: (2,1000)
acc = demo_0.acc # np.ndarray, shape: (2,1000)
t = demo_0.t # np.ndarray, shape: (1,1000)

# To visualise the data (2D position and velocity) use the plot_model utility
lasa.utilities.plot_model(lasa.DataSet.BendedLine) # give any of the available
                                                   # pattern data as argument

Development

pip install -e .[test]
pytest

Acknowledgements

The LASA Handwriting Dataset is created and maintained by the LASA lab at EPFL. See the dataset repository for its terms of use and citation information.

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

pylasadataset-0.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

pylasadataset-0.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylasadataset-0.2.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylasadataset-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ba86e5aee21c6dc5b71205564785133f66275207be540cc54148e8e4dc168a9c
MD5 09281c2cd8ee4d43adcf4d1f14f5099d
BLAKE2b-256 9b200b48208856e6f141e6ce961e5d120b9db248aad5d893d20590f965fd523f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylasadataset-0.2.0.tar.gz:

Publisher: publish.yml on justagist/pyLasaDataset

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pylasadataset-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pylasadataset-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b92b85680e626a6547697898b3ede4c61c6bf25c083a9d6d28cbda6992209fb6
MD5 102f89213651902b6cc1b99184874d94
BLAKE2b-256 5226c21a05d37b06d3bb46c1102b68f45a84f52c357208b9ae05506f5616df22

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylasadataset-0.2.0-py3-none-any.whl:

Publisher: publish.yml on justagist/pyLasaDataset

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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