Handwritten Digits Recognition Using SVM, KNN, RF and Deep Learning Neural Networks
Yevhen Chychkarov, Anastasiia Serhiienko, Iryna Syrmamiikh, Anatolii Kargin
Abstract
This article discusses several classification algorithms of recognizing numbers from photographic images or with manual input, namely: support vector machine (SVM), Knearest neighbors (KNN), random forest (RF) and several variants of neural networks. The success rates of the algorithms in the field of handwriting recognition were compared. Six variants of recognition technology were analyzed and tested: using classifier from Scikitlearn package and using deep learning neural networks. To construct and train neural networks or train classifiers, a well-known and rather complete base of handwritten digits MNIST was chosen. Two types of neural networks were considered: sequential and convolutional. The training of neural networks was carried out using a variable number of steps (epochs). Recognition images were scaled to a size of 28x28 (784 cells in onedimensional representation). Preliminary processing of images (filtering, scaling, etc.) was carried out using the OpenCV library. For recognition, each image of a digit was converted to a 28x28 size and fed to the input of a pre-trained neural network. A technique to select the area of interest in photographs containing hand-written digits for further recognition has been devised. For handwritten digit recognition, the best recognition accuracy is provided by a convolutional neural network, as 97.6% of car ladle digits were recognized correctly with it. To improve the recognition accuracy for handwritten digits, it is necessary to perform two additional stages of image preprocessing and dataset transformation. After building recognition models using all the algorithms mentioned above, the recognition accuracy of all handwritten digits on the test program turned out to be within 98-100%. For industrial images regardless of the used neural network version, the recognition accuracy was 96-98%.