Chinese Digit MNIST
The dataset

It’s always good to understand what data we are working on. The dataset has 15000 images, but how many for each? Since we have 15 different characters, it should be 1000 each, but let’s check. Note that the notebook is run on Kaggle.

Distribution of data

Code for getting the distribution of data

The code will returns the following, which is 1000 images per characters!

value character

0 零 1000

1 一 1000

2 二 1000

3 三 1000

4 四 1000

5 五 1000

6 六 1000

7 七 1000

8 八 1000

9 九 1000

10 十 1000

100 百 1000

1000 千 1000

10000 万 1000

100000000 亿 1000

dtype: int64

2. Missing data?

Let’s check if there’s any missing data.

Code for evaluating missing data

The code returns 0, means the dataset is totally fine! It’s better to be safe than sorry!

Result of missing data

3. Missing images?

Let’s check if there’s 15000 images in the directory.

Number of image files: 15000

Yep! We are good to go!

Note that the images is inside the subdirectory of data/data .

4. Appending images properties to the dataframe

Since the input image has a name convention of “ input_[siote_id]_[sample_id]_[code].jpg ”, thus we should add one more column in our dataframe, for the future processing. Also, we should specify the width and height of the image too!

The code above adds three new columns, which are “ file ”, “ w ” and “ h ” to the dataframe. Our dataframe shall looks like this.

Note that this data have 100 suites with 10 samples each.
[]
['Kaggle', 'Beginner', 'Cnn', 'TensorFlow', 'Tutorial']