Published January 3, 2020 | Version 1
Dataset Open

UHaT Dataset: Urdu Handwritten Text Dataset

  • 1. COMSATS University Islamabad


UHaT Dataset

UHaT: Urdu Handwritten Text Dataset

This dataset contains handwritten characters and digits of Urdu language. The samples are written by 900+ individuals.

Description and organization

Size of images: All the images are stored in 28 by 28 resolution.

How many images: The training set per each character contains of 700 images on average. For example, there are 811 train set images for AYN and 697 train set images for ALIF. Similarly, the train set per each contains 700 images on average. For example, there are 678 train set images for digits one. The test set per each character contains 140 images on average. For example, there are 145 test set images for character ALIF. The test set per each digit contains 140 images on average. For example, there are 147 test set images for digit nine.

The dataset is organized into four sub-directories. Characters Training set, Characters Test set, Digits training set and digits test set. Each sub-director contains one sub-folder per one character. For example, all the train images for character ALIF are placed in sub-folder Alif.

The folder hierarchy is given as:

*Data > characters train set > alif

Data > characters train set > ayn*

And so on….

How to load directly?

You can also load it directly from the uhat_dataset.npz file. See the kernel load_dataset


Thanks to all volunteers who contributed by providing handwriting samples.


This is an MNIST style dataset. The machine learning community in general will find it useful for experimentation, demonstration purposes of machine learning models.
The dataset will also provide an opportunity to researchers to work on Urdu text recognition.


If you use this data, please cite the paper Ali, H., Ullah, A., Iqbal, T. et al. SN Appl. Sci. (2020) 2: 152.


Files (32.9 MB)

Name Size Download all
32.9 MB Preview Download

Additional details

Related works

Is documented by
Journal article: 10.1007/s42452-019-1914-1 (DOI)