## 4 Design and Results of the Experiments
### Results of the Experiments
#### 4.3.3 Experiment 3  
The Intel realistic depth camera D435 deployed to the interactive terminal of the intelligent robot is used to obtain facial images. The data acquisition range of d435 can reach 10m and the frame rate is 30 fps, which can better meet the requirements of the shooting environment and real-time performance. In the actual expression recognition, the depth image is not used. The purpose of using the depth camera is to cooperate with the robot terminal to facilitate the integration of the system with other depth image recognition interactive methods such as gesture and posture. The back end of the recognition system uses the deep learning framework Keras to train and load the recognition model and preprocesses the acquired image through OpenCV and NumPy. The front end adopts the pyqt5 framework for interactive interface development for displaying the recognition image, expression category, and total recognition time in real-time and for tracking the emotion polarity classification [36] information of the displayed expression. The system recognition frame rate is 16.9 fps. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Training Set** & **Adjustment 5** & **Accuracy 1** & **Absolute Increase 2** & **Relative Increase 3** \\ \hline RAF-DB & \(\times\) & 53.70\% & & \\  & ✓ & **57.55\%** & 3.85\% & 7.17\% \\ CK+ & \(\times\) & 31.55\% & & \\  & ✓ & **33.05\%** & & \\ KDEF & \(\times\) & 22.98\% & 9.80\% & 42.66\% \\  & ✓ & **32.78\%** & & \\ FER2013 & \(\times\) & 54.50\% & & \\  & ✓ & **56.98\%** & 2.48\% & 4.54\% \\ \hline Total average 4 & - & - & 4.41\% & 14.78\% \\ \hline \hline \end{tabular}  
* The accuracy here refers to the recognition effect of the model trained on a training set on the dataset other than the original training dataset. For example, the first row of data in Table 3 represents the model effect trained before the adjustment of RAF-DB, so the accuracy of the first row in Table 4 is calculated as the mean value of the accuracy of the first row in Table 3 on CK +, JAFFE, KDEF, and FER2013, that is, (71.00% + 39.5% + 53.2% + 51.1%) + 4 = 53.7%.2  The column Absolute increase means the increase in the data in column Accuracy before and after noise adjustment for the relative training set. For example, 3.85% is the result of 57.55% minus 53.70%. 3 The column Relative increase means the percentage of the absolute increase to the accuracy before noise adjustment for the relative training set. For example, 7.17% is the result of 3.85% divided by 53.70%. 4 Total average means the mean value of the column.5 In the column ‘Adjustment’, to the training set, \(\times\) means the noise adjustment hasn’t been made and ✓ means the noise adjustment has been made.  
\end{table} 
Table 4: Improvements in accuracy relative to real sample environment. Through further statistics on the data in Table 3, the accuracy of the training model is weighted based on the sample size of each test set before and after optimization of the four training datasets, and the standard deviation of the accuracy on all test sets are obtained, as shown in Table 5.  
It can be seen from Table 5 that the model trained by FER2013 in Table 3 has the highest weighted average accuracy and the lowest standard deviation, meaning a high recognition accuracy and a stable performance. Therefore, this group of models is selected for the experiment at the back end of the system. Three subjects are randomly tested in real-time, and they make seven expressions to different degrees. The total number of frames and accuracy of the test is shown in Table 6.  
The average accuracy rate increased by 14.34%, which is significantly higher than the test results of the public dataset. The analysis reason is that the expression change speed of the subjects is lower than the frame rate during the real-time test. Similar frames with correct recognition after optimization and wrong recognition before optimization would be continuously recorded, resulting in a larger gap.