Recognition of Handwritten Arabic and Hindi Numerals Using Convolutional Neural Networks

Arabic and Hindi handwritten numeral detection and classification is one of the most popular fields in the automation research. It has many applications in different fields. Automatic detection and automatic classification of handwritten numerals have persistently received attention from researchers around the world due to the robotic revolution in the past decades. Therefore, many great efforts and contributions have been made to provide highly accurate detection and classification methodologies with high performance. In this paper, we propose a two-stage methodology for the detection and classification of Arabic and Hindi handwritten numerals. The classification was based on convolutional neural networks (CNNs). The first stage of the methodology is the detection of the input numeral to be either Arabic or Hindi. The second stage is to detect the input numeral according to the language it came from. The simulation results show very high performance; the recognition rate was close to 100%.


Introduction
Automatic recognition is widely applied in many aspects; such as face recognition, fingerprint recognition, and numerals recognition. Our traditional life is transforming from paper full to paperless. Nowadays, we communicate using different methods, the main methods are Internet and mobile telephones. Digital services are used in almost every aspect of our lives. Nevertheless, there are still some daily activities and tasks that depend on traditional methods of communication, such as using paper and pen. Therefore, automatic handwriting recognition can undoubtedly save time and effort. Handwritten digit recognition is one of the most successful applications of automatic pattern recognition either on-line or off-line. Most of such these applications were performed on Arabic digits, because it is the most known numbering system in the world. However, Hindi digits are widely used in some countries in Africa [1][2][3][4].
Handwritten recognition is one of the most difficult tasks due stylistic variations of the writers. Due to the importance of automated handwritten recognition in various applications such as reading postal codes, checking verifications, automatic recognition of handwritten numerals is one of the fields that gains interest by many researchers in order to develop algorithms and/or methodologies to increase recognition rates [5][6][7][8][9][10][11]. In this study, we employed convolutional neural networks (CNNs) for the offline recognition of Arabic and Hindi handwritten decimal numbers and through different number of scenarios and experiments, we demonstrated that very high recognition rates can be achieved.

Background and State-of-the-Art Research
In this section, we review the latest published methodologies in the field of numeral recognition focusing on the recognition of handwritten numerals. In our survey on related work about handwritten numeral recognition, we encountered few studies employing various classification techniques. Here, we briefly review the most recent research of this active research area, which plays an important role in the field of artificial intelligence.
In [12], handwritten Arabic (Indian) numerals were classified using a two-stage classification technique with Nearest Mean (NMC), K-Nearest Neighbor (K-NNC), and Hidden Markov Models (HMMC) being used in the first stage and a Structural Classifier (SC) being applied in the second stage. The achieved recognition ratios were around 98%, on average. In their work [13], Choudhary et al. used a supervised learning technique based on the artificial neural network (ANN) for offline handwritten numeral recognition, where they employed a multilayered perceptron (MLP) with one hidden layer. The drawback of this work is the small-sized data set with very few samples.
The authors of [14] applied Adaboost on an ensemble of MLP classifiers for the recognition of three handwritten Indian numerals: Devanagari, Bangla, and Oriya. The work in [15] focused on recognizing the seven segments display of LCDs with an obtained recognition accuracy of 79%. Shape context descriptor methodology was used in [16] to recognize Marathi and English characters and numerals. The achieved recognition accuracy was between 83% and 95%. The study in [17] employed deep learning in the recognition of handwritten Arabic numerals and achieved an accuracy of 97.4%. In [18], the authors used Spiking neural networks (SNNs) in the recognition of handwritten numerals, where they were able to improve the recognition accuracy compared to the use of BP neural networks.
The authors of [19] employed deep learning techniques for the recognition of numerals from multiple languages including Eastern Arabic, Persian, Devanagari, Urdu, Western Arabic, where they were able to achieve high recognition rates. The author of [20] adopted the restricted Boltzmann machine (RBM) in his work as the representative deep learning methodology for the recognition of English and Devanagari numerals with an SVM-based classifier.
In [21], the authors surveyed the most-recent techniques for the recognition of printed and handwritten numerals and characters of both Indic and non-Indic scripts, where the non-Indic scripts include Bangla, Devanagari, Gurmukhi, Kannada, Oriya, and Tamil. The focus of the study in [22] was on the segmentation of a string of digits into individual numerals as the authors applied a combination of PCA and SVM classifiers and called it PCA-SVMNet in the recognition of strings of unknown lengths. The technique applied in [23] combined low-level stroke (LLS) and polar histogram for the recognition of handwritten Gujarati, Devanagari, and English numerals.
Nevertheless, we noticed certain shortcomings in each of previous studies including the lack of a comprehensive data set with large enough samples written by a large number of people for both Indian and Arabic numerals, in addition to unsatisfactory obtained recognition rates. Deep learning is a promising path toward a more capable artificial intelligence that has proved a success in various pattern recognition disciplines. In this study, we address these issues and present a state-of-the-art recognition approach based on deep learning methods.
Researchers and technologists are witnessing the widespread popularity of deep learning theoretically and practically. Deep learning is a branch of artificial neural networks (ANNs), where deep layers are adopted instead of shallow networks used previously in ANNs. We refer interested readers to several survey papers in the field [24][25][26][27][28], where the authors of [24] survey technologies, learning mechanisms, platforms, and applications of deep learning. A review of the recent algorithms and architectures that enhance both training and testing in terms of accuracy and time can be found in [25]. The survey in [26] focuses on joint representation, coordinated representation, and encoder-decoder, which are the frameworks used in Deep Multimodal Representation Learning. The authors of [27] reviewed the application of deep learning in the visual content analysis in multimedia data consisting of images and videos. Deep learning has been extensively used in image processing applications; meanwhile, this field has also promoted new deep learning algorithms and architectures [28].
In our previous work [10,29] we have tackled the problem of automatic numeral recognition, wherein [10] we addressed the problem of printed Arabic numerals. In that study, the correlation coefficient was utilized to find the best match between the numeral under test and a set of reference images representing the baseline for comparison. The task of handwritten numeral recognition is more challenging than that of printed counterparts. The reason for this is due to the imperfection in the handwriting of most individuals. This includes so many writing styles with very large variances in terms of size, orientation, line thickness, and overlapping, among many others. Therefore, the purpose of our next work [29] was to handle the recognition of handwritten Arabic numerals, where we employed self-organizing maps in this task.
Although in our previous work [10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29] we were able to achieve high recognition ratios, our mission in this research is to extend our findings and to build upon our previous results. Specifically, the objective of this work is to build a universal numeral recognizer; one that can recognize both printed and handwritten multilingual numerals. Moreover, we aim also at using the results and findings of this work in the recognition of printed and handwritten multilingual text, in general.
Herein, we present a fast and high accurate methodology using a deep learning technique that exhibits very high recognition rates for the offline detection of numerals (Arabic or Hindi) then classifying of the handwritten of both languages decimal numbers for all the numerals (0-9). The same CNN architecture has been used for all stages of recognition but trained in a different dataset. The training is done using three different types of solvers (Adaptive Moment Learning Rate (Adam), Root Mean Square Propagation (RMSProp), and Stochastic Gradient Descent with Momentum (SGDM)).
The novelty of this paper is obtaining a highly accurate, fast, and reliable system for recognition off-line numerals handwritten in either Arabic or Hindi format, that could be used as a universal system in different fields. All previous studies did not reach 100% accuracy in their work, besides, they applied their algorithms on limited datasets, while this work was applied on three types of huge datasets. This paper is organized as follows: a description of the data processing, methodology, and CNN is presented in Section 2. Section 3 explains our scenarios and provides detailed results. Section 4 provides the time requirements of the proposed methodology/scenarios. Finally, Section 5 concludes the paper.

Materials and Methods
The proposed recognition approach consists of two main stages: the first stage is to detect whether the input numeral is in Arabic or Hindi format. The second stage is to recognize the value of each numeral. Figure 1 shows a flow diagram for the proposed methodology. In both stages, CNN was used to do the classification and the recognition. Three training algorithms were employed: Adaptive Moment Learning Rate (Adam), Root Mean Square Propagation (RMSProp), and Stochastic Gradient Descent with Momentum (SGDM). In the case of Adam training algorithms, different learning rates were used.

Dataset
In this research, we used our dataset proposed in [29]. The images in the dataset were obtained by scanning huge number of handwritten numerals. The scanned image (original image) was transformed to a gray-level image and then into binary images afterward. The binary image was cleaned by opening and closing transforms and by erosion and dilation in order to smooth the numeral boundaries, maintain its size, and remove any noise. The original image dimensions used in this work are (32 × 32) pixels (including the number and background) [29]. The size of the data set was 49,900 images for all (0-9) Arabic numerals distributed equally, and 48,600 images for all ( -) Hindi numerals distributed equally as well. Table 1 shows the 10 Arabic numerals and their corresponding Hindi numerals.

Convolutional Neural Networks (CNN)
Convolutional neural networks (CNN) are a deep learning algorithm, which is commonly used in automatic image features extraction, segmentation, and classification systems. It is a specific kind of artificial neural network (ANN) that is based on supervised machine learning techniques [30]. The preprocessing stage here is not necessarily as other classification algorithms. It is composed of an input layer, an output layer, and many hidden layers [31]. The distinguishing features of CNN are the composition of the hidden layer, which consists of many layers, such as the convolutional layer, which is responsible for detecting the high-level features using weight matrix or filters. These weights are adapted so the cost function is minimized. The various weights combination may extract edges, colors, or lines. The output here is called the feature map. This layer reduces the computation complexity significantly through several hyperparameters, such as depth, stride, and zero paddings [32]. The feature map's dimension can be reduced by passing it to the Pooling layer, which leads to decrease the computation time and complexity as well [33]. Besides, it controls overfitting [34]. There are two types of operations in the pooling layer: max pooling or average pooling. These operations act as an important role in the downstream process, which is the key to reducing the variations in data and preserving the most significant details [35]. The resultant reduced features map is modified by activation function such as rectified linear unit (ReLU), which replaces the negative value by 0 and leaves the positive value as it is. ReLU is defined as (x) = max(0, x). ReLU is the most commonly used activation function. This layer is called the ReLU layer [33,36]. After that, a fully connected layer takes the output of convolution or Pooling layers to predict the best label to describe the image. A fully connected layer is often ended by a softmax layer which applies a softmax function to its input, which is expressed by the corresponding equation [37]: where x is the input vector of size K, j = 1:K, and x i is ith individual input. The Softmax function limits the output between 0 and 1, which leads the output to be interpreted as a probability. It is commonly used in multivariant classifications purposes. The fully connected layer has nodes with the same number of output classes [38]. In the paper, we utilized the properties in MATLAB ® 2019 [39] to build our own CNN which consists of 18 layers and employs it in discriminating the numerals. The following graph shows the flowchart of the proposed CNN. Figure 2 illustrates the internal architecture of the proposed CNN. The input is a grayscale image with size 32 × 32, and the first convolutional layer uses 32 filters with size 3 × 3 and padding zeros is one, whereas the rest convolutional layers use 16 filters with the same size, except the third one uses eight filters only. To accelerate the training stage in CNN, and to decrease the sensitivity of the network initialization, the batch normalization layer is added between the convolutional layer and the nonlinearity layer (ReLU) [40]. Max pooling layer is employed in the suggested CNN with window size 2 × 2 and increments 2 pixels as well. The output layer consists of a fully connected layer with an output size 10, a softmax layer, and a classification layer. In the used CNN the loss function was cross entropy loss which is used during the training to modify model layer weights during preparation. The main aim of cross entropy loss is to minimize the loss, i.e., the smaller the loss, the better the model. The optimal model has a cross-entropic loss of 0. Table 2 shows the details of each layer in the used CNN architecture.

Adaptive Moment Learning Rate (Adam)
The adaptive moment learning rate (Adam) is a form of stochastic gradient descent with an adaptive learning rate. Stochastic is one of the most common optimization algorithms designed to tackle the very complex problem of optimization and is commonly used in deep learning to update weights based on a subset of training samples as shown in the equation below.
where x ij ; y ij b j=1 is the random mini-batch size chosen at iteration t, γ is the forgetting factor, l is the loss function, b the number of training samples, W are the weights, and r is the convex regularize [41].
The illustration for updating the weights in the Adam algorithm is shown in Table 3 [42,43], Table 3. Steps of the Adam algorithm.

Step # Equation Explanation
1 where M is the 1st momentum estimate, R is the 2nd momentum estimate,M is the 1st momentum correction,R is the 2nd momentum correction, W is the weights, α is the learning rate, β 1 and β 2 are the hyper-parameters, and ∇l t is the gradient evaluated at timestep t.

Root Mean Square Propagation (RMSProp)
Neural networks that are based on distance measurements and Gaussian activation functions cannot be trained using only simple mini-batch gradient descent or momentum. This means no or only extremely slow convergence can be achieved. Even for shallow networks, this is the case. The solution is to apply RMSProp algorithm (root mean square propagation), which renders the training possible in the first place. RMSprop keeps a moving average of the element-wise squares of the parameter gradients, that is described by Equation (3 v is the moving avearge β 2 is the decay rate of the moving average, the value that was used is 0.9. θ is the parameter vector and E(θ) is the loss function. RMSProp updates its parameter individually as shown in Equation (4) α represents the learning rate, ε is a small value to avoid division on zero. RMSProp has shown excellent adaptation of indifferent software to the learning levels [44].

Stochastic Gradient Descent with Momentum
Stochastic Gradient Descent with Momentum (SGDM) has a difficulty negotiating ravines, i.e., places where the terrain bends in one dimension much more steeply than in another, which is normal around local optima [45]. Across these cases, SGDM oscillates around the slopes of the ravine while only advancing hesitantly along the bottom toward the optimal locale. A momentum is a tool that helps accelerate SGD and dampen oscillations in the related direction. It does so by adding to the current update vector a fraction of the update vector of the past time step. It is summarized by Equation (5) [42]: Typically, the momentum term γ is set to 0.9 or a similar value which is always less than 1. The process of updating parameters can be explained as a ball is going down a hill, accumulating energy as it is going down and getting faster and faster.
For dimensions whose gradients point in the same directions, the momentum term increases and decreases updates for dimensions whose gradients change direction. As a result, we are gaining faster convergence and reducing oscillation.

Results
In this paper, different scenarios were performed. First, we applied CNNs to classify the input images to be either Hindi numerals or Arabic numerals. Three training algorithms were used: Adam, RMSProp, and SGDM. The second scenario is to classify the Arabic images into their 10 subclasses. The third scenario is to classify the Hindi images into their 10 subclasses, as well. The same training algorithms that were used in the first scenario were used in the second and third scenarios. In both scenarios, Adam was used with different learning rates. In this research, the Adam optimization method was used because it provided a combined heuristics optimization of both Stochastic Gradient Descent with Momentum and Root Mean Square Propagation (RMSProp), and it can build a gradient descent which combats the pathological curvature of the problem with a faster search at the same time. The following subsections show detailed results.

Arabic-Hindi Classification
In this scenario, the main goal is to classify the images under consideration into two classes: Arabic numerals or Hindi numerals. The CNN was trained using the training data that were explained previously. In this regard, we had to exclude some numbers that could be written in the same manner in both languages (Hindi: , , , , Arabic: 1, 0, 7, 9). Therefore, the total number of data used to train and test is 59,100 images, instead of 98,500 images.
Three algorithms were trained and tested in this regard: Adam, RMSProp, and SGDM. Table 4 shows part of the results of this scenario. In this table, the recognition rate was high for all classifiers, they all show promising results. The recognition rate was close to 100%. Adam is providing a combined heuristics optimization of both Stochastic Gradient Descent with Momentum and Root Mean Square Propagation, and it can build a gradient descent which combats the pathological curvature of the problem with a faster search at the same time.  Table 5 shows detailed results of Adam classifier, only 18 images out of 8784 images were misrecognized. The recognition rate was 99.8% (99.7% for Hindi, 99.8% for Arabic). Table 6 shows all the misrecognized images for Arabic-Hindi classification using Adam training algorithm. It is obvious from this table that some of the images were misrecognized due to unclear handwriting. From both tables, it is obvious that the recognition rate of Arabic images was slightly better than the recognition rate of Hindi images.   Table 7 shows detailed results of RMSProp classifier, only 23 images out of 8784 images were misrecognized. The recognition rate was 99.73% (99.65% for Hindi, 99.82% for Arabic). Table 8 shows all the misrecognized images for Arabic-Hindi classification using RMSProp training algorithm. It is obvious from this table that some of the images were misrecognized due to unclear handwriting. From both tables, it is obvious that the recognition rate of Arabic images was slightly better than the recognition rate of Hindi images. Table 9 shows detailed results of SGDM classifier, only 24 images out of 8784 images were misrecognized. The recognition rate was 99.73% (99.68% for Hindi, 99.77% for Arabic). Table 10 shows all the misrecognized images for Arabic-Hindi classification using SGDM training algorithm. It is obvious from this table that some of the images were misrecognized due to unclear handwriting. From both tables, it is obvious that the recognition rate of Arabic images was slightly better than the recognition rate of Hindi images.

Arabic Classification
In this scenario, the main goal is classify Arabic images into 10 subclasses (0, 1, 2, 3, 4, 5, 6,7,8,9). Three training algorithms were investigated: Adam, RMSProp, and SGDM. Adam was trained with three different learning rates. As shown in Table 11, the size of the training data was 34,929 images, the recognition rate of all cases was high. Adam classifier has better performance when the learning rate was 0.0001. Adam is providing a combined heuristics optimization of both Stochastic Gradient Descent with Momentum and Root Mean Square Propagation, and it can build a gradient descent which combats the pathological curvature of the problem with a faster search at the same time.

L.
2 Hindi Table 12 shows detailed results of Adam classifier when the learning rate was 0.0001. Only 34 images out of 7384 images were misrecognized. The recognition rate was 99.54%. All numerals achieved recognition rate higher than 99%. The least recognition rate was for numeral "4". It was misrecognized seven times; six of them as "9". This happened because of the way that number was written, which is sometimes can be misleading. Table 13 shows all the misrecognized images for Arabic classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting. Table 14 shows detailed results of Adam classifier when the learning rate was 0.001. Only 38 images out of 7350 images were misrecognized. The recognition rate was 99.48%. Most numerals achieved recognition rate higher than 99%. The least recognition rate was for numeral "4". It was misrecognized nine times; five of them as "9". This happened because of the way that number was written, which is sometimes can be misleading. Table 15 shows all the misrecognized images for Arabic classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting.  Table 16 shows detailed results of Adam classifier when the learning rate was 0.01. Only 75 images out of 7331 images were misrecognized. The recognition rate was 98.98%. Most numerals achieved recognition rate higher than 99%. The least recognition rate was for numeral "4" and numeral "7". Numeral "4" was misrecognized 16 times; 15 of them as "9" and numeral "7" was misrecognized 16 times; seven of them as "1". This happened because of the way those numbers were written, which is sometimes can be misleading. Table 17 shows all the misrecognized images for Arabic classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting. Table 18 shows detailed results of RMSProp classifier. Only 56 images out of 7332 images were misrecognized. The recognition rate was 99.24%. Most numerals achieved recognition rate higher than 99%. The least recognition rate was for numeral "1". Numeral "1" was misrecognized 22 times; seven of them as "2" and seven of them as "4". This happened because of the way those numbers were written, which is sometimes can be misleading. Table 19 shows all the misrecognized images for Arabic classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting.    Table 9. Recognition rates for Arabic-Hindi classification using SGDM training algorithm.   Table 20 shows detailed results of SGDM classifier. Only 52 images out of 7329 images were misrecognized. The recognition rate was 99.29%. Most numerals achieved recognition rate higher than 99%. The least recognition rate was for numeral "4". Numeral "4" was misrecognized 10 times; eight of them as "9". This happened because of the way those numbers were written, which is sometimes can be misleading. Table 21 shows all the misrecognized images for Arabic classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting.    Table 12. Recognition rates for Arabic numerals classification using Adam training algorithm (learning rate = 0.0001).

Recognition
Rate (

Hindi Classification
In this scenario, the main goal is classify Hindi images into 10 subclasses ( , , , , , , , , , ). Three training algorithms were investigated: Adam, RMSProp, and SGDM. Adam was trained with three different learning rates. As shown in Table 22, the size of the training data was 34,020 images, the recognition rate of all cases was high. Adam classifier has better performance when the learning rate was 0.001. Adam is providing a combined heuristics optimization of both Stochastic Gradient Descent with Momentum and Root Mean Square Propagation, and it can build a gradient descent which combats the pathological curvature of the problem with a faster search at the same time.   Table 14. Recognition rates for Arabic numerals classification using Adam training algorithm (learning rate = 0.001).       Table 18. Recognition rates for Arabic numerals classification using RMSProp training algorithm.

Recognition
Rate (%)  0  1  2  3  4  5  6 Table 23 shows detailed results of Adam classifier when the learning rate was 0.0001. Only 28 images out of 7059 images were misrecognized. The recognition rate was 99.60%. Most numerals achieved recognition rate higher than 99%. Numeral " " and numeral " " achieved 100% recognition rate. The least recognition rate was for numeral " ". It was misrecognized 10 times; five of them as " ". This happened because of the way that number was written, which is sometimes can be misleading. Table 24 shows all the misrecognized images for Hindi classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting. Table 25 shows detailed results of Adam classifier when the learning rate was 0.001. Only 19 images out of 7089 images were misrecognized. The recognition rate was 99.73%. All numerals achieved recognition rate higher than 99%. Numeral " " and numeral " " achieved 100% recognition rate. The least recognition rate was for numeral " ". It was misrecognized five times; two of them as " ". This happened because of the way that number was written, which is sometimes can be misleading. Table 26 shows all the misrecognized images for Hindi classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting. Table 27 shows detailed results of Adam classifier when the learning rate was 0.01. Only 31 images out of 7056 images were misrecognized. The recognition rate was 99.56%. Most numerals achieved recognition rate higher than 99%. Numeral " ", numeral " ", and numeral " " achieved 100% recognition rate. The least recognition rate was for numeral " ". It was misrecognized 11 times; four of them as " ". This happened because of the way that number was written, which is sometimes can be misleading. Table 28 shows all the misrecognized images for Hindi classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting. Table 29 shows detailed results of RMSProp classifier. Only 27 images out of 7089 images were misrecognized. The recognition rate was 99.62%. Most numerals achieved recognition rate higher than 99%. Numeral " ", numeral " ", and numeral " " achieved 100% recognition rate. The least recognition rate was for numeral " ". It was misrecognized 10 times; four of them as " ". This happened because of the way that number was written, which is sometimes can be misleading. Table 30 shows all the misrecognized images for Hindi classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting.                 Table 31 shows detailed results of SGDM classifier. Only 19 images out of 7082 images were than 99%. Numeral " " and numeral " " achieved 100% recognition rate. The least recognition rate was for numeral " ". It was misrecognized four times; two of them as " ".
This happened because of the way that number was written, which is sometimes can be misleading. Table 32 shows all the misrecognized images for Hindi classification using this setup. It is obvious from this table that some of the images were misrecognized due to unclear and misleading handwriting.

Time Requirements
To evaluate the proposed methodology performance in terms of time, the training time as well as the testing time were recorded. The machine that was used is an Intel Core-I7 computer with 16 Gb of RAM. It is obvious that Adam consumes more time than other optimization methods in terms of training. This was because Adam is a hybrid method of two other optimizers. In terms of testing times. Al classifiers show a very fast testing time per image. The recognition time was in the order of milliseconds; which is considered fast. Table 33 shows detailed time records. of architectures that have been used in literature. In [46], the authors built their own CNN with only six layers, three of them are convolutional layers, one fully connected layer, one softmax layer, and an output or classification layer. In [47], the authors utilized VGG19 [48] which is a pretrained CNN structure. It is composed from 19 levels (25 layers; 16 convolution layers, three fully connected layers, five MaxPool layers, and one SoftMax layer). They utilized it for deep features extraction. On the other hand, in [49] the authors used Deep Recurrent Convolutional Neural Network (DRCNN) [50] as a predictor model for bankruptcy, while in [51] the authors built their own CNN structure model based on Efficient Net architecture with nine levels (nine layers) to classify X-ray images into three classes (Normal, Pneumonia, and COVID-19). Table 34 shows the differences and the similarities between the proposed structure and the existing structures in literature. This paper utilized the benefits of deep learning algorithms with various learning rate optimizations methods in discriminating of handwritten images between Hindi and Arabic numerals alongside recognizing the numerals to their 10 classes either in Hindi or in Arabic format. The purpose of employing deep learning was to take advantages of the power of CNNs that can manage input data with large dimensions and share their weights. The three scenarios (Arabic-Hindi classification, Hindi numerals recognition, and Arabic numerals recognition) have exploited various known optimization methods; Adam, RMSprop, and SGDM. Adam shows highly accurate recognition rate in all scenarios alongside requiring more time for processing than others. It was because Adam is providing a combined heuristics optimization of both Stochastic Gradient Descent with Momentum and Root Mean Square Propagation.
The proposed recognition approach has two advantages. First, the method is highly accurate, the results are close to 100% (recognition rate of Arabic numerals was slightly better than the recognition rate of Hindi numerals). Second, the proposed method exhibits high performance: the proposed approach performs recognition in only a few milliseconds. It was obvious from the previous results that some of the images were misrecognized due to unclear and misleading handwriting. This issue can be solved in the future by adding and augmenting more unclear and misleading data and training the system again. This system can be used in many applications such as in banks and exam grading.