# Multi-Pose Face Recognition Based on Deep Learning in Unconstrained Scene
## 3 PTFRM Module
### Optimizing Objectives  
From Section 2, we can see that the mapping function in the study does not specifically address the true identity of the face. Only the face image is classified. As long as the face with the same pose class does not need its identity tag, the same mapping relationship maps the basic feature to approximate frontal feature representation. For faces with the same identity, the PTFRM module uniformly converts the face features of different poses into approximately positive features. This process narrows the distance within the class. However, for faces with similar facial features, the same posture, and different categories, the new feature representation is still similar after the mapping process of the PTFRM module. Therefore, in the optimization process, the existence of small differences among different categories must be considered, as shown in Figure 4:  
To solve the problem of the distance among classes being too small, we consider using identity tags as constraints. After the mapping module outputs the features, we construct a feature center for the features of the same identity class. The feature center is a standard feature representation of the frontal face image of the same person. Next, we construct an optimiza  
Figure 4: The reason for the small difference between classes. Figure 3: Schematic diagram of the transformation layer. the distance between feature representations and the feature center of all the same identities. Thus, all similar feature representations are centered on feature centers and the cohesion between the features is enhanced. Then, we can reduce the intraclass distance and enhance the interclass distance. We define the target loss function as follows:  
\[L_{p}\ =\ \frac{1}{2}\sum_{1\ =\ i}^{m}\|Z(x_{i})-f_{s}^{yi}\|_{2}^{2} \tag{3}\]  
where \(L_{p}\) is the center loss function, \(m\) represents the number of samples of a batch, and \(x_{i}\) is the \(i\)-\(th\) sample. \(Z(x_{i})\) is the map-converted feature representation, and \(f_{s}^{yi}\) is the feature center of the identity class, which is also a feature representation. Figure 5 shows the function diagram. The deep color point is the feature center, and the same color is the same category. By constructing a feature center and constraining distance, similar features can be compact, and the inter-class distance increases, which is conducive to target classification. \(f_{s}^{yi}\) cannot be directly obtained. Thus, we update the center in each batch, that is, we randomly initialize the center, and calculate the distance between the current data and the center in each batch. Then, we add the distance in the gradient form to the center. The optimization formula is as follows:  
\[\Delta f_{s}^{j}\ =\ \frac{\sum_{i\ =\ 1}^{m}\delta(y_{i}\ =\ j)\times\left(f_{s}^{yi }-Z(x_{i})\right)}{1+\sum_{i\ =\ 1}^{m}\delta(y_{i}\ =\ j)} \tag{4}\]  
where \(j\) represents the \(j\)-\(th\) feature center, and \(m\) represents the size of the mini-batch. \(\delta(y_{i}\ =\ j)\) represents where each sample only affects the corresponding feature center. Supposing that the loss function of the classification task is \(L_{c}\), the formula is as follows:  
\[L_{c}\ =\ -\frac{1}{m}\sum_{i\ =\ 0}^{m}\log\frac{e^{\theta_{y_{i}}^{T}x_{i}+b _{i}}}{\sum_{j\ =\ 1}^{n}e^{\theta_{j}^{T}x_{i}+b_{i}}} \tag{5}\]  
where \(m\) is the number of samples in a batch. \(\theta_{y_{i}}^{T}\) is the weight vector corresponding to the category \(y_{i}\) and the \(i\)-\(th\) sample. \(b_{i}\) is the offset value used for the \(i\)-\(th\) sample. \(n\) is the number of identity classes. Given that we have to learn two interrelated tasks, we use the same training set. We consider using the multi-task joint supervision learning method. Then, we set the final loss function to \(L_{\text{loss}}\), which is defined as follows:  
\[L_{\text{loss}}\ =\ \lambda L_{p}+L_{c} \tag{6}\]  
where \(\lambda\) is a hyperparameter, which is mainly used to balance the convergence of a network. If \(\lambda\) is too large, the network will be over-fitting.