Machine Learning Datasets Machine Learning Datasets
  • GitHub 
  • Slack 
  • Documentation 
Get Started
Machine Learning Datasets Machine Learning Datasets
Get Started
Machine Learning Datasets
  • GitHub 
  • Slack 
  • Documentation 

Machine Learning Datasets

  • folder icon closed folder iconDataset Visualization
  • Storage & Credentials
  • API Basics
  • Getting Started
  • Tutorials (w Colab)
  • Playbooks
  • Data Layout
  • folder icon closed folder iconShuffling in ds.pytorch()
  • folder icon closed folder iconStorage Synchronization
  • folder icon closed folder iconHow to Contribute
  • Datasets
    • Speech Commands Dataset
    • 300w Dataset
    • Food 101 Dataset
    • VCTK Dataset
    • LOL Dataset
    • AQUA Dataset
    • LFPW Dataset
    • ARID Video Action dataset
    • The Street View House Numbers (SVHN) Dataset
    • NABirds Dataset
    • GTZAN Music Speech Dataset
    • Places205 Dataset
    • FFHQ Dataset
    • CARPK Dataset
    • SQuAD Dataset
    • CACD Dataset
    • ICDAR 2013 Dataset
    • RAVDESS Dataset
    • Flickr30k Dataset
    • dSprites Dataset
    • Kuzushiji-Kanji (KKanji) dataset
    • PUCPR Dataset
    • KMNIST
    • EMNIST Dataset
    • GTSRB Dataset
    • Free Spoken Digit Dataset (FSDD)
    • USPS Dataset
    • CSSD Dataset
    • MARS Dataset
    • ATIS Dataset
    • HICO Classification Dataset
    • COCO-Text Dataset
    • NSynth Dataset
    • not-MNIST Dataset
    • CoQA Dataset
    • RESIDE dataset
    • ECSSD Dataset
    • FGNET Dataset
    • Electricity Dataset
    • DRD Dataset
    • Caltech 256 Dataset
    • AFW Dataset
    • ESC-50 Dataset
    • HASYv2 Dataset
    • Pascal VOC 2012 Dataset
    • PACS Dataset
    • GlaS Dataset
    • QuAC Dataset
    • TIMIT Dataset
    • WFLW Dataset
    • LFW Deep Funneled Dataset
    • UTZappos50k Dataset
    • Visdrone Dataset
    • 11k Hands Dataset
    • KTH Actions Dataset
    • LFW Funneled Dataset
    • WIDER Face Dataset
    • LFW Dataset
    • Pascal VOC 2007 Dataset
    • Chest X-Ray Image Dataset
    • PlantVillage Dataset
    • Office-Home Dataset
    • WISDOM Dataset
    • Omniglot Dataset
    • DAISEE Dataset
    • HMDB51 Dataset
    • Optical Handwritten Digits Dataset
    • Fashionpedia Dataset
    • UCI Seeds Dataset
    • STN-PLAD Dataset
    • WIDER Dataset
    • Caltech 101 Dataset
    • DRIVE Dataset
    • PPM-100 Dataset
    • FER2013 Dataset
    • LSP Dataset
    • Adience Dataset
    • NIH Chest X-ray Dataset
    • UCF Sports Action Dataset
    • CelebA Dataset
    • Wiki Art Dataset
    • FIGRIM Dataset
    • MNIST
    • COCO Dataset
    • Kaggle Cats & Dogs Dataset
    • ANIMAL (ANIMAL10N) Dataset
    • Image Hotspots Widget
    • ImageNet Dataset
    • CIFAR 10 Dataset
    • Lincolnbeet Dataset
    • CIFAR 100 Dataset
    • LIAR Dataset
    • OPA Dataset
    • Fashion MNIST Dataset
    • Sentiment-140 Dataset
    • Google Objectron Dataset
    • Stanford Cars Dataset
    • DomainNet Dataset
    • MURA Dataset
    • SWAG Dataset
    • HAM10000 Dataset
    • GTZAN Genre Dataset
    • Tiny ImageNet Dataset
  • folder icon closed folder iconTensor Relationships
  • folder icon closed folder iconDeep Lake Docs Home
  • folder icon closed folder iconQuickstart

Docy

Machine Learning Datasets

  • Folder icon closed Folder open iconDataset Visualization
  • Storage & Credentials
  • API Basics
  • Getting Started
  • Tutorials (w Colab)
  • Playbooks
  • Data Layout
  • Folder icon closed Folder open iconShuffling in ds.pytorch()
  • Folder icon closed Folder open iconStorage Synchronization
  • Folder icon closed Folder open iconHow to Contribute
  • Datasets
    • Speech Commands Dataset
    • 300w Dataset
    • Food 101 Dataset
    • VCTK Dataset
    • LOL Dataset
    • AQUA Dataset
    • LFPW Dataset
    • ARID Video Action dataset
    • The Street View House Numbers (SVHN) Dataset
    • NABirds Dataset
    • GTZAN Music Speech Dataset
    • Places205 Dataset
    • FFHQ Dataset
    • CARPK Dataset
    • SQuAD Dataset
    • CACD Dataset
    • ICDAR 2013 Dataset
    • RAVDESS Dataset
    • Flickr30k Dataset
    • dSprites Dataset
    • Kuzushiji-Kanji (KKanji) dataset
    • PUCPR Dataset
    • KMNIST
    • EMNIST Dataset
    • GTSRB Dataset
    • Free Spoken Digit Dataset (FSDD)
    • USPS Dataset
    • CSSD Dataset
    • MARS Dataset
    • ATIS Dataset
    • HICO Classification Dataset
    • COCO-Text Dataset
    • NSynth Dataset
    • not-MNIST Dataset
    • CoQA Dataset
    • RESIDE dataset
    • ECSSD Dataset
    • FGNET Dataset
    • Electricity Dataset
    • DRD Dataset
    • Caltech 256 Dataset
    • AFW Dataset
    • ESC-50 Dataset
    • HASYv2 Dataset
    • Pascal VOC 2012 Dataset
    • PACS Dataset
    • GlaS Dataset
    • QuAC Dataset
    • TIMIT Dataset
    • WFLW Dataset
    • LFW Deep Funneled Dataset
    • UTZappos50k Dataset
    • Visdrone Dataset
    • 11k Hands Dataset
    • KTH Actions Dataset
    • LFW Funneled Dataset
    • WIDER Face Dataset
    • LFW Dataset
    • Pascal VOC 2007 Dataset
    • Chest X-Ray Image Dataset
    • PlantVillage Dataset
    • Office-Home Dataset
    • WISDOM Dataset
    • Omniglot Dataset
    • DAISEE Dataset
    • HMDB51 Dataset
    • Optical Handwritten Digits Dataset
    • Fashionpedia Dataset
    • UCI Seeds Dataset
    • STN-PLAD Dataset
    • WIDER Dataset
    • Caltech 101 Dataset
    • DRIVE Dataset
    • PPM-100 Dataset
    • FER2013 Dataset
    • LSP Dataset
    • Adience Dataset
    • NIH Chest X-ray Dataset
    • UCF Sports Action Dataset
    • CelebA Dataset
    • Wiki Art Dataset
    • FIGRIM Dataset
    • MNIST
    • COCO Dataset
    • Kaggle Cats & Dogs Dataset
    • ANIMAL (ANIMAL10N) Dataset
    • Image Hotspots Widget
    • ImageNet Dataset
    • CIFAR 10 Dataset
    • Lincolnbeet Dataset
    • CIFAR 100 Dataset
    • LIAR Dataset
    • OPA Dataset
    • Fashion MNIST Dataset
    • Sentiment-140 Dataset
    • Google Objectron Dataset
    • Stanford Cars Dataset
    • DomainNet Dataset
    • MURA Dataset
    • SWAG Dataset
    • HAM10000 Dataset
    • GTZAN Genre Dataset
    • Tiny ImageNet Dataset
  • Folder icon closed Folder open iconTensor Relationships
  • Folder icon closed Folder open iconDeep Lake Docs Home
  • Folder icon closed Folder open iconQuickstart

KMNIST

Estimated reading: 5 minutes

Visualization of the KMNIST Test Dataset in the Deep Lake UI

KMNIST dataset

What is KMNIST Dataset?

The KMNIST (Kuzushiji-MNIST) dataset is a drop-in replacement for the MNIST dataset, and is comprised of a training set of 60,000 examples and a testing set of 10,000 examples of handwritten Kuzushiji (cursive Japanese) Hiragana characters. The handwritten characters have been processed to fit into 28×28 pixel resolution grayscale images. The KMNIST dataset is suggested for data scientists who want to try machine learning techniques and computer vision techniques on real-world data while spending minimal effort on preprocessing and formatting.

Download KMNIST Dataset in Python

Instead of downloading the KMNIST dataset in Python, you can effortlessly load it in Python via our Deep Lake open-source with just one line of code.

Load KMNIST Dataset Training Subset in Python

				
					import deeplake
ds = deeplake.load("hub://activeloop/kmnist-train")
				
			

Load KMNIST Dataset Testing Subset in Python

				
					import deeplake
ds = deeplake.load("hub://activeloop/kmnist-test")
				
			

KMNIST Dataset Structure

KMNIST Data Fields
  • images: tensor containing the 28×28 images.
  • labels: one of ten possible classes, each representing one row of Hiragana.
KMNIST Data Splits
  • The KMNIST dataset training set is composed of 60,000 images, perfectly balanced between the ten classes.
  • The KMNIST dataset test set is composed of 10,000 images, perfectly balanced between the ten classes.

How to use KMNIST Dataset with PyTorch and TensorFlow in Python

Train a model on the KMNIST dataset with PyTorch

Let’s use Deep Lake built-in PyTorch one-line dataloader to connect the data to the compute:

				
					dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
				
			
Train a model on the KMNIST dataset with TensorFlow
				
					dataloader = ds.tensorflow()
				
			

KMNIST Dataset Creation

Data Collection and Normalization Information

Source books (35 classical Japanese books from the 18th century) were scanned, and a bounding box was created for each character. The bounding box images were then processed to conform to the 28×28 pixel resolution in grayscale.

Additional Information about KMNIST Dataset

KMNIST Dataset Description

  1. Homepage: http://codh.rois.ac.jp/kmnist/index.html.en 
  2. Repository: https://github.com/rois-codh/kmnist
  3. Paper: T. Clanuwat, M. Bober-Irizar, A. Kitamoto, A. Lamb, K. Yamamoto and D. Ha: Deep Learning for Classical Japanese Literature, arXiv:1812.01718, December 2018
  4. Point of Contact: https://github.com/rois-codh/kmnist/issues
KMNIST Dataset Curators

ROIS-DS Center for Open Data in the Humanities (CODH), adapted from "Kuzushiji Dataset" (created by National Institute of Japanese Literature and others).

KMNIST Dataset Licensing Information

Creative Commons Attribution Share-Alike 4.0 International license

KMNIST Dataset Citation Information
				
					@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},
}

				
			

KMNIST Dataset FAQs

What is the KMNIST dataset for Python?

The KMNIST dataset (Kuzushiji-MNIST) is a drop-in replacement for the MNIST (Modified National Institute of Standards and Technology) dataset, which is one of the most well-known datasets in machine learning. KMNIST is a dataset of 70,000 (60,000 training examples and 10,000 testing examples) 28×28 images of handwritten single Kuzushiji (cursive Japanese) Hiragana characters from classical Japanese literature, spanning ten classes representing the corresponding rows in modern Hiragana. Similar to MNIST, the images are in grayscale format. The classes are as follows:

Class / Codepoint
Hiragana Character
U+304A
お
U+304D
き
U+3059
す
U+3064
つ
U+306A
な
U+306F
は
U+307E
ま
U+3084
や
U+308C
れ
U+3092
を
 
What is the KMNIST dataset used for?

KMNIST is considered a more difficult training task than MNIST due to the many-to-one mapping between labels and characters. This is the case as one class in KMNIST may have many characters mapped to it. KMNIST can be used as a more challenging machine learning task after working with the MNIST dataset

How to download the KMNIST dataset in Python?

You can load the KMNIST dataset fast with one line of Python code using the open-source package Activeloop Deep Lake. See detailed instructions on how to load the KMNIST dataset training subset or how to load the KMNIST dataset testing subset.

How can I use the KMNIST dataset in PyTorch or TensorFlow?

You can stream KMNIST dataset while training a model in PyTorch or TensorFlow with one line of code using the open-source package Activeloop Deep Lake in Python. See detailed instructions on how to train a model on MNIST dataset with PyTorch or train a model on MNIST dataset with TensorFlow .

Should I work with KMNIST dataset in CSV?

No. CSV is not optimized for working with image data, especially for machine learning workflows. Instead of downloading KMNIST dataset in CSV format, you easily load, version-control, query, and manipulate KMNIST for machine learning purposes using Activeloop Deep Lake.

How to create an Image Dataset like KMNIST dataset?

With Activeloop Deep Lake, creating image datasets like the MNIST digits dataset is easy. Simple datasets like KMNIST can be created automatically by allowing Deep Lake to parse the legacy files into Deep Lake dataset format. More complex datasets can be created manually.

KMNIST vs Fashion-MNIST. What is the difference between KMNIST and Fashion-MNIST?

KMNIST and Fashion-MNIST dataset are two separate datasets.Both datasets are inspired by, and meant to be alternatives to the original MNIST dataset, and are thus of the same size (60,000 28×28 grayscale examples in the training set, and 10,000 28×28 grayscale examples in the testing set) and have the same number of classes.

Fashion-MNIST comprises pictures of clothing items and was published in 2017 by Zalando, a German online retailer. KMNIST comprises of handwritten Hiragana characters from classical Japanese books, and was published in 2018. It was curated by the ROIS-DS Center for Open Data in the Humanities (CODH).

What is the size of each image in the KMNIST dataset?

Each image in the KMNIST dataset is a 28×28 grayscale image.

Deep Lake community member Alex Wang has contributed to this documentation. You rock, Alex! 🙂

Datasets - Previous Kuzushiji-Kanji (KKanji) dataset Next - Datasets EMNIST Dataset
Datasets - Previous Kuzushiji-Kanji (KKanji) dataset Next - Datasets EMNIST Dataset
Leaf Illustration

© 2022 All Rights Reserved by Snark AI, inc dba Activeloop