Project 3b - Image classification example #2
- James Canova
- Sep 15, 2021
- 2 min read
Project start: 21 December 2021
Project finish: 26 December 2021
Last updated: 13 August 2022
Objective: introduction to using convolution neural networks
This problem is to identify handwritten digits, 0 through 9, from publicly available data sets from the MNIST collection.
Each data set includes an image of one digit represented by a 28 x 28 bit map in black and white, plus the digit to which the image corresponds.
Option a (see below) is for a method using a convolutional neural network (CNN) and is from lessons 74 to 78 of the Udemy course [Ref. 2.]
CNN works like the visual cortex. I don't understand the theory, yet, except that it is a useful way to reduced the number of parameters required to be calculated and thus makes solution faster and in some cases tractable.
This is explained in, "Hands-on Machine Learning with Scikit-Learn, Keras & TensorFlow...."[Ref. 3, p. 447]
Option b (see below) is a method for solving this problem that does not use a CNN and is from, "Make Your Own Neural Network". [Ref. 3, pp. 169-173]
Both are presented here just because I'm interested comparing the training and solution time performance metrics for each method. Solution time is the time taken for the neural network to infer the digit for each of the images in the date set.
Option a: CNN
Udemy lessons: 74 to 77 [Ref. 2.]
The following .zip file contains a Jupyter Notebook program based on a program from the Udemy course (to run Jupyter Notebook, type jupyter-notebook):
Option b: Non-CNN
The following .zip file contains a Jupyter Notebook program based on a program from Ref. 3 (to run Jupyter Notebook, type jupyter-notebook):
The following .zip file contains the required data which is same for both options:
Performance metrics are tabulated below. The CNN option ran twice as fast as the non-CNN option with the same accuracy.
Note: the second column labelled "Training time" should read "Solution time" (see above).

If you have any problems or need clarification please contact me: jscanova@gmail.com
Comments