Face recognition method and device, equipment, storage medium and program product

By dynamically adjusting the face recognition similarity threshold on the vehicle terminal and using a lightweight model trained with a circular loss function, the problem of the accuracy of face recognition on the vehicle terminal being affected by the scene is solved, achieving high-precision recognition and low computing power consumption in complex scenes.

CN121415451APending Publication Date: 2026-01-27CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511527034.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

The accuracy of facial recognition in existing vehicle terminals is greatly affected by the scene, especially under occlusion and low light conditions, the accuracy of recognition decreases, and it is difficult to improve the performance with limited computing power.

Method used

By dynamically adjusting the face recognition similarity threshold and combining it with a lightweight face recognition model trained with a circular loss function, the recognition strategy is adjusted in real time to adapt to different scenarios using the light sensor and environmental information of the vehicle terminal, and a multi-frame image decision algorithm is adopted to improve recognition accuracy.

Benefits of technology

It reduces the false recognition rate and improves the accuracy of face recognition in complex scenarios, especially under dusty and low-light indoor conditions, with a 3-5% reduction in false recognition rate and less than 5% computational power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121415451A_ABST
    Figure CN121415451A_ABST
Patent Text Reader

Abstract

The invention provides a face recognition method and device, equipment, a storage medium and a program product, and relates to the technical field of face recognition, and the method comprises the steps: obtaining a face recognition similarity threshold value according to the information of a scene where a user is located and a preset face recognition similarity threshold value adjustment strategy, the face recognition similarity threshold adjustment strategy is used for indicating face recognition similarity thresholds corresponding to different scenes; according to a face feature library, obtaining similarity information of to-be-recognized face features of the user; and obtaining a face recognition result of the user according to the face recognition similarity threshold value and the similarity information. According to the scheme of the invention, good face recognition precision can be achieved in different scenes, and the problem that the face recognition precision is influenced by the scenes in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of facial recognition technology, specifically to a facial recognition method, apparatus, device, storage medium, and program product. Background Technology

[0002] Currently, vehicle-to-everything (V2X) systems adopt a three-tier architecture: "vehicle terminal - cloud platform - mobile application". The vehicle terminal, while undertaking data collection, leverages its built-in processing chip's computing power to perform localized data processing and algorithm applications. This three-tier architecture effectively reduces data transmission bandwidth requirements, improves the real-time response performance of vehicle applications, and alleviates the computational burden on the cloud platform.

[0003] Therefore, the optimized allocation and efficient utilization of computing resources in vehicle terminals has become a key research direction in this field. Especially in application scenarios that require real-time processing of streaming data, such as biometric recognition (e.g., facial recognition), the objective requirement for cost reduction and efficiency improvement makes it a pressing technical challenge to achieve performance enhancement without increasing resource consumption within the limited computing power of vehicle terminals.

[0004] In the prior art, to solve the above technical problems, vehicle terminals can use lightweight backbone networks as face recognition models. However, lightweight backbone networks have weak feature abstraction capabilities, which leads to a decrease in face recognition accuracy in complex scenarios (such as occlusion and low light). Face recognition accuracy is affected by the scenario. Summary of the Invention

[0005] At least one embodiment of the present invention provides a face recognition method, apparatus, device, storage medium, and program product to solve the problem that the accuracy of face recognition is affected by the scene in the prior art.

[0006] To solve the above-mentioned technical problems, the present invention is implemented as follows:

[0007] In a first aspect, embodiments of the present invention provide a face recognition method, comprising:

[0008] Based on the user's scene information and a preset face recognition similarity threshold adjustment strategy, a face recognition similarity threshold is obtained. The face recognition similarity threshold adjustment strategy is used to indicate the face recognition similarity threshold corresponding to different scenes.

[0009] Based on the facial feature database, obtain the similarity information of the user's facial features to be identified;

[0010] The user's face recognition result is obtained based on the face recognition similarity threshold and the similarity information.

[0011] Optionally, in the aforementioned face recognition method, the scene information includes at least one of the following:

[0012] Light intensity information; geographic location information; environmental information; vehicle light information.

[0013] Optionally, in the aforementioned face recognition method, obtaining similarity information of the user's facial features to be identified based on a face feature database includes:

[0014] Obtain the facial features of the user to be identified;

[0015] The facial features to be identified are compared with facial features in the facial feature database to obtain the similarity information, which includes the similarity between the facial features to be identified and the facial features.

[0016] Optionally, in the face recognition method, obtaining the user's facial features to be identified includes:

[0017] Based on the face recognition model and the user's face image to be recognized, the user's face features to be recognized are obtained. The face recognition model is obtained by training based on the circular loss function.

[0018] Optionally, in the face recognition method, obtaining the user's face recognition result based on the face recognition similarity threshold and the similarity information includes:

[0019] If the similarity between the facial feature to be identified in the similarity information and the first facial feature in the facial feature database is greater than or equal to the facial recognition similarity threshold, then the facial recognition result of the user is obtained as the user identity information corresponding to the first facial feature.

[0020] Optionally, the face recognition method further includes:

[0021] Determine whether the user's image to be identified contains a human face;

[0022] If the image to be identified includes a human face, then obtain the coordinates of the facial feature points;

[0023] Based on the coordinates of the facial feature points, the image of the face to be identified in the image to be identified is obtained.

[0024] Optionally, the face recognition method further includes:

[0025] The image to be identified is extracted from the user's video stream data according to a preset extraction frame rate.

[0026] Secondly, embodiments of the present invention also provide a face recognition device, comprising:

[0027] The adjustment module is used to obtain the face recognition similarity threshold based on the user's scene information and the preset face recognition similarity threshold adjustment strategy. The face recognition similarity threshold adjustment strategy is used to indicate the face recognition similarity threshold corresponding to different scenes.

[0028] The comparison module is used to obtain similarity information of the user's facial features to be identified based on the facial feature database;

[0029] The recognition module is used to obtain the user's face recognition result based on the face recognition similarity threshold and the similarity information.

[0030] Thirdly, embodiments of the present invention also provide a face recognition device, including: a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the processor executes the program or instructions to implement the face recognition method as described in the first aspect.

[0031] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the face recognition method as described in the first aspect.

[0032] Fifthly, embodiments of the present invention also provide a computer program product, including computer instructions, which, when executed by a processor, implement the face recognition method as described in the first aspect.

[0033] Compared with existing technologies, embodiments of the present invention provide a face recognition method, apparatus, device, storage medium, and program product. The method includes: obtaining a face recognition similarity threshold based on the user's scene information and a preset face recognition similarity threshold adjustment strategy, wherein the face recognition similarity threshold adjustment strategy indicates the face recognition similarity threshold corresponding to different scenes; obtaining similarity information of the user's facial features to be recognized based on a face feature database; and obtaining the user's face recognition result based on the face recognition similarity threshold and the similarity information. This achieves differentiated settings for face recognition similarity thresholds in different scenes, ensuring accurate face recognition results in various scenarios, improving face recognition accuracy, and solving the problem of face recognition accuracy being affected by the scene in existing technologies. Attached Figure Description

[0034] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0035] Figure 1 This is a schematic flowchart of the face recognition method according to an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram illustrating the principle of the triplet loss function in this embodiment of the invention;

[0037] Figure 3 This is a schematic diagram illustrating the principle of the circular loss function in an embodiment of the present invention;

[0038] Figure 4 This is a flowchart illustrating one embodiment of the face recognition method described in this invention.

[0039] Figure 5 This is a schematic diagram of the face recognition device according to an embodiment of the present invention;

[0040] Figure 6 This is a hardware block diagram of the face recognition device described in an embodiment of the present invention. Detailed Implementation

[0041] The terms "first," "second," etc., used in this invention are used to distinguish similar objects, not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, the first object can be one or more. Furthermore, the "or" in this invention indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0042] Before providing a detailed description of the embodiments of the present invention, the application scenarios of the embodiments of the present invention will be described. The embodiments of the present invention can be applied to terminals, such as vehicle terminals.

[0043] Please refer to Figure 1 This invention provides a face recognition method, including:

[0044] Step 101: Based on the user's scene information and the preset face recognition similarity threshold adjustment strategy, obtain the face recognition similarity threshold. The face recognition similarity threshold adjustment strategy is used to indicate the face recognition similarity threshold corresponding to different scenes.

[0045] Optionally, the scene information includes at least one of the following:

[0046] Light intensity information; geographic location information; environmental information; vehicle light information.

[0047] In this embodiment of the invention, different scene information, namely, at least one combination of different light intensity information, different geographical location information, different environmental information, and different vehicle light information, corresponds to different scene types. Moreover, each scene type corresponds to a different face recognition similarity threshold adjustment strategy, that is, a different face recognition similarity threshold.

[0048] Among them, light intensity information can be obtained from the light sensor of the vehicle clock and vehicle camera equipment; geographical location information can be obtained from the positioning module of the vehicle terminal; environmental information can be obtained from the pre-set environmental classifier; and vehicle light information can be obtained from the vehicle light control module of the vehicle terminal.

[0049] For example, the scene types include: daytime, nighttime, dusty, tunnel, and backlighting. Specifically, for daytime, the corresponding face recognition similarity threshold adjustment strategy is the first decreasing strategy, with a face recognition similarity threshold of 0.65; for nighttime, the corresponding strategy is the first increasing strategy, with a face recognition similarity threshold of 0.75; for indoor, the corresponding strategy is the normal strategy, with a face recognition similarity threshold of 0.7; for dusty, the corresponding strategy is the second increasing strategy, with a face recognition similarity threshold of 0.85; for tunnel, the corresponding strategy is the third increasing strategy, with a face recognition similarity threshold of 0.8; and for backlighting, the corresponding strategy is the fourth increasing strategy, with a face recognition similarity threshold of 0.77.

[0050] Here, Table 1 below can be used to explain the mapping relationship between scene information, scene type, face recognition similarity threshold adjustment strategy, and face recognition similarity threshold.

[0051]

[0052] Table 1

[0053] In Table 1 above, "threshold strategy" refers to the face recognition similarity threshold adjustment strategy; "threshold" refers to the face recognition similarity threshold.

[0054] During the reasoning process, due to changes in other scene information such as light intensity, the accuracy of face recognition varies greatly in different scenes. Therefore, the face recognition similarity threshold is adjusted to pursue a lower false acceptance rate (FAR).

[0055] By employing the face recognition method described in this invention and applying a face recognition similarity threshold adjustment strategy, the false recognition rate for special operation vehicles has been reduced by an average of 3% to 5%, with significant improvements, particularly in low-light scenarios such as dusty environments and indoor settings. Therefore, this invention, by introducing a dynamic face recognition similarity threshold adjustment strategy, enables the setting of face recognition similarity thresholds based on scene differences, preventing false recognition, improving face recognition accuracy, and allowing the face recognition method to handle detection in various scenarios.

[0056] Step 102: Obtain the similarity information of the user's facial features to be identified based on the facial feature database;

[0057] The facial feature database is pre-stored, including the facial features of different users. It should be noted that when a user uses the in-vehicle terminal for the first time, facial image data needs to be entered for subsequent identity verification. Thus, the in-vehicle terminal can extract facial features based on the facial image data and store these features in the facial feature database.

[0058] In one implementation, optionally, the similarity information of the user's facial features to be identified is obtained based on a facial feature database, including:

[0059] Obtain the facial features of the user to be identified;

[0060] The facial features to be identified are compared with facial features in the facial feature database to obtain the similarity information, which includes the similarity between the facial features to be identified and the facial features.

[0061] In one implementation method, optionally, obtaining the user's facial features to be identified includes:

[0062] Based on the face recognition model and the user's face image to be recognized, the user's face features to be recognized are obtained. The face recognition model is obtained by training based on the circle loss function.

[0063] In this embodiment of the invention, the face recognition model employs a lightweight face recognition model, such as FaceNet (a deep learning face recognition framework). In the prior art, FaceNet is trained using a triplet loss function. However, the face recognition model in this embodiment of the invention is trained using a circular loss function; that is, FaceNet in this embodiment of the invention uses a circular loss function for training.

[0064] In existing technologies, FaceNet's input data is batch data because FaceNet uses a triplet loss function for training. Therefore, FaceNet's input data consists of triplet data. For example, setting `batch_size=5` means inputting five triplet data sets at once for model training. Each set contains two images of the same person as anchor points and positive samples, and an image of another person as a negative sample. Subsequent deep network structures then calculate the differences between facial features.

[0065] In this embodiment of the invention, since the circular loss function is used instead of the triplet loss function, the input data of FaceNet does not need to be triplet data. That is, there is no need to explicitly construct triplet data. Instead, during the FaceNet model training phase, the batch size is increased to make the number of input images at one time as large as possible, ensuring the diversity of feature distribution. Positive and negative pairs are constructed based on the label information within the batch. For example, a batch includes face images of multiple different users, and positive and negative pairs are automatically generated.

[0066] In the deep construction phase of FaceNet, the backbone network based on MobileNetV1 uses three convolutional blocks to extract facial features from different fields of view. As the number of layers increases, the features that the model can extract become more abstract and detailed. Through multi-layer convolution and global average pooling operations, a highly discriminative 128-dimensional feature vector is extracted, which can uniquely represent facial identity. FaceNet directly learns the mapping from "face to vector", eliminating the need for manual feature design in traditional methods.

[0067] However, directly comparing the original 128-dimensional feature vectors can lead to instability in the numerical range; for example, the vector magnitudes of different faces can vary significantly. Therefore, by adding an L2 normalization layer, the magnitude of the feature vectors is forced to be 1, eliminating the magnitude difference. This significantly improves model stability, causing the vector directions of similar faces to converge and the vector directions of different faces to diverge, making it easier for the model to perform face identification comparisons and improving recognition accuracy.

[0068] At this point, FaceNet has learned the important facial features, while less important features are filtered through the hidden layers and will not be passed to the deeper layers. Finally, it outputs a 128-dimensional feature vector map extracted from the backbone deep features.

[0069] It should be noted that, in this embodiment of the invention, based on the face recognition model and the user's face image to be recognized, pixels other than the face image in the user's face image to be recognized are deleted, which can effectively reduce the computing power consumption of the vehicle terminal.

[0070] In one embodiment, optionally, before step 102, the method further includes:

[0071] Determine whether the user's image to be identified contains a human face;

[0072] If the image to be identified includes a human face, then obtain the coordinates of the facial feature points;

[0073] Based on the coordinates of the facial feature points, the image of the face to be identified in the image to be identified is obtained.

[0074] In this embodiment of the invention, optionally, a face detection algorithm is used to perform face detection on the user's image to be identified, in order to determine whether the image to be identified includes a face. The face detection algorithm may be RetinaFace (a single-stage face detection algorithm based on deep learning).

[0075] It should be noted that the step of determining whether the image to be identified contains a face using a face detection algorithm does not involve high-granularity facial feature abstraction. It only needs to determine whether the image to be identified contains a face, and if so, obtain the coordinates of facial feature points (e.g., coordinates of facial features and facial contour boundaries) and the coordinates of the face localization box. Therefore, MobilenetV1-0.5x can be used as the backbone network to reduce the computational load. For example, a three-layer Feature Pyramid Network (FPN) is constructed, extracting 16×16, 8×8, and 4×4 grid classification feature maps from layers C3, C4, and C5 respectively, and fusing spatial and channel attention information through a Single Stage Headless (SSH) context enhancement module.

[0076] The final classification result is output based on the classification feature map combined with a 1×1 convolutional layer. At each anchor point of the classification feature map, it is determined whether the image to be identified includes a face. Non-Maximum Suppression (NMS) is used to eliminate face prediction boxes with a face recognition confidence level lower than the confidence threshold (e.g., 0.75).

[0077] If the image to be identified does not contain a human face, then output a negative sample label, return to the step of obtaining the user's image to be identified, and obtain the next image to be identified.

[0078] If the face prediction box with the highest confidence level in face recognition includes face features, it means that the user's image to be recognized contains a face. In this case, a positive sample label is output, and the coordinates of the face feature points are obtained.

[0079] Furthermore, based on the coordinates of the facial feature points, a face image to be identified is cropped from the image to be identified, and the face is aligned to a standard pose through affine transformation to eliminate rotation and scale differences. It is understood that the face image to be identified is the aligned face image.

[0080] In one embodiment, optionally, the method further includes:

[0081] The image to be identified is extracted from the user's video stream data according to a preset extraction frame rate.

[0082] In this embodiment of the invention, the image to be recognized is extracted from the user's video stream data according to a preset extraction frame rate, thereby reducing the amount of data for face recognition, avoiding the consumption of excessive computing resources due to the large amount of data, improving data processing efficiency, and reducing the processing burden. Optionally, the static image to be recognized is extracted from the user's video stream data at an extraction frame rate of 1 frame every 15 frames.

[0083] When the face recognition method described in this embodiment of the invention is applied to an in-vehicle terminal, that is, when the face recognition method is used for face recognition in the interior environment of a vehicle, the user's video stream data is captured by an in-vehicle recording device. Therefore, it is first ensured that the in-vehicle recording device has been installed and can stably capture the video stream data; then, the real-time video stream data is obtained from the in-vehicle recording device through corresponding interfaces and software libraries such as OpenCV and FFmpeg.

[0084] It should be noted that since the video stream data of in-vehicle recording devices (such as dashcams) is usually at a frame rate of 15 frames, if it is not processed, it will consume a lot of computing resources due to the large amount of data. Therefore, in this embodiment of the invention, the image to be identified is extracted from the user's video stream data according to a preset extraction frame rate.

[0085] Optionally, after extracting the image to be recognized from the user's video stream data according to a preset frame rate, the image to be recognized is resized to match the input size of the face detection algorithm, thereby obtaining the face image to be recognized from the image to be recognized through the face detection algorithm. For example, if the face detection algorithm is Retinaface, the image to be recognized is resized to 640*640 pixels using the Retinaface algorithm, which then serves as the input image for Retinaface.

[0086] Step 103: Obtain the user's face recognition result based on the face recognition similarity threshold and the similarity information.

[0087] In one implementation, optionally, obtaining the user's face recognition result based on the face recognition similarity threshold and the similarity information includes:

[0088] If the similarity between the facial feature to be identified in the similarity information and the first facial feature in the facial feature database is greater than or equal to the facial recognition similarity threshold, then the facial recognition result of the user is obtained as the user identity information corresponding to the first facial feature.

[0089] In this embodiment of the invention, the face feature database includes pre-stored face features of multiple users. The similarity information includes the cosine similarity between the face feature to be identified and each face feature in the face feature database. Here, the cosine similarity is calculated using the following formula (1):

[0090] (1);

[0091] If the cosine similarity between the face feature to be identified and the first face feature in the face feature database is greater than or equal to the face recognition similarity threshold, then it is determined that the face feature to be identified and the first face feature correspond to the same user identity information, and the face recognition result of the user is the user identity information corresponding to the first face feature; if the cosine similarity between the face feature to be identified and the second face feature in the face feature database is less than the face recognition similarity threshold, then it is determined that the face feature to be identified and the second face feature correspond to different user identity information.

[0092] Since the face recognition model in this embodiment of the invention is trained using a circular loss function, the similarity between the face feature to be recognized and the face features in the face feature database can be expressed by the cosine similarity shown in formula (1). Compared with the Euclidean distance when using the triplet loss function, cosine similarity measures the similarity of vector directions, ignores the difference in magnitude, and has a stronger ability to adapt to noise and difficult samples; moreover, the calculation of cosine similarity only requires vector inner product and magnitude normalization, which is more efficient than the square root of the sum of squares of Euclidean distance.

[0093] Figure 2 This is a schematic diagram illustrating the principle of the triplet loss function in an embodiment of the present invention. (Here, in conjunction with...) Figure 2 The triplet loss function is explained below. The optimization goal of the triplet loss function is to train the model so that the distance between samples of the same class in the embedding space is significantly smaller than the distance between samples of different classes, and to ensure that a predefined safe interval is maintained between them. The triplet loss function is shown in the following formula (2):

[0094] (2);

[0095] in, For inter-class similarity; For intra-class similarity; For predefined safety intervals.

[0096] However, this triplet loss function requires manual construction of triplet data, and due to static margin constraints, its recognition accuracy will drop significantly for some highly similar sample pairs, such as "hard samples" with similarity close to the threshold.

[0097] Figure 3 This is a schematic diagram illustrating the principle of the circular loss function in an embodiment of the present invention. (Here, in conjunction with...) Figure 3 The circular loss function is explained below. The circular loss function is shown in formula (3) as follows:

[0098] (3);

[0099] in, For inter-class similarity; For intra-class similarity; , Represented as weighting factors; This is the scaling factor; , This is the similarity interval threshold for positive and negative pairs.

[0100] The circular loss function is achieved by... and Added to each , as well as To control the sensitivity of the loss to similarity, different gradients are applied to optimize inter-class similarity and intra-class similarity, causing the decision boundary to shrink into an arc, such as... Figure 3 As shown. and Give higher weights to “difficult samples” (e.g., samples with low positive similarity or high negative similarity), forcing the model to focus on optimizing these samples.

[0101] Furthermore, the optimization objective of the circular loss function is to maximize the intra-class similarity of positive sample pairs. This aims to make it as close as possible to 1 (the upper bound of cosine similarity) and minimize the inter-class similarity of negative sample pairs. To make it as close as possible to -1 (the lower bound of cosine similarity). When intra-class similarity... Approaching or below the threshold hour, Increase the inter-class similarity, thus forcing the model to optimize the target closer to the sample pair. Approaching or below the threshold hour, This increases the size of the sample pair, thus forcing the model to optimize the target away from that sample pair.

[0102] The circular loss function dynamically adjusts weights based on the real-time similarity of sample pairs, avoiding ineffective optimization of simple samples and enabling more efficient and flexible optimization of "difficult samples" (e.g., samples close to the decision boundary). Furthermore, by using cosine similarity to measure the distance between facial feature vectors, the model focuses more on the directional differences of feature vectors, improving model robustness.

[0103] Therefore, in this embodiment of the invention, the face recognition model uses a circular loss function instead of a triplet loss function during training to optimize the model. Weighted inter-class similarity and intra-class similarity algorithms improve the discrimination flexibility of face recognition and address the problem of imbalanced data distribution. During inference, an adaptive post-processing strategy dynamically adjusts the face recognition similarity threshold for different scenarios, improving face recognition accuracy in various situations. Furthermore, a multi-frame image decision algorithm enhances the model's robustness.

[0104] Figure 4 This is a flowchart illustrating one embodiment of the face recognition method described in this invention. Figure 4 As shown, the method includes:

[0105] Step 401, video stream data processing: First, read video stream data from the vehicle recording device, and obtain the user's image to be identified according to the preset frame extraction rate;

[0106] Step 402, face recognition: Use a face detection algorithm to determine whether the image to be recognized contains a face, and obtain the user's face image to be recognized;

[0107] Step 403, facial feature acquisition: Based on the facial recognition model and the image of the face to be recognized, acquire the user's facial features to be recognized;

[0108] Step 404, facial feature comparison: compare the facial features to be identified with the facial features in the facial feature database to obtain similarity information;

[0109] Step 405: During the training process, the following is performed: circular loss function optimization, and the face recognition model is trained based on the circular loss function;

[0110] Step 406: In the reasoning process, perform similarity matching. If the similarity between the facial feature to be identified and the first facial feature in the facial feature database is greater than or equal to the facial recognition similarity threshold, then the user's facial recognition result is the user identity information corresponding to the first facial feature.

[0111] It should be noted that after step 106, a multi-frame image decision algorithm can be used based on the user's multiple frames of face images to be recognized to obtain the user's final face recognition result.

[0112] In summary, the face recognition method described in this invention uses the light sensor of the vehicle-mounted camera and a pre-set environment classifier to determine the scene type in real time and dynamically sets differentiated face recognition similarity thresholds, thereby reducing the false recognition rate in complex scenes while maintaining the pass rate. The dynamic adjustment of the face recognition similarity threshold requires less than 5% additional computing resources, avoiding the high computing overhead of multi-model switching schemes in existing technologies. Furthermore, by introducing a circular loss function to improve the existing FaceNet loss function, the dynamic adjustment of the margin and adaptive weight allocation characteristics of the circular loss function enable the model to have a more flexible optimization strategy when dealing with extremely long-tailed data (data with a positive-to-negative sample ratio greater than 1:100), solving the problem of significant decision boundary confusion between similar faces.

[0113] Please refer to Figure 5 This invention also provides a face recognition device, comprising:

[0114] The adjustment module 501 is used to obtain a face recognition similarity threshold based on the user's scene information and a preset face recognition similarity threshold adjustment strategy. The face recognition similarity threshold adjustment strategy is used to indicate the face recognition similarity threshold corresponding to different scenes.

[0115] The comparison module 502 is used to obtain similarity information of the user's facial features to be identified based on the facial feature database;

[0116] The recognition module 503 is used to obtain the user's face recognition result based on the face recognition similarity threshold and the similarity information.

[0117] Optionally, in the aforementioned face recognition device, the scene information includes at least one of the following:

[0118] Light intensity information; geographic location information; environmental information; vehicle light information.

[0119] Optionally, in the aforementioned face recognition device, the comparison module 502 includes:

[0120] The acquisition unit is used to acquire the facial features of the user to be identified;

[0121] The comparison unit is used to compare the facial features to be identified with facial features in the facial feature database to obtain the similarity information, which includes the similarity between the facial features to be identified and the facial features.

[0122] Optionally, in the aforementioned face recognition device, the comparison unit is specifically used for:

[0123] Based on the face recognition model and the user's face image to be recognized, the user's face features to be recognized are obtained. The face recognition model is obtained by training based on the circular loss function.

[0124] Optionally, in the aforementioned face recognition device, the recognition module 503 is specifically used for:

[0125] If the similarity between the facial feature to be identified in the similarity information and the first facial feature in the facial feature database is greater than or equal to the facial recognition similarity threshold, then the facial recognition result of the user is obtained as the user identity information corresponding to the first facial feature.

[0126] Optionally, the face recognition device further includes:

[0127] The judgment module is used to determine whether the user's image to be recognized contains a human face;

[0128] The first acquisition module is used to acquire the coordinates of facial feature points if the image to be identified includes a human face.

[0129] The second acquisition module is used to acquire the face image to be identified in the image to be identified based on the coordinates of the face feature points.

[0130] Optionally, the face recognition device further includes:

[0131] The extraction module is used to extract the image to be identified from the user's video stream data according to a preset extraction frame rate.

[0132] It should be noted that the device provided in the embodiments of the present invention can implement all the method steps implemented in the above-described face recognition method embodiments and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail.

[0133] This invention also provides a face recognition device, such as... Figure 6 As shown, it includes:

[0134] The processor 601, memory 602, transceiver 603, and programs or instructions stored in the memory 602 and executable on the processor 601; when the processor 601 executes the programs or instructions, it implements the various processes of the above-described face recognition method embodiments and achieves the same technical effect. To avoid repetition, these will not be described again here.

[0135] The transceiver 603 is used to receive and send data under the control of the processor 601.

[0136] Among them, Figure 6 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically connecting various circuits of one or more processors represented by processor 601 and memory represented by memory 602. The bus architecture can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. Transceiver 603 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. For different user equipment, the user interface 604 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.

[0137] The processor 601 is responsible for managing the bus architecture and general processing, while the memory 602 can store the data used by the processor 601 when performing operations.

[0138] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described face recognition method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0139] This invention also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement the various processes of the above-described face recognition method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0140] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0142] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A face recognition method, characterized in that, include: Based on the user's scene information and a preset face recognition similarity threshold adjustment strategy, a face recognition similarity threshold is obtained. The face recognition similarity threshold adjustment strategy is used to indicate the face recognition similarity threshold corresponding to different scenes. Based on the facial feature database, obtain the similarity information of the user's facial features to be identified; The user's face recognition result is obtained based on the face recognition similarity threshold and the similarity information.

2. The method according to claim 1, characterized in that, The scene information includes at least one of the following: Light intensity information; geographic location information; environmental information; vehicle light information.

3. The method according to claim 1, characterized in that, Based on the facial feature database, the similarity information of the user's facial features to be identified is obtained, including: Obtain the facial features of the user to be identified; The facial features to be identified are compared with facial features in the facial feature database to obtain the similarity information, which includes the similarity between the facial features to be identified and the facial features.

4. The method according to claim 3, characterized in that, Obtaining the user's facial features to be identified includes: Based on the face recognition model and the user's face image to be recognized, the user's face features to be recognized are obtained. The face recognition model is obtained by training based on the circular loss function.

5. The method according to claim 1, characterized in that, Based on the facial recognition similarity threshold and the similarity information, the user's facial recognition result is obtained, including: If the similarity between the facial feature to be identified in the similarity information and the first facial feature in the facial feature database is greater than or equal to the facial recognition similarity threshold, then the facial recognition result of the user is obtained as the user identity information corresponding to the first facial feature.

6. The method according to claim 4, characterized in that, The method further includes: Determine whether the user's image to be identified contains a human face; If the image to be identified includes a human face, then obtain the coordinates of the facial feature points; Based on the coordinates of the facial feature points, the image of the face to be identified in the image to be identified is obtained.

7. The method according to claim 6, characterized in that, The method further includes: The image to be identified is extracted from the user's video stream data according to a preset extraction frame rate.

8. A face recognition device, characterized in that, include: The adjustment module is used to obtain the face recognition similarity threshold based on the user's scene information and the preset face recognition similarity threshold adjustment strategy. The face recognition similarity threshold adjustment strategy is used to indicate the face recognition similarity threshold corresponding to different scenes. The comparison module is used to obtain similarity information of the user's facial features to be identified based on the facial feature database; The recognition module is used to obtain the user's face recognition result based on the face recognition similarity threshold and the similarity information.

9. A facial recognition device, characterized in that, include: A processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the processor, when executing the program or instructions, implements the face recognition method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the face recognition method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the face recognition method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Light-adaptive facial recognition method and system

    CN106295571A

  • Identity re-identification method and device suitable for security and protection monitoring system, and storage medium

    CN115410246A