downloads and prepares various mnist-compatible datasets
Go to file
2018-03-15 01:32:21 +01:00
mnists split hashes to separate file 2018-03-15 01:27:01 +01:00
.gitignore add .gitignore 2018-03-15 01:26:10 +01:00
LICENSE init 2018-03-14 16:45:53 +01:00
README.md make bold text into headers and note anaconda 2018-03-15 01:32:21 +01:00
requirements.txt init 2018-03-14 16:45:53 +01:00
setup.py init 2018-03-14 16:45:53 +01:00
TODO init 2018-03-14 16:45:53 +01:00

mnists

downloads and prepares various mnist-compatible datasets.

files are downloaded to ~/.mnist and checked for integrity by SHA-256 hashes.

dependencies

python 3.6 (or later), numpy.

install

pip install --upgrade --upgrade-strategy only-if-needed 'https://github.com/notwa/mnists/tarball/master#egg=mnists'

I've added --upgrade-strategy to the command-line so you don't accidentally "upgrade" numpy to a version not compiled specifically for your system. This can happen when using e.g. Anaconda.

usage

import mnists

dataset = "emnist_balanced"
train_images, train_labels, test_images, test_labels = mnists.prepare(dataset)

the default images shape is (n, 1, 28, 28). pass flatten=True to mnists.prepare to get (n, 784).

datasets

in alphabetical order:

emnist

  • emnist_balanced
  • emnist_byclass
  • emnist_bymerge
  • emnist_digits
  • emnist_letters
  • emnist_mnist

fashion-mnist

  • fashion_mnist

mnist

  • mnist