# Facial Emotion Recognition Analysis Based on Age-Biased Data
## 2 Experimental Method  
Table 1 shows the experimental parameters. All experiments were conducted using a workstation equipped with an Intel i7 CPU with 16 GB of RAM (Intel, Santa Clara, CA, USA) and an Nvidia GTX3050 GPU with 8 GB of memory (Nvidia, Santa Clara, CA, USA). The CNN used in this study was developed using the PyTorch (FAIR, Menlo Park, CA, USA) deep learning framework, including the CUDA acceleration library and cuDNN library support. The images used to build the custom dataset were sorted from the OpenCV library. A custom dataset was created by classifying adults and kids from the existing FER2013 [17] and MMA FACILE EXPRESSION [18] datasets. As shown in Figure 1, FER2013 consists of a grayscale image of 48 \(\times\) 48 pixels. MMA FACILE EXPRESSION consists of color images with the same number of pixels. Both datasets included six identical emotion classes (anger, fear, happy, neutral, sad, and surprised). The custom datasets were divided into 3 categories, consisting of 50,000 images each for adults only, kids only, and mixed. The training process was performed using 45,000 images out of 50,000 images in each dataset, and the remaining 5000 images were used for testing. The experimental variables affect the analysis sequence for the accuracy of emotion recognition, as shown in Figure 2. In this study, experiments were conducted using three types of training data (adults, kids, and mixed) and two types of test data (adults and kids). The three types of architecture were trained to produce six age-specific outcomes (A/A, K/K), opposite-age outcomes (A/K, K/A), and mixed-age outcomes (A + K/A, A + K/K). The architecture that was selected was MobileNet-V2 [19], SE-ResNeXt50 (32 \(\times\) 4 d) [20, 21], and ResNeXt101 (64 \(\times\) 4 d) [21] to compare the accuracy of emotions. This architecture was adjusted based on the accuracy and FLOP variables of the object recognition benchmark test [22] in Figure 3.  
In this study, pre-processing was performed to apply the custom dataset to the parameters required according to the architecture type in Table 2. The data's pre-processing parameters are as follows: all image sizes of the custom dataset were converted from 48 \(\times\) 48 to 224 \(\times\) 224 to allow them to be input into the architecture [23, 24, 25]. Since the FER2013 data is grayscale, all images were converted to grayscale. Afterward, the image data's tensor values were normalized. \begin{table}
\begin{tabular}{c c} \hline
**Dataset** & **Adult Type, Kid Type, Adult + Kid Type** \\ \hline Ages & Adult type (\(\geq\)14), Kid type (\(\leq\)13) \\ Number of images in the dataset & 50,000 (Train: 45,000, Test: 5000) \\ Type of emotion & Angry, Fear, Happy, Neutral, Sad, Surprise \\ \hline \end{tabular}
\end{table} 
Table 1: Experimental variables. Figure 1: Example of FER2013. Figure 3: Results of the architecture used in the benchmarks. Figure 2: Schematic diagram of the experimental sequence. The learning parameters of each architecture were set as follows. Considering the memory performance of GPU, the batch size was set to 32 for MobileNet-V2, 32 for SE-ResNeXt50 (32 \(\times\) 4 d), and 12 for ResNeXt101 (64 \(\times\) 4 d). The loss function used cross-entropy loss [23] and set weights to solve the problem of unbalanced data. RAdam (Microsoft Research, Redmond, WA, USA) [24] was used as the optimizer, and the initial learning rate was set to 1 \(\times\) 10\({}^{3}\) s. The learning scheduler created a custom scheduler that was slightly modified from the existing CosineAnnealing WarmRestarts (University of Freiburg, Freiburg, Germany) scheduler [25]. Each architecture had different elapsed times due to having different sizes and types of parameters such as instance activation functions, pooling layers, fully connected layers, regularization layers, and a number of input and output hidden layers. For each architecture, both adults and kids obtained accuracy, recall, precision, and \(F1\) score by learning the model and accuracy in class.