Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Tools for the HASY dataset.

Project description

PyPI version Python Support Code style: black GitHub last commit GitHub commits since latest release (by SemVer) CodeFactor

Please refer to the HASY paper for details about the dataset. If you want to report problems of the HASY dataset, please send an email to info@martin-thoma.de or file an issue at https://github.com/MartinThoma/HASY

Errata are listed in the git repository as well as the actual hasy package.

Contents

The contents of the HASYv2 dataset are:

  • hasy-data: 168236 png images, each 32px x 32px
  • hasy-data-labels.csv: Labels for all images.
  • classification-task: 10 folders (fold-1, fold-2, ..., fold-10) which contain a train.csv and a test.csv each. Every line of the csv files points to one of the png images (relative to itself). If those files are used, then the hasy-data-labels.csv is not necessary.
  • verification-task: A train.csv and three different test files. All files should be used in exactly the same way, but the accuracy should be reported for each one. The task is to decide for a pair of two 32px x 32px images if they belong to the same symbol (binary classification).
  • symbols.csv: All classes
  • README.txt: This file

How to evaluate

Classification Task

Use the pre-defined 10 folds for 10-fold cross-validation. Report the average accuracy as well as the minumum and maximum accuracy.

Verification Task

Use the train.csv for training. Use test-v1.csv, test-v2.csv, test-v3.csv` for evaluation. Report TP, TN, FP, FN and accuracy for each of the three test groups.

hasy package

hasy can be used in two ways: (1) as a shell script (2) as a Python module.

If you want to get more information about the shell script options, execute

$ hasy --help
usage: hasy [-h] [--dataset DATASET] [--verify] [--overview] [--analyze_color]
            [--class_distribution] [--distances] [--pca] [--variance]
            [--correlation] [--count-users] [--analyze-cm CM]

optional arguments:
  -h, --help            show this help message and exit
  --dataset DATASET     specify which data to use (default: None)
  --verify              verify PNG files (default: False)
  --overview            Get overview of data (default: False)
  --analyze_color       Analyze the color distribution (default: False)
  --class_distribution  Analyze the class distribution (default: False)
  --distances           Analyze the euclidean distance distribution (default:
                        False)
  --pca                 Show how many principal components explain 90% / 95% /
                        99% of the variance (default: False)
  --variance            Analyze the variance of features (default: False)
  --correlation         Analyze the correlation of features (default: False)
  --count-users         Count how many different users have created the
                        dataset (default: False)
  --analyze-cm CM       Analyze a confusion matrix in JSON format. (default:
                        False)

If you want to use hasy as a Python package, see

python -c "import hasy.hasy_tools;help(hasy.hasy_tools)"

Changelog

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hasy, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size hasy-0.3.1-py3-none-any.whl (16.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size hasy-0.3.1.tar.gz (18.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page