Skip to content

Commit

Permalink
Add citations, alias FMNIST for FashionMNIST
Browse files Browse the repository at this point in the history
  • Loading branch information
pczarnik committed May 31, 2024
1 parent 12555b1 commit 87101c9
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 2 deletions.
2 changes: 2 additions & 0 deletions mnists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@
from ._emnist import EMNIST
from ._mnist import KMNIST, MNIST, FashionMNIST

FMNIST = FashionMNIST

__version__ = "0.3.0"
105 changes: 105 additions & 0 deletions mnists/_emnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ class EMNIST(MNIST):
>>> letters.train_images().dtype
dtype('uint8')
Citation
--------
@article{cohen2017emnist,
title={EMNIST: an extension of MNIST to handwritten letters},
author={Gregory Cohen and Saeed Afshar and Jonathan Tapson and André van Schaik},
year={2017},
eprint={1702.05373},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
"""

mirrors = [
Expand Down Expand Up @@ -194,6 +204,25 @@ class Balanced(_Split):
Directory where all files exist or will be downloaded.
zip_filepath : str
Zip file from which dataset will be extracted.
Usage
-----
>>> from mnists import EMNIST
>>> emnist = EMNIST()
>>> balanced = emnist.Balanced()
>>> balanced.train_images().dtype
dtype('uint8')
Citation
--------
@article{cohen2017emnist,
title={EMNIST: an extension of MNIST to handwritten letters},
author={Gregory Cohen and Saeed Afshar and Jonathan Tapson and André van Schaik},
year={2017},
eprint={1702.05373},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
"""

resources = {
Expand Down Expand Up @@ -227,6 +256,25 @@ class ByClass(_Split):
Directory where all files exist or will be downloaded.
zip_filepath : str
Zip file from which dataset will be extracted.
Usage
-----
>>> from mnists import EMNIST
>>> emnist = EMNIST()
>>> byclass = emnist.ByClass()
>>> byclass.train_images().dtype
dtype('uint8')
Citation
--------
@article{cohen2017emnist,
title={EMNIST: an extension of MNIST to handwritten letters},
author={Gregory Cohen and Saeed Afshar and Jonathan Tapson and André van Schaik},
year={2017},
eprint={1702.05373},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
"""

resources = {
Expand Down Expand Up @@ -260,6 +308,25 @@ class ByMerge(_Split):
Directory where all files exist or will be downloaded.
zip_filepath : str
Zip file from which dataset will be extracted.
Usage
-----
>>> from mnists import EMNIST
>>> emnist = EMNIST()
>>> bymerge = emnist.ByMerge()
>>> bymerge.train_images().dtype
dtype('uint8')
Citation
--------
@article{cohen2017emnist,
title={EMNIST: an extension of MNIST to handwritten letters},
author={Gregory Cohen and Saeed Afshar and Jonathan Tapson and André van Schaik},
year={2017},
eprint={1702.05373},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
"""

resources = {
Expand Down Expand Up @@ -293,6 +360,25 @@ class Digits(_Split):
Directory where all files exist or will be downloaded.
zip_filepath : str
Zip file from which dataset will be extracted.
Usage
-----
>>> from mnists import EMNIST
>>> emnist = EMNIST()
>>> digits = emnist.Digits()
>>> digits.train_images().dtype
dtype('uint8')
Citation
--------
@article{cohen2017emnist,
title={EMNIST: an extension of MNIST to handwritten letters},
author={Gregory Cohen and Saeed Afshar and Jonathan Tapson and André van Schaik},
year={2017},
eprint={1702.05373},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
"""

resources = {
Expand Down Expand Up @@ -326,6 +412,25 @@ class Letters(_Split):
Directory where all files exist or will be downloaded.
zip_filepath : str
Zip file from which dataset will be extracted.
Usage
-----
>>> from mnists import EMNIST
>>> emnist = EMNIST()
>>> letters = emnist.Letters()
>>> letters.train_images().dtype
dtype('uint8')
Citation
--------
@article{cohen2017emnist,
title={EMNIST: an extension of MNIST to handwritten letters},
author={Gregory Cohen and Saeed Afshar and Jonathan Tapson and André van Schaik},
year={2017},
eprint={1702.05373},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
"""

resources = {
Expand Down
56 changes: 54 additions & 2 deletions mnists/_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class MNIST:
resources : dict[str, tuple[str, str]]
Dictionary of data files with filename and md5 hash.
Example usage
-------------
Usage
-----
>>> from mnists import MNIST
>>> mnist = MNIST()
>>> type(mnist.train_images())
Expand All @@ -46,6 +46,18 @@ class MNIST:
>>> mnist.test_labels().shape
(10000,)
Citation
--------
@article{lecun-98,
author={Lecun, Y. and Bottou, L. and Bengio, Y. and Haffner, P.},
journal={Proceedings of the IEEE},
title={Gradient-based learning applied to document recognition},
year={1998},
volume={86},
number={11},
pages={2278-2324},
doi={10.1109/5.726791}
}
"""

classes = [
Expand Down Expand Up @@ -189,6 +201,26 @@ class FashionMNIST(MNIST):
List of urls where dataset is hosted.
resources : dict[str, tuple[str, str]]
Dictionary of data files with filename and md5 hash.
Usage
-----
>>> from mnists import FashionMNIST
>>> fmnist = FashionMNIST()
>>> fmnist.train_images().dtype
dtype('uint8')
Citation
--------
@online{xiao2017/online,
author = {Han Xiao and Kashif Rasul and Roland Vollgraf},
title = {Fashion-MNIST: a Novel Image Dataset for Benchmarking
Machine Learning Algorithms},
date = {2017-08-28},
year = {2017},
eprintclass = {cs.LG},
eprinttype = {arXiv},
eprint = {cs.LG/1708.07747},
}
"""

classes = [
Expand Down Expand Up @@ -243,6 +275,26 @@ class KMNIST(MNIST):
List of urls where dataset is hosted.
resources : dict[str, tuple[str, str]]
Dictionary of data files with filename and md5 hash.
Usage
-----
>>> from mnists import KMNIST
>>> kmnist = KMNIST()
>>> kmnist.train_images().dtype
dtype('uint8')
Citation
--------
@online{clanuwat2018deep,
author = {Tarin Clanuwat and Mikel Bober-Irizar and Asanobu Kitamoto
and Alex Lamb and Kazuaki Yamamoto and David Ha},
title = {Deep Learning for Classical Japanese Literature},
date = {2018-12-03},
year = {2018},
eprintclass = {cs.CV},
eprinttype = {arXiv},
eprint = {cs.CV/1812.01718},
}
"""

classes = [
Expand Down

0 comments on commit 87101c9

Please sign in to comment.