Hackernoon logoKannada-MNIST:A new handwritten digits dataset in ML town by@vinay-prabhu

Kannada-MNIST:A new handwritten digits dataset in ML town

Author profile picture

@vinay-prabhuVinay Prabhu

PhD, Carnegie Mellon University Chief Scientist, UnifyID


I am disseminating 2 datasets:
Kannada-MNIST dataset: 28X 28 grayscale images: 60k Train | 10k Test
Dig-MNIST:ย 28X 28 grayscale images: 10240 (1024x10) {See pic below}

The Kannada-MNIST dataset is meant to be a drop-in replacement for the MNIST dataset ๐Ÿ™ , albeit for the numeral symbols in the Kannada language .
Also, I am disseminating an additional dataset of 10k handwritten digits in the same language (predominantly by the non-native users of the language) called Dig-MNIST that can be used as an additional test set.


GitHub ๐Ÿ‘‰:ย https://github.com/vinayprabhu/Kannada_MNIST
Kaggle ๐Ÿ‘‰:ย https://www.kaggle.com/higgstachyon/kannada-mnist
ArXiv ๐Ÿ‘‰ :ย https://arxiv.org/pdf/1908.01242.pdf

If you use Kannada-MNIST in a peer reviewed paper, we would appreciate referencing it as:

Prabhu, Vinay Uday. โ€œKannada-MNIST: A new handwritten digits dataset for the Kannada language.โ€ arXiv preprint arXiv:1908.01242 (2019)..

Bibtex entry:


title={Kannada-MNIST: A new handwritten digits dataset for the Kannada language},
  author={Prabhu, Vinay Uday},
  journal={arXiv preprint arXiv:1908.01242},


Kannada is the official and administrative language of the state of Karnataka in India with nearly 60 million speakers worldwide. Also, as per articles 344(1) and 351 of the Indian Constitution, Kannada holds the status of being one of the 22 scheduled languages of India .

The language is written using the official Kannada script, which is an abugida of the Brahmic family and traces its origins to the Kadamba script (325โ€“550 AD).

Kannada stone inscriptions: Source:ย https://karnatakaitihasaacademy.org/karnataka-epigraphy/inscriptions/

Distinct glyphs are used to represent the numerals 0โ€“9 in the language that appear distinct from the modern Hindu-Arabic numerals in vogue in much of the world today.

Unlike some of the other archaic numeral-systems, these numerals are very much used in day-to-day affairs in Karnataka, as in evinced by the prevalence of these glyphs on license-plates of vehicles captured in the pic below:

Fig: A vehicle license plate with Kannada numeral glyphs

This figure below captures the MNIST-ized renderings of the variations of the glyphs across the following modern fonts:ย Kedage, Malige-i, Malige-n, Malige-b, Kedage-n, Malige-t, Kedage-t, Kedage-i, Lohit-Kannada, Sampige and Hubballi-Regular.

Dataset curation


65 volunteers were recruited in Bangalore, India, who were native speakers of the language as well as day-to-day users of the numeral script. Each volunteer filled out an A3 sheet containing a 32 ร— 40 grid. This yielded filled-out A3 sheets containing 128 instances of each number which we posit is large enough to capture most of the natural intra-volunteer variations of the glyph shapes.

All of the sheets thus collected were scanned at 600 dots-per-inch resolution using the Konica Accurio-Press-C6085 scanner that yielded 65 4963 ร— 3509 png images.

Volunteers helping curate the Kannada-MNIST dataset


8 volunteers aged 20 to 40 were recruited to generate a 32 ร— 40 grid of Kannada numerals (akin to 2.1), all written with a black ink Z-Grip Series | Zebra Pen on a commercial Mead Cambridge Quad Writing Pad, 8โ€“1/2" x 11", Quad Ruled, White, 80 Sheets/Pad book.

We then scan the sheet(s) using a Dell โ€” S3845cdn scanner with the following settings:

โ€ข Output color: Grayscale

โ€ข Original type: Text

โ€ข Lighten/Darken: Darken+3

โ€ข Size: Auto-detect

The reduced size of the sheets used for writing the digits (US-letter vis-a-vis A3) resulted in smaller scan (.tif) images that were all approximately 1600ร—2000.

Comparisons with MNIST:

1: Mean pixel-intensities distribution:

2: Morphological properties:

Code source:ย https://github.com/dccastro/Morpho-MNIST

3: PCA-analysis:

4: UMAP visualizations:

Some classification benchmarking:

I used aย standardย MNIST-CNN architecture to get some basic accuracy benchmarks (See fig below)

The CNN architecture used for the benchmarks

(a) Train on Kannada-MNIST train and test on Kannada-MNIST test

(b) Train on Kannada-MNIST train and test on Dig-MNIST

Open challenges to the machine learning community

We propose the following open challenges to the machine learning community at large.

  1. To characterize the nature of catastrophic forgetting when a CNN pre-trained on MNIST is retrained with Kannada-MNIST. This is particularly interesting given the observation that the typographical glyphs for 3 and 7 in Kannada-MNIST hold uncanny resemblance with the glyph for 2 in MNIST.
  2. Get a model trained on purely synthetic data generated using the fonts (as in [1]) and augmenting to achieve high accuracy of the Kannada-MNIST and Dig-MNIST datasets.
  3. Replicate the procedure described in the paper across different languages/scripts, especially the Indic scripts.
  4. With regards to the dig-MNIST dataset, we saw that some of the volunteers had transgressed the borders of the grid and hence some of the images either have only a partial slice of the glyph/stroke or have an appearance where it can be argued that they could potentially belong to either of two different classes. With regards to these images, it would be worthwhile to see if we can design a classifier that will allocate proportionate softmax masses to the candidate classes.
  5. The main reason behind us sharing the raw scan images was to foster research into auto-segmentation algorithms that will parse the individual digit images from the grid, which might in turn lead to higher quality of images in the upgraded versions of the dataset.
  6. Achieve MNIST-level accuracy by training on the Kannada-MNIST dataset and testing on the Dig-MNIST dataset without resorting to image pre-processing.

[1] Prabhu, Vinay Uday, Sanghyun Han, Dian Ang Yap, Mihail Douhaniaris, Preethi Seshadri, and John Whaley. โ€œFonts-2-Handwriting: A Seed-Augment-Train framework for universal digit classification.โ€ย arXiv preprint arXiv:1905.08633ย (2019). [ย https://arxiv.org/abs/1905.08633ย ]


Join Hacker Noon

Create your free account to unlock your custom reading experience.