Facial Emotion Images Recognition Based On Binarized Genetic Algorithm-Random Forest

Attribution


Introduction
The recognition of human feelings has become a prominent and rapidly evolving field of study in recent times.Broadly speaking, human facial expressions can be categorized as either positive emotions, encompassing feelings like joy, love, and happiness, or negative emotions, which encompass anger, loneliness, disgust, fear, and rage 1 .Fig. 1 shows some different facial emotions based on human expressions.The goal of facial emotion recognition systems and methodologies is to make machines capable to forecast an individual's emotional condition from their face automatically.Providing computer programmes with the capacity to recognise human emotional states from facial photographs is an important and difficult task with a wide range of potential applications.
Generally, affective computing techniques must understand human emotional reactions and appropriately integrate this knowledge with the interaction process.action process properly 2 .
In addition, if computer applications are used, human-computer connection will be more robust and natural which can identify and accommodate the human emotional state.In fact, automated techniques which can be identified human emotions depend on the facial emotions can enhance the interaction performance among the human and the computer and presents a system that will be able to adapt and customize for responses 3 .Identifying the participants' emotional states can be quite beneficial for the embodied conversational agents.Consequently, getting more emotional, realistic interactions 4 .Besides, learning and emotions are inextricably linked in intelligent tutoring systems.Thus, the identifying the emotional states of learners can be greatly improved the efficiency of the learning modes 5 .
In another domain, the monitoring applications such as elderly surveillance methods and driver surveillance can also obtain benefits from such application (i.e., facial emotion identification application) in order to achieve the ability to extremely understanding the emotional condition and cognitive of human.Furthermore, the identification of facial emotion can be used in medical applications in the surveillance patients and recognize their conditions.DL (Deep Learning) and ML (Machine Learning) algorithms have found widespread application, owing to their demonstrated effectiveness and efficiency in classifying subjects [6][7][8] .Furthermore, DL and ML algorithms have significantly enhanced the performance of various recent applications across diverse domains, including but not limited to medical image classification [9][10][11] , language identification [12][13][14] , lung cancer detection 15 , voice pathology detection [16][17][18][19] , and notably, the study of identifying emotions on faces 20,21 , where they play a central role.
The examination and analysis of the characteristics of the human face, along with the determination of its emotional state, are regarded as crucial issues and challenging jobs.The main challenge is dealing with the person's non-uniform face and various constraints like shadows, lighting, orientation conditions, and facial pose 22 .Although a human has the ability to identify and understand facial expressions naturally, robust and accurate facial emotion identification through computer systems is yet a high challenge.
Numerous approaches and strategies have been proposed for identifying the emotions on a person's face.However, the majority of facial expression recognition systems are only assessed based on accuracy; additional performance metrics, such as sensitivity, precision, F-measure, and G-mean, are regarded as important in the assessment process.Moreover, a common problem in facial expression detection systems that has to be fixed is that most feature extraction approaches are comparable to manual techniques, which makes it difficult for the algorithms to extract features efficiently.The ineffective extracted features lead to reduce the accuracy rate of the classification algorithm 23 .For instance, although the Histograms of Oriented Gradients (HOG) approach is mostly employed in several image processing domains and is regarded as one of the most widely used methods for feature extraction [24][25][26] .However, the HOG features still suffer from some drawbacks such as the high number of features 27 .Stated differently, HOG features contain redundant features that affect the classification process that causes the system's accuracy rate to be poor.Therefore, the HOG technique needs improvement in terms of selecting the best features by using an optimization approach to increase the system's accuracy rate.
The Binarized Genetic Algorithm (BGA) is popular search and optimization approaches 28,29 .The BGA is one of the GA versions that uses binary numbers to represent the chromosomes.According to Holland 30 , Goldberg 31 made a significant contribution to the dissemination of BGA by demonstrating that many issues may be solved using BGA methodologies.The BGA techniques have been effectively applied in several applications including stock market prediction 32 , classification of five different biological datasets 33 , and aircraft arrival sequencing and scheduling 34 .
Further, the Random Forest (RF) is an ML algorithm, when it is regarded as a strong algorithm and its efficacy and efficiency in the classification process that have been demonstrated in different domains such as nanofluids viscosity prediction 35 , system of detecting the network intrusion 36 , COVID-19 prediction 37 , and diagnosis the breast cancer 38 .
Based on all the above-mentioned facts, the following is a list of this study's primary objectives.: -Propose a new facial emotion recognition system by using the Binarized Genetic Algorithm-Random Forest (BGA-RF) for selecting the most relevant HOG features (i.e., preventing the redundant HOG features).-Employ the conventional HOG features and RF classifier in the facial emotion recognition.-Analyse and contrast how well the suggested BGA-RF and the conventional based on several evaluation measurements (i.e., accuracy, sensitivity (recall), G-mean, and F-measure).-Compare the performance of the suggested BGA-RF with other benchmark techniques in terms of accuracy.
The structure of this manuscript is presented as follow.The study on related work is explained in section 2. While part 3 provides the ingredients and suggested technique.Additionally, the findings and comments are provided in section 4.And section 5 presents the study's conclusion.

Related Work
Recent studies and methods have had a notable level of interest from developers and researchers that specialise in identifying human facial emotions by using face images.For example, the study in 39 , has been presented a new framework, where the improved systems of facial emotion recognition can be compared with each other by using this presented framework in a standardized and constant manner.
The CNN algorithm has been trained based on an image database that is called AffectNet.Further, there was a web application that has been is developed and involved with this framework.In this presented framework, there were 8 classes of emotions.In the given database, there were 287,651 and 4,000 images that have been carried out for training and testing phases, respectively.It is revealed that the presented work can achieve 55.09% detection accuracy.However, the obtained accuracy is still low.Moreover, this work is assessed just in terms of accuracy; in cases where there are additional significant evaluation metrics such as precision; specificity; sensitivity; and others.
Furthermore, the writers in 40 have created a system for emotion recognition in the area of Facial Nerve Paralysis (FNP).They have inferenced the stress from facial photos for individuals with facial nerve paralysis.In this work, the database of patients has been created from 45 patients and there were six basic classes of emotions.This database has been collected from an experienced clinician in the acupuncture and moxibustion department, China.Furthermore, the CNN technique is used to extract information from pictures.Whilst, the VGGNet model of DL has been used for the classification task.It is indicated that the maximum results of VGGNet model accuracy reached 66.58%.However, the detection accuracy was not encouraging.Moreover, the system has been assessed in terms of accuracy only.
Furthermore, a group of researchers in 41 , have presented a multi-attention module that has been used in the identification of facial emotions.In this method, they have designed three attention modules, where these three modules can be inserted into the backbone network flexibly.These modules are called a frame, channel, and spatial.The authors have used maximum pooling and average pooling in the dimensions of the channel and spatial for extracting the vital data and overlaying it, following a little computation, on the feature map.Whilst, in the dimension of the frame, they have applied Multi-Layer Perception (MLP) in order to compute the weight of the present frame with respect to the output of the CNN feature vector and place it on the feature vector.This method has been used two databases which are eNTERFACE'05 and CK+.In each database, there were six classes of emotions that have been used in this method.After obtained the features from the databases, the MLP will perform the classification task.The outcomes from the experiment showed that the proposed method can achieve 89.52% accuracy based on the CK+ database.Meanwhile, the outcomes have been demonstrated that the suggested approach can achieve 88.33% accuracy based on the eNTERFACE'05 database.Although the proposed method has been used two kinds of database, it has been tested and assessed based on accuracy only.
Further, the work in 42 , has been presented a system for solving the problems that facing the facial emotion identification systems.One of these problems is low accuracy rate that has been obtained by using many methods and tools.The presented method has been used three techniques.The first technique is Stationary Wavelet Entropy (SWE) that has been utilized as a feature extraction technique to obtain the image features.Furthermore, for the classification part, the Single-Hidden-Layer Feedforward Neural Network (SHLFNN) technique has been used as second technique in order to classify the emotions with respect to their label.Finally, the third technique is Particle Swarm Optimization (PSO) algorithm which has been implemented for the training phase.In this method, the database is private and there were seven emotions of human facial.It worth mention that all samples of images have been approved through three experienced psychologists.The total quantity of sample images used in this method is 700 samples.The findings of this technique have been revealed that the highest achieved accuracy is up to 93.89%.However, the suggested method has been examined and evaluated based on the detection accuracy rate only.
Besides, the authors in 43 , have presented A technique for identifying human emotions from their faces based on images.In their method, they have used the VGGNet architecture as a type of convolutional neural network algorithms.In the VGGNet algorithm, three completely connected layers and four convolutional phases are present.Besides, every convolutional phase has been included with max-pooling layer and two convolutional blocks.The convolutional phases have been used for task of feature extraction to extract characteristics from images.The third fully connected layer has been used for the classification task.This method has been used the FER2013 database, where this database includes 35888 samples of images and there were seven various emotions of facial human.The experiment results have shown that the proposed method using the VGGNet algorithm can achieve 73.28% as detection accuracy between these seven labels of emotions.Nevertheless, the obtained accuracy of this method is still low.Facial emotion recognition system is proposed in 44 .
In this system, the authors have presented a Facial (fi-score), respectively.However, the results of facial emotion identification are not encouraging.
Additionally, A new framework is presented in 45 for improving the image quality in the database and removing the noise in terms of image preprocessing and normalization in facial emotion recognition.In this work, the images' features have been extracted utilizing the Optimized Pre-Processing (OP) technique, and for the classification part, there are three classifiers that have been used for classifying the facial emotions which are the ANN (Artificial Neural Network) algorithm, K-Nearest Neighbor (K-NN), and Cultural Algorithm (CA).Furthermore, the image database used in this work has been downloaded from the Kaggle repository.This image database has seven emotions which are fear, happy, angry, disgust, surprise, neutral, and sad.In this database, each emotion class has 100 image samples have that have been utilized in the human facial emotions identification.The experiment results have shown that the presented Optimized Pre-Processing technique using ANN algorithm is showed the best results as compared with K-N N and CA.The highest obtained results for accuracy, sensitivity, and specificity were 85.06%, 84.95%, and 85.17%.However, there are a a small selection of images from each class used in this work.Furthermore, the detection accuracy rate for recognizing facial emotions is low.
Moreover, the authors in 23 have been presented a new algorithm for face emotions recognition.In this research, the new algorithm is called Histogram of Oriented Gradient (HOG) based on Shared Representations (ESRs).The HOG technique is utilized to extract features from image samples.While the ESRs is a method that is used for decreasing the residual generalization error effectively.Besides, the Support Vector Machine (SVM) algorithm is applied as a classifier to identify facial emotions.The database used in this work is called the FER2013 database.The collection of facial emotion image samples was obtained from the 35,887 samples available on the Kaggle website.There are seven classes of face emotions which are anger (0), dislike (1), fear (2), happy (3), sad (4), surprise (5), and neutral (6).The experiment's findings demonstrate that the suggested work has an accuracy of 89.3%.Additionally, the suggested work's execution time is assessed (i.e., the time when the image entering the system until providing the detection accuracy results) and the results showed that the system is taking 1000 milliseconds.Nevertheless, the suggested study has not been evaluated using the other assessment metrics, including sensitivity, specificity, G-mean, and F-measure.
As well as, a system of face emotion monitoring and recognition for preschool children is presented in 46 .In this system, the HOG technique is also used for extracting the features.Furthermore, there is a new effective geometric feature that has been presented in this system in order to capture facial contour variations.In addition, there are seven types of facial emotions which are Angry, Contempt, Disgust, Sad, Surprise, Fear, and Happy.Based on the experiment outcomes, the utmost accomplished accuracy of the proposed system is 97.8%.However, the other evaluation measurements (e.g., sensitivity, specificity, and others) are ignored in the performance evaluation of the suggested framework.Furthermore, there hasn't been an equal distribution of the quantity of image samples.For example, the entire quantity of pictures within the Fear class is 400 samples.Meanwhile, the images in the Sad class are 100 samples.Also, in regards to the CNN algorithm, the work in 47 is suggested a human facial emotions identification system by using static images based on the Xception CNN algorithm.In this work, the proposed system has been enhanced by implementing the fine-tuning method.Three phases are involved in optimising the CNN algorithm, where the first step is to train and learn the whole system from scratch by using the pre-trained model's weight values system as primary weights.The second step refers to prepare the prediction layers and a few convolution layers, and the third step refers to train the prediction layer only.Furthermore, the CNN algorithm has been used for extracting features from images and for the classification part.There are two types of databases that have been used in this system, the first type refers to the ImageNet database that is used for pretrain the system.This database has 1,000,000 images, where it is considered the biggest image database of human facial expression.The second type is referred to the CK+ database which includes 593 samples of images for human facial expressions.There are seven face emotions that have been classified using the CNN algorithm.In the first database, the CNN algorithm has been achieved 69% detection accuracy, while in the CK+ database, the CNN algorithm has been achieved 98.34% accuracy.Nevertheless, the suggested system was assessed based on accuracy only.
The researchers in 48 have been presented a system for identifying faces and the emotions on human faces.The ANN algorithm has been utilised for both the classification and feature extraction from photos in facial emotion recognition.In this system, the NVIDIA Jetson Nano has been used, where its compact size and range of connectivity choices make it suitable as an IoT edge device.The NVIDIA Jetson Nano is used for machine learning inferencing.The image database sued in this system is private, where there is seven emotions have been classified using the ANN algorithm.Each emotion class has 12 human facial emotion samples.The number of images is 84.According to the experiment results, the ANN algorithm has been achieved 75% for detecting human facial emotions based on images.However, there are some limitations of this work, first, the accuracy rate of facial emotion identification is low.Second, the system was not assessed based on other evaluation measurements, where it was assessed based on accuracy only.Third, there aren't many image samples that were utilised to assess how well the suggested approach works.Furthermore, many machine learning techniques have been applied as classifiers to identify compassionate facial emotions in 49 .In this study, all collected image samples have been standardized on behave of ground truth.Next, the colour digital images have been converted into the grey level format.Subsequently, the CVIP tool is utilised to choose the interest zones that do not overlap.Furthermore, there are three types of features that have been extracted from image samples which are texture, histogram, and binary.After that, the The best features are chosen using the correlation-based feature selection (CFS) technique.Finally, three types of classifiers have been used in the classification part which are the Logistic (Lg) algorithm, Random Forest (RF) algorithm, and J48 algorithm.In this study, the image database used has been gathered from Bahawalpur City, Pakistan.It has three classes of facial emotions and they are sad, happy, and angry.Each emotion class includes 200 samples of face emotion images where the number of the images is 600 samples.The findings indicate that the accuracy achieved by the RF classifier is marginally greater than Lg and J48 classifiers, where RF is achieved 96.33% accuracy.While the accuracy results of Lg and J48 classifiers were 95.67% and 95.33%, respectively.Besides, the results of the execution time (seconds) of RF, Lg, https://doi.org/10.21123/bsj.2024.9698P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal and J48 classifiers were 0.18 sec, 0.04 sec, and 0.03 sec, respectively.However, the system has been proposed to classify three types only of human facial emotions.
Furthermore, the authors in 50  Further, A new method is presented in 51

Materials and Proposed Method
This section provides a deep explanation of the selected techniques for the current proposed system in the recognition of human facial emotion.This paper has proposed a new system based on several main phases.For examples, the first phase refers to pre-processing.The second phase refers to the technique of HOG.This technique will be performed as a feature extraction method in order to extract the features of facial emotion images.
Finally, the third phase refers to the feature selection process using BGA with RF.This last phase is performed in order to select the best HOG features with highest classification performance.These phases will be explained in the following sections, respectively.Furthermore, Fig. 2 shows the flowchart of the proposed method based on HOG-BGA-RF.Yale Faces Dataset: The presented system is utilized facial emotion image samples sourced from a reputable database known as Yale Faces, which is documented in reference 53 .Yale Faces is a renowned database frequently employed for facial emotion recognition tasks.This dataset comprises imagery from 11 different individuals, with each subject contributing a set of 15 distinct examples of photos depicting human face emotions.Consequently, the Yale Faces dataset contains a total of 165 image samples.These original image samples from the Yale Faces database have been subjected to preprocessing, resulting in 8-bit 3D images with dimensions of 231×195×3.Table 2 illustrates the Yale Faces database.

Pre-processing:
Two main procedures make up the preprocessing of the photographs of human face emotions used in

Feature Extraction: HOG:
The accumulation of gradient directions across image pixels is the foundation of the HOG approach within a designated region referred to as a "Cell" 54 .
In the subsequent construction of the one-dimensional histogram, this process generates a series of feature vectors that serve as input for the process of classification.Let's denote G as the function used for analyzing and describing grayscale images.Additionally, each image is separated into a group of cells, each measuring (N × N) pixels.Moreover, as shown in Fig. 3 (IV and V), the orientations θ_j^i, where i varies from 1 to N^2 for the similar cell j, are collected and arranged into an M-bins histogram.Finally, all the histograms generated are collated and merged to form a HOG histogram, serving as the ultimate the final result of the feature extraction procedure, as exemplified in Fig. 3 (VI).The illustration in Fig. 3 provides an instance utilizing eight orientation bins for the cell histograms and a four-pixel-sized cell.
In the proposed method, the pre-processing step output (150 × 150) will be used as an input into the HOG approach.For each image, the dimensionality of the output features for HOG technique is (1 × 10404).While for the whole dataset, the dimensionality of the output features for HOG technique is (165 × 10404).The HOG features of the whole dataset (165 × 10404) will be used as input in the features selection phase.Table 3 shows the dimensionality of a single raw image as well as the dimensionality of a single pre-processing image and the HOG features dimension for one and all images dataset.on the RF classifier's output accuracy.The BGA, RF, and BGA-RF will be elaborated upon in the subsequent subsections, respectively.

Binarized Genetic Algorithm (BGA):
IAs is known for the basic concept of GA, iterative changes occurring in communities and systems, assessment of psychological effects, and modelling of changing methods.The Binarized Genetic Algorithm (BGA) is one of the GA versions that uses binary numbers to represent the chromosomes.
According to Holland 30 , Goldberg 31 made a significant contribution to the dissemination of BGA by demonstrating that many issues may be solved using BGA methodologies.For tackling difficult issues, the BGA is a popular used search and optimization methods 28,29 .The BGA techniques have been effectively applied in applications including machine learning methodologies.The BGA technique is outlined below 55 :  Initial population: This entails a feasible solution of set P, a collection of binary values produced at random, P = {p1, p2, …, ps}. Evaluation: To evaluate every chromosome in the population, the fitness function, characterized as fitness = g(P), must be defined. Selection: Following the determination of the fitness values, the order of the chromosomes is determined by the fitness values.After then, two parents are chosen for the crossover and mutation processes as part of the parent selection procedure. Genetic operators: Next, new chromosomes are created using genetic operators.This is where the crossover and mutation operations transpire 56 .
During the crossover process, information is exchanged between the two parents who were chosen.There are various ways in which the crossover could happen.Then, the genes on the chromosomes of the crossed offspring are altered during the mutation procedure.Likewise, the mutation could occur by way of several methods as well.
Once all the processes above are completed, the process is repeated in the following iteration, creating a new population that will be used.The reiterations will come to an end when the outcomes converge or once the maximum amount of iterations is met.The flowchart of the GA is shown in Fig. 4 below.

RF Classifier:
Within the realms of data science and machine learning, tree-based learning algorithms stand out as some of the most widely employed techniques.An example of such a tree-based algorithm is RF 57 , which is constructed by leveraging multiple decision trees.Furthermore, the RF algorithm is regarded as the most effective classifier in the identification of binary and multi classes 58,59 .
Using the ensemble approach, separate trees are combined.Each tree contributes its classification decision for a given vector, effectively casting a vote for the class.The Random Forest then selects the classifier with the most votes as the final decision.This ensemble classifier operates based on the divide-and-conquer approach, where a collective of Now, a total of z datasets (TS1, TS2, …, TSz) are created, each with a size matching that of the original training set.These datasets are formed by replacement sampling at random, meaning that to construct each dataset TSi (where i = 1, 2, …, z), n vectors are selected randomly from TS.It's important to note that a single vector (Xi, Li) can be reused to generate another dataset TSj, where j ≠ i.
Because of the replacement during random sampling, it's possible for any vector '(Xi, Li)' to be chosen multiple times for different TSi, while some vectors may never be selected for any TSi.This process is referred to as 'bagging' and is based on aggregation bootstrap.For each of these TSi datasets, a decision tree Zi is constructed.When a new input vector 'Vi' needs classification, it is passed through all z trees.For the new vector 'Vi,' each tree casts a vote for a certain class, and the class for 'Vi' is chosen by taking the average of these votes.Fig. 5 provides an illustration of the structure of the RF classifier.

BGA-RF:
Based on the literature, the among the most widely used optimization methods is BGA.and it has been significantly used in various domains including features selection 60 , to get an optimum device arrangement in the design region 61 , and the optimal join point detection in the cancer applications 62 .Therefore, this work will use the BGA algorithm as a feature selection in human facial emotion recognition.The following steps bellow will provide a deep explanation of BGA-RF process: Step 1: Randomly generates the primary population (P) of binary values, p = {C1, C2…C50}.The dimensionality of each randomly generated chromosome is equal to the HOG features (i.e., 10404).For the binary chromosome implemented in this study, a gene value equal to one represents that the specific feature indexed via the position of the one is chosen.Otherwise, (i.e., in case the gene value is equal to zero), the feature will not be chosen for the evaluation of the chromosomal.
Step 2: Select the HOG features of the whole dataset (165 × 10404) based on each Chromosome (C) and divide the dataset into 67% for training and 33% for testing.
Step 3: Sequentially calculation of the fitness value for all Cs of the P using RF classifier (see section B for RF algorithm description).https://doi.org/10.21123/bsj.2024.9698P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal Step 4: The Cs are arranged in a descending order depend on their fitness values (i.e., accuracy rate of the RF).
Step 5: Pick a couple of parents from the current P for the crossover operation in order to generate a couple of new children.A random selection criterion is used in this study.The criterion of random selection denotes the process that the C is randomly picked from the P. In the criterion of random selection, every individual C of the P has an equal probability of being selected.
Step 6: The one-point crossover is used to transfer information among the two parents who were previously chosen in order to generate a pair of new offspring.A one point crossover scenario is shown in Fig. 6.Step 7: Implement the crossover operation's two produced offspring underwent a mutation process.The Mutation is used to change the genetic traits on a chromosome that have been chosen at random.Fig. 7 depicts an example of the mutation operation.Following the operations completion of crossing, mutation, and selection, a new group is created.This procedure will be repeated with a new group, and it will be conducted again, and this process will be repeated.When whichever the outcomes have converged or the amount of iterations has beyond the upper bound, the iterative process can be halted.Later, the best features will be selected to obtain the highest accuracy result.

Results and Discussion
In this study, the proposed BGA-RF approach has been presented in the human facial emotion's identification.The proposed method is aimed to classify 11 common human facial emotions which are a) no glasses, b) glasses, c) sad, d) happy, e) normal, f) centre light, g) right light, h) left light, i) sleepy, j) wink, and k) surprised.Additionally, the suggested approach has been carried out using a number of trials including increments of 50-300 trees in the range of trees step of 50.Consequently, the total amount of experiments is 6.The database that has been used is called Yale Faces database which includes image samples and it has been collected from various persons with different human facial emotions.In all experiments, the database was split into 67% for the purpose of training the proposed method and 33% for the purpose of testing the proposed method.All experimentations have  According that the proposed BGA-RF method is reached the best outcomes when the number of trees was equal to 200.Therefore, this study evaluates the proposed BGA-RF method with 200 trees for each class of emotions.The outcomes of the proposed BGA-RG method for each class are illustrated in Table 5.The best outcomes are accomplished for the classes of Right Light, Happy, and Left Light.
The highest accuracy, G-Mean, F-Measure, precision, and recall are all equal to 100%.Meanwhile, the TP, FP, TN, and FN were 5, 0, 50, and 0, correspondingly.In addition, Fig. 8 displays the confusion matrix for the utmost outcomes of the proposed BGA-RF method in the human facial emotions classification.In addition, the conventional method experiment was conducted (i.e., HOG features and RF classifier).Table 6 presents the overall outcome of the RF method in the identification of all facial emotions.The trial results have shown that the highest results of the RF method can be achieved when the number of trees is equal to 100 and 300.
In 100 and 300, the highest achieved accuracy is reached to 93.39%, 63.64% precision, 63.64% recall, 63.64% F-measure, and 63.64% G-mean.While, the obtained results of TP, FP, TN, FN were 35, 20, 530, and 20, respectively.However, the lowest results of the RF method are obtained when the number of trees is equal to 50.Since the RF method is obtained the highest results when the number of trees was 100 and 300.Therefore, this study evaluates the RF method with 100 trees for each class.The outcomes of the RF method for each class are shown in Table 7.The highest results are achieved for the Happy class, where accuracy, precision, G-Mean, F-Measure, and recall are all equal to 100%.While, the TP, FP, TN, and FN were 5, 0, 50, and 0, respectively.Further, Fig. 9 presents the best results from the confusion matrix of the RF method in the recognition of human facial emotions.Moreover, this study has compared the proposed HOG-BGA-RF with HOG-RF in terms of the number of features.Table 8 shows the evaluation between the proposed method and the original method in terms of the number of features.Based on Table 8, the proposed HOG-BGA-RF method has used a small number of features with respect to select the most effective features which is equal to 5253.While the original HOG-RF has used a large number of features that include many redundant features, where the total number of features was equal to 10404.Furthermore, the performance of BGA-RF method is compared against recent studies that have been presented in the facial emotion identification in terms of several evaluation measurements [63-67].
It worth notice that these recent studies have been used same image database that has been used in the proposed BGA-RF approach.The comparison of the evaluation measurements between the proposed BGA-RF approach with other studies is shown in Table 9.However, most previous studies have evaluated based on accuracy only as well as they have not mentioned the number of extracted features.Although the proposed method has used more features (i.e., 5253) than the study (Aly, 2006)  (i.e., 230), the performance of the proposed HOG-BGA-RF method is achieved higher classification accuracy.The experimental results in Table 9 shows that the performance of the proposed BGA-RF method has been beat the other studies in terms of accuracy and other evaluation measurements in the recognition of https://doi.org/10.21123/bsj.2024.9698P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal human facial emotions.That proves that the performance of the proposed BGA-RF approach is effective and can be obtained promising result in the identification of facial emotions with respect to the image samples.However, the proposed method still has some limitations which are listed in the following below: -The performance of the proposed method has not been evaluated in terms of the specificity and execution time.-The proposed BGA-RF method has been conducted based on offline, where it is imperative to use the system of facial emotion identification based on online.

Conclusion
This research proposed a facial emotion recognition system based on HOG features and BGA-RF features selection.The study developed a facial emotion recognition system based on HOG features and BGA which has been utilized as a features selection in order to choose the most effective features of HOG.Besides, the RF was used as a classifier to classify human facial emotions based on images samples.The input consisted of a set of 11 common human facial emotions which are a) no glasses, b) glasses, c) sad, d) happy, e) normal, f) centre light, g) right light, h) left light, i) sleepy, j) wink, and k) surprised with the output being the class to which the image was associated with or related to.Furthermore, the performance of the proposed system has been evaluated and compared against the conventional RF method in terms of accuracy, sensitivity, precision, F-measure, and Gmean.The results have been revealed that the suggested BGA-RF method was the traditional RF method on all evaluation measures.Thus, as long as that the greatest accuracy ever attained of the proposed BGA-RF method is 96.03% (refer to Table 4) and the greater achieved accuracy of the conventional RF method is 93.39% (refer to Table 6).Therefore, the improved result accuracy is reached to 2.82686%.In addition, the proposed BGA-RF method has been outperformed the recent approaches in terms of the detection accuracy rate in the recognition of human facial emotions based on image samples.Therefore, this study summarized that the proposed BGA-RF method is suitable to perform facial emotion recognition based on its promising results.As for future work, this research may eventually use sophisticated deep learning methods.Furthermore, broadening the dataset to encompass a wider range of age groups, races, and facial expressions may enhance the generalization capabilities of the model.

Figure 1 .
Figure 1.Different facial emotions based on human expressions.
https://doi.org/10.21123/bsj.2024.9698P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal Image Threshing (FIT) machine.The FIT machine is using pre-trained advanced features from the Xception algorithm for recognizing facial emotions.In addition, the FIT machine is gathering facial images, excluding irrelevant facial photos, relocating facial data that was misplaced, and combining original image databases on a large scale.Different deep learning algorithms have been used in this system for example; simple-CNN, ResNet 50, MobileNet, Inception V.1, PyFER, and the Xception algorithm.Furthermore, all algorithms have been tested on FER 2013 Dataset.FER 2013 dataset as a basis, the total number of facial image samples is around 35,821 images, where there are 7166 facial photos were used for the testing phase and 28,655 face images were used for the training phase.There are seven various classes of emotions in the FER 2013 dataset (i.e., anger, disgust, fear, happiness, neutral, sad, and surprised).The results have been evaluated in terms of the value of accuracy, precision, recall, and f1-score.The best results are achieved by the Xception algorithm, where the greates accuracy is 63.99%, and the highest achieved results were 63.01%(precision), The proposed system used a DL algorithm which is called CNN (Convolutional Neural Network), where it has been used for classifying the facial emotions types.The representations of the emotions on the faces have been collected from CK + dataset.There are 1460 examples in total of photos depicting face emotions.https://doi.org/10.21123/bsj.2024.9698P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal have been presented a model called PRATIT in the identification of human facial emotions.The PRATT uses many steps of pre-processing in order to remove unwanted features of image samples and synthetically creates images to augment the size of the database used in this work.The CNN algorithm has been used to extract features from image samples and for the classification between facial emotions classes.The experiment of this work has been performed using the Fer2013 database.In this database, it has been used 35887 image samples of facials emotions, and each image has a size of 48 x 48 pixels.Besides, there are seven classes of face expressions that have been employed in this study.The database was separated into 80%, 10%, and 10% for the training phase, cross-validation phase, and testing phase, respectively.The results have revealed that the suggested model using PRATIT and CNN algorithm has been achieved 78.52% detection accuracy in the human facial emotions identification.However, the achieved accuracy results of the suggested model are considered not encouraging.Moreover, the suggested model has been assessed based on accuracy only.

Figure 2 .
Figure 2. The flowchart of the proposed method based on HOG-BGA-RF.
this study: conversion and image scaling.The conversion step involves reading all the human facial emotion images and assessing their https://doi.org/10.21123/bsj.2024.9698P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal dimensionality.This entails converting the 3D human facial emotion images into grayscale, resulting in 2D representations.The dimensions of each human face emotion image were adjusted during the image scaling process is adjusted to a uniform size of (150 × 150) dimensions.Subsequently, the output of the preprocessing operation serves as input for the HOG technique, facilitating the extraction of essential features from the facial emotion images.

Figure 7 .
Figure 7.An example of the mutation operation.

Figure 8 .
Figure 8. Confusion matrix of the best result using the proposed method BGA-RF.

Figure 9 .Table 8 .
Figure 9. Confusion matrix of the best result using the benchmark method RF.Table 8. Comparison of number of features between the proposed and original methods.Methods No of Features for One Image All Images HOG-BGA-RF (1 × 5253) (165 × 5253) HOG-RF (1 × 10404) (165 × 10404)

Table 1 . The summary of related work in facial emotions recognition from images.
52r recognizing human facial emotions.In this method, the CNN algorithm is proposed to normalize images of facial expressions and the border of each stratum of images has been retrieved with the application of convolution.Next, the retrieved implicit features' dimensionality was reduced by applying the maximum pooling method.Lastly, the image samples of facial emotions have been tested and classified by adopting a softmax classifier.The image samples were collected from the Fer-2013 dataset.This database includes 28,709 samples of facial emotions for the training phase and 7,178 samples of facial emotions for the testing phase, every image is grayscale with a size of 48 × 48.In this method, there are seven categories of facial emotions that need to be identified and recognized based on the softmax classifier.This technique's effectiveness was assessed based on accuracy and execution time, where the technique's experimental findings demonstrate the highest level of accuracy attained.isupto88.56%, 187 sec for taken time of the training phase, 24.89 sec for taken time of the testing phase.The suggested method was outperformed its comparatives regarding to the detection accuracy.However, the proposed algorithm failed Regarding training and exam duration as compared with the Feature Redundancy Reduced-CNN (FRR-CNN) algorithm, where the training speed and testing speed of the FRR-CNN is 148 sec and 17.92 sec, respectively.Moreover, the other evaluation measurements are ignored in the performance assessment.Besides, a deep Neural Networks (DNNs) is proposed in52for the identification of human face emotions through the use of pictures.In the proposed technique, the characteristics of sample images have been extracted by using the convolution layers of the DNN algorithm.While the softmax layer and has been used as a classifier in order to recognize the facial emotions.

Table 4 . Demonstrates all the results of BGA-RF.
Table 4illustrates the general outcomes of the proposed BGA-RF technique in the identification of all facial emotions.The outcomes have revealed that the best outcomes of the proposed BGA-RF method can be accomplished when the number of trees is equal to 200.The best accomplished accuracy is reached to 96.03%, 78.18% precision, 78.18% recall, 78.18% F-measure, and 78.18% G-mean.Whilst, the obtained outcomes of TP, FP, TN, FN were 43, 12, 538, and 12, respectively.However, the lowermost outcomes of the proposed BGA-RF method are found when the number of trees is equal to 50.