# 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
CDCNN can effectively extract the gradient-level detail information in the face live detection task. However, the method mainly focuses on intensity-level semantic information and ignores the importance of gradient-level detail information. The study suggests an algorithm to address this issue by combining gradient and detail information with ordinary and center-differential convolution. This allows the two algorithms to share weights and learn both gradient and intensity-level semantic information. In this way, the algorithm can generalize better and improve performance without additional parameters. The equation for combining ordinary and center difference convolution is shown in Equation (8). \[ \begin{array}{ll}y^{\prime\prime}(p_{0})=&\theta\sum\limits_{p_{n}\in R} \omega(p_{n})\cdot(x(p_{0}+p_{n})-x(p_{0}))\\ &+(1-\theta)\sum\limits_{p_{n}\in R}\omega(p_{n})\cdot x(p_{0}+p_{n})\end{array}  \tag{8}\]  
In Equation (8), the shared weight, i.e., hyperparameter, is \(\theta\), which takes the value in the range of [0, 1]. Its larger value indicates the higher importance of the center differential gradient information. The structure of DS-CDC is shown in Figure 4.  
DS-CDC consists of depth-by-depth center difference convolution CDC and point-by-point convolution. The structure initiates with a channel-by-channel convolution of each channel of the input feature map, which yields the intermediate feature map. Subsequently, a point-by-point convolution of the depth-by-depth center difference convolution results is conducted, with the objective of fusing the center difference features and convolving them point-by-point. For point-by-point convolution, each intermediate feature map corresponds to a set of \(1\times 1\) convolutions, and finally, M output feature maps are obtained using M sets of \(1\times 1\) convolutions. This depth-separable structure can reduce the number of network parameters. After each depth layer is completed, the feature images need to be processed by normalization and activation operations. Equation (9) displays the conventional convolution computation. \[Comput_{1}=D_{K}\times D_{K}\times M\times N\times D_{F}\times D_{F} \tag{9}\]  
In Equation (9), the conventional convolution is computed as \(Comput_{1}\), and the input feature map size is \(D_{F}\times D_{F}\times N\). The output feature map size is \(D_{F}\times D_{F}\times M\), and the convolution kernel size is \(D_{K}\times D_{K}\). The computation of the depth separable convolution is shown in Equation (10). Figure 4: DS-CDC structure. In Equation (9), the input feature map size is \(D_{F}\times D_{F}\times N\), and the output feature map size is \(D_{K}\times D_{K}\). The convolution kernel size is \(D_{K}\times D_{K}\), which computes the standard convolution as \(Comput_{1}\). Equation (10) illustrates how the depth separable convolution was computed. \[Comput_{2}=D_{K}\times D_{K}\times N\times D_{F}\times D_{F}+N\times M\times D_{ F}\times D_{F} \tag{10}\]  
In Equation (10), the computation of depth-separable convolution is \(Comput_{2}\). MCAF is a method that can dynamically fuse feature information between different levels. The low-, middle-, and high-level features that are retrieved are subjected to \(3\times 3\), \(5\times 5\), and \(7\times 7\) convolution operations in a center difference convolutional network, respectively. Following that, a feature vector F is created by concatenating these features. We will feed this feature vector F into the channel attention module. The channel attention module is capable of refining and fusing the central difference features at low and medium levels through the channel attention mechanism. This allows for the dynamic fusion of various feature information levels, enhancing the network's generalization and performance. The structure of MCAF is shown in Figure 5.  
In the compression process, each feature map obtained by convolution is globally pooled, and the values of the feature channels are averaged into a real number to obtain a global feature on a channel.