Next Article in Journal
Regeneration of Intrabony Defects with Nano Hydroxyapatite Graft, Derived from Eggshell along with Periosteum as Barrier Membrane under Magnification—An Interventional Study
Next Article in Special Issue
Calibrated Q-Matrix-Enhanced Deep Knowledge Tracing with Relational Attention Mechanism
Previous Article in Journal
A Framework for Assessing the Interference from NGSO Satellite Systems to a Radio Astronomy System
Previous Article in Special Issue
Cooperative Content Caching Framework Using Cuckoo Search Optimization in Vehicular Edge Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Towards Accurate Children’s Arabic Handwriting Recognition via Deep Learning

1
Department of Information Technology, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia
2
Department of Computer Science, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia
*
Author to whom correspondence should be addressed.
First joint author.
Appl. Sci. 2023, 13(3), 1692; https://doi.org/10.3390/app13031692
Submission received: 20 November 2022 / Revised: 17 January 2023 / Accepted: 25 January 2023 / Published: 29 January 2023

Abstract

:
Automatic handwriting recognition has received considerable attention over the past three decades. Handwriting recognition systems are useful for a wide range of applications. Much research has been conducted to address the problem in Latin languages. However, less research has focused on the Arabic language, especially concerning recognizing children’s Arabic handwriting. This task is essential as the demand for educational applications to practice writing and spelling Arabic letters is increasing. Thus, the development of Arabic handwriting recognition systems and applications for children is important. In this paper, we propose two deep learning-based models for the recognition of children’s Arabic handwriting. The proposed models, a convolutional neural network (CNN) and a pre-trained CNN (VGG-16) were trained using Hijja, a recent dataset of Arabic children’s handwriting collected in Saudi Arabia. We also train and test our proposed models using the Arabic Handwritten Character Dataset (AHCD). We compare the performance of the proposed models with similar models from the literature. The results indicate that our proposed CNN outperforms the pre-trained CNN (VGG-16) and the other compared models from the literature. Moreover, we developed Mutqin, a prototype to help children practice Arabic handwriting. The prototype was evaluated by target users, and the results are reported.

1. Introduction

Automatic handwriting recognition is important for a wide range of applications. Automatic handwriting recognition refers to the capability of a computer to recognize handwritten input [1]. Character recognition technologies are used to convert the characters into their digital counterparts, which provide an automatic technique for recognizing text on images. Handwriting data that are input via scanning are considered offline, and handwriting data that are input via pen tip are considered online. The handwriting can be input from a variety of sources, including paper documents, images, touch screens, or other devices [1]. Automatic handwriting recognition is a challenging task since different individuals’ handwriting differs in most cases. Furthermore, a single writer’s handwriting may vary significantly over time [1]. Arabic handwritten character recognition presents additional challenges to researchers posed by the Arabic language including variations in the character shapes according to their placement in words.
Arabic is one of the top five spoken languages in the world, and there are 315 million Arabic speakers, which means that computers must now, more than ever, be able to understand what these speakers are writing [2]. Arabic handwritten character recognition (AHCR) technology has been significantly improved by using various machine learning (ML) algorithms, such as support vector machines (SVMs) and artificial neural networks (ANN) [2]. Additionally, AHCR models that use convolutional neural networks (CNNs) have achieved outstanding results in a variety of handwritten datasets [2]. CNNs automatically detect and extract images’ distinctive and representative features, outperforming traditional ML algorithms that require the features to be manually defined (e.g., SVMs) [2]. In the fields of computer vision, machine vision, speech recognition, natural language processing, and audio recognition, deep learning has achieved excellent success [3,4,5]. Recently, deep learning has also demonstrated remarkable results in handwriting recognition.
Handwriting-based systems are being employed to help children in their education. Researchers have spent an abundance of time and effort developing and improving handwriting learning systems for schoolchildren in different languages and on different platforms including web pages, computer-based applications and tablet applications [6]. This is encouraged by the fact that writing using digital notebooks allows children to obtain immediate feedback, which improves their learning experience. In addition, it facilitates the personalization of the learning process for better learning outcomes. Jolly et al. [7] presented a comparative study in French preschools that focused on handwriting acquisition using digital devices versus paper. The results showed that children trained on digital devices performed significantly better than children trained on paper, particularly in terms of fluency (decreased ’in-air’ time and stopping time). Despite the importance and demand for Arabic handwriting recognition systems for children’s handwriting, little published research is available [1,8,9].
In this paper, we detail the development of deep learning-based models to recognize children’s handwriting using the Hijja dataset [1]. This research presents the following contributions to the literature: (1) improved Arabic handwriting recognition models based on CNN. The gap that we address is the need to investigate the recognition of children’s handwriting. This research direction also serves handwriting recognition in other languages that use Arabic characters, such as Persian, Tajik, Dari, and Urdu; (2) a comparative study of the performances of the developed models as compared to state-of-art models and (3) the development of a prototype, named Mutqin, that integrates the best-obtained model into a useful tablet application for children to practice Arabic handwriting and spelling skills, with feedback based on their answers.
The paper is divided into six sections. Section 2 gives an overview of the related work in the field of deep learning for handwriting recognition. Section 3 presents the dataset and the proposed deep learning models. Section 4 presents the performance results of the proposed deep learning models and compares the proposed models with different models from the literature. In Section 5, we describe the development of our prototype application. Finally, Section 6 presents the conclusion and future work.

2. Related Work

This section presents various machine learning and deep learning approaches to solving the handwriting recognition problem for digits and characters.

2.1. Deep Learning for Handwriting Digit Recognition

For handwriting digit recognition, In 2010, Das et al. [10] represented handwritten Arabic numerals using an algorithm consisting of 88 features. They used a Multilayer Perceptron (MLP)-based classifier to recognize handwritten Arabic digits using the CMATERDB 3.3.1 dataset. An experiment involving 3000 samples showed that the technique yielded an average recognition rate of 94.93%. In 2017, Ashiquzzaman et al. [11] presented a novel algorithm for deep learning neural networks that used an activation function based on ReLU activation and a regularization process that used dropout. Moreover, the authors modified the method outlined in [10] by implementing dropout regularization in the MLP model to reduce the overfitting between the fully connected layers. Overall, there were 10 neurons in the output layer with softmax activation. The CMATERDB 3.3.1 handwritten Arabic digits dataset was used to test all the models. The proposed model in the study had 93.8% accuracy. In 2017, Alani et al. [12] proposed an algorithm combining RBMs and CNNs to recognize handwritten Arabic digits. In particular, they presented a two-phase approach to Arabic digit recognition. First, features were extracted from the raw data using an RBM. Then, a deep supervised learning architecture was used to train and test the extracted features. Similar to the previous study, the CMATERDB 3.3.1 handwritten Arabic digit dataset was used to train and test the proposed algorithm, which achieved an accuracy of 98.59%. In 2017, Mudhsh et al. [13] proposed an alphanumeric VGG net design with 13 convolutional layers, two max-pooling layers, and three fully connected layers for alphanumeric character recognition. To avoid overfitting, regularization dataset augmentation and dropout were used. Their VGGnet was based on the VGGNet standard model. Furthermore, their methodology employed the ADBase for digits and the HACDB for characters. For the ADBase database, the model was 99.57% accurate, while for the HACDB database, it was 97.32% accurate. In 2018, Latif et al. [14] proposed a CNN model for recognizing handwritten digits in different languages: Eastern Arabic, Persian, Devanagari, Urdu, and Western Arabic. The proposed deep learning model was tested on various datasets. For the multilanguage database, the proposed algorithm achieved an accuracy of 99.26% and a precision of 99.29% on average, while an average accuracy of 99.32% was achieved for each language individually. In 2019, Ashiquzzaman et al. [15] modified the CNN model for recognizing handwritten Arabic numerals proposed in [11] by adding data augmentation to the CMATERDB 3.3.1 dataset as well as changing the activation function from a ReLU to an exponential linear unit (ELU). Compared to previous work on this dataset, the model achieved a high accuracy of 99.4%. Table 1 summarizes these deep learning-based handwritten digit recognition studies.

2.2. Deep Learning for Handwritten Character Recognition

Recently, researchers have shown an increased interest in handwritten character recognition. In 2017, El-Sawy et al. [16] collected an extensive dataset of handwritten Arabic characters to train a deep learning model. Furthermore, they implemented optimization methods on a CNN. The proposed CNN model achieved 94.9% accuracy. In 2017, Younis et al. [17] proposed a deep neural network (DNN) for handwritten Arabic character recognition that used CNN models. In addition, they used dropout and batch normalization as regularization techniques. They tested the approach with two datasets: the AHCD and the AIA9K. The experimental results showed that the CNN model achieved 97.6% accuracy for the AHCD and 94.8% accuracy for the AIA9K. As recognizing handwritten characters has become more critical, recognizing children’s handwriting has emerged as a specific area of research. In 2021, Altwaijry et al. [1] explored this area by conducting a study using the Arabic language in recognition systems and creating a dataset called Hijja, which contains Arabic letters produced by children aged 7–12 years. Five hundred and ninety-one participants contributed 47,434 characters to their dataset. They also proposed a model for automatic handwriting recognition based on a CNN. The model consisted of three convolutional layers, three pooling layers, and four fully connected layers. In addition, the ReLU activation function was used after each convolutional layer along with 80% dropout in the fully connected layers to avoid overfitting. The Hijja and AHCD datasets were used to train this model. The proposed CNN model outperformed the other model presented in [16] on the Hijja and AHCD datasets, achieving 88% and 97% accuracy, respectively. In 2020, Alyahya et al. [18] studied the effectiveness of the ResNet-18 architecture in recognizing handwritten Arabic letters. They employed a fully connected layer and a dropout layer in the original architecture. They proposed two ensemble models: the first one was based on the original ResNet-18 and modified ResNet-18 with one fully connected layer with/without a dropout layer, and the second one was based on the original ResNet-18 and modified ResNet-18 with two fully connected layers added to both the original and the modified ResNet-18 with/without a dropout layer. The AHCD dataset was used to train and evaluate the proposed algorithm, with the original ResNet-18 achieving the best result of 98.30%. The ensemble model with one fully connected layer and an ensemble model with two fully connected layers paired with a dropout layer achieved an accuracy of 98.00% and 98.03%, respectively. In 2020, Elkhayati et al. [19] described a new categorization strategy based on a CNN relative neighborhood graph (RNG) with Gabriel’s graph (GG). The method was evaluated using recognition of isolated handwritten Arabic characters. The method involved directing the CNN through a filtering layer, thereby narrowing the set of probable classes for a query item. For this purpose, the rules of the RNG and GG were integrated. Experiments on the IFHCDB database showed that the proposed technique performed better than a standard CNN by 97.40%. In 2020, Shams et al. [20] proposed a hybrid model based on the development of deep convolution neural networks (DCNN) followed by an SVM to recognize and classify the missing features that the DCNN did not correctly classify. They employed the k-means clustering approach to solving the multi-stroke Arabic character recognition problem, which refers to the difficulty of recognizing letters that have the same stroke but different numbers or positions of the dots. To train and assess the model, they employed AHCD [16] and 840 additional images. In terms of accuracy, the model outperformed El-Sawy et al’s. [16] model, reaching an accuracy of 95.07%. In 2021, AlJarrah et al. [5] proposed a CNN for the recognition of handwritten Arabic characters, training the model on 16,800 images of handwritten Arabic characters. The proposed model was composed of six convolution layers with different functions to predict and recognize images and three fully connected layers to perform character recognition. The CNN model was applied to two batches: 40 and 256, achieving a 97.2% accuracy. After applying data augmentation, the model achieved an accuracy of 97.7%. In 2021, Alrobah et al. [2] proposed a hybrid model combining an ML model and a deep learning model. They preprocessed the Hijja dataset introduced by Altwaijry et al. [1] and developed a CNN for feature extraction of the Arabic character images. They then passed it on to a hybrid model using an SVM and eXtreme Gradient Boosting classifiers. The CNN was trained with backpropagation. The CNNs, trained first with the softmax fully connected layer, were then employed as a feature extractor to train and evaluate the ML classifier. They conducted two experiments and attained a recognition rate of 96.3%. In 2021, Balaha et al. [21] investigated the effects of architectural complexity on the recognition of handwritten Arabic characters. The researchers introduced and used a dataset of handwritten Arabic characters (HMDB) and two CNN-based architectures: HMB1 and HMB2. The HMBD, CMATER, and AIA9k datasets were used to train and evaluate the two proposed architectures. The authors performed 16 experiments to investigate the effects of the weight initializers, optimizers, data augmentation, and regularization on the model accuracy. For the HMBD, CMATER, and AIA9k, the best accuracies obtained were 98.4%, 100%, and 99.0%, respectively. In 2021, Balaha et al. [22] addressed the recognition and text segmentation phases. They presented several solutions for text segmentation. A CNN was used in the recognition phase, and they proposed 14 different native CNN architectures. The model was trained and evaluated using the HMBD database, which includes 54,115 handwritten Arabic characters. Experiments were conducted using native CNN architectures and the highest accuracy was 91.96%. In the same study, a transfer learning (TL) and genetic algorithm (GA) approach called HMB-AHCR-DLGA was also developed to improve the recognition phase’s training parameters and hyperparameters. For the latter technique, pre-trained CNN models (VGG16, VGG19, and MobileNetV2) were used. The best combinations were presented after five optimization experiments. The highest testing accuracy reported was 92.88%, achieved in the VGG16 experiment using the AdaMax weights optimizer. Table 2 summarizes these deep learning-based handwritten character recognition studies.
Previous research has shown that CNNs have achieved high accuracy in recognizing numbers [14,15] and Arabic characters [1,5,18,21]. In addition, the focus has been exclusively on adult handwriting, which was used to train the Arabic handwriting recognition models. We found that the new Hijja dataset for children has not been comprehensively studied, with an accuracy of only 88% being achieved in [1]. On the other hand, in [2], the dataset was modified, and only the individual letters, i.e., 29 classes, were considered. In this case, an accuracy of 96.3% was achieved. In addition, the use of VGG16 as a pre-trained model for TL led to good accuracy for Arabic datasets, such as in [22], where an accuracy of 92.88% was achieved. The literature also shows that there are few handwriting recognition-based applications for children, and there are only two such applications for children that include Arabic. The first of these applicationss [8] depends on the stroke number of a single letter only, and the second [23] depends on tracking dots for words or letters. To the best of our knowledge, only Android-based software exists for this purpose.

3. Material and Methods

3.1. Dataset

We used the Hijja as our main dataset to train our proposed models. The Hijja is a recent and publicly available dataset of single Arabic letters introduced by Altwaijry et al. [1]. It was written by Arabic-speaking school children aged 7 to 12 years in Riyadh, Saudi Arabia. The dataset contains 108 classes that represent each Arabic letter using four different shapes for positioning at the start, center, and end of a word as well as when standing alone. The dataset contains a total of 47,434 images. The dataset is divided into 29 files, and each file contains images for one Arabic letter and one file for the Hamza. Figure 1 presents a sample of the Hijja dataset.

3.2. Proposed Deep Learning Models

The use of CNNs has been highly successful in recognizing numbers and characters, and TL models (such as the VGG16 model) have achieved good accuracy in recognizing Arabic letters; as such, we used these models to train our dataset.

3.2.1. Convolutional Neural Network Model

Our proposed CNN deep learning model was comprised of seven layers as presented in Figure 2. The first four layers were convolutional layers, while the last three were fully connected. Furthermore, there were pooling and activation layers between the convolutional and fully connected layers. The hidden layers used the nonlinearity function ReLU [24] to speed up the training phase, defined as shown in Equation (1).
R e L U ( x ) = m a x ( 0 , x )
The Hijja dataset was divided into 70% for training the model, 10% for validation, and 10% for testing. Then, we conducted two experiments on handwriting recognition using the same model, the first for 29 classes and the second for 108 classes for the variations in the handwritten Arabic letters.
Convolutional layers 1 and 2: The input images were 32 × 32 × 1 grayscale images. At least one layer in a CNN is used for convolution. In a convolutional layer, there are several filters (kernels) to produce a feature map. Each filter functions as a feature extractor, identifying features such as vertices, edges, and endpoints. Therefore, the first convolutional layer was the first step of feature extraction. In this layer, the input image of size 32 × 32 was processed with 64 filters with a kernel size of 3 × 3 . In addition, the stride size was 1, where the stride refers to the movement across the image, meaning the filter moves one pixel at a time. We used zero padding, which prevented information loss around the perimeter of the image. We also set the initial random weights of the layers using the HeNormal initializer. HeNormal draws the weights from a normal distribution X N ( μ , σ 2 ) with the mean μ and standard deviation σ defined as in (2).
μ = 0 , σ 2 = 2 f a n i n ,
where f a n i n is the number of input units in the weight tensor. In addition, the ReLU function (1) was used as the activation function in the hidden layers.
Pooling Layer: To minimize the size of the feature maps, a pooling layer is typically placed after the convolution layer. Pooling is applied to each feature map and can be performed in several ways, such as max-pooling, average-pooling, or min-pooling with a q × q window, where q is the filter size [1]. We used max-pooling to construct a two-dimensional pooling layer. Figure 2 shows that MP1 was the first pooling layer. This layer managed each feature map individually, resulting in an output of 64 feature maps, each with a size of 16 × 16 . The layer selected the max-pooling layer over 2 × 2 area; then, a batch normalization layer was used to normalize the output.
Convolutional Layer 3: Convolutional Layer 3 was also used to extract features. This layer and its specifications were very similar to those of the previous convolutional layers. The input data, consisting of feature maps received from the first convolutional layer, were processed with 128 convolutional kernels, each with a size of 3 × 3 . A stride of one pixel and zero padding were used. Thus, we extracted 128 feature maps with a size of 16 × 16 . We also employed the ReLU activation function, followed by a max-pooling layer of the same size as the previous max-pooling layer, resulting in an 8 × 8 layer. An additional layer of batch normalization was used after this layer.
Convolutional Layer 4: Convolutional Layer 4 performed similar tasks to the previous convolutional layers with a filter size of 128 to extract additional features. We also employed the activation function ReLU followed by a max-pooling layer with the same size as the previous max-pooling layer, to create a 4 × 4 layer followed by a batch normalization layer. Finally, the dropout technique was used in each convolutional layer except the first one. The probability of the dropout rate in the network was 20 % .
Fully Connected Layer: There can be any number of fully connected layers after the convolutional and pooling layers. Each neuron in a fully connected layer is connected to every other neuron in the layers around it. These layers are used to generate predictions and provide the final nonlinear feature combinations of the network. Therefore, in our case, the output of the previous convolutional layers was flattened to create a single long feature vector. Figure 2 shows the last three steps of the learning process, including the fully concatenated layers FC1 and FC2, which provided 512 and 1,024-dimensional feature vectors, respectively. In addition, FC3 was the output layer, and it provided 29 classes using the Softmax activation function, see Equation (3), where N was the number of output classes.
S o f t m a x ( x i ) = e x i k = 1 N e x k
Optimization: We employed Adam, a computationally efficient optimization solver for neural network algorithms, as an optimizer [25]. Furthermore, we used the categorical cross-entropy loss function for this model to estimate the loss (error) and make comparisons and measurements of the distance between the prediction and the correct results; this was used for multiclass classification.

3.2.2. VGG-16 Model

We used a pre-trained model VGG-16 and retrained part of it on the Hijja dataset. We preprocessed the size of the image as follows: since the size of the Hijja image was 32 × 32 , we resized it to 224 × 224 to fit the VGG16 model, which was trained on an image of the same size. The trained model did not work well when applied to new and unknown datasets due to various dataset constraints, such as the lack of images in the dataset. Therefore, we divided the Hijja dataset into three sections: 40% for training, 48% for validation, and 12% for testing, with training and validation accounting for most of the data.
The VGG-16 weights were pre-trained in ImageNet. In our case, we used the VGG-16 model by freezing the weights of the first four groups and using the pre-trained convolutional base. In addition, we added our layers, namely, flattening layers and a fully connected layer with a ReLU activation function, a dropout layer with a ratio of 50%, and at least one Softmax layer as an output layer to distinguish between classes. To train the proposed VGG-16, root mean square propagation was used as the optimizer. Finally, we trained the model using the Hijja dataset.

4. Results and Discussion

4.1. Evaluation Measures

The performance of the proposed deep learning model for multiclass classification was evaluated based on the precision, recall, and F1-score metrics.
1.
The precision (P) is the fraction of images that are correctly classified divided by the total number of images classified:
P r e c i s i o n ( P ) = T P T P + F P .
2.
The recall (R) is the fraction of correctly classified images divided by the total number of images that belong to class x:
R e c a l l ( R ) = T P T P + F N .
3.
The F1-score combines the recall and precision as follows:
F 1 = 2 * P r e c i s i o n * R e c a l l P r e c i s i o n + R e c a l l .
In the above equations, the parameters are as follows: (1) TP (true positives) refers to the total number of images that were correctly labeled by the classifier as belonging to class x; (2) FP (false positives) refers to the total number of images that were incorrectly labeled as belonging to class x; (3) FN (false negatives) refers to the total number of images that were incorrectly labeled as not belonging to class x; and (4) TN (true negatives) refers to the total number of images that were correctly labeled by the classifier as not belonging to class x.

4.2. Results

The goal of our research was to improve the accuracy of children’s handwriting recognition. We used the Hijja dataset to evaluate the performance of the proposed CNN models. Two experiments were conducted. The first one was to classify the dataset into 29 classes, the number of letters in the alphabet including hamza. The second was to classify the dataset into 108 categories, the number of letters in the alphabet in all their separate and connected forms. All the models were trained and tested on the Hijja dataset, and all the models were designed for multiclass classification of the alphabet into 29 or 108 labels.

4.2.1. Results for the 29 Classes (CNN and VGG-16)

Our aim was to demonstrate how the CNN and VGG-16 performed after being trained with the Hijja. Table 3 compares their performance measures. Regarding the classification accuracy, precision, recall, and F1-score, the CNN performed better than the VGG-16, achieving an accuracy value of 99% on the testing set. Table 3 also shows that all class numbers from 0 to 27 corresponded to the alphabet in order from alif to ya, while classification number 28 corresponded to hamza.

4.2.2. Performance Comparison with Models and Datasets from the Literature

We compared our classification results with those of different models and datasets from the literature. Table 4 shows our results alongside the results of a number of other models on the Hijja and AHCD datasets. Table 5 shows the detailed results of running our proposed models using the AHCD dataset. Here, the CNN also performed better than the VGG-16, achieving an accuracy value of 98% on the testing set. AHCD [26] is composed of 16,800 characters written by 60 participants, whose age range was between 19 and 40 years. It should be noted that Alrobah and Albahli [2] reported results for 12,776 images (out of 47,424) containing isolated letters, thereby improving their performance measures. The lower performance of the VGG-16 may be attributed to the need for resizing the input images, as well as the original size of the network, leading us to conclude that a smaller network is more desirable for a simpler classification task. The last row in the table shows the training accuracy obtained in the present study.
Comparing the models shows that our model was more lightweight than that of Alrobah et al. [2], whilst it was marginally larger than that of Altwaijry et al. [1]; yet, it achieved a substantially improved performance on the Hijja dataset. Smaller models are faster to train than larger models, and yield better performance on datasets with fewer classes and smaller image sizes than the ImageNet dataset, which has over 14 million images in 22,000 classes. They also usually perform better than large models such as VGG with transfer learning on smaller datasets. The model proposed by El-Sawy et al. [16] was likely too small to handle the intricacies of a handwriting dataset, such as the Hijja, which was reflected in its performance [1]. The AHCD dataset was easier to classify than the Hijja dataset, which allowed both models in [16,17] to improve their performance on the AHCD despite the model size, and a moderate increase in model size [20] did not translate into a large improvement on the AHCD. A large model such as [18] achieved improved performance on the AHCD, and yet its initial training time and subsequent transfer learning training made our model a more attractive option, with a similar performance to a smaller model [5].

4.2.3. Results for the 108 Classes (CNN and VGG-16)

We aimed to test the performance of the proposed models in recognizing all variations of the Arabic handling of connected and disconnected letters. Therefore, we trained the models using the Hijja dataset. The VGG-16 failed to recognize many classifications due to the dataset limitations. Overall, the CNN model outperformed the VGG-16 and achieved an accuracy of 95%.

4.3. Computational Complexity

Table 6 shows the computational time for our proposed CNN model on both the Hijja and AHCD datasets. We report the average training and prediction times in seconds. Hijja is a larger and more complicated dataset compared to the AHCD. Thus, the training and prediction times were longer using Hijja. The larger number of parameters for the Hijja dataset was the result of having 29 classes instead of 28.

5. Development of the Mutqin Application

We developed a prototype that integrates the CNN model into a useful tablet application for children to practice Arabic handwriting and spelling skills. First, we created a questionnaire to investigate the need for the development of an educational application to practice writing and spelling skills in Arabic and to gather functional requirements for such an application. We collected information from eight teachers. The results indicated that there was a need for the development of an application with essential and attractive features to encourage children to practice spelling and writing skills. Moreover, the results helped us to identify the most important functional requirements to build an application appropriate for the target audience. The target user is between 7 and 12 years old. The application offers two options: practice writing Arabic letters and practice spelling skills, as presented in Figure 3. The application allows a user to practice writing by displaying the writing board, which contains pens of different colors and an eraser, as presented in Figure 4. Moreover, the user receives appropriate feedback based on the input, as presented in Figure 5. Considering children are the main audience, the application was designed to be very clear and easy to use and understand.
Then, we implemented user acceptance testing, which is a necessary step before releasing software into the real world. It is used to ensure that the application accomplishes what it aims to do and meets the requirements [27]. We conducted user acceptance testing with 11 users. The participants were between 7 and 12 years old. The evaluation was based on three usability criteria: effectiveness, efficiency, and satisfaction. We recorded the time it took users to perform a particular function to ensure efficiency. To evaluate the application’s effectiveness, we calculated the average number of errors in certain tasks and the average time it took users to complete the tasks, using both the stylus and the finger, for the application’s target group.
As shown in Table 7, all the functions passed the test and were completed in a reasonable amount of time; hence, it was concluded that the application was efficient and saved time. Finally, a survey was conducted to measure the user satisfaction with the application [28], and the users were satisfied.

6. Conclusions and Further Work

In this paper, we proposed two deep-learning models. We designed a CNN and fine-tuned a VGG-16 pre-trained model for Arabic handwriting character recognition. The models were designed to classify the letters into 29 and 108 classes based on letter shape. The research was carried out using the Hijja dataset for children’s handwriting. We evaluated the performances of the CNN and VGG-16 and compared them with each other. We also trained and tested our proposed models using the Arabic Handwritten Character Dataset (AHCD). We then compared the results with the results of approaches from the literature. We selected the best-performing model among them, namely, the CNN model, which was able to outperform state-of-the-art classification algorithms using the Hijja dataset and achieved 99% accuracy. Then, we developed Mutqin, a prototype for children to practice writing and spelling skills, and integrated it with our CNN model. Furthermore, we evaluated the Mutqin application using user acceptance testing to measure three criteria: effectiveness, efficiency, and satisfaction. Our results indicated that the application performed well.
This research could be extended in many ways. The developed deep learning models could be trained on a combination of datasets to improve performance. They could also be trained to recognize connected letters and words. Such models can be used in writing and dictation applications. In addition, models can be built for the recognition of Arabic calligraphy. In the future, more features can be added to the prototype, such as the ability to share results with parents and teachers, personalization with photos, and support for different platforms. The application of gesture-based handwriting could be investigated in the context of writing applications for children in Arabic and other languages.

Author Contributions

Conceptualization, I.A.-T. and N.A.; methodology, I.A.-T., N.A., A.A.-A. and A.B.D.; software, A.B.D. and N.A.; validation, A.B.D. and N.A.; discussion and results, A.A.-A., I.A.-T. and N.A.; writing—original draft preparation, A.A.-A.; writing—review and editing, A.A.-A., I.A.-T. and N.A.; supervision, I.A.-T. All authors have read and agreed to this version of the manuscript.

Funding

This research project was supported by a grant from the “Research Center of the Female Scientific and Medical Colleges”, Deanship of Scientific Research, King Saud University.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Altwaijry, N.; Al-Turaiki, I. Arabic handwriting recognition system using convolutional neural network. Neural Comput. Appl. 2021, 33, 2249–2261. [Google Scholar] [CrossRef]
  2. Alrobah, N.; Albahli, S. A Hybrid Deep Model for Recognizing Arabic Handwritten Characters. IEEE Access 2021, 9, 87058–87069. [Google Scholar] [CrossRef]
  3. Hong, D.; Gao, L.; Yao, J.; Zhang, B.; Plaza, A.; Chanussot, J. Graph Convolutional Networks for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote. Sens. 2021, 59, 5966–5978. [Google Scholar] [CrossRef]
  4. Wu, X.; Hong, D.; Chanussot, J. UIU-Net: U-Net in U-Net for Infrared Small Object Detection. IEEE Trans. Image Process. 2023, 32, 364–376. [Google Scholar] [CrossRef]
  5. AlJarrah, M.N.; Zyout, M.M.; Duwairi, R. Arabic Handwritten Characters Recognition Using Convolutional Neural Network. In Proceedings of the 2021 12th International Conference on Information and Communication Systems (ICICS), Valencia, Spain, 24–26 May 2021; pp. 182–188. [Google Scholar]
  6. Corbille, S.; Fromont, E.; Anquetil, E.; Nerdeux, P. Integrating Writing Dynamics in CNN for Online Children Handwriting Recognition. In Proceedings of the 2020 17th International Conference on Frontiers in Handwriting Recognition (ICFHR), Dortmund, Germany, 8–10 September 2020; pp. 270–275. [Google Scholar] [CrossRef]
  7. Jolly, C.; Palluel-Germain, R.; Gentaz, E. Evaluation of a tactile training for handwriting acquisition in French kindergarten children: A pilot study. In Kindergartens: Teaching Methods, Expectations and Current Challenges; Nova Science Publishers: Hauppauge, NY, USA, 2013; pp. 161–176. [Google Scholar]
  8. El-Sawy, A.; Loey, M.; EL-Bakry, H. Arab Kids Tutor (AKT) System For Handwriting Stroke Errors Detection. Int. J. Technol. Enhanc. Emerg. Eng. Res. 2016, 4, 8. [Google Scholar]
  9. Alheraki, M.; Al-Matham, R.; Al-Khalifa, H. Handwritten Arabic Character Recognition for Children Writ-ing Using Convolutional Neural Network and Stroke Identification. arXiv 2022, arXiv:2211.02119. [Google Scholar]
  10. Das, N.; Mollah, A.F.; Saha, S.; Haque, S.S. Handwritten arabic numeral recognition using a multi layer perceptron. arXiv 2010, arXiv:1003.18914. [Google Scholar]
  11. Ashiquzzaman, A.; Tushar, A.K. Handwritten Arabic numeral recognition using deep learning neural networks. In Proceedings of the 2017 IEEE International Conference on Imaging, Vision & Pattern Recognition (icIVPR), Dhaka, Bangladesh, 13–14 February 2017; pp. 1–4. [Google Scholar]
  12. Alani, A. Arabic Handwritten Digit Recognition Based on Restricted Boltzmann Machine and Convolutional Neural Networks. Information 2017, 8, 142. [Google Scholar] [CrossRef] [Green Version]
  13. Mudhsh, M.; Almodfer, R. Arabic Handwritten Alphanumeric Character Recognition Using Very Deep Neural Network. Information 2017, 8, 105. [Google Scholar] [CrossRef] [Green Version]
  14. Latif, G.; Alghazo, J.; Alzubaidi, L.; Naseer, M.M.; Alghazo, Y. Deep Convolutional Neural Network for Recognition of Unified Multi-Language Handwritten Numerals. In Proceedings of the 2018 IEEE 2nd International Workshop on Arabic and Derived Script Analysis and Recognition (ASAR), London, UK, 12–14 March 2018; pp. 90–95. [Google Scholar]
  15. Ashiquzzaman, A.; Tushar, A.K.; Rahman, A.; Mohsin, F. An efficient recognition method for handwritten arabic numerals using CNN with data augmentation and dropout. In Data Management, Analytics and Innovation; Balas, V.E., Sharma, N., Chakrabarti, A., Eds.; Springer: Singapore, 2019; Volume 808, pp. 299–309. [Google Scholar]
  16. El-Sawy, A.; Loey, M.; El-Bakry, H. Arabic handwritten characters recognition using convolutional neural network. WSEAS Trans. Comput. Res. 2017, 5, 11–19. [Google Scholar]
  17. Younis, K.; Khateeb, A. Arabic Hand-Written Character Recognition Based on Deep Convolutional Neural Networks. Jordanian J. Comput. Inf. Technol. 2017, 3, 186. [Google Scholar] [CrossRef]
  18. Alyahya, H.; Al-Salman, A.; Ben Ismail, M.M. Deep ensemble neural networks for recognizing isolated Arabic handwritten characters. ACCENTS Trans. Image Process. Comput. Vis. 2020, 6, 2455–4707. [Google Scholar] [CrossRef]
  19. Elkhayati, M.; Elkettani, Y. Towards directing convolutional neural networks using computational geometry algorithms: Application to handwritten Arabic character recognition. Adv. Sci. Technol. Eng. Syst. J. 2020, 5, 137–147. [Google Scholar] [CrossRef]
  20. Shams, M.; Elsonbaty, A.; ElSawy, W. Arabic Handwritten Character Recognition based on Convolution Neural Networks and Support Vector Machine. Int. J. Adv. Comput. Sci. Appl. 2020, 11. [Google Scholar] [CrossRef]
  21. Balaha, H.M.; Ali, H.A.; Saraya, M.; Badawy, M. A new Arabic handwritten character recognition deep learning system (AHCR-DLS). Neural Comput. Appl. 2021, 33, 6325–6367. [Google Scholar] [CrossRef]
  22. Balaha, H.M.; Ali, H.A.; Youssef, E.K.; Elsayed, A.E.; Samak, R.A.; Abdelhaleem, M.S.; Tolba, M.M.; Shehata, M.R.; Mahmoud, M.R.; Abdelhameed, M.M.; et al. Recognizing arabic handwritten characters using deep learning and genetic algorithms. Multimed. Tools Appl. 2021, 80, 32473–32509. [Google Scholar] [CrossRef]
  23. Aizan, N.L.K.; Mansor, E.I.; Mahmod, R. Preschool children handwriting evaluation on paper-based and tablet-based settings. Int. J. Comput. Inf. Technol. 2014, 3, 7. [Google Scholar]
  24. Glorot, X.; Bordes, A.; Bengio, Y. Deep sparse rectifier neural networks. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Ft. Lauderdale, FL, USA, 11–13 April 2011; pp. 315–323. [Google Scholar]
  25. Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2017, arXiv:1412.6980. [Google Scholar]
  26. El-Sawy, A.; Loey, M.; Hazem, E. Arabic Handwritten Characters Dataset. 2017. Available online: https://www.kaggle.com/mloey1/ahcd1 (accessed on 30 May 2019).
  27. Hambling, B.; Van Goethem, P. User Acceptance Testing: A Step-by-Step Guide; BCS, The Chartered Institute for IT: Swindon, UK, 2013. [Google Scholar]
  28. Sualim, S.A.; Yassin, N.M.; Mohamad, R. Comparative evaluation of automated user acceptance testing tool for web based application. Int. J. Softw. Eng. Technol. 2016, 2, 7. [Google Scholar]
Figure 1. Sample of the Hijja dataset [2].
Figure 1. Sample of the Hijja dataset [2].
Applsci 13 01692 g001
Figure 2. Our CNN architecture.
Figure 2. Our CNN architecture.
Applsci 13 01692 g002
Figure 3. Homepage interface.
Figure 3. Homepage interface.
Applsci 13 01692 g003
Figure 4. The writing board page interface.
Figure 4. The writing board page interface.
Applsci 13 01692 g004
Figure 5. Feedback interface.
Figure 5. Feedback interface.
Applsci 13 01692 g005
Table 1. A summary of deep learning-based handwritten digit recognition models.
Table 1. A summary of deep learning-based handwritten digit recognition models.
ReferencesYearModelDatasetTypeSizeAccuracy
Das et al. [10]2010MLPCMATERDBDigits300094.93%
Ashiquzzaman et al. [11]2017MLP 93.8%
Alani et al. [12]2017RBM-CNN 98.59 %
Mudhsh et al. [13]2017DNNADBaseDigits70,00099.57%
HACDBChars660097.32%
Latif et al. [14]2018CNNMADBaseDigits70,00099.32%
MNIST 70,00099.32%
HODA 80,00099.32%
Urdu 850099.32%
DHCD 20,00099.32%
Combined 20,00099.26%
Ashiquzzaman et al. [15]2019CNNCMATERDBDigits300099.4%
Table 2. A summary of deep learning-based handwritten character recognition models.
Table 2. A summary of deep learning-based handwritten character recognition models.
ReferencesYearModelDatasetTypeSizeAccuracy
El-Sawy et al. [16]2017CNNAHCDChars16,80094.9%
Younis et al. [17]2017CNNAHCDChars16,80097.6%
AIA9KChars873794.8%
Altwaijry et al. [1]2021CNNHijjaChars47,43488%
AHCDChars16,80097%
Alyahya et al. [18]2020CNNAHCDChars16,80098.3%
Elkhayati et al. [19]2020CNN + CGIFHCDBChars52,38097.4%
Shams et al. [20]2020DCNN + SVMAHCDChars16,80095.07%
AlJarrah et al. [5]2021CNNAHCDChars16,80097.2%
CNN+Data augmentationAHCDChars16,80097.7%
Alrobah et al. [2]2021CNN + SVMHijjaChars12,77696.3%
Balaha et al. [21]2021CNNHMBDChars54,11598.4%
CMATERChars30,000100%
AIA9kChars89,74099.0%
Balaha et al. [22]2021CNNHMBDChars54,11591.96%
HMB-AHCR-DLGAHMBDChars54,11592.88%
Table 3. The results and comparison of the CNN and VGG16 models for the 29 classes of the Hijja dataset.
Table 3. The results and comparison of the CNN and VGG16 models for the 29 classes of the Hijja dataset.
ModelCNNVGG-16
CharacterClassPrecisionRecallF1-ScorePrecisionRecallF1-Score
أ01.001.001.000.960.950.96
ب10.991.000.990.780.910.84
ت20.990.990.990.920.810.86
ث31.001.001.000.920.890.90
ج41.000.991.000.950.800.87
ح50.991.000.990.720.940.82
خ60.990.980.980.880.820.85
د70.970.980.970.880.850.87
ذ80.990.940.960.960.820.89
ر90.980.980.980.840.670.75
ز101.000.990.990.980.520.68
س111.001.001.000.910.950.93
ش121.001.001.000.760.660.71
ص130.991.000.990.710.880.79
ض140.991.000.990.850.880.86
ط151.001.001.000.900.890.89
ظ160.991.001.000.880.870.87
ع170.970.990.980.810.760.79
غ180.990.970.980.690.930.79
ف190.980.990.980.880.870.87
ق201.000.990.990.960.900.92
ك211.000.960.980.760.770.77
ل220.990.990.990.800.850.82
م231.000.990.990.760.900.83
ن240.960.990.970.910.880.90
هـ251.000.991.000.760.900.83
و261.001.001.000.840.790.82
ي271.000.980.990.620.810.71
ء280.980.980.980.820.560.67
accuracy (train) 0.96 0.90
accuracy (test) 0.99 0.83
macro avg0.990.990.990.840.830.83
weighted avg0.990.990.990.850.830.83
Table 4. Performance comparison with models from the literature.
Table 4. Performance comparison with models from the literature.
ReferencesAccuracyPrecisionRecallF-MeasureDatasets
Altwaijry et al. [1]88%88%88%88%Hijja
Alrobah et al. [2]96.3%---Part of Hijja
Proposed VGG-1683%85%83%83%Hijja
Proposed CNN99%99%99%99%Hijja
El-Sawy et al. [16]94.9%---AHCD
Younis et al. [17]97.6%---AHCD
Alyahya et al. [18]98.3%98.35%--AHCD
Altwaijry et al. [1]97%97%97%97%AHCD
Proposed VGG-1694%95%94%94%AHCD
Proposed CNN98%99%99%99%AHCD
Table 5. The results and comparison of the CNN and VGG16 models on the AHCD dataset.
Table 5. The results and comparison of the CNN and VGG16 models on the AHCD dataset.
ModelCNNVGG-16
CharacterClassPrecisionRecallF1-ScorePrecisionRecallF1-Score
أ01.001.001.001.000.960.98
ب10.971.000.980.880.980.93
ت20.990.990.990.950.850.90
ث30.990.990.990.960.970.97
ج41.000.840.910.970.970.97
ح50.861.000.930.950.950.95
خ60.991.000.990.960.960.96
د70.991.000.990.970.960.96
ذ80.990.970.980.920.960.94
ر90.970.990.980.960.900.93
ز100.981.000.990.980.970.97
س111.000.991.000.991.001.00
ش121.001.001.000.930.910.92
ص130.981.000.990.870.930.90
ض141.000.991.000.930.930.93
ط150.980.990.980.980.930.96
ظ161.000.970.980.960.970.97
ع171.000.990.990.960.760.85
غ180.990.990.990.940.950.95
ف190.980.990.990.960.920.94
ق200.990.980.990.990.960.97
ك211.001.001.000.811.000.89
ل221.000.980.991.000.880.94
م231.001.001.000.970.950.96
ن241.000.991.000.930.980.96
هـ251.000.990.990.950.970.96
و260.991.001.000.850.980.91
ي271.001.001.000.930.930.93
accuracy (train) 0.97 0.97
accuracy (test) 0.98 0.94
macro avg0.990.990.990.950.940.94
weighted avg0.990.990.990.950.940.94
Table 6. Computational Complexity.
Table 6. Computational Complexity.
TrainingPredictionParameters
TimeTimeTrainableNon-TrainableTotal
Hijja
Proposed CNN202s1.96 s5,123,7418965,124,637
AHCD
Proposed CNN30.24s0.68 s5,123,2288965,124,124
Table 7. User acceptance test for stylus and finger tasks.
Table 7. User acceptance test for stylus and finger tasks.
Task (Stylus)Average Number of ErrorsAverage Time in SecondsResult
Choose skill0.004.03Pass
Hear sound0.095.15Pass
Change pen color0.005.58Pass
Write on board1.7328.87Pass
Erase0.002.99Pass
Task (Finger)
Choose skill0.003.45Pass
Hear sound0.004.07Pass
Change pen color0.003.16Pass
Write on board1.3626.64Pass
Erase0.001.03Pass
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Bin Durayhim, A.; Al-Ajlan, A.; Al-Turaiki, I.; Altwaijry, N. Towards Accurate Children’s Arabic Handwriting Recognition via Deep Learning. Appl. Sci. 2023, 13, 1692. https://doi.org/10.3390/app13031692

AMA Style

Bin Durayhim A, Al-Ajlan A, Al-Turaiki I, Altwaijry N. Towards Accurate Children’s Arabic Handwriting Recognition via Deep Learning. Applied Sciences. 2023; 13(3):1692. https://doi.org/10.3390/app13031692

Chicago/Turabian Style

Bin Durayhim, Anfal, Amani Al-Ajlan, Isra Al-Turaiki, and Najwa Altwaijry. 2023. "Towards Accurate Children’s Arabic Handwriting Recognition via Deep Learning" Applied Sciences 13, no. 3: 1692. https://doi.org/10.3390/app13031692

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop