Face recognition method based on deep learning
By combining Retinaface and Facenet models through deep learning, the problems of insufficient detection speed and accuracy in traditional face recognition methods are solved, achieving efficient and accurate face recognition.
Patent Information
- Application Number
- CN202511545743.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-03-03
AI Technical Summary
Traditional facial recognition methods rely on geometric features, and their detection speed and accuracy need to be improved. Furthermore, they are highly dependent on the experience of the operators.
We employ a deep learning-based Retinaface model for face detection and feature extraction, combine it with the Facenet model for face alignment and feature encoding, construct a dynamic threshold model to improve recognition accuracy, use FPN and SSH networks to enhance feature extraction, and combine Cross-Entropy Loss and Triplet Loss to assist network convergence.
This technology improves detection speed and accuracy in face recognition, reduces reliance on operator experience, and enhances network stability and recognition accuracy.
Smart Images

Figure CN121600570A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition technology and discloses a facial recognition method based on deep learning. Background Technology
[0002] Facial recognition technology, as a biometric identification method, can determine a person's identity by analyzing and comparing features in facial images. This technology leverages the uniqueness and universality of faces, along with image processing and pattern recognition techniques, to achieve automated facial recognition in various scenarios.
[0003] The basic process of face recognition is as follows: Step 1, Face Detection. Locate face regions in images or videos to determine the possible locations of faces in the image for subsequent feature extraction and recognition. Step 2, Face Alignment. After face detection, align the detected face regions to ensure consistent position and pose during feature extraction and matching. Common alignment methods include rotation, scaling, and translation based on eye position. Step 3, Feature Extraction. After alignment, extract features from each face region. These features can be low-level features, such as grayscale histograms and gradient orientation histograms, or high-level features, such as convolutional features in deep learning models. The goal of feature extraction is to convert the face image into a discriminative and robust feature vector. Step 4, Feature Matching / Comparison. Match or compare the extracted features with known face features to determine the similarity or distance between the two feature vectors to determine if they belong to the same person. Common methods include calculating Euclidean distance and cosine similarity. Step 5, Decision / Recognition. Based on the results of feature matching or comparison, a final decision or identification is made. If the matching degree exceeds a pre-set similarity threshold, the input face is considered to match a face in the database, and is identified as the corresponding identity or category.
[0004] Traditional face recognition methods use geometric features to represent the features of a frontal face image, but this stage still requires the experience and knowledge of the operator and has limitations. The detection speed and detection accuracy both need to be improved. Summary of the Invention
[0005] The purpose of this invention is to provide a face recognition method based on deep learning, which can improve detection speed and accuracy.
[0006] To achieve the above-mentioned technical effects, the technical solution adopted by the present invention is as follows: A deep learning-based face recognition method, comprising: Step 1: Collect several images containing human faces as a training set, use the Retinaface model to perform face detection on each image, output the image with the detection box selected by the face and the facial key points corresponding to the face, and determine the horizontal yaw angle, pitch angle, sharpness, average gray value and occlusion mark corresponding to the face in each image. The combination of the horizontal yaw angle, the pitch angle, the sharpness, the average gray value and the occlusion mark is defined as the detection auxiliary information vector of the face in each image. Step 2: Construct a dynamic threshold model based on the detection auxiliary information vector of the face, and train the dynamic threshold model using the detection auxiliary information vector corresponding to the images in the training set to obtain the trained dynamic threshold model; Step 3: Analyze the detection auxiliary information vectors of the images in the test set using the trained dynamic threshold model to obtain the similarity threshold of faces in the images in the test set; Step 4: Based on the facial landmarks of the faces in the test set images, perform face alignment processing on the faces, and then use the FaceNet model to encode the face-aligned faces to obtain the facial feature vectors of the faces; Step 5: Collect initial images containing the target face as a test set, execute steps 1-4, obtain the facial feature vector of the target face and the similarity threshold of the target face, and construct a face database; Step 6: Collect images containing the faces to be identified as a test set, and execute steps 1-4 to obtain the facial feature vectors of the faces to be identified; Step 7: Select any target face feature vector from the face database, calculate the Euclidean distance between the face feature vector of the face to be identified and the face feature vector of the target face, and compare the Euclidean distance with a similarity threshold of the target face. If the Euclidean distance is less than the similarity threshold, the face to be identified is determined to be related to the target face and is marked as a similar target face; otherwise, the face to be identified and the target face are determined to be unrelated and are marked as dissimilar target faces. Traverse the face feature vectors of all target faces in the face database to obtain the set of similar target faces. Step 8: If the number of similar target faces in the set of similar target faces is zero, then the face recognition fails. Otherwise, in the set of similar target faces, the target face with the smallest Euclidean distance is selected as the recognition result of the face to be recognized, and the corresponding detection box and facial key points are marked on the image to be processed and displayed.
[0007] Furthermore, the method for face detection in the image using the Retinaface model includes: For an input image containing a human face, the Backbone feature network is used to extract features from the image to obtain the basic feature layer corresponding to the human face. The basic feature layer is enhanced using the FPN feature pyramid network to obtain a fused feature layer containing prior boxes; The fused feature layer is enhanced and extracted using the SSH enhanced feature extraction network to obtain an effective feature layer for subsequent prediction. Based on the effective feature layer, the prediction task is performed using the ClassHead submodule, BoxHead submodule and LandmarkHead submodule in the prediction result module to obtain the classification prediction result for determining whether there is a face in the prior box, the box regression prediction result for adjusting the position and size of the prior box, and the regression prediction result for locating and adjusting the facial key points in the prior box. The classification prediction results, bounding box regression prediction results, and regression prediction results are decoded and subjected to NMS nonmaximum suppression to obtain the faces selected by the detected bounding boxes in the image and the corresponding facial key points.
[0008] Furthermore, the auxiliary information vector expression for face detection in the image is: ; in, This is the auxiliary information vector for detecting faces in the image. The horizontal tilt angle of the face in the image. For the clarity of the face in the image, The average grayscale value of the face in the image. This is a marker indicating that a face in an image is obscured.
[0009] Furthermore, the expression for constructing the dynamic threshold model is: ; in, The similarity threshold for faces in the image. This is the auxiliary information vector for detecting faces in the image. These are the weight parameters.
[0010] Furthermore, methods for encoding face-aligned faces using the FaceNet model include: A deep convolutional neural network is used to extract features from the face-aligned image data to obtain a feature vector of length 128. The feature vector is normalized using an L2 normalization module to obtain a normalized feature vector. The embedding module is used to process the normalized feature vector to obtain the embedding vector of the face; The embedding vector of the face is analyzed using a triplet loss module to obtain the face feature vector.
[0011] Furthermore, the deep convolutional neural network uses MobileNetV1 as the backbone feature network.
[0012] Furthermore, the L2 standardization module through The feature vector of length 128 is L2 normalized, where, For vectors L2 norm, For vectors The Middle One element, For vectors The total number of elements in the text.
[0013] Furthermore, the triplet loss module includes a Cross-Entropy Loss submodule and a Triplet Loss submodule. The Cross-Entropy Loss submodule is used for face classification and assists the Triplet Loss submodule in convergence.
[0014] Compared with the prior art, the beneficial effects of this invention are: This invention presents a deep learning-based face recognition method. It utilizes a neural network model built on Retinface and FaceNet to achieve end-to-end face recognition. Retinface employs an FPN feature pyramid network and an SSH network to enhance feature extraction, achieving pixel-level localization of faces at various scales for face detection. FaceNet maps faces onto feature vectors in Euclidean space using a CNN, obtaining feature vectors for faces in different images, and then performs face recognition by comparing distances. Furthermore, this invention incorporates Cross-Entropy Loss and Triplet Loss as the overall loss in the FaceNet network to aid network convergence and enhance network stability. This method improves both the speed and accuracy of face recognition detection. Attached Figure Description
[0015] Figure 1 This is a flowchart of the deep learning-based face recognition method in the embodiment; Figure 2 This is a structural diagram of the Retinaface model framework in the embodiment; Figure 3 This is a schematic diagram of the Facenet model in the embodiment; Figure 4 This is a demonstration of the face recognition results in the example. Detailed Implementation
[0016] The present invention will now be described in further detail with reference to the embodiments and accompanying drawings. However, this should not be construed as limiting the scope of the above-described subject matter of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0017] Example See Figures 1-4 This embodiment provides a face recognition method based on deep learning, characterized by including: Step 1: Collect several images containing human faces and divide them into training and testing sets. Use the Retinaface model to detect faces in each image, outputting images with bounding boxes around the faces and the corresponding facial landmarks. Determine the horizontal yaw angle, pitch angle, sharpness, average grayscale value, and occlusion marker for each face in each image. Define the combination of these factors as the auxiliary information vector for face detection in each image. It should be noted that facial landmarks refer to specific points on the face that can accurately locate the positions of facial features and contours. Facial landmarks include the coordinates of the left eye, right eye, tip of the nose, left corner of the mouth, and right corner of the mouth in the image.
[0018] Collect all face images to be identified, and create a new folder named `face_dataset` to store all the faces to be identified. Each image in the database corresponds to one person's face; the part of the image name with the underscore "_" to the left is the person's name. If there are multiple images of one person, they can be named in the order of xxx_1, xxx_2, xxx_3. Note that each image in `face_dataset` can only contain one face. All face images are divided into training and test sets.
[0019] like Figure 2 As shown, the Retinaface model sequentially includes a backbone feature network, an FPN feature pyramid network, an SSH enhanced feature extraction network, a prediction result module, a decoding layer, and a non-maximum suppression layer.
[0020] The backbone feature network uses MobileNet V1-0.25 as its core feature network. MobileNet is based on a streamlined architecture and uses depthwise separable convolutions to construct a lightweight deep neural network. In this embodiment, the depthwise separable convolutions consist of two parts: channel-wise convolutions with a kernel of 3x3 and pointwise convolutions with a kernel of 1x1. Compared with conventional convolutions, it has a lower number of parameters and lower computational cost. After an image containing a face is input into the RetinaFace model, it is processed by the backbone feature network to output the image's feature layer. In this embodiment, when using the RetinaFace model to detect faces in the image, the backbone feature network is used to extract features from the image to obtain the basic feature layer corresponding to the face.
[0021] The FPN feature pyramid network enhances feature extraction on the basic feature layer output by the backbone network by adjusting the number of channels after 1x1 convolution and by upsampling and feature fusion, thus obtaining a fused feature layer containing prior boxes.
[0022] SSH uses three convolutions in parallel: the first is a 3x3 convolution, the second is a double 3x3 convolution, and the third is a triple 3x3 convolution. The SSH enhanced feature extraction network continues to enhance feature extraction on the fused feature layer containing the prior boxes, obtaining an effective feature layer for subsequent prediction.
[0023] After obtaining the effective feature layer for subsequent prediction, the prediction task is performed using the ClassHead, BoxHead, and LandmarkHead submodules in the prediction results module. Prediction results are obtained from the effective feature layer, namely: classification prediction results to determine whether the prior bounding box contains a face; bounding box regression prediction results to adjust the position and size of the prior bounding box; and regression prediction results to locate and adjust facial landmarks within the prior bounding box. ClassHead is used to determine whether the prior bounding box contains an object; BoxHead adjusts the prior bounding box to obtain the predicted bounding box; and LandmarkHead adjusts the prior bounding box to obtain facial landmarks. Each facial landmark requires two adjustment parameters, and there are a total of five facial landmarks.
[0024] Based on the prediction results output by the ClassHead, BoxHead, and LandmarkHead submodules, the prediction results are decoded and duplicate detection values are removed using NMS (Non-Maximum Suppression) to obtain the detection results, that is, the faces selected by the detection boxes in the image and the corresponding facial key points are obtained.
[0025] After further feature extraction using the SSH enhanced feature extraction network, three effective feature layers are obtained. The positions of the predicted bounding boxes and facial landmark detections need to be adjusted. After adjusting the prior boxes, the classification, predicted bounding boxes, and facial landmark detection results are concatenated. Finally, non-maximum suppression is used to remove highly overlapping predicted bounding boxes from the decoding results, selecting the highest-scoring bounding boxes belonging to the same category within a certain region. The final detection result includes the target face selected by the detected bounding box in each image and the corresponding facial landmarks.
[0026] It should be noted that the Retinaface model's results for face detection in images include face detection bounding boxes, facial landmarks, landmark localization accuracy, mean and variance of brightness, and face occlusion detection. This embodiment determines the horizontal deflection angle of the face in the image using face detection bounding boxes and facial landmarks. The larger the absolute value of the pose angle, the more profile the face, and the less reliable the facial features are, making feature deviation more likely. Based on the landmark localization accuracy data, the Laplacian operator is used to determine the sharpness of the face in the image. Lower sharpness means a blurrier image, poorer feature stability, and greater loss of feature details. The mean and variance of brightness determine the average grayscale value of the face in the image. The average grayscale value represents the lighting conditions; excessively dark lighting (i.e., low mean grayscale value) or excessively bright lighting (i.e., high mean grayscale value) will lead to feature extraction deviations. Face occlusion detection determines the occlusion markers of the face in the image. Partial occlusion will result in incomplete facial features and reduced feature recognition. The combination of the horizontal yaw angle, the pitch angle, the sharpness, the average gray value, and the occlusion marker is defined as the detection auxiliary information vector for the face in each image, expressed as: ; in: This is an auxiliary information vector for detecting faces in the image; The horizontal tilt angle of the face in the image. ; To normalize the sharpness of the faces in the image to [0, 1]; The average grayscale value of the face in the image; This is a flag indicating whether a face in the image is obscured. The value can be 0 or 1. A value of 0 indicates that the face is not obscured, while a value of 1 indicates that the face is obscured.
[0027] Step 2: Construct a dynamic threshold model based on the detection auxiliary information vector of the face, and train the dynamic threshold model using the detection auxiliary information vector corresponding to the images in the training set to obtain the trained dynamic threshold model.
[0028] In the standard FaceNet model, a fixed cosine similarity threshold, such as 0.6 or 0.7, is often used to determine whether a target face and a face in the database belong to the same person. However, this ignores information such as input image quality, pose, and lighting, leading to the following problems: when the input image is a clear frontal face, it should be recognized with high confidence, but is mistakenly rejected by a low similarity threshold; when the input image is a blurred profile face, facial features are greatly distorted, but a high similarity threshold is still used, resulting in missed recognition. Therefore, to improve recognition accuracy and precision, this embodiment uses a dynamic threshold model to analyze the similarity threshold of each image instead of the fixed cosine similarity threshold. Specifically, the dynamic threshold model is constructed as follows: ; in, The similarity threshold for faces in the image. This is the auxiliary information vector for detecting faces in the image. The weight parameters are obtained by using labeled face comparison samples from the training set and training them using methods such as gradient descent, so that the overall recognition error rate meets the preset requirements.
[0029] Step 3: Analyze the detection auxiliary information vectors of the images in the test set using the trained dynamic threshold model to obtain the similarity threshold of faces in the images in the test set.
[0030] Step 4: For the images in the test set where faces are selected using a detection box, extract the selected face region from the images based on the detection box.
[0031] Step 5: For the captured face region, perform face alignment processing on the face based on the facial key points of the face in the face region, and then use the FaceNet model to encode the face after face alignment to obtain the face feature vector of the face.
[0032] Specifically, this embodiment uses a known method for face alignment processing of the target face, such as using binocular coordinates to straighten the image captured in step 4. Straightening using binocular coordinates requires two parameters: the tilt angle of the line connecting the eyes relative to the horizontal line and the center of the image. These two parameters are used to calculate the angle by which the image needs to be rotated and the center of rotation, thereby completing the face alignment.
[0033] like Figure 3 As shown, this embodiment uses the Facenet model, which includes a deep convolutional neural network, an L2 normalization module, an embedding module, and a triplet loss module.
[0034] This invention uses MobileNetV1 as the backbone feature network, which is the same as the backbone feature network of the RetinaFace model. For the target face after face alignment, a feature layer is obtained using the MobileNetV1 backbone feature extraction network, and global average pooling is applied to it for easier subsequent processing. The flattened feature layer is then connected to a fully connected layer with 128 neurons to obtain a feature vector of length 128. This can be viewed as using a 128-length feature vector to replace the image input to the FaceNet model; this 128-length feature vector is a feature condensation of the input image.
[0035] The feature vector is L2 normalized using an L2 normalization module to obtain a normalized feature vector. The L2 normalization module... The feature vector of length 128 is processed, where, For vectors L2 norm, For vectors The Middle One element, For vectors The total number of elements in the vector. L2 normalization is used to ensure that the feature vectors of different faces belong to the same order of magnitude for easier comparison. Before performing L2 normalization, the 2-norm, also known as the Euclidean norm, needs to be calculated, which is the square root of the sum of the squares of the absolute values of the vector elements. L2 normalization is calculated by dividing each element by the L2 norm, thus ensuring that the feature vectors of the face are on the same scale.
[0036] The embedding module is used to process the normalized feature vector to obtain the embedding vector of the face.
[0037] The embedding vector of the face is analyzed using a triplet loss module to obtain the face feature vector. Triplet Loss is used as the loss function. The input to Triplet Loss is a triplet, where: a: anchor, a 128-dimensional face feature vector obtained from the reference image; p: positive, a 128-dimensional face feature vector obtained from an image belonging to the same face as the reference image; n: negative, a 128-dimensional face feature vector obtained from an image not belonging to the same face as the reference image. The Euclidean distance between the anchor and positive is calculated and minimized; the Euclidean distance between the anchor and negative is calculated and maximized. The specific formula is as follows:
[0038] in It's the Euclidean distance between the anchor and the positive. It's the Euclidean distance between negative and positive faces, with a constant margin. The goal is to calculate such that the Euclidean distances of vectors from the same face image in Euclidean space are similar, while the Euclidean distances of vectors from different face images in Euclidean space are relatively large.
[0039] However, since using only Triplet Loss makes it difficult for the entire network to converge, this invention combines Cross-Entropy Loss and Triplet Loss as the overall loss. Cross-Entropy Loss is used for face classification, specifically to assist Triplet Loss convergence.
[0040] Step 6: Collect initial images containing the target face as a test set, execute steps 1-5, obtain the facial feature vector of the target face and the similarity threshold of the target face, and construct a face database.
[0041] The facial feature vectors obtained by encoding all target faces are placed in a list and saved in .npy format. The encoded list is the feature list of all known faces. When the image to be analyzed is obtained later, the face to be analyzed in the image is compared with the known facial feature vectors to complete the face recognition.
[0042] Step 7: Collect images containing the faces to be identified as a test set, and execute steps 1-5 to obtain the facial feature vectors of the faces to be identified.
[0043] Step 8: Select any target face's facial feature vector from the face database. Calculate the Euclidean distance between the facial feature vector of the face to be identified and the facial feature vector of the target face. Compare the Euclidean distance with a similarity threshold for the target face. If the Euclidean distance is less than the similarity threshold, the face to be identified is determined to be related to the target face and marked as a similar target face; otherwise, the face to be identified and the target face are determined to be unrelated and marked as dissimilar target faces. Iterate through the facial feature vectors of all target faces in the face database to obtain the set of similar target faces. For example, if there are 10 target face facial feature vectors in the face database, calculate the Euclidean distance between the facial feature vector of the face to be identified and the facial feature vector of each target face. That is, obtain 10 corresponding Euclidean distances for the facial feature vectors of the 10 target faces. Then, compare the Euclidean distance of each target face's facial feature vector with its respective similarity threshold. If the Euclidean distance between the feature vectors of the target face and its own similarity threshold is less than its own, then... If the face to be identified is related to the target face, it is marked as a similar target face; otherwise, it is marked as dissimilar target faces. After the aforementioned judgment is performed on the facial feature vectors of all 10 target faces, a set of similar target faces is obtained.
[0044] Step 9: If the number of similar target faces in the set of similar target faces is zero, then output "Face recognition failed"; otherwise, select the target face with the smallest Euclidean distance from the set of similar target faces as the recognition result of the face to be recognized, mark the corresponding detection box and facial key points on the image to be processed, and output and display them, such as... Figure 4 As shown.
[0045] Step 6: Traverse each facial feature vector in the face database, calculate the Euclidean distance between the facial feature vector of the face to be identified and each facial feature vector in the face database. If the Euclidean distance between the facial feature vector of the face to be identified and the facial feature vector in the face database is less than a preset similarity threshold, then the face recognition is considered successful, and the corresponding detection box and facial key points are displayed on the image to be processed; otherwise, the face recognition is considered unsuccessful. Figure 4 As shown.
[0046] This invention presents a deep learning-based face recognition method, building a neural network model based on Retinface and FaceNet to achieve end-to-end face recognition. Retinface uses an FPN feature pyramid network and an SSH network to enhance feature extraction, achieving pixel-level localization of faces under various scale conditions, thus realizing face detection. FaceNet uses a CNN to map faces onto feature vectors in Euclidean space, obtaining feature vectors of faces from different images, and achieving face recognition by comparing distances. Furthermore, this invention incorporates Cross-Entropy Loss and Triplet Loss as the overall loss in the FaceNet network to assist network convergence and enhance network stability. The entire network model improves detection accuracy while maintaining detection speed.
[0047] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A face recognition method based on deep learning, characterized in that, include: Step 1: Collect several images containing human faces as a training set, use the Retinaface model to perform face detection on each image, output the image with the detection box selected by the face and the facial key points corresponding to the face, and determine the horizontal yaw angle, pitch angle, sharpness, average gray value and occlusion mark corresponding to the face in each image. The combination of the horizontal yaw angle, the pitch angle, the sharpness, the average gray value and the occlusion mark is defined as the detection auxiliary information vector of the face in each image. Step 2: Construct a dynamic threshold model based on the detection auxiliary information vector of the face, and train the dynamic threshold model using the detection auxiliary information vector corresponding to the images in the training set to obtain the trained dynamic threshold model; Step 3: Analyze the detection auxiliary information vectors of the images in the test set using the trained dynamic threshold model to obtain the similarity threshold of faces in the images in the test set; Step 4: Based on the facial landmarks of the faces in the test set images, perform face alignment processing on the faces, and then use the FaceNet model to encode the face-aligned faces to obtain the facial feature vectors of the faces; Step 5: Collect initial images containing the target face as a test set, execute steps 1-4, obtain the facial feature vector of the target face and the similarity threshold of the target face, and construct a face database; Step 6: Collect images containing the faces to be identified as a test set, and execute steps 1-4 to obtain the facial feature vectors of the faces to be identified; Step 7: Select any target face feature vector from the face database, calculate the Euclidean distance between the face feature vector of the face to be identified and the face feature vector of the target face, and compare the Euclidean distance with the similarity threshold of the target face. If the Euclidean distance is less than the similarity threshold, the face to be identified is determined to be related to the target face and is marked as a similar target face; otherwise, the face to be identified and the target face are determined to be unrelated and are marked as dissimilar target faces. Traverse the face feature vectors of all target faces in the face database to obtain the set of similar target faces. Step 8: If the number of similar target faces in the set of similar target faces is zero, then the face recognition fails. Otherwise, in the set of similar target faces, the target face with the smallest Euclidean distance is selected as the recognition result of the face to be recognized. The corresponding detection box and facial key points are marked on the image to be processed and displayed.
2. The face recognition method according to claim 1, characterized in that, The method for face detection in the image using the Retinaface model includes: For an input image containing a human face, the Backbone feature network is used to extract features from the image to obtain the basic feature layer corresponding to the human face. The basic feature layer is enhanced using the FPN feature pyramid network to obtain a fused feature layer containing prior boxes; The fused feature layer is enhanced by using the SSH enhanced feature extraction network to obtain an effective feature layer for subsequent prediction. Based on the effective feature layer, the prediction task is performed using the ClassHead submodule, BoxHead submodule and LandmarkHead submodule in the prediction result module to obtain the classification prediction result for determining whether there is a face in the prior box, the box regression prediction result for adjusting the position and size of the prior box, and the regression prediction result for locating and adjusting the facial key points in the prior box. The classification prediction results, bounding box regression prediction results, and regression prediction results are decoded and subjected to NMS nonmaximum suppression to obtain the faces selected by the detected bounding boxes in the image and the corresponding facial key points.
3. The face recognition method according to claim 2, characterized in that, The auxiliary information vector expression for face detection in the image is: ; in, This is the auxiliary information vector for detecting faces in the image. The horizontal tilt angle of the face in the image. For the clarity of the face in the image, The average grayscale value of the face in the image. This is a marker indicating that a face in an image is obscured.
4. The face recognition method according to claim 3, characterized in that, The expression for constructing the dynamic threshold model is: ; in, The similarity threshold for faces in the image. This is the auxiliary information vector for detecting faces in the image. These are the weight parameters.
5. The face recognition method according to claim 1, characterized in that, Methods for encoding face-aligned faces using the FaceNet model include: A deep convolutional neural network is used to extract features from the face-aligned image data to obtain a feature vector of length 128. The feature vector is normalized using an L2 normalization module to obtain a normalized feature vector. The normalized feature vector is processed using an embedding module to obtain the embedding vector of the face; The embedding vector of the face is analyzed using a triplet loss module to obtain the face feature vector.
6. The face recognition method according to claim 5, characterized in that, The deep convolutional neural network uses MobileNetV1 as its backbone feature network.
7. The face recognition method according to claim 6, characterized in that, The L2 standardization module passes through The feature vector of length 128 is L2 normalized, where, For vectors L2 norm, For vectors The Middle One element, For vectors The total number of elements in the text.
8. The face recognition method according to claim 7, characterized in that, The triplet loss module includes a Cross-Entropy Loss submodule and a Triplet Loss submodule. The Cross-Entropy Loss submodule is used for face classification and assists the Triplet Loss submodule in convergence.