# Deep Learning and Face Recognition: Face Recognition Approach Based on the DS-CDCN Algorithm
## 3 Design of Face Recognition Method Based on DS-CDCN Algorithm
### Design of Face Recognition Algorithm Based on DS-CDCN  
Center difference convolutional neural network (CDCNN) is a CNN algorithm for face detection. The features extracted by CDCNN at low, medium, and high levels are subjected to spatial attention refinement and fusion by a multi-scale feature modulation (MAFM) module [21]. The features at different levels are refined by spatial attention related  
Figure 2: Face dataset acquisition process. to the kernel size of the receptive domain and then connected together. The refined features are shown in Equation (5). \[{F_{i}}^{\prime}={F_{i}}\odot(\sigma(C_{i}([A(F_{i}),M(F_{i})]))),i\in\{low,mid, high\} \tag{5}\]  
In Equation (5), the refined features are \(F^{\prime}\), and the features at different levels are \(F\). The multiplication of two matrices with the same dimensions is denoted by \(\odot\). The average pooling and the maximum pooling are \(A\) and \(M\), respectively. The Sigmoid function is \(\sigma\), and the convolutional layer is \(C\). In this study, an improved DS-CDCN algorithm is proposed on the basis of CDCNN. The algorithm uses depth separable center difference convolution to extract multilevel center difference features and then fuses the multilevel features using multiscale channel attention fusion (MCAF). The structure of the DS-CDCN algorithm is shown in Figure 3.  
The DS-CDCN neural network consists of four DS-CDC layers and three CDC_Blocks. The DS-CDC convolutional layer consists of a 3 \(\times\) 3 depth-by-depth center difference convolutional layer plus a 1 \(\times\) 1 point-by-point convolution. The CDC_Block consists of two DS-CDC layers. The two DS-CDC layers in the CDC_Block are used to expand the channels and reduce the channels, respectively. The first DS-CDC layer first expands the channels to double the output of the previous layer and keeps the feature map size unchanged. The second CDC_DW layer then reduces the number of channels in the output feature map of the first layer to half the previous number, while maintaining the same feature map size. The specific function of CDC_Block is to extract center difference features at different levels to achieve a detailed analysis of input images. Three CDC_Blocks are used for low-, medium- and high-level center difference feature extraction. Each CDC_Block is followed by a maximum pooling layer for parameter reduction. The three-level features are fed into the MCAF feature fusion module, and the fused features are passed through two DS-CDC convolutional layers to reduce the number of channels to obtain the predicted depth map of the predicted pass. The pixel values of the depth map obtained after the depth loss guided network training are mapped to the range [0, 1]. Subsequently, the predicted depth map obtained is compared with the input image after resetting the labeled size, and the probability that the current face is alive is calculated [22]. The output features obtained by ordinary convolution are shown in Equation (6). \[y(p_{0})=\sum_{p_{u}\in R}\omega(p_{n})\cdot x(p_{0}+p_{n}) \tag{6}\]  
In Equation (6), the output feature is \(y\), and the input feature is \(x\). The position of the current point of the sampling window is \(p_{0}\). The coordinates of the point in the local sensing field \(R\) are \(p_{u}\), and the weight is \(\omega\). The sampling and aggregation process of CDCNN is  
Figure 3: DS-CDCN algorithm structures. different from the ordinary convolution. CDCNN is more likely to aggregate the collected values' center gradient information during the sampling step. In order to enhance the network model's performance, CDCNN combines the multilevel center difference features through multi-scale channel attention fusion during the aggregation step. Equation (7) displays the CDCNN equation derived from standard convolution. \[y^{\prime}(p_{0})=\sum\limits_{p_{n}\in R}\omega(p_{n})\cdot(x(p_{0}+p_{n})-x(p _{0})) \tag{7}\]  
In Equation (7), the CDCNN output is \(y^{\prime}\).