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.1.tar.gz (6.2 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.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylasadataset-0.2.1.tar.gz
  • Upload date:
  • Size: 6.2 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.1.tar.gz
Algorithm Hash digest
SHA256 aa2337fb101238c3af47037ec4d103449428b1166e02b959a60188e26527a8ac
MD5 a275c524f3e9b10622c3395c4ed9d3a9
BLAKE2b-256 b52c9a6974b9354e37d9a9e453643d5b817ea1060b289265a2d2ecc33693ed86

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylasadataset-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pylasadataset-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4aa1747523955242aad3840c4f2c4dd91bd990b2110e708d30066b120aa0af0
MD5 ff6748ad5e366b0484d93dc9760b187b
BLAKE2b-256 7a1cc0256f311eb6de7ae806834269c06d4334927650da16bb21f9036ae80fd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylasadataset-0.2.1-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