Digital Recognition using Neural Network

: Problem statement: Handwriting number recognition is a challenging problem researchers had been research into this area for so long especially in the recent years. In our study there are many fields concern with numbers, for example, checks in banks or recognizing numbers in car plates, the subject of digit recognition appears. A system for recognizing isolated digits may be as an approach for dealing with such application. In other words, to let the computer understand the Arabic numbers that is written manually by users and views them according to the computer process. Scientists and engineers with interests in image processing and pattern recognition have developed various approaches to deal with handwriting number recognition problems such as, minimum distance, decision tree and statistics. Approach: The main objective for our system was to recognize isolated Arabic digits exist in different applications. For example, different users had their own handwriting styles where here the main challenge falls to let computer system understand these different handwriting styles and recognize them as standard writing. Result: We presented a system for dealing with such problem. The system started by acquiring an image containing digits, this image was digitized using some optical devices and after applying some enhancements and modifications to the digits within the image it can be recognized using feed forward back propagation algorithm. The studies were conducted on the Arabic handwriting digits of 10 independent writers who contributed a total of 1300 isolated Arabic digits these digits divided into two data sets: Training 1000 digits, testing 300 digits. An overall accuracy meet using this system was 95% on the test data set used. Conclusion: We developed a system for Arabic handwritten recognition. And we efficiently choose a segmentation method to fit our demands. Our system successfully designs and implement a neural network which efficiently go without demands, after that the system are able to understand the Arabic numbers that was written manually by users.


INTRODUCTION
Recently, a lot of works was done by depending on the computer; In order to let the processing time to be reduced and to provide more results that are accurate, for example, depending on different types of data, such as characters and digits and the numbers are used frequently in normal life operation. In order to automate systems that deal with numbers such as postal code, banking account numbers and numbers on car plates. And an automatic recognition number system is proposed in this study.
Digit recognition has been extremely found and studied. Various approaches in image processing and pattern recognition have been developed by scientists and engineers to solve this problem [1,16] . That is because it has an importance in several fields and it may probably be used in checks in banks or for recognizing numbers in cars plates, or many other application.
In this study, system for recognized of digits is built, which may benefit various fields, the system concerning on isolated digits, the input is considered to be an image of specific size and format, the image is processed and then recognized to result of an edited digits.
The proposed system recognizes isolated Arabic digits as the system acquire an image consisting digits, then, the image will be processed into several phases such as image enhancement, thinning, skeletonaization and segmentation before recognizing the digit. A multilayer neural network will be used for the recognition phase; a feed forward back propagation algorithm will be applied for training the network and finally change them into numeral text [2] .
Related work: Pattern recognition is an area of study that is well-established and known through years of research, especially in the field of digit recognition which is considered one of the obvious challenges and one of the significant contributors to digit recognition. However, Arabic digits recognition is considered the recent major areas that attract researcher's attention. Arabic digits recognition attracts researchers into mainly two areas; first, a hierarchical division of the input letter space to easily solve the problem. Second, a heuristically defined rule for classification or feature selection, which is depend on both the writer and the written material (data).
Experiments were done by Jurgen Frank for the polynomial classifier approach. There are three classifiers; the first one is simple and linear. It was efficiently built and successfully tested for the purpose of obtaining a reference point for different data set. Accordingly, the performance is improved by depending on several sophisticated polynomial structures. The second classifier comprises the effects of extracting the feature which are demonstrated with the Karhunce-loeve transformation and some results iterative learning were mentioned to be provided. The third classifier comprises the fixed classifier approach for various structure kinds of the classifier system on the same data set. As a result, the performance effects were demonstrated, the efforts and supporting of these different systems in the training and testing stage are shown in [3] .
Alceu de Britto et al. [4] proposed an approach for recognizing the handwritten numeral strings that relies on the two-stage HMM-based method. The possible loss of recognition performance is returned by the method that is caused by the necessary trade-off between recognition and segmentation in an implicit segmentation-based strategy. In the first phase of the segmentation process, implicit segmentation process concerns contextual information in the sense of providing multiple segmentation-recognition hypotheses for a mentioned preprocessed string is taken. In the second phase, these hypotheses are reranked and verified in a by performing an isolation for the digit classifier. An experiment on 12,802 handwritten numeral strings of different lengths has been conducted to proof that the dependence of the two-stage recognition strategy is a promising approach. An average improvement of 9.9% was for the verification stage on the string recognition rate. A recognition rate of 89.6% on touching digit pairs was obtained by this method.
Genetic programming techniques for hand written digits recognition was applied by [15] on the USPS data set. Some variations appears on the selection and evolution methods which normally used accompanied by genetic programming systems such as aged members, directed crossover, inter-output crossover and node mutation. This genetic approach shows a promising result where the accuracy rate reaches 84.3% using interoutput crossover using 19 features.
An approach to recognize a bank cheque amount that is manually typed on a bank cheque was proposed by [5] . Several splitting algorithms that achieve a better segmentation for the individual digits where obtained. As a result, a designation for the system was done in order to have the most likely one first; if it fails, it uses different techniques. By using the neural network architecture which employs a group of four neural networks of various types that are applicable in parallel to reduce the chances of incorrect readings, the digits classified. The data used for training the neural network consists of 3103 real cheques and 1444 segments for accuracy. The overall accuracy using MLP neural network was about 85%.
An Optical Character Recognition (OCR) framework was developed by [6] . It depends on the handprinted numeric recognition field. From the VISA credit card application forms, the numeric fields were taken from binary images. Individual identity telephone numbers and other numbers were contained in the image. The proposed OCR framework is considered to be as a cascaded neural network. It contains three stages; the first stage is the self-organizing feature map algorithm. The second stage maps distance values to the values of allograph membership by using a gradient descent learning algorithm. The third stage is a network of multi-layer feed-forward. Experiments were efficiently performed on a test data set from the CCL/ITRI database which contains above 90,390 handwritten numeric digits. A test recognition rate of 98.85% was achieved by this experiment.
Ernst Kussul and Tatiana Baidyk [7] have efficiently developed a novel neural classifier Limited Receptive Area (LIRA). The classifier LIRA is contained of three neuron layers: output, sensor and associative layers. The classifier was tested over two image databases. The first database is the MNIST database which contained 60,000 handwritten digit images for the classifier training and 10,000 handwritten digit images for the classifier testing. The second database has 441 images of the assembly micro device. For dividing the database a random procedure was used to test and train subsets. The classifier LIRA provides error rate of 0.61% as a mean value of three trials. A finally approach was presented by WESTALL in order to use the neural networks in the system of the decision logic for the handwritten numerals segmentation. This approach has been successfully implemented in a commercial system that is internationally used in the recognition of hand written amounts on personal bank checks; computer-based recognition of unconstrained hand written fields within scanned images of financial documents has three steps. The first step is the field identification that supplies the location within the image of the typically rectangular region of interest that consists of the target field. The second step, an identification must be performed by the segmentation of the group of pixels compressing each numeral of the field. The third step is to classify the numerals that are extracted by segmentation [8] .
Framework: There are many fields concern with numbers, for example, checks in banks or recognizing numbers in car plates, the subject of digit recognition appears. A system for recognizing isolated digits may be as an approach for dealing with such application. In other words, to let the computer understand the Arabic numbers that is written manually by users and views them according to the computer process.here, we present a way to recognize isolated Arabic digits exist in different applications. For example, different users have their own handwriting styles where here the main challenge falls to let computer system understand these different handwriting styles and recognize them as standard writing. Figure 1 shows some examples of different user-handwritten.and in Fig. 2 the scenario of number recognition with Artificial Neural Network Which contains input and hiding layer and output with the number (4) for examination the Network.

Fig. 3: A general diagram for Arabic digit recognition system
System components: ADR it is a group of Arabic number (0-9) handwritten, the numbers will be given to the system handwritten in a different styles, sizes and possible orientations. And also the system consists of five components Fig. 3.

MATERIALS AND METHODS
There are four steps to build the isolated digits recognition system. These steps are presented on Fig. 3 and below are the descriptions of them: Image acquisition: We will acquire an image to our system as an input .this image should have a specific format, for example, bmp format and with a determined size such as 30×20 pixels. This image can be acquired through the scanner or, digital camera or other digital input devices [9] .
Preprocessing: After acquiring the image, it will be processed through sequence of preprocessing steps to be ready for the next step.
Noise removal: reducing noise in an image. For on-line there is no noise to eliminate so no need for the noise removal. In off-line mode, the noise may come from the writing style or from the optical device captures the image [10] .
Normalization-scaling: standardize the font size within the image. This problem appears clearly in handwritten text, because the font size is not restricted when using handwriting.
Thinning and skeletonization: Representing the shape of the object in a relatively smaller number of pixels [9] . Thinning algorithms can be parallel or sequential. Parallel is applied on all pixels simultaneously. Sequential examine pixels and transform them depending on the preceding processed results.

Segmentation:
Since the data are isolated, no need for segmentation. With regards to the isolated digits, to apply vertical segmentation on the image containing more than digit will isolate each digit alone.

Normalization scaling and translation:
Handwriting produces variability in size of written digits. This leads to the need of scaling the digits size within the image to a standard size, as this may lead to better recognition accuracy. We tried to normalize the size of digit within the image and also translate it to a specific position by the following.  In the hidden layer the number of nodes governs the variance of samples which can be accurately and correctly recognized by this Network. In our system project, the data will be divided using neural networks. In addition, we use the algorithm of back propagation [11] .
Algorithm code: Commonly neural networks are trained, so that a particular input leads to a specific target output. There, the network is adjusted, based on a comparison of the output and the target, until the network output matches the target. In both networks we applied feed forward back propagation neural network algorithm.
The first network (two layers) shown in Fig. 4 is consisted of an input layer P1 of a vector of 600 inputs and an input weights IW1,1 of 50×600 and b1 a vector bias with 50 biases connecting the input vector with the hidden layer which consist of 50 neurons. n1 = IW1,1 P1+ b1 represents the input for the 50 neurons of the hidden layer. a1 is the output of 50 neurons of the hidden layer resulted of applying an activation function on n1, a1 is now is the input vector of the next layer which is here the output layer. LW2,1 of 10×50 represents layer weights and b2 a vector bias with 10 biases which connects the hidden layer with the output layer which consist of 10 neurons. n2 = IW2,1 a1+ b2 the input for the 10 neurons of the output layer. a2 is the output of 10 neurons of the output layer resulted of applying an activation function on n2. The output layer of the first network consist of 10 neurons since we need to classify 10 digits [0, 1,…,9], each of which correspond to one of the possible digits that might be considered.
The architecture of the second network (three layers) as illustrated in Fig. 5 also is the same as the architecture of the first network except that there are an additional hidden layer rather than one hidden layer. The input vector also consists of 600 inputs. There are two hidden layers, the first consists of 250 neurons and the second consists of 6 neurons. The output layer also consists of 10 neurons. Also the same as in the first network, each neuron is used to correspond to one of the possible digits that might be considered. Both networks are fully connected feed forward network, which means activation travels in a direction from the input layer to the output layer and the units in one layer are connected to every other unit in the next layer up [12] . The back propagation algorithm consists of three stages. The first is the forward phase, spread inputs from the input layer to the output layer through hidden layer to provide outputs. The second is the backward stage, calculate and propagate back of the associated error from the output layer to the input layer through hidden layer. And the third stage is the adjustment of the weights [13] .
The backward stage is similar to the forward stage except that error values are propagated back through the network to determine how the weights are to be changed during training. During training each input pattern will have an associated target pattern. After training, application of the net involves only the computations of the feed forward stage. Hereafter, we will describe the algorithm used to train the network in details [14] .
Training algorithm: As shown in Fig. 6 the applying the three stages, feed forward, back propagation of error and adjustment of weights and biases represents one epoch. In our research, the first network used needed 36 epochs to reach the goal and the other network needed 33 epochs to reach the goal. The goal in the first network was until E <= 0.00001, while in the second network was until E <= 0.000001.

RESULTS AND DISCUSSION
We have experimented two networks, one with two layers and another with three layers. Both networks have been trained on the same training data set using feed forward back propagation algorithm. We used different ordering for the data set in the training process. The same test data set has been used for testing both networks. In Table 1, we show the results and a comparison between the two networks constructed. We observe that the net2 converged more rapidly than net1 as the number of epochs is greater in net1, in spite of that error rate in net1 is greater than in net2. The accuracy of recognition is 93% in net1 and 95% in net2.
In Table 2, we tested each digit alone. We found that the recognition accuracy for digits (1, 2, 3, 5, 6 and 7) remains the same in both networks. And the recognition accuracy for digits (0, 4 and 8) was better in net2, while the recognition accuracy for digit (9) was better in net1. Digit (0) achieved the best average accuracy 96.65% in both networks. Digit (9) achieved the least average accuracy 89.95% in both networks. We conclude that net2 recognized all digits more accurately than net1 except for digit (9).
The input data is an image format file containing numbers. The data feed into the system and then passed through several preprocessing steps before it can be recognized. The preprocessing steps is an image processing methods, such as (convert the (RGP) image to grayscale, sequentially, convert it to a grayscale to binary). The binary image then passed through a filtering technique to remove the noise.
Implementation: In Fig. 7 show the different steps involved in the proposed recognition system of Arabic number from Zero to nine and we been able to select any part from the image before the recognition process.  The noiseless image is segmented if it contains more than one digit. The previous segments are normalized to a common size to be suits as an input for the neural network. As a last step before the recognition process, thinning and skeletonaization process are applied on each segment. Finally, digits within the image are recognized using Neural Networks.
Our system is designed to deal with any field where the digits could be used for example in bank checks, postal arrangement according to zip-code, car plates and any application forms that deals with numbers. At the end of the study we proved the ability for our system dependent on the results for the recognition accuracy after the applied our system using neural network. In Fig. 8 shown A comparison between the theories with our System In terms of recognition accuracy. We conclude that our Neural Network approach to recognizing Arabic Handwritten digits proved as a viable concept. Further refinement of the networks will certainly produce higher recognition accuracy while increasing the robustness of the solution.
Scientists and researchers are still interested in this area, because it has many challenges until now ,and the system involves a verity of process operate sequentially to achieve the goal, many issues related to those process have not been touched, as the needed in the future those issues can be studied and tested under the proposed system and some of the following can be consider as the base for the future work, like check robustness in noisy setting and with different random initializations and skew detection and correction to the digits.

CONCLUSION
We can conclude that we reached the computer to the human's brain by the importance use of isolated digits recognition for different applications. This recognition starts with acquiring the image to be preprocessed throw a number of steps. As an important point, classification and recognition have to be done to gain a numeral text. In a final conclusion, neural network seems to be better than other techniques used for recognition.