Convenience functions for the HASY dataset
Project description
hasy_tools
hasy_tools
is a support package for the HASY dataset. The dataset is
described in The HASYv2 dataset.
The HASY dataset contains handwritten symbols obtained via Detexify and write-math.com. The data was rendered and is similar to MNIST.
Installation
$ pip install git+https://github.com/MartinThoma/hasy_tools.git
It can, of course, also be installed via PyPI.
Usage
>>> import hasy_tools
>>> data = hasy_tools.load()
>>> data.keys()
dict_keys(['x_train', 'y_train', 'x_test', 'y_test', 's_train', 's_test', 'labels'])
>>> len(data['labels'])
369
>>> data['x_train'].shape
(151241, 32, 32, 1)
>>> x_train = hasy_tools.preprocess(data['x_train'])
>>> y_train = np.eye(hasy_tools.n_classes)[y_train.squeeze()]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hasy_tools-0.1.2.tar.gz
(15.1 kB
view hashes)
Built Distribution
hasy_tools-0.1.2-py3-none-any.whl
(14.3 kB
view hashes)
Close
Hashes for hasy_tools-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084ab3e69e7f5a3b562393d26211d5947547e94e1bf3e339211201a20bbaaa3e |
|
MD5 | 1906c17ea33230547a852cfd0ae453fb |
|
BLAKE2b-256 | f3ea99ca91fda35fcfc380abb4ca8cbc61f844710231cfc3047907006806c416 |