# An Intelligent Error Correction Algorithm for Elderly Care Robots
## 3 Intelligent Error Correction Algorithm
### Error Correction Algorithm Based on Convolution Layer  
The reasons for the low gesture recognition rate of individual elderly people have been found: the palm deformation of the elderly leads to the high similarity of some gestures. We produced an array of the overall features of these gestures that are similar. Next, we needed to verify our idea and shift our focus to the characteristic matrix of special channels, find the differences between similar gestures, and establish an error-correction algorithm. According to Table 3, when the predicted gesture number is 01, the possible input gesture numbers are 00, 01, 02, and 03. Because the probability of 00 is less than 10%, we only extract the feature map of gesture numbers 01, 02, and 03 in the fifth layer of the volume base (the reason for choosing the fifth layer will be given in the experiment section), and record them as 01, 02, and 03. The size of this feature map is 256 \(\times\) 12 \(\times\) 12, which is converted into a 192 \(\times\) 192 matrix. In the neural network shown in Figure 1, the convolution method of edge pixel filling [28] is adopted. Although the size of each channel of the fifth layer of convolutional layers is 13 \(\times\) 13, the useful matrix size is only 12 \(\times\) 12. The size of the fifth convolution layer mentioned below is 12 \(\times\) 12 \(\times\) 256. \(\beta_{\text{i}}\) represents a 12 \(\times\) 12 matrix, then the feature map of the fifth layer can be expressed as \(\left[ \begin{array}{cccc}\beta_{1}&\beta_{2}&\cdots&\beta_{256}\end{array}  \right]\). The conversion mode is shown in Equation (1). \[\left[ \begin{array}{cccc}\beta_{1}&\beta_{2}&\cdots&\beta_{256}\end{array}  \right]\Rightarrow\left[ \begin{array}{cccc}\beta_{1}&\cdots&\beta_{16}\\ \vdots&\cdots&\vdots\\ \beta_{241}&\cdots&\beta_{256}\end{array} \right]. \tag{1}\]  
To determine whether there is an obvious gap between the data of the three arrays, this paper uses the spline function interpolation method [29] to fit them into three-dimensional surface graphs, respectively, as shown in Figure 3 (in this paper, only 01 and 02 gestures are selected, and 03 is similar, so we will not repeat them). The \(x\)-direction represents the first-dimension information of the feature, and the value range is 1 to 192. The \(y\)-direction represents the second-dimension information of the feature, with a value range of 1 to 192. The \(z\)-direction represents the eigenvalue. Figure 3: 3d surface map of feature map of the fifth convolutional layer: (**a**) is 01 gesture, (**b**) is 02 gesture. It can be seen from Figure 3 that the feature arrays of the two gestures in the fifth layer of convolutional layers are very similar, so one gesture is likely to be mistakenly recognized as another. However, fundamentally, they are still two different gestures. To find the most representative feature of each gesture, we study each channel of the layer 5 feature array deeply. Firstly, three feature maps representing 01, 02, and 03 are selected and divided into 256 12 \(\times\) 12 matrices, respectively, and then the differences of channels with the same number are calculated. Although we need to calculate the difference degree between the data, we cannot only calculate the matrix as data, because these data have specific meaning in the specific position of the matrix. In order not to lose the location characteristics of data and to facilitate calculation, we convert 256 12 \(\times\) 12 matrices into 256 1 \(\times\) 144 one-dimensional arrays in row order, as shown in Equation (2). \[\left[ \begin{array}{c}\gamma_{1}\\ \gamma_{2}\\.\\ \gamma_{12}\end{array} \right]\Rightarrow\left[ \begin{array}{cccc}\gamma_{1 }&\gamma_{2}&\cdot&\gamma_{12}\end{array} \right], \tag{2}\]  
where \(\gamma_{1}\) represents a 12-dimensional row vector.