MNIST as .jpg
- by user1
- 28 February, 2022
Kaggle Digit Recognizer Competition Dataset as .jpg Image Files
LicenseCC0: Public Domain
Tagsearth and nature, computer science
Context
The Digit Recognizer competition uses the popular MNIST dataset to challenge Kagglers to classify digits correctly. In this dataset, the images are represented as strings of pixel values in train.csv
and test.csv
. Often, it is beneficial for image data to be in an image format rather than a string format. Therefore, I have converted the aforementioned datasets from text in .csv files to organized .jpg files.
Content
This dataset is composed of four files:
trainingSet.tar.gz
(10.2 MB) – This file contains ten sub folders labeled 0 to 9. Each of the sub folders contains .jpg images from the Digit Recognizer competition’strain.csv
dataset, corresponding to the folder name (ie. folder 2 contains images of 2’s, etc.). In total, there are 42,000 images in the training set.testSet.tar.gz
(6.8 MB) – This file contains the .jpg images from the Digit Recognizer competition’stest.csv
dataset. In total, there are 28,000 images in the test set.trainingSample.zip
(407 KB) – This file contains ten sub folders labeled 0 to 9. Each sub folder contains 60 .jpg images from the training set, for a total of 600 images.testSample.zip
(233 KB) – This file contains a 350 image sample from the test set.
Acknowledgements
As previously mentioned, all data presented here is simply a cleaned version of the data presented in Kaggle’s Digit Recognizer competition. The division of the MNIST dataset into training and test sets exactly mirrors that presented in the competition.
Inspiration
I created this dataset when exploring TensorFlow’s Inception model. Inception is a massive CNN built by Google to compete in the ImageNet competition. By way of Transfer Learning, the final layer of Inception can be retrained, rendering the model useful for general classification tasks. In retraining the model, .jpg images must be used, thereby necessitating to the creation of this dataset.
My hope in experimenting with Inception was to achieve an accuracy of around 98.5% or higher on the MNIST dataset. Unfortunately, the maximum accuracy I reached with Inception was only 95.314%. If you are interested in my code for said attempt, it is available on my GitHub repository Kaggle MNIST Inception CNN.
To learn more about retraining Inception, check out TensorFlow for Poets.
Size: 70065 KB Price: Free Author: Stuart Colianni Data source: kaggle.com