Skip to main content

A single library to (down)load all existing sign language handshape datasets. This library allows you to automatically download and load various sign language handshape datasets. Currently supporting 13 different datasets.

Project description

A single library to (down)load all existing sign language handshape datasets.

handshape handshape

There are various handshape datasets for Sign Language. However:

  • Each dataset has its own format and many are hard to find.
  • Each dataset has its own mapping of handshapes to classes. While Signs depend on the specific Sign Language for a country/region, handshapes are universal. Hence, they could be shared between datasets/tasks.

This library aims to provide two main features:

  • A simplified API to download and load handshape datasets
  • A mapping between datasets so that datasets can be merged for training/testing models.

We hope it will help Sign Language Recognition develop further, both for research and application development.

If you wish to add a dataset you can make a push request, file an issue, or write to handshape.datasets@at@gmail.

This library is a work in progress. Contributions are welcome.

Working with images

  • Identifiying Hand Classes
Letter Class ID
a 0
b 1
c 2
d 3
e 4
f 5
g 6
h 7
i 8
j 9

How to use?

Import handshape_datasets

handshape_datasets.load("dataset_id")

Download, extract and preprocess the dataset. The function will return "x" that contain an array with the images and metadata, this one contain an array with classes and if it have, an array with subjects or differents other values. For example, in lsa16 "x" will return a shape of (800,32,32,3). Also you could give a version value if its available to the selected dataset and you could give a boolean value to delete temporary files if its possible

Example:

handshape_datasets.load("lsa16",version="color",delete=True) --> download, extract and preprocess the lsa16 dataset in
version "color" and delete the temporary files if its have a .npz file.

handshape_datasets.clear("dataset_id") --> Delete all the local files for the dataset, if its exist.

handshape_datasets.list_datasets() --> Returns a table with the information for the availables datasets

handshape_datasets.delete_temporary_files("dataset_id") --> Delete the local files if its exist a .npz file

How to use the dataset in keras?

First, you must to load the dataset

dataset = handshape_datasets.load(dataset_id, version=ver, delete=supr)

You could have the input_shape and the number of classes

input_shape = self.dataset[0][0].shape
classes = self.dataset[1]['y'].max() + 1

Then you must to build a model

base_model = keras.applications.mobilenet.MobileNet(input_shape=(input_shape[0],self.input_shape[1],3), 
                                                            weights='imagenet', include_top=False)
output = keras.layers.GlobalAveragePooling2D()(base_model.output)
output = keras.layers.Dense(32, activation='relu')(output)
output = keras.layers.Dense(self.classes, activation='softmax')(output)
model = Model(inputs=base_model.input, outputs=output)
model.compile(optimizer='Adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])

Its optional to split the dataset for the validation data when fit the model

X_train, X_test, Y_train, Y_test = sklearn.model_selection.train_test_split(self.dataset[0], self.dataset[1]['y'],
                                                                                test_size=test_size,
                                                                                stratify=self.dataset[1]['y'])

At last you must to fit the model

history = model.fit(X_train, Y_train, batch_size=self.batch_size, epochs=self.epochs,
                             validation_data=(X_test, Y_test))

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

handshape-datasets-0.1.tar.gz (27.1 kB view details)

Uploaded Source

Built Distributions

handshape_datasets-0.1.0-py2.py3-none-any.whl (47.6 kB view details)

Uploaded Python 2 Python 3

handshape_datasets-0.1-py2.py3-none-any.whl (47.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file handshape-datasets-0.1.tar.gz.

File metadata

  • Download URL: handshape-datasets-0.1.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for handshape-datasets-0.1.tar.gz
Algorithm Hash digest
SHA256 43314cf49fbb894a01ac8705503fab3145fbe8578bf95bfe830a0c91ee5a8980
MD5 80258beee0b6aa52c1129aaf6fb4bd55
BLAKE2b-256 c85dc7caa43ac25edeb1ca2918c9e56620f271578901e5a785345ca2b530bf12

See more details on using hashes here.

File details

Details for the file handshape_datasets-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: handshape_datasets-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for handshape_datasets-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 216d8dd5d5431677d27f1d39e92b6f9c0baa7b7de7bd3bd15c67c375dc7f20de
MD5 9b6feb541d98769b7dd7ed386327d084
BLAKE2b-256 0678418b99e3280f458a896f67d7d7abf6310f1eb0f53ede9eb716c124261582

See more details on using hashes here.

File details

Details for the file handshape_datasets-0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: handshape_datasets-0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for handshape_datasets-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 02eca85fb59fbcce69455ece4be43af8f5a576716ac4901e51006451b343983b
MD5 1f022e15dea981ba4f0a15d4b8e4d443
BLAKE2b-256 cd3f63948f8bbbe1017f45985722ce9337f1349bd3d3d7d9099b3be4ed888664

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page