normalizing mnist digits

I'm slowly working my way towards mnist digit recognition. Today's contribution is a normalization step, which I assume will help. Behind the scenes it actually represents quite a bit of code, though in this post I'll just describe the broad steps. Eventually I will probably try to automate it into a single script.

First step, average digits in the full 60k training set based on their labels:
$ ./mnist-data-to-average-images.py
Producing these average digits:
Though we should note this only works because it is a well constructed data-set, that has been pre-aligned.

Next, extract average features, using k = 5 (ie 5*5 tiles) and average categorize threshold t = 0.8:
$ ./create-average-images.py 5 work-on-handwritten-digits/label-average-images/
Producing these features:
And this corresponding sw file, that we need in phi-transform.

Here are the raw 2000 test images:


Next, we phi-transform the test images:
$ ./phi-transform-v2.py 5 work-on-handwritten-digits/test-images
Producing these images:
Then final step, we edge enhance them:
$ ./image_directory_edge_enhance.py 20 work-on-handwritten-digits/phi-transformed-images-v2/
Update: I finally have them all done:
phi-transformed-images-v2--10k-test--edge-enhanced-20.zip
phi-transformed-images-v2--60k-train--edge-enhanced-20.zip



Home
previous: p pattern similarity metric in python
next: full mnist results

updated: 19/12/2016
by Garry Morrison
email: garry -at- semantic-db.org