A face recognition method, device, storage medium, and electronic device

By using an adaptive thresholding method, which combines facial feature similarity and scene information to dynamically adjust the comparison threshold, the problem of setting the face comparison threshold is solved, and the accuracy and adaptability of face recognition are improved.

CN116311405BActive Publication Date: 2026-05-26ZHEJIANG UNIVIEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIVIEW TECH CO LTD
Filing Date
2021-12-20
Publication Date
2026-05-26

Smart Images

  • Figure CN116311405B_ABST
    Figure CN116311405B_ABST
Patent Text Reader

Abstract

This application discloses a face recognition method, apparatus, storage medium, and electronic device. The method includes: calculating the similarity between the facial features of a person to be identified and the facial features of candidate comparison persons to obtain a candidate comparison similarity; selecting candidate comparison persons from a pre-stored database; determining a candidate dynamic comparison threshold condition pre-associated with the candidate comparison persons; wherein the dynamic comparison threshold condition is determined based on the facial identifier of the comparison persons, the comparison similarity, and scene information; if the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition between the person to be identified and the candidate comparison persons is successful. This technical solution, based on an adaptive dynamic comparison threshold for face recognition, can effectively improve the scene adaptability and ease of use of face recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of face recognition technology, and in particular to a face recognition method, device, storage medium and electronic device. Background Technology

[0002] With the maturation of facial recognition algorithms, facial recognition is increasingly being used in security monitoring, access control, and financial payments. Compared to traditional card swiping and password verification methods, facial recognition offers advantages such as ease of use and accurate identification. The final step in facial recognition is face comparison, where the face comparison threshold has a significant impact on the accuracy of the final facial recognition result. Therefore, defining an appropriate face comparison threshold is a question worth exploring.

[0003] Currently, a predefined fixed threshold is used for face comparison, and the comparison threshold is manually adjusted when needed.

[0004] However, manually adjusting the comparison threshold is not user-friendly and it is difficult to manually set the optimal threshold. Summary of the Invention

[0005] This application provides a face recognition method, device, storage medium, and electronic device. Face recognition based on adaptive thresholds can effectively improve the scene adaptability and ease of use of face recognition.

[0006] In a first aspect, embodiments of this application provide a face recognition method, the method comprising:

[0007] The facial features of the person to be identified are compared with the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the pre-stored comparison persons in the database.

[0008] Determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information;

[0009] If the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition of the person to be identified and the candidate comparison person is successful.

[0010] Secondly, embodiments of this application provide a face recognition device, which includes:

[0011] The candidate comparison similarity determination module is used to calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the comparison persons pre-stored in the database.

[0012] The candidate dynamic comparison threshold condition determination module is used to determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information;

[0013] The face recognition determination module is used to determine if the similarity between the candidate comparisons meets the candidate dynamic comparison threshold condition, in which case the face recognition of the person to be identified and the candidate comparison person is successful.

[0014] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the face recognition method as described in embodiments of this application.

[0015] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the face recognition method as described in embodiments of this application.

[0016] The technical solution provided in this application calculates the similarity between the facial features of the person to be identified and the facial features of candidate comparison persons to obtain a candidate comparison similarity. Then, it determines a candidate dynamic comparison threshold condition pre-associated with the candidate comparison persons and judges whether the candidate comparison similarity meets the candidate dynamic comparison threshold condition. If it does, the face recognition between the person to be identified and the candidate comparison persons is successful. This technical solution, based on adaptive dynamic comparison thresholds for face recognition, can effectively improve the scene adaptability and ease of use of face recognition. Attached Figure Description

[0017] Figure 1 This is a flowchart of the face recognition method provided in Embodiment 1 of this application;

[0018] Figure 2 This is a schematic diagram of the face recognition process provided in Embodiment 2 of this application;

[0019] Figure 3 This is a schematic diagram of the face recognition device provided in Embodiment 3 of this application;

[0020] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of this application. Detailed Implementation

[0021] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit its scope. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.

[0022] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0023] Example 1

[0024] Figure 1 This is a flowchart of the face recognition method provided in Embodiment 1 of this application. This embodiment can be applied to the case of face recognition based on adaptive dynamic threshold. The method can be executed by the face recognition device provided in this embodiment. The device can be implemented by software and / or hardware and can be integrated into smart terminals and other devices used for face recognition.

[0025] like Figure 1 As shown, the face recognition method includes:

[0026] S110. Calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the comparison persons pre-stored in the database.

[0027] Facial features are used to characterize feature points in a face image, such as eyes, nose tip, corners of the mouth, eyebrows, and contour points of various facial components. Face images can be acquired using acquisition devices. Optionally, access control devices, cameras, and imaging devices can be used to acquire face images.

[0028] In this embodiment, similarity is used to characterize the degree of similarity between the facial features of different individuals. Similarity can be represented by a range of 0-1, with values ​​closer to 1 indicating a higher degree of similarity in the facial features of the two individuals.

[0029] In this scheme, the person to be identified can refer to the person passing by the data collection device at the current moment.

[0030] The database can be a dynamic face threshold information database, used to store the recognition records of multiple comparison subjects. One or more comparison subjects can be selected from the database as candidate comparison subjects. Preferably, all comparison subjects in the database can be used as candidate comparison subjects. The dynamic face threshold information database can also perform some aging processing based on factors such as time, removing some unsuitable recognition records, such as records that are too old or records that no longer appear in the scene conditions.

[0031] In this scheme, conventional technical methods can be used to calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison person, thus obtaining the candidate comparison similarity. For example, deep learning algorithms can be used to calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison person. This embodiment does not impose specific limitations.

[0032] S120. Determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information;

[0033] The dynamic comparison threshold condition can refer to the comparison threshold in the face recognition process. For example, the dynamic comparison threshold condition can be set to 0.9.

[0034] In this embodiment, a face identifier is used to represent the identity of the person being compared in the database, and each person being compared corresponds to a face identifier. The face identifier can be represented in the form of letters, numbers, or strings.

[0035] Among them, the comparison similarity is used to characterize the degree of similarity of the facial features of the compared individuals. The comparison similarity can be calculated during the process of facial recognition of the compared individuals.

[0036] In this scheme, scene information is used to characterize the scene in which the person being compared is located. This includes date, time, image brightness, image dynamic range, and image sharpness. The dynamic comparison threshold conditions for the person being compared can be adjusted by combining scene information, making the face recognition scene adaptability more advanced.

[0037] In this scheme, target recognition records of candidate comparison personnel can be determined in the database based on the target face identifiers of the candidate comparison personnel. The candidate dynamic comparison threshold conditions are then determined based on the average, maximum, and minimum similarity values ​​of all target comparisons in the target recognition records. Furthermore, the candidate dynamic comparison threshold conditions can also be determined based on target scene information in the target recognition records.

[0038] S130. If the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition of the person to be identified and the candidate comparison person is successful.

[0039] In this scheme, the candidate similarity is compared with the candidate dynamic comparison threshold. If the candidate similarity is greater than or equal to the candidate dynamic comparison threshold, the candidate similarity meets the candidate dynamic comparison threshold, and the face recognition between the person to be identified and the candidate person is successful. If the candidate similarity is less than the candidate dynamic comparison threshold, the candidate similarity does not meet the candidate dynamic comparison threshold, and the face recognition between the person to be identified and the candidate person fails.

[0040] In this embodiment, if multiple candidate individuals exist, multiple candidate dynamic comparison threshold conditions can be determined. Then, the candidate comparison similarity is sequentially compared with these multiple candidate dynamic comparison threshold conditions, and the resulting comparison results are placed into a valid comparison result set until all comparisons are completed. If the valid comparison result set is empty, the comparison fails, indicating that the face recognition between the person to be identified and the candidate individuals has failed. If the valid comparison result set is not empty, the comparison result with the highest candidate comparison similarity is selected as the comparison result for the person to be identified. After determining the comparison result, the candidate comparison similarity of the person to be identified and the current scene information are saved to the target recognition record of the candidate individual with the highest matching degree.

[0041] The technical solution provided in this application calculates the similarity between the facial features of the person to be identified and the facial features of candidate comparison persons to obtain a candidate comparison similarity. Then, it determines a candidate dynamic comparison threshold condition pre-associated with the candidate comparison persons and judges whether the candidate comparison similarity meets the candidate dynamic comparison threshold condition. If it does, the face recognition between the person to be identified and the candidate comparison persons is successful. By implementing this technical solution, face recognition can be performed based on an adaptive dynamic comparison threshold, effectively improving the scene adaptability and ease of use of face recognition.

[0042] Example 2

[0043] Figure 2 This is a schematic diagram of the face recognition process provided in Embodiment 2 of this application. Embodiment 2 is a further optimization based on Embodiment 1. Specifically, the optimization includes: determining the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel, including: determining the target recognition records associated with the target face identifier in the database based on the target face identifier of the candidate comparison personnel; if the target recognition records meet the record count condition, determining the average, maximum, and minimum values ​​of the target comparison similarity in the target recognition records; and determining the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel based on the average, maximum, and minimum values. For details not described in this embodiment, please refer to Embodiment 1.

[0044] like Figure 2 As shown, the method includes the following steps:

[0045] S210. Calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the comparison persons pre-stored in the database.

[0046] S220. Based on the target face identifier of the candidate comparison personnel, determine the target recognition record in the database associated with the target face identifier;

[0047] The target recognition record includes the target face identifier, target similarity comparison, and target scene information.

[0048] In this scheme, a new success record is generated after each successful person identification, recording the person's facial identifier, similarity score, and scene information. After identifying candidate persons for comparison, the database is traversed to retrieve target identification records associated with the target facial identifiers of the candidate persons.

[0049] S230. If the target identification record meets the record number condition, then determine the average, maximum, and minimum values ​​of the target comparison similarity in the target identification record;

[0050] The record count condition is used to characterize the threshold number of records to be identified. For example, the record count condition can be set to 100. The record count condition can be set based on experimental data or empirical data.

[0051] In this scheme, when the number of target identification records exceeds the record count requirement, the target identification records meet the record count requirement. Then, all target similarity scores from the target identification records are read. The average value of the target similarity scores is calculated, and the maximum and minimum values ​​of the target similarity scores are determined.

[0052] S240. Based on the average value, maximum value and minimum value, determine the candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel;

[0053] In this scheme, if the difference between the average value and the maximum and minimum values ​​is less than or equal to the preset threshold, it indicates that the target comparison similarity of the candidate comparison personnel fluctuates within a small range. In this case, the average value of the target comparison similarity can be used as the candidate dynamic comparison threshold condition. If the difference between the average value and the maximum and minimum values ​​is greater than the preset threshold, it indicates that the target comparison similarity of the candidate comparison personnel fluctuates within a large range. In this case, it is necessary to determine the candidate dynamic comparison threshold condition based on the target scene information of the candidate comparison personnel.

[0054] In this technical solution, optionally, based on the average, maximum, and minimum values, a candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel is determined, including:

[0055] If the difference between the average value and the maximum value satisfies the threshold condition, and the difference between the average value and the minimum value satisfies the threshold condition, then the average value is used as the dynamic threshold.

[0056] If the difference between the average value and the maximum value does not meet the threshold condition, and / or the difference between the average value and the minimum value does not meet the threshold condition, then at least two dynamic thresholds are determined based on the target scene information in the target recognition record.

[0057] Based on the dynamic threshold, determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel.

[0058] Among them, the dynamic threshold is used to characterize the comparison threshold in the face recognition process.

[0059] The threshold condition is used to characterize the fluctuation range of the similarity between candidate individuals and the target, and can be set according to the accuracy requirements of face recognition. For example, the threshold condition can be set to 0.1, meaning that when the difference between the average and the maximum value is less than or equal to 0.1, the difference between the average and the minimum value satisfies the threshold condition; when the difference between the average and the maximum value is greater than 0.1, the difference between the average and the maximum value does not satisfy the threshold condition; and when the difference between the average and the minimum value is greater than 0.1, the difference between the average and the minimum value does not satisfy the threshold condition.

[0060] In this embodiment, if the difference between the average and the maximum value of the target comparison similarity of the candidate comparison personnel meets the threshold condition, and the difference between the average and the minimum value meets the threshold condition, then the average value of the target comparison similarity can be used as the dynamic threshold.

[0061] In this scheme, if the difference between the average and maximum similarity scores of the candidate comparison personnel does not meet the threshold condition, and / or the difference between the average and minimum similarity scores does not meet the threshold condition, then based on the target scene information in the target recognition records of the candidate comparison personnel, the target similarity scores in the target recognition records are divided into multiple scenes, where the target similarity scores within the same scene are relatively close. For example, if the target similarity scores are 0.9, 0.85, 0.6, and 0.65, then 0.9 and 0.85 can be classified as the same scene, and 0.6 and 0.65 can be classified as the same scene.

[0062] In this embodiment, after dividing the targets with relatively close similarity into multiple scenarios, the average, maximum and minimum values ​​of the target similarity are calculated for different scenarios, and at least two dynamic thresholds are determined based on the average, maximum and minimum values.

[0063] In this embodiment, clustering algorithms can be used to group targets with similar alignment similarities into one class, and the mean of the alignment similarities in the same class can be calculated. The mean of the alignment similarities can then be used as a dynamic threshold.

[0064] In this scheme, the dynamic threshold can be increased or decreased within a certain range, and the adjusted dynamic threshold can be used as the candidate dynamic comparison threshold condition for pre-association with candidate comparison personnel.

[0065] By setting different dynamic thresholds, face recognition can be performed based on adaptive thresholds, thereby improving the accuracy of face recognition.

[0066] In this technical solution, optionally, the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel are determined based on the dynamic threshold, including:

[0067] Determine the current scene information of the person to be identified;

[0068] The current scene information is matched with the target scene information of the candidate comparison personnel to obtain a matching value;

[0069] If the matching value meets the scene matching degree condition, then the candidate dynamic comparison threshold condition is determined according to the dynamic threshold and the predetermined boundary value; wherein, the boundary value is used to characterize the fluctuation range of the dynamic comparison threshold.

[0070] The current scene information of the person to be identified can also be collected using the data acquisition device.

[0071] In this embodiment, the matching value is used to characterize the degree of matching between the scene information of the person to be identified and the scene information of the candidate person to be compared. Similarly, the matching value between the scene information of the person to be identified and the scene information of the candidate person to be compared can be calculated using a deep learning algorithm.

[0072] The scene matching condition is a threshold used to characterize scene information matching, and it can be set according to the accuracy of face recognition. For example, the scene matching condition can be set to 90%.

[0073] In this scheme, the candidate comparison personnel include multiple target scene information. The current scene information is matched with the target scene information to obtain multiple matching values. If the matching value is greater than the matching threshold, that is, the matching value meets the scene matching degree condition, the dynamic threshold and boundary value corresponding to the target scene information with the highest matching degree are subtracted to obtain the candidate dynamic comparison threshold condition.

[0074] Face recognition is achieved based on dynamic thresholds, which effectively improves the scene adaptability and ease of use of face recognition.

[0075] In this technical solution, optionally, after matching the current scene information with the target scene information of the candidate comparison personnel to obtain a matching value, the method further includes:

[0076] If the matching value does not meet the scene matching degree condition, then the candidate dynamic matching threshold condition is determined according to the pre-determined static comparison threshold and boundary value.

[0077] The static comparison threshold, used to characterize the comparison threshold in the face recognition process, is calculated based on the similarity between positive and negative test sample individuals in the database. Positive test sample individuals are those from the database, while negative test sample individuals are those from other databases.

[0078] In this scheme, if the matching value is less than or equal to the matching threshold, it means that the matching value does not meet the scene matching degree condition. At this time, the current scene information does not match the target scene information. Then, the static comparison threshold is subtracted from the boundary value to obtain the candidate dynamic comparison threshold condition.

[0079] Even when scene information does not match, face recognition can still be performed based on static comparison thresholds, thus improving the pass rate of face recognition.

[0080] In this technical solution, optionally, candidate dynamic comparison threshold conditions are determined based on predetermined static comparison thresholds and boundary values, including:

[0081] An initial static comparison threshold is determined based on the similarity of the negative test sample personnel and the predetermined baseline false recognition rate; wherein, the baseline false recognition rate is used to characterize the error range of face recognition.

[0082] The initial face recognition rate is determined based on the initial static comparison threshold and the comparison similarity of the positive test sample personnel.

[0083] If the initial face recognition rate meets the recognition conditions, then the initial static comparison threshold is used as the static comparison threshold.

[0084] If the initial face recognition rate does not meet the recognition conditions, the following steps are executed repeatedly: reduce the initial static comparison threshold, determine the target face recognition rate based on the comparison similarity between the reduced initial static comparison threshold and the positive test sample personnel, until the target face recognition rate meets the recognition conditions, and use the reduced initial static comparison threshold as the static comparison threshold.

[0085] Subtracting the static comparison threshold from the boundary value yields the candidate dynamic comparison threshold conditions.

[0086] In this scheme, negative test samples are used to traverse the database, calculating the similarity score for each negative test sample. Since the negative test sample individuals are not in the database, the similarity score for each negative test sample should be less than the comparison threshold. Because a certain degree of error is permissible in face recognition, the comparison threshold can be adjusted based on a predefined baseline false recognition rate, and this adjusted threshold can be used as the initial static comparison threshold. For example, if the similarity scores of the negative test sample individuals are 0.9, 0.8, 0.7, and 0.6, the comparison threshold should be set greater than 0.9. Since a certain degree of error is permissible, the initial static comparison threshold can be set to 0.89.

[0087] The initial personnel identification rate is used to characterize the probability that all personnel in the positive test sample are identified.

[0088] In this scheme, the recognition condition is a comparison threshold used to characterize the probability of a person in the positive test sample being recognized. It can be set according to the face recognition accuracy requirements. For example, the recognition condition can be set to 98%, that is, if the calculated initial person recognition rate is greater than or equal to 98%, the initial face recognition rate meets the recognition condition; if the initial person recognition rate is less than 98%, the initial face recognition rate does not meet the recognition condition.

[0089] In this embodiment, since the positive test sample personnel are those in the database, each positive test sample personnel should be identified, meaning the similarity of each positive test sample personnel should be greater than the initial static comparison threshold. The database is traversed using positive test samples, and the similarity of each positive test sample personnel is calculated. This similarity is then compared with the initial static comparison threshold to obtain the initial face recognition rate.

[0090] In this scheme, if the initial face recognition rate meets the recognition conditions, the initial static comparison threshold can be used as the static comparison threshold. If the initial personnel recognition rate does not meet the recognition requirements, the initial static comparison threshold is reduced until the proportion of all positive test sample personnel whose similarity is greater than the adjusted initial static comparison threshold meets the recognition conditions, and the adjusted initial static comparison threshold is used as the static comparison threshold.

[0091] The system calculates static comparison thresholds and maintains a dynamic face threshold information database based on real-time recognition records. Adaptive threshold face recognition is achieved by combining static comparison thresholds, dynamic face threshold information databases, and current scene information, effectively improving the scene adaptability of face recognition and enhancing the ease of project deployment.

[0092] In this technical solution, optionally, after determining the target recognition record associated with the target face identifier in the database based on the target face identifier of the candidate comparison person, the method further includes:

[0093] If the target identification record does not meet the record count condition, then the candidate dynamic comparison threshold condition is determined according to the predetermined static comparison threshold and boundary value.

[0094] In this scheme, when the number of target recognition records is less than or equal to the record count condition, that is, the number of target recognition records does not meet the record count condition, it means that the recognition record corresponding to the person to be identified in the dynamic face threshold information database has not met the record condition, or the person to be identified is a newly added face. At this time, the static comparison threshold is subtracted from the boundary value to determine the candidate comparison threshold condition.

[0095] It can perform face recognition based on adaptive dynamic comparison thresholds, which effectively improves the scene adaptability and ease of use of face recognition.

[0096] S250. If the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition of the person to be identified and the candidate comparison person is successful.

[0097] In this embodiment, if the person to be identified is a newly added face, after successful identification, a new face identifier is set for the person to be identified, and the face identifier of the person to be identified, the candidate comparison similarity, and the current scene information are stored in the database to generate an identification record.

[0098] The technical solution provided in this application calculates the similarity between the facial features of the person to be identified and the facial features of candidate comparison persons to obtain a candidate comparison similarity. Then, based on the target face identifier of the candidate comparison persons, it determines the target recognition records associated with the target face identifier in the database. If the number of target recognition records meets the record count requirement, it determines the average, maximum, and minimum values ​​of the target comparison similarity in the target recognition records. Based on the average, maximum, and minimum values, it determines the candidate dynamic comparison threshold condition pre-associated with the candidate comparison persons and judges whether the candidate comparison similarity meets the candidate dynamic comparison threshold condition. If it does, the face recognition between the person to be identified and the candidate comparison persons is successful. By implementing this technical solution, face recognition can be performed based on an adaptive dynamic comparison threshold, effectively improving the scene adaptability and ease of use of face recognition.

[0099] Example 3

[0100] Figure 3 This is a schematic diagram of the face recognition device provided in Embodiment 3 of this application, as shown below. Figure 3 As shown, the facial recognition device includes:

[0101] The candidate comparison similarity determination module 310 is used to calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the comparison persons pre-stored in the database.

[0102] The candidate dynamic comparison threshold condition determination module 320 is used to determine the candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold condition is determined based on the face identifier of the comparison personnel, the comparison similarity and scene information;

[0103] The face recognition determination module 330 is used to determine if the similarity of the candidate comparison meets the candidate dynamic comparison threshold condition, and then the face recognition of the person to be identified and the candidate comparison person is successful.

[0104] In this technical solution, optionally, the candidate dynamic comparison threshold condition determination module 320 includes:

[0105] The target recognition record determination submodule is used to determine the target recognition record associated with the target face identifier in the database based on the target face identifier of the candidate comparison person;

[0106] The target comparison similarity calculation submodule is used to determine the average, maximum, and minimum values ​​of the target comparison similarity in the target identification record if the target identification record meets the record number condition;

[0107] The candidate dynamic comparison threshold condition determination submodule is used to determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel based on the average value, maximum value and minimum value.

[0108] In this technical solution, the optional candidate dynamic comparison threshold condition determination submodule includes:

[0109] The threshold condition satisfaction unit is used to use the average value as a dynamic threshold if the difference between the average value and the maximum value satisfies the threshold condition, and the difference between the average value and the minimum value satisfies the threshold condition.

[0110] The threshold condition not satisfied unit is used to determine at least two dynamic thresholds based on the target scene information in the target recognition record if the difference between the average value and the maximum value does not satisfy the threshold condition, and / or the difference between the average value and the minimum value does not satisfy the threshold condition.

[0111] The candidate dynamic comparison threshold condition determination unit is used to determine the candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel based on the dynamic threshold.

[0112] In this technical solution, the optional candidate dynamic comparison threshold condition determination unit includes:

[0113] The current scene information determination subunit is used to determine the current scene information of the person to be identified;

[0114] The matching value sub-unit is used to match the current scene information with the target scene information of the candidate comparison person to obtain the matching value;

[0115] The matching value conforms to the sub-unit, which is used to determine the candidate dynamic comparison threshold condition based on the dynamic threshold and the predetermined boundary value if the matching value meets the scene matching degree condition; wherein, the boundary value is used to characterize the fluctuation range of the dynamic comparison threshold.

[0116] In this technical solution, the optional candidate dynamic comparison threshold condition determination unit further includes:

[0117] The matching value does not meet the sub-unit, which is used to determine the candidate dynamic comparison threshold condition based on the pre-determined static comparison threshold and boundary value if the matching value does not meet the scene matching degree condition.

[0118] In this technical solution, optionally, the candidate dynamic comparison threshold condition determination module 320 further includes:

[0119] The candidate dynamic comparison threshold condition determination submodule is used to determine the candidate dynamic comparison threshold condition based on the pre-determined static comparison threshold and boundary value if the target identification record does not meet the record number condition.

[0120] In this technical solution, optionally, the matching value does not match the sub-unit, specifically used for:

[0121] An initial static comparison threshold is determined based on the similarity of the negative test sample personnel and the predetermined baseline false recognition rate; wherein, the baseline false recognition rate is used to characterize the error range of face recognition.

[0122] The initial face recognition rate is determined based on the initial static comparison threshold and the comparison similarity of the positive test sample personnel.

[0123] If the initial face recognition rate meets the recognition conditions, then the initial static comparison threshold is used as the static comparison threshold.

[0124] If the initial face recognition rate does not meet the recognition conditions, the following steps are executed repeatedly: reduce the initial static comparison threshold, determine the target face recognition rate based on the comparison similarity between the reduced initial static comparison threshold and the positive test sample personnel, until the target face recognition rate meets the recognition conditions, and use the reduced initial static comparison threshold as the static comparison threshold.

[0125] Subtracting the static comparison threshold from the boundary value yields the candidate dynamic comparison threshold conditions.

[0126] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods.

[0127] Example 4

[0128] This application embodiment also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a face recognition method, the method comprising:

[0129] The facial features of the person to be identified are compared with the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the pre-stored comparison persons in the database.

[0130] Determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information;

[0131] If the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition of the person to be identified and the candidate comparison person is successful.

[0132] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a computer system in which a program is executed, or it may reside in a different second computer system connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) that can be executed by one or more processors.

[0133] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the face recognition operation described above, but can also perform related operations in the face recognition method provided in any embodiment of this application.

[0134] Example 5

[0135] This application provides an electronic device that can integrate the face recognition device provided in this application. Figure 4This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of this application. Figure 4 As shown, this embodiment provides an electronic device 400, which includes: one or more processors 420; and a storage device 410 for storing one or more programs. When the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement the face recognition method provided in this embodiment, the method including:

[0136] The facial features of the person to be identified are compared with the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the pre-stored comparison persons in the database.

[0137] Determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information;

[0138] If the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition of the person to be identified and the candidate comparison person is successful.

[0139] Of course, those skilled in the art will understand that the processor 420 also implements the technical solutions of the face recognition method provided in any embodiment of this application.

[0140] Figure 4 The electronic device 400 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0141] like Figure 4 As shown, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the electronic device can be one or more. Figure 4 Taking a processor 420 as an example; the processor 420, storage device 410, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 4 For example, China and Israel are connected via bus 450.

[0142] Storage device 410, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to the face recognition method in the embodiments of this application.

[0143] Storage device 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, storage device 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, storage device 410 may further include memory remotely located relative to processor 420, which can be connected via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0144] Input device 430 can be used to receive input digital, character, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 440 may include electronic devices such as a display screen and a speaker.

[0145] The electronic device provided in this application embodiment can achieve face recognition based on adaptive dynamic comparison threshold, effectively improving the scene adaptability and ease of use of face recognition.

[0146] The face recognition device, storage medium, and electronic device provided in the above embodiments can execute the face recognition method provided in any embodiment of this application, and have the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the above embodiments can be found in the face recognition method provided in any embodiment of this application.

[0147] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.

Claims

1. A face recognition method, characterized in that, include: The facial features of the person to be identified are compared with the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the pre-stored comparison persons in the database. Determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information; If the candidate comparison similarity meets the candidate dynamic comparison threshold condition, then the face recognition of the person to be identified and the candidate comparison person is successful. The conditions for determining the candidate dynamic comparison threshold pre-associated with the candidate comparison personnel include: Based on the target face identifier of the candidate comparison person, determine the target recognition record in the database that is associated with the target face identifier; If the target identification record meets the record count condition, then the average, maximum, and minimum values ​​of the target comparison similarity in the target identification record are determined; If the difference between the average value and the maximum value satisfies the threshold condition, and the difference between the average value and the minimum value satisfies the threshold condition, then the average value is used as the dynamic threshold. If the difference between the average value and the maximum value does not meet the threshold condition, and / or the difference between the average value and the minimum value does not meet the threshold condition, then the target comparison similarity in the target recognition record is divided into multiple scenes according to the target scene information in the target recognition record of the candidate comparison personnel, and the mean of the target comparison similarity in the same scene is calculated, and the mean of the target comparison similarity is used as the dynamic threshold. Based on the dynamic threshold, determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; The scene information is used to characterize the scene in which the person being compared is located when the comparison is made; it includes date, time, image brightness, image dynamic range, and image sharpness. The step of determining the candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel based on the dynamic threshold includes: Determine the current scene information of the person to be identified; The current scene information is matched with the target scene information of the candidate comparison personnel to obtain a matching value; If the matching value meets the scene matching degree condition, then the candidate dynamic comparison threshold condition is determined according to the dynamic threshold and the predetermined boundary value; wherein, the boundary value is used to characterize the fluctuation range of the dynamic comparison threshold.

2. The method according to claim 1, characterized in that, After matching the current scene information with the target scene information of the candidate comparison person to obtain a matching value, the method further includes: If the matching value does not meet the scene matching degree condition, then the candidate dynamic matching threshold condition is determined according to the pre-determined static comparison threshold and boundary value.

3. The method according to claim 1, characterized in that, After determining the target recognition record in the database associated with the target face identifier based on the target face identifier of the candidate comparison person, the method further includes: If the target identification record does not meet the record count condition, then the candidate dynamic comparison threshold condition is determined according to the predetermined static comparison threshold and boundary value.

4. The method according to claim 2 or 3, characterized in that, Based on predetermined static alignment thresholds and boundary values, candidate dynamic alignment threshold conditions are determined, including: An initial static comparison threshold is determined based on the comparison similarity of negative test sample personnel and a predetermined baseline false recognition rate; wherein, the baseline false recognition rate is used to characterize the error range of face recognition. The initial face recognition rate is determined based on the initial static comparison threshold and the comparison similarity of the positive test sample personnel. If the initial face recognition rate meets the recognition conditions, then the initial static comparison threshold is used as the static comparison threshold. If the initial face recognition rate does not meet the recognition conditions, the following steps are executed repeatedly: reduce the initial static comparison threshold, determine the target face recognition rate based on the comparison similarity between the reduced initial static comparison threshold and the positive test sample personnel, until the target face recognition rate meets the recognition conditions, and use the reduced initial static comparison threshold as the static comparison threshold. Subtracting the static comparison threshold from the boundary value yields the candidate dynamic comparison threshold conditions.

5. A face recognition device, characterized in that, include: The candidate comparison similarity determination module is used to calculate the similarity between the facial features of the person to be identified and the facial features of the candidate comparison persons to obtain the candidate comparison similarity; the candidate comparison persons are selected from the comparison persons pre-stored in the database. The candidate dynamic comparison threshold condition determination module is used to determine the candidate dynamic comparison threshold conditions pre-associated with the candidate comparison personnel; wherein, the dynamic comparison threshold conditions are determined based on the facial identifier of the comparison personnel, the comparison similarity, and scene information; The face recognition determination module is used to determine if the similarity of the candidate comparison meets the candidate dynamic comparison threshold condition, and then the face recognition of the person to be identified and the candidate comparison person is successful. The candidate dynamic comparison threshold condition determination module includes: The target recognition record determination submodule is used to determine the target recognition record in the database associated with the target face identifier based on the target face identifier of the candidate comparison person; The target comparison similarity calculation submodule is used to determine the average, maximum, and minimum values ​​of the target comparison similarity in the target identification record if the target identification record meets the record number condition; The candidate dynamic comparison threshold condition determination submodule is used to determine the candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel based on the average value, maximum value and minimum value; The candidate dynamic comparison threshold condition determination submodule includes: The threshold condition satisfaction unit is used to use the average value as a dynamic threshold if the difference between the average value and the maximum value satisfies the threshold condition, and the difference between the average value and the minimum value satisfies the threshold condition. The threshold condition not satisfied unit is used to divide the target comparison similarity in the target identification record into multiple scenes according to the target scene information in the target identification record of the candidate comparison personnel, and calculate the mean of the target comparison similarity in the same scene if the difference between the average value and the maximum value does not satisfy the threshold condition, and / or the difference between the average value and the minimum value does not satisfy the threshold condition, and use the mean of the target comparison similarity as the dynamic threshold. The candidate dynamic comparison threshold condition determination unit is used to determine the candidate dynamic comparison threshold condition pre-associated with the candidate comparison personnel based on the dynamic threshold. The scene information is used to characterize the scene in which the person being compared is located when the comparison is made; it includes date, time, image brightness, image dynamic range, and image sharpness. The candidate dynamic comparison threshold condition determination unit includes: The current scene information determination subunit is used to determine the current scene information of the person to be identified; The matching value sub-unit is used to match the current scene information with the target scene information of the candidate comparison person to obtain the matching value; The matching value conforms to the sub-unit, which is used to determine the candidate dynamic comparison threshold condition based on the dynamic threshold and the predetermined boundary value if the matching value meets the scene matching degree condition; wherein, the boundary value is used to characterize the fluctuation range of the dynamic comparison threshold.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the face recognition method as described in any one of claims 1-4.

7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the face recognition method as described in any one of claims 1-4.