WO2017162076A1 - Face identification method and system - Google Patents

Face identification method and system Download PDF

Info

Publication number
WO2017162076A1
WO2017162076A1 PCT/CN2017/076723 CN2017076723W WO2017162076A1 WO 2017162076 A1 WO2017162076 A1 WO 2017162076A1 CN 2017076723 W CN2017076723 W CN 2017076723W WO 2017162076 A1 WO2017162076 A1 WO 2017162076A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
similarity
face feature
feature template
face
Prior art date
Application number
PCT/CN2017/076723
Other languages
French (fr)
Chinese (zh)
Inventor
陈�胜
Original Assignee
北京握奇数据股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京握奇数据股份有限公司 filed Critical 北京握奇数据股份有限公司
Publication of WO2017162076A1 publication Critical patent/WO2017162076A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/179Human faces, e.g. facial parts, sketches or expressions metadata assisted face recognition

Definitions

  • the invention belongs to the field of biometrics, and particularly relates to a face recognition method and system.
  • Face recognition is a very challenging research topic, especially for face recognition under unconstrained conditions. Under different lighting, posture, expression, age, makeup, etc., shooting the same person's face image is very different. How to effectively overcome the effects of these unfavorable factors is crucial for face recognition. In general, the impact of adverse factors on face recognition can be overcome in two ways.
  • the feature extraction process of face recognition is optimized: appropriate features are extracted from the face image, which should be intra-class changes of the same person while effectively depicting the inter-class differences between different people (intra-class Difference) has strong stability; on the other hand, it optimizes the feature template matching process of face recognition: the feature templates of two or more sets of face images that need to be compared are input into an appropriate classifier for comparison, A good classifier can further expand the distance between different people's face feature templates, reduce the distance between different face image feature templates of the same person, and better discriminate whether the two sets of face images are from the same person. In the case that the feature extraction process has been perfected, the optimization feature template comparison process can still greatly improve the recognition accuracy of the entire face recognition system.
  • the face recognition system can be divided into a single template comparison system and a multiple template comparison system.
  • the use of multiple template alignment techniques in a face recognition system can significantly improve recognition accuracy compared to a single template alignment system.
  • one solution is to use the average similarity as the decision basis for the feature template comparison.
  • user A registers k feature templates X A1 , X A2 , . . . , X Ak in the face recognition system, and the similarity between the feature template Y of the face image to be recognized and the k feature templates is S A1 .
  • the scheme averages the similarity of the multi-template alignment, and the distribution of the similarity after the average is more concentrated. It is easy to cause the FRY of the face recognition to increase compared with the single template. Another solution is to use maximum similarity as the basis for decision making of feature template comparisons.
  • the maximum value of the similarity S A1 , S A2 , . . . , S Ak of the feature template Y of the face image to be recognized and the k feature templates is set to S A , if S A is greater than or equal to a preset
  • the feature template compares the similarity threshold S 0 , and determines that the user in the face image corresponding to Y is the same person as A; if S A is smaller than the threshold S 0 , it determines the user in the face image corresponding to Y A is not the same person.
  • the similarity of the multi-template alignment is maximized.
  • the maximum similarity of multiple template comparisons between different people will be more similar than the single template comparison. It is easier to misjudge different people. For the same person, the false positive rate of face recognition, that is, the false acceptance rate FAR rises when compared with the single template.
  • an object of the present invention is to provide a face recognition method and system, by which the accuracy of face recognition can be effectively improved.
  • a face recognition method includes the following steps:
  • the face feature template library stores N user face feature templates and user basic information, each user corresponding to at least one face feature template; wherein, N ⁇ 1;
  • the maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a user refers to the face feature template to be identified and the user's location. The average of the similarities of the face feature templates;
  • the maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library
  • the average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
  • step 3 Obtain the maximum value MAX Max in S Max1 , S Max2 ,..., S MaxN , and judge according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum value MAX Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , if yes, the recognition ends, and if not, proceeds to step 3;
  • step 2 and step 3 according to the face feature template of a user in the face feature template library and the face feature template to be recognized, it is determined whether the user to be identified is a
  • the way to describe a user includes:
  • step 3 2) determining whether the maximum similarity S MaxA is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified is the user, and if not, proceeding to step 3);
  • step 4 judging whether k ⁇ K S is satisfied, if yes, proceeding to step 4), if not, determining that the user to be identified is not the user; wherein K S is a positive integer, K S >1;
  • step 4 if the average similarity S AvgA ⁇ S avg , before the prompt recognition fails, the method further includes:
  • the method further includes the steps of determining the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min , and the determining manner is:
  • a. Construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
  • the false positive rate threshold, the second false positive rate threshold, and the third false positive rate threshold are greater than the first when N>1, respectively.
  • the embodiment of the invention further provides a face recognition system, comprising:
  • a template library building module configured to construct a face feature template library, where the face feature template library stores N user face feature templates and user basic information, and each user corresponds to at least one face feature template; N ⁇ 1;
  • a feature extraction module to be used for extracting a face feature in a face image of the user to be identified, and obtaining a face feature template to be recognized
  • a face recognition module configured to perform identification of the user to be identified according to the face feature template to be identified and the face feature template library;
  • the face recognition module includes:
  • a first similarity calculation unit configured to respectively calculate a similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, to obtain a face feature template and a face feature to be recognized The maximum similarity and average similarity of each user in the template library;
  • the maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a certain user refers to an average value of the similarity between the face feature template to be identified and all the face feature templates of the user;
  • the maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library
  • the average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
  • the first face recognition unit is configured to obtain a maximum value MAX Max in S Max1 , S Max2 , . . . , S MaxN , and a facial feature template of the user in the face feature template library corresponding to the maximum value MAX Max
  • the recognized face feature template determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends; if not, the second face recognition unit is entered;
  • a second face recognition unit configured to acquire a maximum value AVG Max in S Avg1 , S Avg2 , . . . , S AvgN , according to a face feature template of the user in the face feature template library corresponding to the maximum value AVG Max
  • the recognized face feature template determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
  • a face recognition system as described above, there are k face feature templates of the user in the face feature template library, and the face feature template to be recognized is similar to the k face feature template.
  • the degrees are S A1 , S A2 , ..., S Ak ;
  • the first face recognition unit and the second face recognition unit each include:
  • the average similarity calculating sub-unit for taking the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., the average value of S Ak , get the average similarity S AvgA ;
  • a first identifying subunit configured to determine whether the maximum similarity S MaxA is greater than or equal to a preset maximum similarity threshold S max , and if yes, determining that the user to be identified is the user, and if not, entering the second identifier unit;
  • a second identification subunit configured to determine whether k ⁇ K S is satisfied, and if yes, proceeds to step third identification subunit, and if not, determines that the user to be identified is not the user; wherein K S is a positive integer, K S >1;
  • a third identifying subunit configured to determine whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, determining that the user is to be identified The user is not the user.
  • the third identification subunit further includes:
  • a face recognition system as described above, the system further comprising:
  • the similarity confirmation module includes:
  • the test library building unit is configured to construct a face image test library, wherein the face image of the H person is stored in the test library, and the number of face images of each person is one;
  • sub-library building unit for randomly selecting J images from each person's I face images to form a sub-library P, and all remaining images constitute a sub-library G;
  • a sub-library grouping unit which divides a face image of each person in the sub-library G into K groups, and obtains an H ⁇ K group image
  • a second similarity calculation unit configured to calculate, for each image P′ in the H ⁇ J images in the sub-library P, each image of the image P′ and the sub-library G other than the user to which the image P′ belongs
  • the maximum similarity, the minimum similarity and the average similarity are obtained as H ⁇ J ⁇ (H-1) ⁇ K maximum similarities, H ⁇ J ⁇ (H-1) ⁇ K minimum similarities and H ⁇ J ⁇ (H-1) ⁇ K average similarities;
  • a similarity threshold determining unit configured to arrange the H ⁇ J ⁇ (H ⁇ 1 ⁇ K maximum similarities, the minimum similarity, and the average similarity in descending order, respectively, in an order of H ⁇ J ⁇ ( H-1) ⁇ K maximum similarities, the ratio of the position number to H ⁇ J ⁇ (H-1) ⁇ K is equal to the preset first misrecognition rate threshold, the maximum similarity is the maximum similarity threshold S max Taking the ratio of the position number of H ⁇ J ⁇ (H-1) ⁇ K average similarities to H ⁇ J ⁇ (H-1) ⁇ K equal to the average similarity of the preset second misrecognition rate threshold is average Similarity threshold S avg ; taking H ⁇ J ⁇ (H-1) ⁇ K minimum similarities, the ratio of the position number to H ⁇ J ⁇ (H-1) ⁇ K is equal to the preset third misrecognition rate threshold The minimum similarity is the minimum similarity threshold S min .
  • the invention has the beneficial effects that the face recognition method provided by the present invention comprehensively utilizes the maximum similarity and average similarity between the face feature template to be recognized and the face feature template of the user in the template library, or the maximum similarity. Degree, average similarity and minimum similarity multiple reference factors can effectively improve the accuracy of face recognition compared with existing face recognition methods.
  • FIG. 1 is a flowchart of a face recognition method according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart of determining whether a user to be identified is a user in a feature template library according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a face recognition method according to Embodiment 3 of the present invention.
  • FIG. 4 is a structural block diagram of a face recognition system according to Embodiment 6 of the present invention.
  • FIG. 1 is a flowchart of a face recognition method provided in this embodiment. As can be seen from the figure, the method may include the following steps:
  • Step S101 construct a face feature template library
  • a face feature template library for face recognition is constructed, and the feature library is used for storing basic information of the user and face feature information.
  • the existing facial feature extraction algorithm is used to extract the facial features of the user's face image
  • the deep neural network algorithm is used to extract the facial features
  • the extracted user facial features are used as follow-up purposes.
  • the face feature template identifying the user is stored in the template library.
  • the face feature template library stores N user face feature templates and user basic information (user name and other information), and each user corresponds to at least one face feature template; wherein, N ⁇ 1.
  • the number of face feature templates for different users can be different.
  • Step S102 Extract a face feature in a face image of the user to be identified, and obtain a face feature template to be identified;
  • the face image of the user to be recognized is first acquired, and the image is generally collected in real time, or may be an existing face image (for characters in the existing face image)
  • the recognition is performed), and then the facial features in the image of the user's face to be recognized are extracted, and the facial feature template to be recognized is obtained.
  • the manner of extracting the face features of the user to be recognized is the same as the manner of extracting the face features when constructing the template library in step S101.
  • Step S103 Perform identification of the user to be identified according to the face feature template to be identified and the face feature template library.
  • the face feature template library constructed in step S101 performs identification of the user to be identified.
  • the identification manner of the user to be identified is as shown in FIG. 1 , and includes the following steps:
  • the maximum similarity between the face feature template to be identified and a certain user refers to the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature to be recognized
  • the average similarity between the template and a certain user refers to the average of the similarity between the face feature template to be identified and all the face feature templates of the user.
  • the face feature template library includes two users, user A and user B.
  • the template library user A corresponds to two face feature templates
  • user B corresponds to three face feature templates
  • the face feature templates to be recognized are respectively calculated.
  • the larger of the two similarities is the maximum similarity between the face feature template to be identified and the user A.
  • the average of the two similarities is the person to be identified.
  • the maximum value of the similarity between the face feature template to be identified and the three face feature templates of the user B is the maximum similarity between the face feature template to be recognized and the user B
  • the average of the three similarities is The average similarity between the face feature template to be identified and the user B.
  • the similarity of the two face template features is calculated by using the existing calculation method.
  • the similarity between the two face feature templates can be calculated by using the cosine similarity.
  • the maximum similarities of the N face users in the face feature template and the face feature template library are S Max1 , S Max2 , . . . , S MaxN respectively ; the face feature template and the face to be recognized are respectively
  • the average similarity of N users in the feature template library is recorded as S Avg1 , S Avg2 , ..., S AvgN , respectively .
  • step 3 Obtain the maximum value MAX Max in S Max1 , S Max2 ,..., S MaxN , and judge according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum value MAX Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , if yes, the recognition ends, and if not, proceeds to step 3;
  • the face recognition method in this embodiment first calculates the similarity between the face feature template of the user to be identified and each face feature template of each user in the template library, and obtains the face feature template to be identified and each
  • the maximum similarity of the user is determined by selecting a maximum of the plurality of maximum similarities, and identifying the user to be identified based on the facial feature template in the template library of the user corresponding to the maximum value of the maximum similarity. If the user cannot be identified by the facial feature template in the template library of the user corresponding to the maximum value, and according to the average similarity of each facial feature template to each user, the maximum value among the multiple average similarities is obtained.
  • the face feature template in the corresponding user's template library is recognized again.
  • step 2 and step 3 after the maximum value MAX Max and the maximum value AVG Max are obtained , the face feature template of the user and the face feature to be recognized in the face feature template library corresponding to the maximum value MAX Max are obtained.
  • the manner in which the template is to be recognized by the user to be identified, or the method of identifying the user to be recognized according to the face feature template of the user in the face feature template library corresponding to the maximum AVG Max and the face feature template to be recognized may be used. Some face recognition methods are implemented.
  • the difference between this embodiment and the first embodiment is that after the maximum value MAX Max is obtained in step 2 or after the AVG Max is acquired in step 3, the embodiment further provides a maximum value MAX Max .
  • the face feature template of the user and the face feature template to be recognized in the corresponding face feature template library are used to identify the user to be recognized or the face feature template of the user in the face feature template library corresponding to the maximum AVG Max And the manner of identifying the user to be recognized by the face feature template to be identified.
  • the manner of determining whether the user to be identified is the user is as shown in FIG. 2, and includes the following Steps:
  • step 3 2) determining whether the maximum similarity S MaxA is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified is the user, and if not, proceeding to step 3);
  • step 2 the user is the user in the face feature template library corresponding to the maximum value MAX Max .
  • step 3 the user is the user in the face feature template library corresponding to the maximum value AVG Max .
  • FIG. 3 is a flowchart of a method for recognizing a face provided in this embodiment.
  • the method in this embodiment of China may include the following steps:
  • Step S301 construct a face feature template library
  • Step S302 Extract a face feature in a face image of the user to be identified, and obtain a face feature template to be identified;
  • step S301 The specific manner of constructing the face feature template library in step S301 in the embodiment and the face feature in the face image of the user to be recognized in step S302, and obtaining the face feature template to be recognized, and the first embodiment
  • step S101 The manner of constructing the face feature template library in step S101 described in the same manner as the step S102 of obtaining the face feature template to be recognized is the same.
  • Step S303 Perform identification of the user to be identified according to the face feature template to be identified and the face feature template library.
  • the specific manner of performing the identification of the user to be identified according to the face feature template to be identified and the constructed face feature template library includes the following steps:
  • the maximum similarity between the face feature template to be identified and a certain user refers to the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature to be recognized
  • the average similarity between the template and a certain user refers to the average of the similarity between the face feature template to be identified and all the face feature templates of the user.
  • the maximum similarity between the face feature template and the face feature template library in the face feature template library are respectively S Max1 , S Max2 , . . . , S MaxN ; the face feature template to be recognized and the person
  • the average similarity of N users in the face feature template library is recorded as S Avg1 , S Avg2 , ..., S AvgN , respectively .
  • step 3 acquisition S Max1, S Max2, ..., MAX Max S MaxN maximum value of the maximum value MAX Max and corresponding facial feature template library users, and the person to be identified with the face feature pattern of the maximum value MAX Max Corresponding the similarity of the user's face feature template in the face feature template library, determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends, if not, Then proceed to step 3;
  • the face feature template of the user in the face feature template library corresponding to the maximum value MAX Max has k 1 , and the face feature template to be recognized and k 1 person
  • the similarity of the face feature templates are S A1 , S A2 , . . . , S Ak1 ; respectively, and the specific manner of determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max is as shown in FIG. 3 . Includes the following steps:
  • K S Is a positive integer, K S >1;
  • v, k 1 th take similarities S A1, S A2, ..., S Ak1 whether the minimum degree of similarity S MinA, S MinA determining the minimum degree of similarity equal to or greater than a preset minimum similarity threshold S min, and if yes, Then, the user to be identified is the user in the face feature template library corresponding to the MAX Max . If not, the user to be identified is not the user in the face feature template library corresponding to the MAX Max , and the process proceeds to step 3.
  • the manner of determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max and the face feature template corresponding to determining whether the user to be identified is the maximum value MAX Max in the above step 2
  • the users in the library are in the same way, as follows:
  • step III Determine whether k 2 ⁇ K S is satisfied. If yes, proceed to step IV. If not, determine that the user to be identified is not a user in the face feature template library corresponding to AVG Max , and prompt recognition failure; wherein, K S Is a positive integer, K S >1;
  • V, k 2 th take similarities S A1, S A2, ..., S Ak2 S MinB the minimum degree of similarity, determining the minimum degree of similarity is greater than or equal to S MinB preset minimum similarity threshold S min, and if yes, Then, the user to be identified is the user in the face feature template library corresponding to the AVG Max . If not, the user to be identified is not the user in the face feature template library corresponding to the AVG Max , and the recognition fails.
  • the face recognition method provided in this embodiment is a flowchart for using the method described in Embodiment 3 for a 1:1 face verification system, wherein 1:1 refers to only storing in the face feature template library.
  • a user's face feature template, ie N 1.
  • the R facial feature template of the user A is stored in the face feature template library, and the R personal face feature templates are respectively recorded as feature templates X A1 , X A2 , . . . , X AR , to be identified by the user to be identified.
  • the face feature template is recorded as the feature template Y.
  • K S is 3.
  • Step 1 Calculate the similarity between the feature template Y and the R feature templates X A1 , X A2 , . . . , X AR respectively.
  • the R similarities are respectively recorded as S A1 , S A2 , . . . , S AR , and the maximum similarity is taken.
  • A (S A1 + S A2 +... + S AR ) / R;
  • Step 2 determining whether SMax A is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified corresponding to the feature template Y is the same person as the user A, and if not, proceeding to step 3;
  • Step 3 Determine whether R ⁇ 3 is satisfied. If yes, proceed to step 4. If the user to be identified corresponding to the judgment feature template Y is not the same person as the user A, the prompt recognition fails.
  • Step 4 Determine whether SAvg A is greater than or equal to the preset average similarity threshold S avg , and if so, determine that the user to be identified corresponding to the feature template Y is the same person as the user A, and if not, proceed to step 5;
  • Step 5 Determine whether the SMin A is greater than or equal to the preset minimum similarity threshold. If yes, determine that the user to be identified corresponding to the feature template Y is the same person as the user A. If not, determine the user to be identified corresponding to the feature template Y. The user is not the same person as User A, and the prompt recognition fails.
  • the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min in the first embodiment, the second embodiment, the third embodiment, and the fourth embodiment may be directly applied according to the application scenario. Set directly to the experience value by the user.
  • a method for determining the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min is provided, and the manner includes the following steps:
  • a. Construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
  • the first erroneous rate threshold, the second erroneous rate threshold, and the third erroneous rate threshold may be set to the same value or may be set to different values.
  • the size of the test library is also as large as possible.
  • the first false alarm rate threshold can be set to 0.01%
  • the second false positive rate threshold can be set to 0.01%
  • the third false positive rate threshold can be set to 0.01%
  • N>1 the first false positive rate threshold can be set to 0.001%
  • the second false positive rate The threshold can be set to 0.001%
  • the first The three false alarm rate threshold can be set to 0.001%.
  • a test library of 100 face images of 100 faces per person for a total of 100,000 face images can be constructed. 10 sub-databases P constituting a total of 10,000 face images are randomly selected from each of the 100 face images, and the remaining 90,000 face images constitute a sub-library G, and 90 of each of the sub-libraries G The face images are evenly divided into 9 groups, which are divided into 9 ⁇ 1000 groups.
  • FIG. 4 is a structural block diagram of a face recognition system provided in this embodiment.
  • the system includes a template library establishment module 100, a similarity threshold determination module 200, and a feature extraction module 300 to be verified. And a face recognition module 400. among them,
  • the template library building module 100 is configured to construct a face feature template library, where the face feature template library stores N user face feature templates and user basic information, and each user corresponds to at least one face feature template; , N ⁇ 1;
  • the to-be-verified feature extraction module 300 is configured to extract a facial feature in a face image of the user to be identified, and obtain a facial feature template to be identified;
  • the face recognition module 400 is configured to perform identification of the user to be identified according to the face feature template to be recognized and the face feature template library; the face recognition module 400 includes a first similarity calculation unit 401 The first face recognition unit 402 and the second face recognition unit 403. among them:
  • the first similarity calculation unit 401 is configured to separately calculate the similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, and obtain the face feature template and the face to be recognized.
  • the maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a certain user refers to an average value of the similarity between the face feature template to be identified and all the face feature templates of the user;
  • the maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library
  • the average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
  • the first face recognition unit 402 is configured to obtain a maximum value MAX Max in S Max1 , S Max2 , . . . , S MaxN , according to a face feature template of the user in the face feature template library corresponding to the maximum value MAX Max a face feature template to be identified, determining whether the user to be identified is a user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends; if not, entering the second face recognition unit;
  • a second face recognition unit 403 configured to acquire a maximum value AVG Max in S Avg1 , S Avg2 , . . . , S AvgN , according to a face feature template of the user in the face feature template library corresponding to the maximum value AVG Max
  • the face feature template to be identified determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
  • the first face recognition unit 402 and the second face recognition unit 403 each include an average similarity calculation subunit, a first identification subunit, a second identification subunit, and a third identification subunit.
  • the average similarity calculating sub-unit for taking the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., the average value of S Ak , get the average similarity S AvgA ;
  • a first identifying subunit configured to determine whether the maximum similarity S MaxA is greater than or equal to a preset maximum similarity threshold S max , and if yes, determining that the user to be identified is the user, and if not, entering the second identifier unit;
  • a second identification subunit configured to determine whether k ⁇ K S is satisfied; if yes, proceed to step third identification subunit, if not, determine that the user to be identified is not the user, and prompt identification failure; wherein, K S Is a positive integer, K S >1;
  • a third identifying subunit configured to determine whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, prompting the identification to fail .
  • the third identifier subunit may further include:
  • the face recognition system may further include:
  • the similarity threshold determining module 200 is configured to determine the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min .
  • the similarity confirmation module 200 may include a test library construction unit 201, a sub-library construction unit 202, a sub-library grouping unit 203, a second similarity calculation unit 204, and a similarity threshold determination unit 205. among them:
  • the test library construction unit 201 is configured to construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
  • the sub-library building unit 202 is configured to randomly select J images from each of the I face images to form a sub-library P, and all the remaining images constitute a sub-library G;
  • the sub-library grouping unit 203 divides the face image of each person in the sub-library G into K groups, and obtains H. ⁇ K group image;
  • the second similarity calculation unit 204 is configured to calculate, for each image P′ in the H ⁇ J images in the sub-library P, each set of images other than the user of the image P′ in the sub-library G
  • the maximum similarity, minimum similarity and average similarity of the image are obtained as H ⁇ J ⁇ (H-1) ⁇ K maximum similarities, H ⁇ J ⁇ (H-1) ⁇ K minimum similarities and H ⁇ J ⁇ (H-1) ⁇ K average similarities;
  • the similarity threshold determining unit 205 is configured to arrange the H ⁇ J ⁇ (H ⁇ 1 ⁇ K maximum similarities, the minimum similarity, and the average similarity in descending order, respectively, in an order of H ⁇ J ⁇ (H-1) ⁇ K maximum similarities, the ratio of the position number to H ⁇ J ⁇ (H-1) ⁇ K is equal to the maximum similarity of the preset first misrecognition rate threshold is the maximum similarity threshold S Max ; taking H ⁇ J ⁇ (H-1) ⁇ K average similarities, the ratio of the position number to H ⁇ J ⁇ (H-1) ⁇ K is equal to the preset second misunderstanding rate threshold, the average similarity is The average similarity threshold S avg ; taking H ⁇ J ⁇ (H-1) ⁇ K minimum similarities, the ratio of the position number to H ⁇ J ⁇ (H-1) ⁇ K is equal to the preset third misrecognition rate threshold The minimum similarity is the minimum similarity threshold S min .

Landscapes

  • Engineering & Computer Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

A face identification method and system. The identification method comprises: constructing a face feature template library (S301), wherein the face feature template library is stored with face feature templates and basic user information of N users, and each of the users corresponds to at least one face feature template; extracting face features from a face image of a user to be identified, so as to obtain a face feature template to be identified (S302); calculating similarity levels of the face feature template to be identified with respect to the face feature templates of the respective users in the face feature template library, and finding a maximum value from highest similarity levels of the face feature template to be identified with respect to the respective users; determining whether the user is the user corresponding to said maximum value; and if not, then finding a maximum value from average similarity levels of the face feature template to be identified with respect to the respective users, and determining whether the user is the user corresponding to said maximum value. Compared with existing face identification methods, the method and system in the present invention can effectively improve accuracy of face identification.

Description

一种人脸识别方法及系统Face recognition method and system 技术领域Technical field
本发明属于生物识别技术领域,具体涉及一种人脸识别方法及系统。The invention belongs to the field of biometrics, and particularly relates to a face recognition method and system.
背景技术Background technique
随着移动互联网的蓬勃发展,生物特征识别技术也受到了越来越多的重视。作为交互方式最自然的一种生物特征识别技术,人脸识别技术得到了广泛的关注和重视,其应用前景十分广阔。With the rapid development of the mobile Internet, biometrics technology has also received more and more attention. As the most natural biometric feature of interactive mode, face recognition technology has received extensive attention and attention, and its application prospects are very broad.
人脸识别是一个非常具有挑战性的研究课题,特别是在非约束条件下的人脸识别。在不同光照、姿态、表情、年龄、妆扮等条件下,拍摄同一个人得到的人脸图像是有很大差异的。如何有效地克服这些不利因素的影响,对人脸识别来说至关重要。一般来说,可以从两个方面来克服不利因素对人脸识别的影响。一方面,优化人脸识别的特征提取过程:从人脸图像中提取适当的特征,该特征应该在有效刻画不同人之间的类间差异的同时,对同一个人的类内变化(intra-class difference)具有较强的稳定性;另一方面,优化人脸识别的特征模板比对过程:将需要比对的两组或者多组人脸图像的特征模板输入到适当的分类器进行比对,好的分类器可以进一步扩大不同人的人脸特征模板之间的距离,缩小同一个人的不同人脸图像特征模板之间的距离,更好地判别两组人脸图像是否来自同一个人。在特征提取过程已经较完善的情况下,优化特征模板比对过程仍然能大幅改善整个人脸识别系统的识别精度。按照在人脸特征模板库中每个人注册的特征模板的数量,人脸识别系统可以分为单模板比对系统和多模板比对系统。一般来说,相比单模板比对系统,在人脸识别系统中适当地使用多模板比对技术能显著地提高识别精度。Face recognition is a very challenging research topic, especially for face recognition under unconstrained conditions. Under different lighting, posture, expression, age, makeup, etc., shooting the same person's face image is very different. How to effectively overcome the effects of these unfavorable factors is crucial for face recognition. In general, the impact of adverse factors on face recognition can be overcome in two ways. On the one hand, the feature extraction process of face recognition is optimized: appropriate features are extracted from the face image, which should be intra-class changes of the same person while effectively depicting the inter-class differences between different people (intra-class Difference) has strong stability; on the other hand, it optimizes the feature template matching process of face recognition: the feature templates of two or more sets of face images that need to be compared are input into an appropriate classifier for comparison, A good classifier can further expand the distance between different people's face feature templates, reduce the distance between different face image feature templates of the same person, and better discriminate whether the two sets of face images are from the same person. In the case that the feature extraction process has been perfected, the optimization feature template comparison process can still greatly improve the recognition accuracy of the entire face recognition system. According to the number of feature templates registered by each person in the face feature template library, the face recognition system can be divided into a single template comparison system and a multiple template comparison system. In general, the use of multiple template alignment techniques in a face recognition system can significantly improve recognition accuracy compared to a single template alignment system.
目前,在具体使用多模板比对技术时主要有以下两种技术方案:一种方案是使用平均相似度作为特征模板比对的决策依据。例如,用户A在人脸识别系统中注册了k个特征模板XA1,XA2,…,XAk,待识别的人脸图像的特征模板Y与这k个特征模板的相似度分别为SA1,SA2,…,SAk,计算平均相似度SA=(SA1+SA2+…+SAk)/k,如果SA大于或等于预先设定的特征模板比对相似度阈值S0,就判断Y所对应的人脸图像中的用户与A是同一个人;如果SA小于阈 值S0,就判断Y所对应的人脸图像中的用户与A不是同一个人。该方案将多模板比对的相似度进行了平均,平均后的相似度的分布会更加集中,容易造成人脸识别的拒真率FRR相对单模板比对时上升。另一种方案是使用最大相似度作为特征模板比对的决策依据。例如,假设上述待识别的人脸图像的特征模板Y与k个特征模板的相似度SA1,SA2,…,SAk中的最大值设为SA,如果SA大于或等于预先设定的特征模板比对相似度阈值S0,就判断Y所对应的人脸图像中的用户与A是同一个人;如果SA小于阈值S0,就判断Y所对应的人脸图像中的用户与A不是同一个人,该方案对多模板比对的相似度取了最大值,不同人之间多模板比对最大相似度会比单模板比对相似度更大一些,更容易把不同人误判为同一个人,造成人脸识别的误识率即错误接受率FAR相对单模板比对时上升。At present, there are mainly two technical solutions when using the multi-template comparison technology: one solution is to use the average similarity as the decision basis for the feature template comparison. For example, user A registers k feature templates X A1 , X A2 , . . . , X Ak in the face recognition system, and the similarity between the feature template Y of the face image to be recognized and the k feature templates is S A1 . , S A2 ,...,S Ak , calculate the average similarity S A =(S A1 +S A2 +...+S Ak )/k, if S A is greater than or equal to the preset feature template comparison similarity threshold S 0 It is judged that the user in the face image corresponding to Y is the same person as A; if S A is smaller than the threshold S 0 , it is judged that the user in the face image corresponding to Y is not the same person as A. The scheme averages the similarity of the multi-template alignment, and the distribution of the similarity after the average is more concentrated. It is easy to cause the FRY of the face recognition to increase compared with the single template. Another solution is to use maximum similarity as the basis for decision making of feature template comparisons. For example, suppose that the maximum value of the similarity S A1 , S A2 , . . . , S Ak of the feature template Y of the face image to be recognized and the k feature templates is set to S A , if S A is greater than or equal to a preset The feature template compares the similarity threshold S 0 , and determines that the user in the face image corresponding to Y is the same person as A; if S A is smaller than the threshold S 0 , it determines the user in the face image corresponding to Y A is not the same person. The similarity of the multi-template alignment is maximized. The maximum similarity of multiple template comparisons between different people will be more similar than the single template comparison. It is easier to misjudge different people. For the same person, the false positive rate of face recognition, that is, the false acceptance rate FAR rises when compared with the single template.
发明内容Summary of the invention
针对现有技术中存在的缺陷,本发明的目的在于提供一种人脸识别方法及系统,通过该方法及系统,可有效提高人脸识别的准确率。In view of the deficiencies in the prior art, an object of the present invention is to provide a face recognition method and system, by which the accuracy of face recognition can be effectively improved.
为实现上述目的,本发明采用的技术方案如下:In order to achieve the above object, the technical solution adopted by the present invention is as follows:
一种人脸识别方法,包括以下步骤:A face recognition method includes the following steps:
(1)构建人脸特征模板库,所述人脸特征模板库中存储有N个用户的人脸特征模板和用户基本信息,每个用户对应至少一个人脸特征模板;其中,N≥1;(1) constructing a face feature template library, wherein the face feature template library stores N user face feature templates and user basic information, each user corresponding to at least one face feature template; wherein, N≥1;
(2)提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板;(2) extracting facial features in the face image of the user to be identified, and obtaining a facial feature template to be recognized;
(3)根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别;进行待识别用户的识别方式包括:(3) performing identification of the user to be identified according to the face feature template to be identified and the face feature template library; and the manner of identifying the user to be identified includes:
①分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度;1 respectively calculating the similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, and obtaining the maximum of each user in the face feature template and the face feature template library to be recognized. Similarity and average similarity;
待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所 有人脸特征模板的相似度的平均值;The maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a user refers to the face feature template to be identified and the user's location. The average of the similarities of the face feature templates;
记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNThe maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library The average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
②获取SMax1,SMax2,…,SMaxN中的最大值MAXMax,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入步骤③;2 Obtain the maximum value MAX Max in S Max1 , S Max2 ,..., S MaxN , and judge according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum value MAX Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , if yes, the recognition ends, and if not, proceeds to step 3;
③获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax,根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则提示识别失败。3 Obtaining the maximum value AVG Max in S Avg1 , S Avg2 , ..., S AvgN , judging according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum AVG Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
进一步,所述的一种人脸识别方法,步骤②和步骤③中,根据人脸特征模板库中的某用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为所述某用户的方式包括:Further, in the face recognition method, in step 2 and step 3, according to the face feature template of a user in the face feature template library and the face feature template to be recognized, it is determined whether the user to be identified is a The way to describe a user includes:
设人脸特征模板库中的所述某用户的人脸特征模板有k个,记待识别的人脸特征模板与k个人脸特征模板的相似度分别为SA1,SA2,…,SAkThere are k face feature templates for the user in the face feature template library, and the similarity between the face feature template and the k face feature template for the recognition is S A1 , S A2 , ..., S Ak ;
1)取k个相似度SA1,SA2,…,SAk中的最大相似度SMaxA,计算k个相似度SA1,SA2,…,SAk的平均值,得到平均相似度SAvgA1) Take the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., S Ak average value, the average similarity S AvgA ;
2)判断最大相似度SMaxA是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是所述某用户,若否,则进入步骤3);2) determining whether the maximum similarity S MaxA is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified is the user, and if not, proceeding to step 3);
3)判断是否满足k≥KS,若是,则进入步骤4),若否,则确定待识别用户不是所述某用户;其中,KS为正整数,KS>1;3) judging whether k≥K S is satisfied, if yes, proceeding to step 4), if not, determining that the user to be identified is not the user; wherein K S is a positive integer, K S >1;
4)判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。 4) determining whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, determining that the user to be identified is not the user .
进一步,所述的一种人脸识别方法,步骤4)中,若平均相似度SAvgA<Savg,在提示识别失败之前,还包括:Further, in the face recognition method, in step 4), if the average similarity S AvgA <S avg , before the prompt recognition fails, the method further includes:
取k个相似度SA1,SA2,…,SAk中的最小相似度SMinA,判断所述最小相似度SMinA是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。Taking the minimum similarity S MinA in the k similarities S A1 , S A2 , . . . , S Ak , determining whether the minimum similarity S MinA is greater than or equal to a preset minimum similarity threshold S min , and if yes, determining The user is identified as the user, and if not, it is determined that the user to be identified is not the user.
进一步,所述的一种人脸识别方法,该方法还包括确定所述最大相似度阈值Smax、平均相似度阈值Savg和最小相似度阈值Smin的步骤,确定方式为:Further, in the method for recognizing a face, the method further includes the steps of determining the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min , and the determining manner is:
a、构建一个人脸图像测试库,测试库中存储有H个人的人脸图像,每个人的人脸图像数为I张;a. Construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
b、从每个人的I张人脸图像中随机选取J张图像构成子库P,剩余的所有图像构成子库G;b, randomly selecting J images from each person's face images to form a sub-library P, and all remaining images constitute a sub-bank G;
c、将子库G中的每个人的人脸图像分成K组,得到H×K组图像;c. Divide the face image of each person in the sub-library G into K groups, and obtain an H×K group image;
d、对于子库P中的H×J张图像中的每张图像P’,计算图像P’与子库G中除图像P’所属用户之外的每组图像的最大相似度、最小相似度和平均相似度,得到H×J×(H-1)×K个最大相似度、H×J×(H-1)×K个最小相似度和H×J×(H-1)×K个平均相似度;d. For each image P′ in the H×J images in the sub-library P, the maximum similarity and minimum similarity of the image P′ and each group of images other than the user of the image P′ in the sub-bank G are calculated. Degree and average similarity, obtain H × J × (H-1) × K maximum similarities, H × J × (H-1) × K minimum similarities and H × J × (H-1) × K Average similarity;
e、将所述H×J×(H-1)×K个最大相似度、最小相似度和平均相似度分别按照从大到小的顺序排列,取H×J×(H-1)×K个最大相似度中位置序号与H×J×(H-1)×K的比值等于预设的第一误识率阈值的最大相似度为所述最大相似度阈值Smax;取H×J×(H-1)×K个平均相似度中位置序号与H×J×(H-1)×K的比值等于预设的第二误识率阈值的平均相似度为平均相似度阈值Savg;取H×J×(H-1)×K个最小相似度中位置序号与H×J×(H-1)×K的比值等于预设的第三误识率阈值的最小相似度为最小相似度阈值Smine. Align the H×J×(H-1)×K maximum similarities, the minimum similarity, and the average similarity in descending order, and take H×J×(H-1)×K The maximum similarity between the position number and the ratio of H×J×(H-1)×K equal to the preset first misrecognition rate threshold is the maximum similarity threshold S max ; taking H×J× (H-1) × K average similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset second misunderstanding rate threshold, and the average similarity is the average similarity threshold S avg ; Taking the ratio of the position number of H×J×(H-1)×K minimum similarities to the ratio of H×J×(H-1)×K equal to the minimum similarity of the preset third misrecognition rate threshold is the minimum similarity Degree threshold S min .
进一步,所述的一种人脸识别方法,步骤e中,N=1时的第一误识率阈值、第二误识率阈值和第三误识率阈值分别大于N>1时的第一误识率阈值、第二误识率阈值和第三误识率阈值。 Further, in the face recognition method, in step e, the first misrecognition rate threshold, the second misrecognition rate threshold, and the third misrecognition rate threshold when N=1 are greater than the first when N>1, respectively. The false positive rate threshold, the second false positive rate threshold, and the third false positive rate threshold.
进一步,所述的一种人脸识别方法,H=1000,I=100,J=10,K=9。Further, the face recognition method described is H=1000, I=100, J=10, and K=9.
进一步,所述的一种人脸识别方法,当N=1时,第一误识率阈值为0.01%,第二误识率阈值为0.01%,第三误识率阈值为0.01%;当N>1时,第一误识率阈值为0.001%,第二误识率阈值为0.001%,第三误识率阈值为0.001%。Further, in the face recognition method, when N=1, the first false positive rate threshold is 0.01%, the second false positive rate threshold is 0.01%, and the third false positive rate threshold is 0.01%; When >1, the first false positive rate threshold is 0.001%, the second false positive rate threshold is 0.001%, and the third false positive rate threshold is 0.001%.
本发明实施例中还提供了一种人脸识别系统,包括:The embodiment of the invention further provides a face recognition system, comprising:
模板库建立模块,用于构建人脸特征模板库,所述人脸特征模板库中存储有N个用户的人脸特征模板和用户基本信息,每个用户对应至少一个人脸特征模板;其中,N≥1;a template library building module, configured to construct a face feature template library, where the face feature template library stores N user face feature templates and user basic information, and each user corresponds to at least one face feature template; N≥1;
待验证特征提取模块,用于提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板;a feature extraction module to be used for extracting a face feature in a face image of the user to be identified, and obtaining a face feature template to be recognized;
人脸识别模块,用于根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别;所述人脸识别模块包括:a face recognition module, configured to perform identification of the user to be identified according to the face feature template to be identified and the face feature template library; the face recognition module includes:
第一相似度计算单元,用于分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度;a first similarity calculation unit, configured to respectively calculate a similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, to obtain a face feature template and a face feature to be recognized The maximum similarity and average similarity of each user in the template library;
待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度的平均值;The maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a certain user refers to an average value of the similarity between the face feature template to be identified and all the face feature templates of the user;
记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNThe maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library The average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
第一人脸识别单元,用于获取SMax1,SMax2,…,SMaxN中的最大值MAXMax,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入第二人脸识别单元; The first face recognition unit is configured to obtain a maximum value MAX Max in S Max1 , S Max2 , . . . , S MaxN , and a facial feature template of the user in the face feature template library corresponding to the maximum value MAX Max The recognized face feature template determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends; if not, the second face recognition unit is entered;
第二人脸识别单元,用于获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax,根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则提示识别失败。a second face recognition unit, configured to acquire a maximum value AVG Max in S Avg1 , S Avg2 , . . . , S AvgN , according to a face feature template of the user in the face feature template library corresponding to the maximum value AVG Max The recognized face feature template determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
进一步,如上所述的一种人脸识别系统,设人脸特征模板库中的所述某用户的人脸特征模板有k个,记待识别的人脸特征模板与k个人脸特征模板的相似度分别为SA1,SA2,…,SAkFurther, in a face recognition system as described above, there are k face feature templates of the user in the face feature template library, and the face feature template to be recognized is similar to the k face feature template. The degrees are S A1 , S A2 , ..., S Ak ;
所述第一人脸识别单元和第二人脸识别单元均包括:The first face recognition unit and the second face recognition unit each include:
平均相似度计算子单元,用于取k个相似度SA1,SA2,…,SAk中的最大相似度SMaxA,计算k个相似度SA1,SA2,…,SAk的平均值,得到平均相似度SAvgAThe average similarity calculating sub-unit, for taking the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., the average value of S Ak , get the average similarity S AvgA ;
第一识别子单元,用于判断最大相似度SMaxA是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是所述某用户,若否,则进入第二识别子单元;a first identifying subunit, configured to determine whether the maximum similarity S MaxA is greater than or equal to a preset maximum similarity threshold S max , and if yes, determining that the user to be identified is the user, and if not, entering the second identifier unit;
第二识别子单元,用于判断是否满足k≥KS,若是,则进入步骤第三识别子单元,若否,则确定待识别用户不是所述某用户;其中,KS为正整数,KS>1;a second identification subunit, configured to determine whether k≥K S is satisfied, and if yes, proceeds to step third identification subunit, and if not, determines that the user to be identified is not the user; wherein K S is a positive integer, K S >1;
第三识别子单元,用于判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。a third identifying subunit, configured to determine whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, determining that the user is to be identified The user is not the user.
进一步,如上所述的一种人脸识别系统,所述第三识别子单元还包括:Further, in a face recognition system as described above, the third identification subunit further includes:
再次识别子单元,用于在平均相似度SAvgA<Savg时,在提示识别失败之前,再次进行待识别用户的识别;识别方式为:Recognizing the sub-unit again, when the average similarity S AvgA <S avg is used, the identification of the user to be identified is performed again before the prompt recognition fails; the recognition manner is:
取k个相似度SA1,SA2,…,SAk中的最小相似度SMinA,判断所述最小相似度SMinA是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。Taking the minimum similarity S MinA in the k similarities S A1 , S A2 , . . . , S Ak , determining whether the minimum similarity S MinA is greater than or equal to a preset minimum similarity threshold S min , and if yes, determining The user is identified as the user, and if not, it is determined that the user to be identified is not the user.
进一步,如上所述的一种人脸识别系统,该系统还包括: Further, a face recognition system as described above, the system further comprising:
相似度阈值确定模块,用于确定所述最大相似度阈值Smax、平均相似度阈值Savg和最小相似度阈值Smin;所述相似度确认模块包括:a similarity threshold determining module, configured to determine the maximum similarity threshold S max , an average similarity threshold S avg , and a minimum similarity threshold S min ; the similarity confirmation module includes:
测试库构建单元,用于构建一个人脸图像测试库,测试库中存储有H个人的人脸图像,每个人的人脸图像数为I张;The test library building unit is configured to construct a face image test library, wherein the face image of the H person is stored in the test library, and the number of face images of each person is one;
子库构建单元,用于从每个人的I张人脸图像中随机选取J张图像构成子库P,剩余的所有图像构成子库G;a sub-library building unit for randomly selecting J images from each person's I face images to form a sub-library P, and all remaining images constitute a sub-library G;
子库分组单元,将子库G中的每个人的人脸图像分成K组,得到H×K组图像;a sub-library grouping unit, which divides a face image of each person in the sub-library G into K groups, and obtains an H×K group image;
第二相似度计算单元,用于对于子库P中的H×J张图像中的每张图像P’,计算图像P’与子库G中除图像P’所属用户之外的每组图像的最大相似度、最小相似度和平均相似度,得到H×J×(H-1)×K个最大相似度、H×J×(H-1)×K个最小相似度和H×J×(H-1)×K个平均相似度;a second similarity calculation unit, configured to calculate, for each image P′ in the H×J images in the sub-library P, each image of the image P′ and the sub-library G other than the user to which the image P′ belongs The maximum similarity, the minimum similarity and the average similarity are obtained as H × J × (H-1) × K maximum similarities, H × J × (H-1) × K minimum similarities and H × J × (H-1) × K average similarities;
相似度阈值确定单元,用于将所述H×J×(H-1)×K个最大相似度、最小相似度和平均相似度分别按照从大到小的顺序排列,取H×J×(H-1)×K个最大相似度中位置序号与H×J×(H-1)×K的比值等于预设的第一误识率阈值的最大相似度为所述最大相似度阈值Smax;取H×J×(H-1)×K个平均相似度中位置序号与H×J×(H-1)×K的比值等于预设的第二误识率阈值的平均相似度为平均相似度阈值Savg;取H×J×(H-1)×K个最小相似度中位置序号与H×J×(H-1)×K的比值等于预设的第三误识率阈值的最小相似度为最小相似度阈值Smina similarity threshold determining unit, configured to arrange the H×J×(H−1××K maximum similarities, the minimum similarity, and the average similarity in descending order, respectively, in an order of H×J×( H-1) × K maximum similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset first misrecognition rate threshold, the maximum similarity is the maximum similarity threshold S max Taking the ratio of the position number of H×J×(H-1)×K average similarities to H×J×(H-1)×K equal to the average similarity of the preset second misrecognition rate threshold is average Similarity threshold S avg ; taking H × J × (H-1) × K minimum similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset third misrecognition rate threshold The minimum similarity is the minimum similarity threshold S min .
本发明的有益效果在于:本发明所提供的人脸识别方法,综合利用待识别人脸特征模板与模板库中用户的人脸特征模板之间的最大相似度和平均相似度,或者是最大相似度、平均相似度和最小相似度多个参考因素,与现有人脸识别方式相比,可有效提高人脸识别的准确率。The invention has the beneficial effects that the face recognition method provided by the present invention comprehensively utilizes the maximum similarity and average similarity between the face feature template to be recognized and the face feature template of the user in the template library, or the maximum similarity. Degree, average similarity and minimum similarity multiple reference factors can effectively improve the accuracy of face recognition compared with existing face recognition methods.
附图说明DRAWINGS
图1为本发明实施例一中提供的一种人脸识别方法的流程图;1 is a flowchart of a face recognition method according to Embodiment 1 of the present invention;
图2为本发明实施例二中提供的判断待识别用户是否为特征模板库中某用户的流程图; 2 is a flowchart of determining whether a user to be identified is a user in a feature template library according to Embodiment 2 of the present invention;
图3为本发明实施例三中提供的一种人脸识别方法的流程图;3 is a flowchart of a face recognition method according to Embodiment 3 of the present invention;
图4为本发明实施例六中提供的一种人脸识别系统的结构框图。4 is a structural block diagram of a face recognition system according to Embodiment 6 of the present invention.
具体实施方式detailed description
下面结合说明书附图与具体实施方式对本发明做进一步的详细说明。The present invention will be further described in detail below in conjunction with the drawings and specific embodiments.
实施例一Embodiment 1
图1示出了本实施例中提供的一种人脸识别方法的流程图,由图中可以看出,该方法可以包括以下步骤:FIG. 1 is a flowchart of a face recognition method provided in this embodiment. As can be seen from the figure, the method may include the following steps:
步骤S101:构建人脸特征模板库;Step S101: construct a face feature template library;
首先构建用于进行人脸识别的人脸特征模板库,特征库用于存储用户的基本信息和人脸特征信息。Firstly, a face feature template library for face recognition is constructed, and the feature library is used for storing basic information of the user and face feature information.
本实施例中,采用现有的人脸特征提取算法,提取用户的人脸图像的人脸特征,例如采用深度神经网络算法进行人脸特征的提取,将提取到的用户人脸特征作为后续用途识别用户的人脸特征模板存储到模板库中。In this embodiment, the existing facial feature extraction algorithm is used to extract the facial features of the user's face image, for example, the deep neural network algorithm is used to extract the facial features, and the extracted user facial features are used as follow-up purposes. The face feature template identifying the user is stored in the template library.
本实施例中,所述人脸特征模板库中存储有N个用户的人脸特征模板和用户基本信息(用户的姓名等信息),每个用户对应至少一个人脸特征模板;其中,N≥1。不同的用户的人脸特征模板的个数可以不同。In this embodiment, the face feature template library stores N user face feature templates and user basic information (user name and other information), and each user corresponds to at least one face feature template; wherein, N≥ 1. The number of face feature templates for different users can be different.
步骤S102:提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板;Step S102: Extract a face feature in a face image of the user to be identified, and obtain a face feature template to be identified;
在进行人脸识别时,对于待识别用户,首先获取待识别用户的人脸图像,该图像一般是实时采集的,也可以是已有的人脸图像(用于对已有人脸图像中的人物进行识别),之后提取待识别用户人脸图像中的人脸特征,得到待识别的人脸特征模板。提取待识别用户人脸特征的方式与采用与步骤S101中构建模板库时提取人脸特征相同的方式。When performing face recognition, for the user to be identified, the face image of the user to be recognized is first acquired, and the image is generally collected in real time, or may be an existing face image (for characters in the existing face image) The recognition is performed), and then the facial features in the image of the user's face to be recognized are extracted, and the facial feature template to be recognized is obtained. The manner of extracting the face features of the user to be recognized is the same as the manner of extracting the face features when constructing the template library in step S101.
步骤S103:根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别。Step S103: Perform identification of the user to be identified according to the face feature template to be identified and the face feature template library.
获取到待识别的人脸特征模板后,根据所述待识别的人脸特征模板和步 骤S101中所构建的人脸特征模板库进行待识别用户的识别。本实施例中,进行待识别用户的识别方式如图1所示,包括以下步骤:After obtaining the face feature template to be identified, according to the face feature template and step to be recognized The face feature template library constructed in step S101 performs identification of the user to be identified. In this embodiment, the identification manner of the user to be identified is as shown in FIG. 1 , and includes the following steps:
①分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度;1 respectively calculating the similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, and obtaining the maximum of each user in the face feature template and the face feature template library to be recognized. Similarity and average similarity;
其中,待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度的平均值。The maximum similarity between the face feature template to be identified and a certain user refers to the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature to be recognized The average similarity between the template and a certain user refers to the average of the similarity between the face feature template to be identified and all the face feature templates of the user.
例如,人脸特征模板库中包括两个用户,用户A和用户B,模板库用户A对应2个人脸特征模板,用户B对应3个人脸特征模板,则分别计算待识别的人脸特征模板与用户A的2个人脸特征模板的相似度,2个相似度中的较大值即为待识别的人脸特征模板与用户A的最大相似度,2个相似度的均值即为待识别的人脸特征模板与用户A的平均相似度。同样,待识别的人脸特征模板与用户B的3个人脸特征模板的相似度中的最大值即为待识别的人脸特征模板与用户B的最大相似度,三个相似度的平均值即为待识别的人脸特征模板与用户B的平均相似度。For example, the face feature template library includes two users, user A and user B. The template library user A corresponds to two face feature templates, and user B corresponds to three face feature templates, and the face feature templates to be recognized are respectively calculated. The similarity between the two face feature templates of user A. The larger of the two similarities is the maximum similarity between the face feature template to be identified and the user A. The average of the two similarities is the person to be identified. The average similarity between the face feature template and user A. Similarly, the maximum value of the similarity between the face feature template to be identified and the three face feature templates of the user B is the maximum similarity between the face feature template to be recognized and the user B, and the average of the three similarities is The average similarity between the face feature template to be identified and the user B.
两个人脸模板特征的相似度的计算采用现有的计算方式,如可以采用余弦相似度计算两个人脸特征模板之间的相似度。The similarity of the two face template features is calculated by using the existing calculation method. For example, the similarity between the two face feature templates can be calculated by using the cosine similarity.
本实施例中,记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNIn this embodiment, the maximum similarities of the N face users in the face feature template and the face feature template library are S Max1 , S Max2 , . . . , S MaxN respectively ; the face feature template and the face to be recognized are respectively The average similarity of N users in the feature template library is recorded as S Avg1 , S Avg2 , ..., S AvgN , respectively .
②获取SMax1,SMax2,…,SMaxN中的最大值MAXMax,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入步骤③;2 Obtain the maximum value MAX Max in S Max1 , S Max2 ,..., S MaxN , and judge according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum value MAX Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , if yes, the recognition ends, and if not, proceeds to step 3;
③获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax,根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户, 若是,则识别结束,若否,则提示识别失败。3 Obtaining the maximum value AVG Max in S Avg1 , S Avg2 , ..., S AvgN , judging according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum AVG Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
本实施例中的人脸识别方法,首先分别计算出待识别用户的人脸特征模板与模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与每个用户的最大相似度,再通过选取多个最大相似度中的最大值,以最大相似度中的最大值所对应的用户的模板库中的人脸特征模板为依据,进行待识别用户的识别,如果无法通过该最大值对应的用户的模板库中的人脸特征模板识别出用户,再依据待识别的人脸特征模板与每个用户的平均相似度,以多个平均相似度中的最大值所对应的用户的模板库中的人脸特征模板进行再次识别。The face recognition method in this embodiment first calculates the similarity between the face feature template of the user to be identified and each face feature template of each user in the template library, and obtains the face feature template to be identified and each The maximum similarity of the user is determined by selecting a maximum of the plurality of maximum similarities, and identifying the user to be identified based on the facial feature template in the template library of the user corresponding to the maximum value of the maximum similarity. If the user cannot be identified by the facial feature template in the template library of the user corresponding to the maximum value, and according to the average similarity of each facial feature template to each user, the maximum value among the multiple average similarities is obtained. The face feature template in the corresponding user's template library is recognized again.
其中,步骤②和步骤③中,获取到最大值MAXMax和最大值AVGMax后,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板进行待识别用户识别的方式,或者根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板进行待识别用户识别的方式,可以采用现有的人脸识别方式实现。In step 2 and step 3, after the maximum value MAX Max and the maximum value AVG Max are obtained , the face feature template of the user and the face feature to be recognized in the face feature template library corresponding to the maximum value MAX Max are obtained. The manner in which the template is to be recognized by the user to be identified, or the method of identifying the user to be recognized according to the face feature template of the user in the face feature template library corresponding to the maximum AVG Max and the face feature template to be recognized may be used. Some face recognition methods are implemented.
实施例二Embodiment 2
本实施例与上述实施例一的不同之处在于:在步骤②中获取到最大值MAXMax后或者在步骤③中获取到AVGMax后,本实施例还提供了一种根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板进行待识别用户识别或者根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板进行待识别用户识别的方式。The difference between this embodiment and the first embodiment is that after the maximum value MAX Max is obtained in step 2 or after the AVG Max is acquired in step 3, the embodiment further provides a maximum value MAX Max . The face feature template of the user and the face feature template to be recognized in the corresponding face feature template library are used to identify the user to be recognized or the face feature template of the user in the face feature template library corresponding to the maximum AVG Max And the manner of identifying the user to be recognized by the face feature template to be identified.
本实施例中,根据人脸特征模板库中的某用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为所述某用户的方式如图2所示,包括以下几个步骤:In this embodiment, according to the face feature template of a user in the face feature template library and the face feature template to be identified, the manner of determining whether the user to be identified is the user is as shown in FIG. 2, and includes the following Steps:
设人脸特征模板库中的所述某用户的人脸特征模板有k个,记待识别的人脸特征模板与k个人脸特征模板的相似度分别为SA1,SA2,…,SAkThere are k face feature templates for the user in the face feature template library, and the similarity between the face feature template and the k face feature template for the recognition is S A1 , S A2 , ..., S Ak ;
1)取k个相似度SA1,SA2,…,SAk中的最大相似度SMaxA,计算k个相似度SA1,SA2,…,SAk的平均值,得到平均相似度SAvgA1) Take the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., S Ak average value, the average similarity S AvgA ;
2)判断最大相似度SMaxA是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是所述某用户,若否,则进入步骤3);2) determining whether the maximum similarity S MaxA is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified is the user, and if not, proceeding to step 3);
3)判断是否满足k≥KS,若是,则进入步骤4),若否,则确定待识别用户不是所述某用户;其中,KS为正整数,KS>1,例如KS=3;3) judging whether k≥K S is satisfied, if yes, proceeding to step 4), if not, determining that the user to be identified is not the user; wherein K S is a positive integer, K S >1, for example, K S =3 ;
4)判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。4) determining whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, determining that the user to be identified is not the user .
对于步骤②,所述某用户为最大值MAXMax所对应的人脸特征模板库中的用户,对于步骤③,所述某用户为最大值AVGMax所对应的人脸特征模板库中的用户。For step 2, the user is the user in the face feature template library corresponding to the maximum value MAX Max . For step 3, the user is the user in the face feature template library corresponding to the maximum value AVG Max .
实施例三Embodiment 3
图3示出了本实施例中提供的一种人脸识别方法的流程图,本实施例中国的该方法可以包括以下步骤:FIG. 3 is a flowchart of a method for recognizing a face provided in this embodiment. The method in this embodiment of China may include the following steps:
步骤S301:构建人脸特征模板库;Step S301: construct a face feature template library;
步骤S302:提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板;Step S302: Extract a face feature in a face image of the user to be identified, and obtain a face feature template to be identified;
本实施例中步骤S301中构建人脸特征模板库的具体方式和步骤S302中提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板的具体方式,与实施例一中所记载的步骤S101中构建人脸特征模板库的方式和步骤S102得到待识别的人脸特征模板的方式相同。The specific manner of constructing the face feature template library in step S301 in the embodiment and the face feature in the face image of the user to be recognized in step S302, and obtaining the face feature template to be recognized, and the first embodiment The manner of constructing the face feature template library in step S101 described in the same manner as the step S102 of obtaining the face feature template to be recognized is the same.
步骤S303:根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别。Step S303: Perform identification of the user to be identified according to the face feature template to be identified and the face feature template library.
本实施例中,根据所述待识别的人脸特征模板和所构建的人脸特征模板库进行待识别用户的识别的具体方式包括以下步骤:In this embodiment, the specific manner of performing the identification of the user to be identified according to the face feature template to be identified and the constructed face feature template library includes the following steps:
①分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度; 1 respectively calculating the similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, and obtaining the maximum of each user in the face feature template and the face feature template library to be recognized. Similarity and average similarity;
同样,待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度的平均值。Similarly, the maximum similarity between the face feature template to be identified and a certain user refers to the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature to be recognized The average similarity between the template and a certain user refers to the average of the similarity between the face feature template to be identified and all the face feature templates of the user.
本实施例中,同样记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNIn this embodiment, the maximum similarity between the face feature template and the face feature template library in the face feature template library are respectively S Max1 , S Max2 , . . . , S MaxN ; the face feature template to be recognized and the person The average similarity of N users in the face feature template library is recorded as S Avg1 , S Avg2 , ..., S AvgN , respectively .
②获取SMax1,SMax2,…,SMaxN中的最大值MAXMax和该最大值MAXMax所对应的人脸特征模板库中的用户,以及待识别的人脸特征模板与最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板的相似度,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入步骤③;② acquisition S Max1, S Max2, ..., MAX Max S MaxN maximum value of the maximum value MAX Max and corresponding facial feature template library users, and the person to be identified with the face feature pattern of the maximum value MAX Max Corresponding the similarity of the user's face feature template in the face feature template library, determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends, if not, Then proceed to step 3;
本实施例中,设最大值MAXMax所对应的人脸特征模板库中的用户在人脸特征模板库中的人脸特征模板有k1个,记待识别的人脸特征模板与k1个人脸特征模板的相似度分别为SA1,SA2,…,SAk1;则判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户的具体方式如图3所示,包括以下步骤:In this embodiment, the face feature template of the user in the face feature template library corresponding to the maximum value MAX Max has k 1 , and the face feature template to be recognized and k 1 person The similarity of the face feature templates are S A1 , S A2 , . . . , S Ak1 ; respectively, and the specific manner of determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max is as shown in FIG. 3 . Includes the following steps:
i、取k1个相似度SA1,SA2,…,SAk1中的最大相似度SMaxA,计算k1个相似度SA1,SA2,…,SAk1的平均值,得到平均相似度SAvgAi, k 1 th take similarities S A1, S A2, ..., S Ak1 maximum similarity S MaxA, calculate k 1 th similarity S A1, S A2, ..., S Ak1 average, the average similarity S AvgA ;
ii、判断最大相似度SMaxA是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是MAXMax所对应的人脸特征模板库中的用户,若否,则进入步骤iii;Ii. Determine whether the maximum similarity S MaxA is greater than or equal to a preset maximum similarity threshold S max , and if yes, determine that the user to be identified is a user in the face feature template library corresponding to MAX Max , and if not, proceed to the step Iii;
iii、判断是否满足k1≥KS,若是,则进入步骤iv,若否,则确定待识别用户不是MAXMax所对应的人脸特征模板库中的用户,并进入步骤③;其中,KS为正整数,KS>1;Iii, determining whether k 1 ≥ K S is satisfied, if yes, proceeding to step iv, if not, determining that the user to be identified is not a user in the face feature template library corresponding to MAX Max , and proceeding to step 3; wherein, K S Is a positive integer, K S >1;
iv、判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为MAXMax所对应的人脸特征模板库中的用户,若否,则进入步骤v; Iv, determining whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is a user in the face feature template library corresponding to MAX Max , and if not, Go to step v;
v、取k1个相似度SA1,SA2,…,SAk1中的最小相似度SMinA,判断所述最小相似度SMinA是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户为所述MAXMax所对应的人脸特征模板库中的用户,若否,则确定待识别用户不是MAXMax所对应的人脸特征模板库中的用户,并进入步骤③。v, k 1 th take similarities S A1, S A2, ..., S Ak1 whether the minimum degree of similarity S MinA, S MinA determining the minimum degree of similarity equal to or greater than a preset minimum similarity threshold S min, and if yes, Then, the user to be identified is the user in the face feature template library corresponding to the MAX Max . If not, the user to be identified is not the user in the face feature template library corresponding to the MAX Max , and the process proceeds to step 3.
③获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax和该最大值AVGMax所对应的人脸特征模板库中的用户,以及待识别的人脸特征模板与最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板的相似度,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则提示识别失败;③ Get S Avg1, S Avg2, ..., AVG Max S AvgN maximum value and the maximum value of AVG Max corresponding facial feature template library users, and the person to be recognized face feature pattern and the maximum value of the AVG Max Corresponding the similarity degree of the user's face feature template in the face feature template library, determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, if not, Then the prompt identification fails;
本实施例中,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户的方式与上述步骤②中判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户的方式相同,具体如下:In this embodiment, the manner of determining whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max and the face feature template corresponding to determining whether the user to be identified is the maximum value MAX Max in the above step 2 The users in the library are in the same way, as follows:
设最大值AVGMax所对应的人脸特征模板库中的用户在人脸特征模板库中的人脸特征模板有k2个,记待识别的人脸特征模板与k2个人脸特征模板的相似度分别为SA1,SA2,…,SAk2Let the user in the face feature template library corresponding to the maximum AVG Max have k 2 face feature templates in the face feature template library, and the face feature template to be recognized is similar to the k 2 face feature template. The degrees are S A1 , S A2 ,..., S Ak2 ;
I、取k2个相似度SA1,SA2,…,SAk2中的最大相似度SMaxB,计算k1个相似度SA1,SA2,…,SAk2的平均值,得到平均相似度SAvgBI, taken k 2 th similarity S A1, S A2, ..., S Ak2 maximum similarity S MaxB, calculate k 1 th similarity S A1, S A2, ..., S Ak2 average, the average similarity S AvgB ;
II、判断最大相似度SMaxB是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是AVGMax所对应的人脸特征模板库中的用户,若否,则进入步骤III;II. Determine whether the maximum similarity S MaxB is greater than or equal to a preset maximum similarity threshold S max , and if yes, determine that the user to be identified is a user in the facial feature template library corresponding to AVG Max , and if not, proceed to the step III;
III、判断是否满足k2≥KS,若是,则进入步骤IV,若否,则确定待识别用户不是AVGMax所对应的人脸特征模板库中的用户,并提示识别失败;其中,KS为正整数,KS>1;III. Determine whether k 2 ≥ K S is satisfied. If yes, proceed to step IV. If not, determine that the user to be identified is not a user in the face feature template library corresponding to AVG Max , and prompt recognition failure; wherein, K S Is a positive integer, K S >1;
IV、判断所述平均相似度SAvgB是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为AVGMax所对应的人脸特征模板库中的用户,若否,则进入步骤V;IV. Determine whether the average similarity S AvgB is greater than or equal to a preset average similarity threshold S avg , and if yes, determine that the user to be identified is a user in the face feature template library corresponding to AVG Max , and if not, Go to step V;
V、取k2个相似度SA1,SA2,…,SAk2中的最小相似度SMinB,判断所述最小相似度SMinB是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户 为所述AVGMax所对应的人脸特征模板库中的用户,若否,则确定待识别用户不是AVGMax所对应的人脸特征模板库中的用户,并提示识别失败。V, k 2 th take similarities S A1, S A2, ..., S Ak2 S MinB the minimum degree of similarity, determining the minimum degree of similarity is greater than or equal to S MinB preset minimum similarity threshold S min, and if yes, Then, the user to be identified is the user in the face feature template library corresponding to the AVG Max . If not, the user to be identified is not the user in the face feature template library corresponding to the AVG Max , and the recognition fails.
实施例四Embodiment 4
本实施例中所提供的人脸识别方法为将实施例三中所述的方法用于1:1人脸验证系统的流程图,其中,1:1指的是人脸特征模板库中只存储了一个用户的人脸特征模板,即N=1。The face recognition method provided in this embodiment is a flowchart for using the method described in Embodiment 3 for a 1:1 face verification system, wherein 1:1 refers to only storing in the face feature template library. A user's face feature template, ie N=1.
本实施例中,设人脸特征模板库中存储了用户A的R个人脸特征模板,R个人脸特征模板分别记为特征模板XA1,XA2,…,XAR,待识别用户的待识别的人脸特征模板记为特征模板Y。KS取值为3。In this embodiment, the R facial feature template of the user A is stored in the face feature template library, and the R personal face feature templates are respectively recorded as feature templates X A1 , X A2 , . . . , X AR , to be identified by the user to be identified. The face feature template is recorded as the feature template Y. K S is 3.
本实施例中的人脸识别方法可以简化为以下几个步骤:The face recognition method in this embodiment can be simplified into the following steps:
步骤1:分别计算特征模板Y与R个特征模板XA1,XA2,…,XAR的相似度,R个相似度分别记为SA1,SA2,…,SAR,取其中的最大相似度记为SMaxA=max(SA1,SA2,…,SAR),取其中的最小相似度记为SMinA=min(SA1,SA2,…,SAR),计算平均相似度SAvgA=(SA1+SA2+…+SAR)/R;Step 1: Calculate the similarity between the feature template Y and the R feature templates X A1 , X A2 , . . . , X AR respectively. The R similarities are respectively recorded as S A1 , S A2 , . . . , S AR , and the maximum similarity is taken. The degree is recorded as SMax A =max(S A1 , S A2 ,...,S AR ), and the minimum similarity is recorded as SMin A =min(S A1 ,S A2 ,...,S AR ), and the average similarity SAvg is calculated. A = (S A1 + S A2 +... + S AR ) / R;
步骤2:判断SMaxA是否大于或等于预先设定的最大相似度阈值Smax,若是,则判断特征模板Y对应的待识别用户与用户A是同一个人,若否,则进入到步骤3;Step 2: determining whether SMax A is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified corresponding to the feature template Y is the same person as the user A, and if not, proceeding to step 3;
步骤3:判断是否满足R≥3,如果满足,则进入步骤4,如果不满足判断特征模板Y对应的待识别用户与用户A不是同一个人,提示识别失败;Step 3: Determine whether R≥3 is satisfied. If yes, proceed to step 4. If the user to be identified corresponding to the judgment feature template Y is not the same person as the user A, the prompt recognition fails.
步骤4:判断SAvgA是否大于或等于预先设定的平均相似度阈值Savg,若是,则判断特征模板Y对应的待识别用户与用户A是同一个人,若否,则进入步骤5;Step 4: Determine whether SAvg A is greater than or equal to the preset average similarity threshold S avg , and if so, determine that the user to be identified corresponding to the feature template Y is the same person as the user A, and if not, proceed to step 5;
步骤5:判断SMinA是否大于或等于预先设定的最小相似度阈值,若是,判断特征模板Y对应的待识别用户与用户A是同一个人,若否,则判断特征模板Y对应的待识别用户与用户A不是同一个人,提示识别失败。Step 5: Determine whether the SMin A is greater than or equal to the preset minimum similarity threshold. If yes, determine that the user to be identified corresponding to the feature template Y is the same person as the user A. If not, determine the user to be identified corresponding to the feature template Y. The user is not the same person as User A, and the prompt recognition fails.
实施例五Embodiment 5
对于上述实施例一、实施例二、实施例三和实施例四中的最大相似度阈 值Smax、平均相似度阈值Savg、最小相似度阈值Smin,在实际应用中,可以直接根据应用场景由用户直接设置成经验值。The maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min in the first embodiment, the second embodiment, the third embodiment, and the fourth embodiment may be directly applied according to the application scenario. Set directly to the experience value by the user.
本实施例中,提供了一种确定所述最大相似度阈值Smax、平均相似度阈值Savg和最小相似度阈值Smin的方式,该方式包括以下步骤:In this embodiment, a method for determining the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min is provided, and the manner includes the following steps:
a、构建一个人脸图像测试库,测试库中存储有H个人的人脸图像,每个人的人脸图像数为I张;a. Construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
b、从每个人的I张人脸图像中随机选取J张图像构成子库P,剩余的所有图像构成子库G;b, randomly selecting J images from each person's face images to form a sub-library P, and all remaining images constitute a sub-bank G;
c、将子库G中的每个人的人脸图像分成K组,得到H×K组图像;c. Divide the face image of each person in the sub-library G into K groups, and obtain an H×K group image;
d、对于子库P中的H×J张图像中的每张图像P’,计算图像P’与子库G中除图像P’所属用户之外的每组图像的最大相似度、最小相似度和平均相似度,得到H×J×(H-1)×K个最大相似度、H×J×(H-1)×K个最小相似度和H×J×(H-1)×K个平均相似度;d. For each image P′ in the H×J images in the sub-library P, the maximum similarity and minimum similarity of the image P′ and each group of images other than the user of the image P′ in the sub-bank G are calculated. Degree and average similarity, obtain H × J × (H-1) × K maximum similarities, H × J × (H-1) × K minimum similarities and H × J × (H-1) × K Average similarity;
e、将所述H×J×(H-1)×K个最大相似度、最小相似度和平均相似度分别按照从大到小的顺序排列,取H×J×(H-1)×K个最大相似度中位置序号与H×J×(H-1)×K的比值等于预设的第一误识率阈值的最大相似度为所述最大相似度阈值Smax;取H×J×(H-1)×K个平均相似度中位置序号与H×J×(H-1)×K的比值等于预设的第二误识率阈值的平均相似度为平均相似度阈值Savg;取H×J×(H-1)×K个最小相似度中位置序号与H×J×(H-1)×K的比值等于预设的第三误识率阈值的最小相似度为最小相似度阈值Smine. Align the H×J×(H-1)×K maximum similarities, the minimum similarity, and the average similarity in descending order, and take H×J×(H-1)×K The maximum similarity between the position number and the ratio of H×J×(H-1)×K equal to the preset first misrecognition rate threshold is the maximum similarity threshold S max ; taking H×J× (H-1) × K average similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset second misunderstanding rate threshold, and the average similarity is the average similarity threshold S avg ; Taking the ratio of the position number of H×J×(H-1)×K minimum similarities to the ratio of H×J×(H-1)×K equal to the minimum similarity of the preset third misrecognition rate threshold is the minimum similarity Degree threshold S min .
为了进一步提高识别准确率,步骤e中,N=1时的第一误识率阈值、第二误识率阈值和第三误识率阈值分别大于N>1时的第一误识率阈值、第二误识率阈值和第三误识率阈值。其中,第一误识率阈值、第二误识率阈值和第三误识率阈值也可以设置为相同的值,也可以设置为不同的值。In order to further improve the recognition accuracy, in step e, the first false positive rate threshold, the second false positive rate threshold, and the third false positive rate threshold when N=1 are respectively greater than the first false positive rate threshold when N>1, The second false positive rate threshold and the third false positive rate threshold. The first erroneous rate threshold, the second erroneous rate threshold, and the third erroneous rate threshold may be set to the same value or may be set to different values.
测试库的规模也采用尽可能大的规模,本实施例中,可以采用H=1000,I=100,J=10,K=9,当N=1时,第一误识率阈值可以设置为0.01%,第二误识率阈值可以设置为0.01%,第三误识率阈值可以设置为0.01%;当N>1时,第一误识率阈值可以设置为0.001%,第二误识率阈值可以设置为0.001%,第 三误识率阈值可以设置为0.001%。The size of the test library is also as large as possible. In this embodiment, H=1000, I=100, J=10, and K=9 can be used. When N=1, the first false alarm rate threshold can be set to 0.01%, the second false positive rate threshold can be set to 0.01%, the third false positive rate threshold can be set to 0.01%; when N>1, the first false positive rate threshold can be set to 0.001%, the second false positive rate The threshold can be set to 0.001%, the first The three false alarm rate threshold can be set to 0.001%.
采用本实施例所提供的上述数据可构建一个1000人每人100张人脸图像共10万张人脸图像的测试库。从每个人的100张人脸图像中随机选取10张构成共1万张人脸图像的子库P,剩下的9万张人脸图像构成子库G,子库G中每个人的90张人脸图像均匀分成9组,共分成了9×1000组。首先分别计算子库P里的每张人脸图像与子库G里的每组人脸图像之间的最大相似度、最小相似度和平均相似度(一张图像与一组图像的最大相似度指的是该图像与一组图像中每张图像的相似度中的最大值),得到1万×9×1000=9000万个最大相似度,9000万个最小相似度和9000万个平均相似度,其中,9000万个相似度中属于同一用户的相似度(计算相似度时,子库P中的图像与子库G中的图像组属于同一个用户)共1000×10×9=9万个,因此,9000万个相似度中不属于同一用户的共8991万个,分别将8991万个最大相似度、8991万个最小相似度、8991万个平均相似度按照从大到小的顺序排列起来,对于1:1(N=1)人脸验证系统,将排好后位置序号与8991万的比值等于0.01%的最大相似度确定为最大相似度阈值Smax,将排好后位置序号与8991万的比值等于0.01%的最小相似度确定为最小相似度阈值Smin,将排好后位置序号与8991万的比值等于0.01%的平均相似度确定为平均相似度阈值Savg,即将排好顺序后的第8991个最大相似度、第8991个最小相似度和第8991个平均相似度分别确定为最大相似度阈值、最小相似度阈值和平均相似度阈值;同样,对于1:N(N>1)人脸搜索系统,将排好顺序后的第899个最大相似度设置为最大相似度阈值,将第899个最小相似度设置为最小相似度阈值,将第889个平均相似度设置为平均相似度阈值。Using the above data provided in this embodiment, a test library of 100 face images of 100 faces per person for a total of 100,000 face images can be constructed. 10 sub-databases P constituting a total of 10,000 face images are randomly selected from each of the 100 face images, and the remaining 90,000 face images constitute a sub-library G, and 90 of each of the sub-libraries G The face images are evenly divided into 9 groups, which are divided into 9×1000 groups. First, the maximum similarity, the minimum similarity, and the average similarity between each face image in the sub-database P and each group of face images in the sub-bank G are calculated separately (the maximum similarity between an image and a group of images) Degree refers to the maximum value of the similarity between the image and each image in a group of images), which gives 10,000 × 9 × 1000 = 90 million maximum similarities, 90 million minimum similarities and 90 million averages Similarity, wherein the similarity among the 90 million similarities belongs to the same user (when the similarity is calculated, the image in the sub-database P and the image group in the sub-database G belong to the same user) 1000×10×9=9 10,000, therefore, 90.000 million of the 90 million similarities do not belong to the same user, respectively, the maximum similarity of 89.91 million, the minimum similarity of 89.91 million, and the average similarity of 89.91 million are in descending order Arranged, for the 1:1 (N=1) face verification system, the maximum similarity between the ranked position number and the 89.91 million ratio equal to 0.01% is determined as the maximum similarity threshold S max , and the position number will be ranked The minimum similarity with a ratio of 89.91 million equal to 0.01% is determined to be the minimum similarity After the threshold value S min, will line up with the position number 89910000 ratio is equal to 0.01% average similarity is determined as the average similarity threshold S avg, the second row is about 8991 after the maximum similarity in good order, the minimum similarity 8991 The average similarity with the 8991th is determined as the maximum similarity threshold, the minimum similarity threshold, and the average similarity threshold respectively; similarly, for the 1:N (N>1) face search system, the 899th order will be ranked. The maximum similarity is set to the maximum similarity threshold, the 899th minimum similarity is set as the minimum similarity threshold, and the 889th average similarity is set as the average similarity threshold.
实施例六Embodiment 6
图4示出了本实施例中提供的一种人脸识别系统的结构框图,由图中可以看出,该系统包括模板库建立模块100、相似度阈值确定模块200、待验证特征提取模块300和人脸识别模块400。其中,FIG. 4 is a structural block diagram of a face recognition system provided in this embodiment. As can be seen from the figure, the system includes a template library establishment module 100, a similarity threshold determination module 200, and a feature extraction module 300 to be verified. And a face recognition module 400. among them,
模板库建立模块100,用于构建人脸特征模板库,所述人脸特征模板库中存储有N个用户的人脸特征模板和用户基本信息,每个用户对应至少一个人脸特征模板;其中,N≥1; The template library building module 100 is configured to construct a face feature template library, where the face feature template library stores N user face feature templates and user basic information, and each user corresponds to at least one face feature template; , N≥1;
待验证特征提取模块300,用于提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板;The to-be-verified feature extraction module 300 is configured to extract a facial feature in a face image of the user to be identified, and obtain a facial feature template to be identified;
人脸识别模块400,用于根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别;所述人脸识别模块400包括第一相似度计算单元401、第一人脸识别单元402和第二人脸识别单元403。其中:The face recognition module 400 is configured to perform identification of the user to be identified according to the face feature template to be recognized and the face feature template library; the face recognition module 400 includes a first similarity calculation unit 401 The first face recognition unit 402 and the second face recognition unit 403. among them:
第一相似度计算单元401,用于分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度;The first similarity calculation unit 401 is configured to separately calculate the similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, and obtain the face feature template and the face to be recognized. The maximum similarity and average similarity of each user in the feature template library;
待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度的平均值;The maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a certain user refers to an average value of the similarity between the face feature template to be identified and all the face feature templates of the user;
记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNThe maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library The average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
第一人脸识别单元402,用于获取SMax1,SMax2,…,SMaxN中的最大值MAXMax,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入第二人脸识别单元;The first face recognition unit 402 is configured to obtain a maximum value MAX Max in S Max1 , S Max2 , . . . , S MaxN , according to a face feature template of the user in the face feature template library corresponding to the maximum value MAX Max a face feature template to be identified, determining whether the user to be identified is a user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends; if not, entering the second face recognition unit;
第二人脸识别单元403,用于获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax,根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则提示识别失败。a second face recognition unit 403, configured to acquire a maximum value AVG Max in S Avg1 , S Avg2 , . . . , S AvgN , according to a face feature template of the user in the face feature template library corresponding to the maximum value AVG Max The face feature template to be identified determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
本实施例中,所述第一人脸识别单元402和第二人脸识别单元403均包括平均相似度计算子单元、第一识别子单元、第二识别子单元和第三识别子单元。设人脸特征模板库中的所述某用户的人脸特征模板有k个,记待识别的人脸特征模板与k个人脸特征模板的相似度分别为SA1,SA2,…,SAk。其中, In this embodiment, the first face recognition unit 402 and the second face recognition unit 403 each include an average similarity calculation subunit, a first identification subunit, a second identification subunit, and a third identification subunit. There are k face feature templates for the user in the face feature template library, and the similarity between the face feature template and the k face feature template for the recognition is S A1 , S A2 , ..., S Ak . among them,
平均相似度计算子单元,用于取k个相似度SA1,SA2,…,SAk中的最大相似度SMaxA,计算k个相似度SA1,SA2,…,SAk的平均值,得到平均相似度SAvgAThe average similarity calculating sub-unit, for taking the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., the average value of S Ak , get the average similarity S AvgA ;
第一识别子单元,用于判断最大相似度SMaxA是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是所述某用户,若否,则进入第二识别子单元;a first identifying subunit, configured to determine whether the maximum similarity S MaxA is greater than or equal to a preset maximum similarity threshold S max , and if yes, determining that the user to be identified is the user, and if not, entering the second identifier unit;
第二识别子单元,用于判断是否满足k≥KS,若是,则进入步骤第三识别子单元,若否,则确定待识别用户不是所述某用户,并提示识别失败;其中,KS为正整数,KS>1;a second identification subunit, configured to determine whether k≥K S is satisfied; if yes, proceed to step third identification subunit, if not, determine that the user to be identified is not the user, and prompt identification failure; wherein, K S Is a positive integer, K S >1;
第三识别子单元,用于判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为所述某用户,若否,则提示识别失败。a third identifying subunit, configured to determine whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, prompting the identification to fail .
本实施例中,所述第三识别子单元还可以包括:In this embodiment, the third identifier subunit may further include:
再次识别子单元,用于在平均相似度SAvgA<Savg时,在提示识别失败之前,再次进行待识别用户的识别;识别方式为:Recognizing the sub-unit again, when the average similarity S AvgA <S avg is used, the identification of the user to be identified is performed again before the prompt recognition fails; the recognition manner is:
取k个相似度SA1,SA2,…,SAk中的最小相似度SMinA,判断所述最小相似度SMinA是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户为所述某用户,若否,则提示识别失败。Taking the minimum similarity S MinA in the k similarities S A1 , S A2 , . . . , S Ak , determining whether the minimum similarity S MinA is greater than or equal to a preset minimum similarity threshold S min , and if yes, determining The user is identified as the user, and if not, the recognition fails.
本实施例中,所述人脸识别系统还可以包括:In this embodiment, the face recognition system may further include:
相似度阈值确定模块200,用于确定所述最大相似度阈值Smax、平均相似度阈值Savg和最小相似度阈值SminThe similarity threshold determining module 200 is configured to determine the maximum similarity threshold S max , the average similarity threshold S avg , and the minimum similarity threshold S min .
本实施例中,所述相似度确认模块200可以包括测试库构建单元201、子库构建单元202、子库分组单元203第二相似度计算单元204和相似度阈值确定单元205。其中:In this embodiment, the similarity confirmation module 200 may include a test library construction unit 201, a sub-library construction unit 202, a sub-library grouping unit 203, a second similarity calculation unit 204, and a similarity threshold determination unit 205. among them:
测试库构建单元201,用于构建一个人脸图像测试库,测试库中存储有H个人的人脸图像,每个人的人脸图像数为I张;The test library construction unit 201 is configured to construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
子库构建单元202,用于从每个人的I张人脸图像中随机选取J张图像构成子库P,剩余的所有图像构成子库G;The sub-library building unit 202 is configured to randomly select J images from each of the I face images to form a sub-library P, and all the remaining images constitute a sub-library G;
子库分组单元203,将子库G中的每个人的人脸图像分成K组,得到H ×K组图像;The sub-library grouping unit 203 divides the face image of each person in the sub-library G into K groups, and obtains H. ×K group image;
第二相似度计算单元204,用于对于子库P中的H×J张图像中的每张图像P’,计算图像P’与子库G中除图像P’所属用户之外的每组图像的最大相似度、最小相似度和平均相似度,得到H×J×(H-1)×K个最大相似度、H×J×(H-1)×K个最小相似度和H×J×(H-1)×K个平均相似度;The second similarity calculation unit 204 is configured to calculate, for each image P′ in the H×J images in the sub-library P, each set of images other than the user of the image P′ in the sub-library G The maximum similarity, minimum similarity and average similarity of the image are obtained as H×J×(H-1)×K maximum similarities, H×J×(H-1)×K minimum similarities and H×J ×(H-1)×K average similarities;
相似度阈值确定单元205,用于将所述H×J×(H-1)×K个最大相似度、最小相似度和平均相似度分别按照从大到小的顺序排列,取H×J×(H-1)×K个最大相似度中位置序号与H×J×(H-1)×K的比值等于预设的第一误识率阈值的最大相似度为所述最大相似度阈值Smax;取H×J×(H-1)×K个平均相似度中位置序号与H×J×(H-1)×K的比值等于预设的第二误识率阈值的平均相似度为平均相似度阈值Savg;取H×J×(H-1)×K个最小相似度中位置序号与H×J×(H-1)×K的比值等于预设的第三误识率阈值的最小相似度为最小相似度阈值SminThe similarity threshold determining unit 205 is configured to arrange the H×J×(H−1××K maximum similarities, the minimum similarity, and the average similarity in descending order, respectively, in an order of H×J× (H-1)×K maximum similarities, the ratio of the position number to H×J×(H-1)×K is equal to the maximum similarity of the preset first misrecognition rate threshold is the maximum similarity threshold S Max ; taking H×J×(H-1)×K average similarities, the ratio of the position number to H×J×(H-1)×K is equal to the preset second misunderstanding rate threshold, the average similarity is The average similarity threshold S avg ; taking H × J × (H-1) × K minimum similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset third misrecognition rate threshold The minimum similarity is the minimum similarity threshold S min .
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其同等技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and the modifications

Claims (11)

  1. 一种人脸识别方法,包括以下步骤:A face recognition method includes the following steps:
    (1)构建人脸特征模板库,所述人脸特征模板库中存储有N个用户的人脸特征模板和用户基本信息,每个用户对应至少一个人脸特征模板;其中,N≥1;(1) constructing a face feature template library, wherein the face feature template library stores N user face feature templates and user basic information, each user corresponding to at least one face feature template; wherein, N≥1;
    (2)提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板;(2) extracting facial features in the face image of the user to be identified, and obtaining a facial feature template to be recognized;
    (3)根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别;进行待识别用户的识别方式包括:(3) performing identification of the user to be identified according to the face feature template to be identified and the face feature template library; and the manner of identifying the user to be identified includes:
    ①分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度;1 respectively calculating the similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, and obtaining the maximum of each user in the face feature template and the face feature template library to be recognized. Similarity and average similarity;
    待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度的平均值;The maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a certain user refers to an average value of the similarity between the face feature template to be identified and all the face feature templates of the user;
    记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNThe maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library The average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
    ②获取SMax1,SMax2,…,SMaxN中的最大值MAXMax,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入步骤③;2 Obtain the maximum value MAX Max in S Max1 , S Max2 ,..., S MaxN , and judge according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum value MAX Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , if yes, the recognition ends, and if not, proceeds to step 3;
    ③获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax,根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则提示识别失败。 3 Obtaining the maximum value AVG Max in S Avg1 , S Avg2 , ..., S AvgN , judging according to the user's face feature template and the face feature template to be recognized in the face feature template library corresponding to the maximum AVG Max Whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
  2. 根据权利要求1所述的一种人脸识别方法,其特征在于:步骤②和步骤③中,根据人脸特征模板库中的某用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为所述某用户的方式包括:The method for recognizing a face according to claim 1, wherein in step 2 and step 3, judging according to a face feature template of a user in the face feature template library and a face feature template to be recognized Whether the user to be identified is the user or not includes:
    设人脸特征模板库中的所述某用户的人脸特征模板有k个,记待识别的人脸特征模板与k个人脸特征模板的相似度分别为SA1,SA2,…,SAkThere are k face feature templates for the user in the face feature template library, and the similarity between the face feature template and the k face feature template for the recognition is S A1 , S A2 , ..., S Ak ;
    1)取k个相似度SA1,SA2,…,SAk中的最大相似度SMaxA,计算k个相似度SA1,SA2,…,SAk的平均值,得到平均相似度SAvgA1) Take the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., S Ak average value, the average similarity S AvgA ;
    2)判断最大相似度SMaxA是否大于或等于预设的最大相似度阈值Smax,若是,则确定待识别用户是所述某用户,若否,则进入步骤3);2) determining whether the maximum similarity S MaxA is greater than or equal to the preset maximum similarity threshold S max , and if so, determining that the user to be identified is the user, and if not, proceeding to step 3);
    3)判断是否满足k≥KS,若是,则进入步骤4),若否,则确定待识别用户不是所述用户;其中,KS为正整数,KS>1;3) judging whether k ≥ K S is satisfied, if yes, proceeding to step 4), if not, determining that the user to be identified is not the user; wherein K S is a positive integer, K S >1;
    4)判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。4) determining whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, determining that the user to be identified is not the user .
  3. 根据权利要求2所述的一种人脸识别方法,其特征在于:步骤4)中,若平均相似度SAvgA<Savg,在确定待识别用户不是所述某用户之前,还包括:The face recognition method according to claim 2, wherein in step 4), if the average similarity S AvgA <S avg , before determining that the user to be identified is not the user, the method further comprises:
    取k个相似度SA1,SA2,…,SAk中的最小相似度SMinA,判断所述最小相似度SMinA是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。Taking the minimum similarity S MinA in the k similarities S A1 , S A2 , . . . , S Ak , determining whether the minimum similarity S MinA is greater than or equal to a preset minimum similarity threshold S min , and if yes, determining The user is identified as the user, and if not, it is determined that the user to be identified is not the user.
  4. 根据权利要求3所述的一种人脸识别方法,其特征在于:该方法还包括确定所述最大相似度阈值Smax、平均相似度阈值Savg和最小相似度阈值Smin的步骤,确定方式为:A face recognition method according to claim 3, characterized in that the method further comprises the steps of determining the maximum similarity threshold S max , the average similarity threshold S avg and the minimum similarity threshold S min , determining the manner for:
    a、构建一个人脸图像测试库,测试库中存储有H个人的人脸图像,每个人的人脸图像数为I张;a. Construct a face image test library, where the face image of the H person is stored in the test library, and the number of face images of each person is one;
    b、从每个人的I张人脸图像中随机选取J张图像构成子库P,剩余的所有图像构成子库G;b, randomly selecting J images from each person's face images to form a sub-library P, and all remaining images constitute a sub-bank G;
    c、将子库G中的每个人的人脸图像分成K组,得到H×K组图像; c. Divide the face image of each person in the sub-library G into K groups, and obtain an H×K group image;
    d、对于子库P中的H×J张图像中的每张图像P’,计算图像P’与子库G中除图像P’所属用户之外的每组图像的最大相似度、最小相似度和平均相似度,得到H×J×(H-1)×K个最大相似度、H×J×(H-1)×K个最小相似度和H×J×(H-1)×K个平均相似度;d. For each image P′ in the H×J images in the sub-library P, the maximum similarity and minimum similarity of the image P′ and each group of images other than the user of the image P′ in the sub-bank G are calculated. Degree and average similarity, obtain H × J × (H-1) × K maximum similarities, H × J × (H-1) × K minimum similarities and H × J × (H-1) × K Average similarity;
    e、将所述H×J×(H-1)×K个最大相似度、最小相似度和平均相似度分别按照从大到小的顺序排列,取H×J×(H-1)×K个最大相似度中位置序号与H×J×(H-1)×K的比值等于预设的第一误识率阈值的最大相似度为所述最大相似度阈值Smax;取H×J×(H-1)×K个平均相似度中位置序号与H×J×(H-1)×K的比值等于预设的第二误识率阈值的平均相似度为平均相似度阈值Savg;取H×J×(H-1)×K个最小相似度中位置序号与H×J×(H-1)×K的比值等于预设的第三误识率阈值的最小相似度为最小相似度阈值Smine. Align the H×J×(H-1)×K maximum similarities, the minimum similarity, and the average similarity in descending order, and take H×J×(H-1)×K The maximum similarity between the position number and the ratio of H×J×(H-1)×K equal to the preset first misrecognition rate threshold is the maximum similarity threshold S max ; taking H×J× (H-1) × K average similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset second misunderstanding rate threshold, and the average similarity is the average similarity threshold S avg ; Taking the ratio of the position number of H×J×(H-1)×K minimum similarities to the ratio of H×J×(H-1)×K equal to the minimum similarity of the preset third misrecognition rate threshold is the minimum similarity Degree threshold S min .
  5. 根据权利要求4所述的一种人脸识别方法,其特征在于:步骤e中,N=1时的第一误识率阈值、第二误识率阈值和第三误识率阈值分别大于N>1时的第一误识率阈值、第二误识率阈值和第三误识率阈值。The face recognition method according to claim 4, wherein in step e, the first false positive rate threshold, the second false positive rate threshold, and the third false positive rate threshold are respectively greater than N when N=1; The first false positive rate threshold, the second false positive rate threshold, and the third false positive rate threshold of >1.
  6. 根据权利要求4或5所述的一种人脸识别方法,其特征在于:H=1000,I=100,J=10,K=9。A face recognition method according to claim 4 or 5, characterized in that H = 1000, I = 100, J = 10, and K = 9.
  7. 根据权利要求6所述的一种人脸识别方法,其特征在于:当N=1时,第一误识率阈值为0.01%,第二误识率阈值为0.01%,第三误识率阈值为0.01%;当N>1时,第一误识率阈值为0.001%,第二误识率阈值为0.001%,第三误识率阈值为0.001%。A face recognition method according to claim 6, wherein when N=1, the first false positive rate threshold is 0.01%, the second false positive rate threshold is 0.01%, and the third false positive rate threshold is It is 0.01%; when N>1, the first false positive rate threshold is 0.001%, the second false positive rate threshold is 0.001%, and the third false positive rate threshold is 0.001%.
  8. 一种人脸识别系统,包括:A face recognition system comprising:
    模板库建立模块,用于构建人脸特征模板库,所述人脸特征模板库中存储有N个用户的人脸特征模板和用户基本信息,每个用户对应至少一个人脸特征模板;其中,N≥1;a template library building module, configured to construct a face feature template library, where the face feature template library stores N user face feature templates and user basic information, and each user corresponds to at least one face feature template; N≥1;
    待验证特征提取模块,用于提取待识别用户的人脸图像中的人脸特征,得到待识别的人脸特征模板; a feature extraction module to be used for extracting a face feature in a face image of the user to be identified, and obtaining a face feature template to be recognized;
    人脸识别模块,用于根据所述待识别的人脸特征模板和所述人脸特征模板库进行所述待识别用户的识别;所述人脸识别模块包括:a face recognition module, configured to perform identification of the user to be identified according to the face feature template to be identified and the face feature template library; the face recognition module includes:
    第一相似度计算单元,用于分别计算待识别的人脸特征模板与人脸特征模板库中每个用户的每个人脸特征模板的相似度,得到待识别的人脸特征模板与人脸特征模板库中每个用户的最大相似度和平均相似度;a first similarity calculation unit, configured to respectively calculate a similarity between the face feature template to be recognized and each face feature template of each user in the face feature template library, to obtain a face feature template and a face feature to be recognized The maximum similarity and average similarity of each user in the template library;
    待识别的人脸特征模板与某一用户的最大相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度中的最大相似度;待识别的人脸特征模板与某一用户的平均相似度是指待识别的人脸特征模板与该用户的所有人脸特征模板的相似度的平均值;The maximum similarity between the face feature template to be identified and a certain user is the maximum similarity between the similarity between the face feature template to be identified and all the face feature templates of the user; the face feature template to be recognized and The average similarity of a certain user refers to an average value of the similarity between the face feature template to be identified and all the face feature templates of the user;
    记待识别的人脸特征模板与人脸特征模板库中N个用户的最大相似度分别为SMax1,SMax2,…,SMaxN;待识别的人脸特征模板与人脸特征模板库中N个用户的平均相似度分别记为SAvg1,SAvg2,…,SAvgNThe maximum similarities between the N-users in the face feature template and the face feature template library are S Max1 , S Max2 ,..., S MaxN ; the face feature template to be recognized and the face feature template library The average similarity of users is recorded as S Avg1 , S Avg2 ,...,S AvgN ;
    第一人脸识别单元,用于获取SMax1,SMax2,…,SMaxN中的最大值MAXMax,根据最大值MAXMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值MAXMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则进入第二人脸识别单元;The first face recognition unit is configured to obtain a maximum value MAX Max in S Max1 , S Max2 , . . . , S MaxN , and a facial feature template of the user in the face feature template library corresponding to the maximum value MAX Max The recognized face feature template determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value MAX Max , and if so, the recognition ends; if not, the second face recognition unit is entered;
    第二人脸识别单元,用于获取SAvg1,SAvg2,…,SAvgN中的最大值AVGMax,根据最大值AVGMax所对应的人脸特征模板库中的用户的人脸特征模板和待识别的人脸特征模板,判断待识别用户是否为最大值AVGMax所对应的人脸特征模板库中的用户,若是,则识别结束,若否,则提示识别失败。a second face recognition unit, configured to acquire a maximum value AVG Max in S Avg1 , S Avg2 , . . . , S AvgN , according to a face feature template of the user in the face feature template library corresponding to the maximum value AVG Max The recognized face feature template determines whether the user to be identified is the user in the face feature template library corresponding to the maximum value AVG Max , and if so, the recognition ends, and if not, the recognition fails.
  9. 根据权利要求8所述的一种人脸识别系统,其特征在于:设人脸特征模板库中的所述某用户的人脸特征模板有k个,记待识别的人脸特征模板与k个人脸特征模板的相似度分别为SA1,SA2,…,SAkA face recognition system according to claim 8, wherein there are k face feature templates of the user in the face feature template library, and the face feature templates and k individuals to be identified are identified. The similarity of face feature templates are S A1 , S A2 ,..., S Ak ;
    所述第一人脸识别单元和第二人脸识别单元均包括:The first face recognition unit and the second face recognition unit each include:
    平均相似度计算子单元,用于取k个相似度SA1,SA2,…,SAk中的最大相似度SMaxA,计算k个相似度SA1,SA2,…,SAk的平均值,得到平均相似度SAvgAThe average similarity calculating sub-unit, for taking the k similarities S A1, S A2, ..., S Ak maximum similarity S MaxA, k is calculated a similarity S A1, S A2, ..., the average value of S Ak , get the average similarity S AvgA ;
    第一识别子单元,用于判断最大相似度SMaxA是否大于或等于预设的最 大相似度阈值Smax,若是,则确定待识别用户是所述某用户,若否,则进入第二识别子单元;a first identifying subunit, configured to determine whether the maximum similarity S MaxA is greater than or equal to a preset maximum similarity threshold S max , and if yes, determining that the user to be identified is the user, and if not, entering the second identifier unit;
    第二识别子单元,用于判断是否满足k≥KS,若是,则进入步骤第三识别子单元,若否,则确定待识别用户不是所述某用户;其中,KS为正整数,KS>1;a second identification subunit, configured to determine whether k≥K S is satisfied, and if yes, proceeds to step third identification subunit, and if not, determines that the user to be identified is not the user; wherein K S is a positive integer, K S >1;
    第三识别子单元,,用于判断所述平均相似度SAvgA是否大于或等于预设的平均相似度阈值Savg,若是,则确定待识别用户为所述某用户,若否,确定待识别用户不是所述某用户。a third identifying subunit, configured to determine whether the average similarity S AvgA is greater than or equal to a preset average similarity threshold S avg , and if yes, determining that the user to be identified is the user, and if not, determining to be identified The user is not the user.
  10. 根据权利要求9所述的一种人脸识别系统,其特征在于:所述第三识别子单元还包括:A face recognition system according to claim 9, wherein the third identification subunit further comprises:
    再次识别子单元,用于在平均相似度SAvgA<Savg时,在提示识别失败之前,再次进行待识别用户的识别;识别方式为:Recognizing the sub-unit again, when the average similarity S AvgA <S avg is used, the identification of the user to be identified is performed again before the prompt recognition fails; the recognition manner is:
    取k个相似度SA1,SA2,…,SAk中的最小相似度SMinA,判断所述最小相似度SMinA是否大于或等于预设的最小相似度阈值Smin,若是,则确定待识别用户为所述某用户,若否,则确定待识别用户不是所述某用户。Taking the minimum similarity S MinA in the k similarities S A1 , S A2 , . . . , S Ak , determining whether the minimum similarity S MinA is greater than or equal to a preset minimum similarity threshold S min , and if yes, determining The user is identified as the user, and if not, it is determined that the user to be identified is not the user.
  11. 根据权利要求10所述的一种人脸识别系统,其特征在于:该系统还包括:A face recognition system according to claim 10, wherein the system further comprises:
    相似度阈值确定模块,用于确定所述最大相似度阈值Smax、平均相似度阈值Savg和最小相似度阈值Smin;所述相似度确认模块包括:a similarity threshold determining module, configured to determine the maximum similarity threshold S max , an average similarity threshold S avg , and a minimum similarity threshold S min ; the similarity confirmation module includes:
    测试库构建单元,用于构建一个人脸图像测试库,测试库中存储有H个人的人脸图像,每个人的人脸图像数为I张;The test library building unit is configured to construct a face image test library, wherein the face image of the H person is stored in the test library, and the number of face images of each person is one;
    子库构建单元,用于从每个人的I张人脸图像中随机选取J张图像构成子库P,剩余的所有图像构成子库G;a sub-library building unit for randomly selecting J images from each person's I face images to form a sub-library P, and all remaining images constitute a sub-library G;
    子库分组单元,将子库G中的每个人的人脸图像分成K组,得到H×K组图像;a sub-library grouping unit, which divides a face image of each person in the sub-library G into K groups, and obtains an H×K group image;
    第二相似度计算单元,用于对于子库P中的H×J张图像中的每张图像P’,计算图像P’与子库G中除图像P’所属用户之外的每组图像的最大相似度、最 小相似度和平均相似度,得到H×J×(H-1)×K个最大相似度、H×J×(H-1)×K个最小相似度和H×J×(H-1)×K个平均相似度;a second similarity calculation unit, configured to calculate, for each image P′ in the H×J images in the sub-library P, each image of the image P′ and the sub-library G other than the user to which the image P′ belongs Maximum similarity, most Small similarity and average similarity, get H×J×(H-1)×K maximum similarities, H×J×(H-1)×K minimum similarities and H×J×(H-1) ×K average similarities;
    相似度阈值确定单元,用于将所述H×J×(H-1)×K个最大相似度、最小相似度和平均相似度分别按照从大到小的顺序排列,取H×J×(H-1)×K个最大相似度中位置序号与H×J×(H-1)×K的比值等于预设的第一误识率阈值的最大相似度为所述最大相似度阈值Smax;取H×J×(H-1)×K个平均相似度中位置序号与H×J×(H-1)×K的比值等于预设的第二误识率阈值的平均相似度为平均相似度阈值Savg;取H×J×(H-1)×K个最小相似度中位置序号与H×J×(H-1)×K的比值等于预设的第三误识率阈值的最小相似度为最小相似度阈值Smina similarity threshold determining unit, configured to arrange the H×J×(H−1××K maximum similarities, the minimum similarity, and the average similarity in descending order, respectively, in an order of H×J×( H-1) × K maximum similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset first misrecognition rate threshold, the maximum similarity is the maximum similarity threshold S max Taking the ratio of the position number of H×J×(H-1)×K average similarities to H×J×(H-1)×K equal to the average similarity of the preset second misrecognition rate threshold is average Similarity threshold S avg ; taking H × J × (H-1) × K minimum similarities, the ratio of the position number to H × J × (H-1) × K is equal to the preset third misrecognition rate threshold The minimum similarity is the minimum similarity threshold S min .
PCT/CN2017/076723 2016-03-24 2017-03-15 Face identification method and system WO2017162076A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610173912.8A CN105868695B (en) 2016-03-24 2016-03-24 A kind of face identification method and system
CN201610173912.8 2016-03-24

Publications (1)

Publication Number Publication Date
WO2017162076A1 true WO2017162076A1 (en) 2017-09-28

Family

ID=56625593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/076723 WO2017162076A1 (en) 2016-03-24 2017-03-15 Face identification method and system

Country Status (2)

Country Link
CN (1) CN105868695B (en)
WO (1) WO2017162076A1 (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298335A (en) * 2019-07-09 2019-10-01 中控华运(厦门)集成电路有限公司 Face identification system and face identification method
CN110843726A (en) * 2019-12-19 2020-02-28 北京明朝万达科技股份有限公司 Automobile door lock control system and method and vehicle
CN110858283A (en) * 2018-08-23 2020-03-03 营利度富信息系统(上海)有限公司 Application of face recognition in intelligent bank system
CN111291596A (en) * 2018-12-07 2020-06-16 杭州海康威视数字技术股份有限公司 Early warning method and device based on face recognition
CN111444886A (en) * 2020-04-27 2020-07-24 无锡职业技术学院 Intelligent face recognition system based on wearable equipment
CN111582305A (en) * 2020-03-26 2020-08-25 平安科技(深圳)有限公司 Biological feature recognition method and device, computer equipment and storage medium
CN111597532A (en) * 2020-04-10 2020-08-28 云知声智能科技股份有限公司 Method and system for realizing child robot child lock system based on face recognition
CN111639689A (en) * 2020-05-20 2020-09-08 杭州海康威视系统技术有限公司 Face data processing method and device and computer readable storage medium
CN113327332A (en) * 2018-09-29 2021-08-31 爱笔(北京)智能科技有限公司 Biological information-based ticket processing method and system, server and client
CN113420666A (en) * 2021-06-23 2021-09-21 上海应用技术大学 Memory assisting method and device based on face recognition technology
CN113469012A (en) * 2021-06-28 2021-10-01 广州云从鼎望科技有限公司 Method, system, medium, and apparatus for user face-brushing verification
CN114116849A (en) * 2021-12-01 2022-03-01 南威软件股份有限公司 Secondary studying and judging method and device for portrait early warning information
CN115019365A (en) * 2022-05-23 2022-09-06 北京计算机技术及应用研究所 Hierarchical face recognition method based on model applicability measurement
CN115880745A (en) * 2022-09-07 2023-03-31 以萨技术股份有限公司 Data processing system for acquiring human face image characteristics
CN116597185A (en) * 2023-07-17 2023-08-15 荣耀终端有限公司 Template updating method and electronic equipment
CN117284131A (en) * 2023-09-26 2023-12-26 广东安能电业有限公司 Electric bicycle charging cabinet and control method thereof

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868695B (en) * 2016-03-24 2019-04-02 北京握奇数据系统有限公司 A kind of face identification method and system
CN107832657A (en) * 2017-09-19 2018-03-23 浙江广锐信息科技有限公司 Image processing method and device
CN107563360B (en) * 2017-09-30 2021-05-07 百度在线网络技术(北京)有限公司 Information acquisition method and device
CN107679493A (en) * 2017-09-30 2018-02-09 百度在线网络技术(北京)有限公司 Face identification method and device
CN108875493B (en) * 2017-10-12 2021-04-27 北京旷视科技有限公司 Method and device for determining similarity threshold in face recognition
CN108052879B (en) * 2017-11-29 2020-08-07 厦门瑞为信息技术有限公司 Method for reducing human face recognition error rate
CN107862301A (en) * 2017-11-29 2018-03-30 厦门瑞为信息技术有限公司 The method for reducing recognition of face misclassification rate
CN108090420B (en) * 2017-11-30 2021-07-23 睿视智觉(深圳)算法技术有限公司 Face recognition method
CN108229322B (en) * 2017-11-30 2021-02-12 北京市商汤科技开发有限公司 Video-based face recognition method and device, electronic equipment and storage medium
CN108564067B (en) * 2018-04-28 2021-07-20 深圳卡安兴科技有限公司 Method and system for determining threshold value of face comparison
CN110619253B (en) * 2018-06-19 2022-06-07 北京京东尚科信息技术有限公司 Identity recognition method and device
CN109033988A (en) * 2018-06-29 2018-12-18 江苏食品药品职业技术学院 A kind of library's access management system based on recognition of face
CN109657605A (en) * 2018-12-17 2019-04-19 东方网力科技股份有限公司 A kind of method and device of face track and MAC track collision
CN109815845B (en) * 2018-12-29 2022-03-29 达闼机器人有限公司 Face recognition method and device and storage medium
CN109766857A (en) * 2019-01-16 2019-05-17 嘉兴学院 A kind of three-dimensional face identification method based on semantic alignment multizone template fusion
CN109902644A (en) * 2019-03-07 2019-06-18 北京海益同展信息科技有限公司 Face identification method, device, equipment and computer-readable medium
CN110717458B (en) * 2019-10-11 2022-07-22 北京地平线机器人技术研发有限公司 Face recognition method and recognition device
CN110866443B (en) * 2019-10-11 2023-06-16 厦门身份宝网络科技有限公司 Portrait storage method, face recognition equipment and storage medium
CN112860931B (en) * 2021-01-18 2023-11-03 广东便捷神科技股份有限公司 Construction method of face recognition library
CN112818885B (en) * 2021-02-07 2024-05-28 中国银联股份有限公司 Face recognition method, device, equipment and storage medium
CN113158786A (en) * 2021-03-11 2021-07-23 光控特斯联(上海)信息科技有限公司 Face recognition data processing method and device, computer equipment and storage medium
CN113269125B (en) * 2021-06-10 2024-05-14 北京中科闻歌科技股份有限公司 Face recognition method, device, equipment and storage medium
CN115880761B (en) * 2023-02-09 2023-05-05 数据空间研究院 Face recognition method, system, storage medium and application based on policy optimization

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060204058A1 (en) * 2004-12-07 2006-09-14 Kim Do-Hyung User recognition system and method thereof
CN101964064A (en) * 2010-07-27 2011-02-02 上海摩比源软件技术有限公司 Human face comparison method
CN102184391A (en) * 2011-05-19 2011-09-14 汉王科技股份有限公司 Distributed type face recognition method and system as well as face recognition terminal
CN103902961A (en) * 2012-12-28 2014-07-02 汉王科技股份有限公司 Face recognition method and device
CN105184238A (en) * 2015-08-26 2015-12-23 广西小草信息产业有限责任公司 Human face recognition method and system
CN105868695A (en) * 2016-03-24 2016-08-17 北京握奇数据系统有限公司 Human face recognition method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005196678A (en) * 2004-01-09 2005-07-21 Neucore Technol Inc Template matching method, and objective image area extracting device
CN105320923B (en) * 2014-08-05 2018-06-12 北京大学 Model recognizing method and device
CN105335726B (en) * 2015-11-06 2018-11-27 广州视源电子科技股份有限公司 Recognition of face confidence level acquisition methods and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060204058A1 (en) * 2004-12-07 2006-09-14 Kim Do-Hyung User recognition system and method thereof
CN101964064A (en) * 2010-07-27 2011-02-02 上海摩比源软件技术有限公司 Human face comparison method
CN102184391A (en) * 2011-05-19 2011-09-14 汉王科技股份有限公司 Distributed type face recognition method and system as well as face recognition terminal
CN103902961A (en) * 2012-12-28 2014-07-02 汉王科技股份有限公司 Face recognition method and device
CN105184238A (en) * 2015-08-26 2015-12-23 广西小草信息产业有限责任公司 Human face recognition method and system
CN105868695A (en) * 2016-03-24 2016-08-17 北京握奇数据系统有限公司 Human face recognition method and system

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110858283A (en) * 2018-08-23 2020-03-03 营利度富信息系统(上海)有限公司 Application of face recognition in intelligent bank system
CN113327332A (en) * 2018-09-29 2021-08-31 爱笔(北京)智能科技有限公司 Biological information-based ticket processing method and system, server and client
CN111291596A (en) * 2018-12-07 2020-06-16 杭州海康威视数字技术股份有限公司 Early warning method and device based on face recognition
CN110298335A (en) * 2019-07-09 2019-10-01 中控华运(厦门)集成电路有限公司 Face identification system and face identification method
CN110843726A (en) * 2019-12-19 2020-02-28 北京明朝万达科技股份有限公司 Automobile door lock control system and method and vehicle
CN111582305B (en) * 2020-03-26 2023-08-18 平安科技(深圳)有限公司 Biological feature recognition method, apparatus, computer device and storage medium
CN111582305A (en) * 2020-03-26 2020-08-25 平安科技(深圳)有限公司 Biological feature recognition method and device, computer equipment and storage medium
CN111597532A (en) * 2020-04-10 2020-08-28 云知声智能科技股份有限公司 Method and system for realizing child robot child lock system based on face recognition
CN111597532B (en) * 2020-04-10 2023-11-17 云知声智能科技股份有限公司 Method and system for realizing child lock system of child robot based on face recognition
CN111444886A (en) * 2020-04-27 2020-07-24 无锡职业技术学院 Intelligent face recognition system based on wearable equipment
CN111639689A (en) * 2020-05-20 2020-09-08 杭州海康威视系统技术有限公司 Face data processing method and device and computer readable storage medium
CN111639689B (en) * 2020-05-20 2023-07-25 杭州海康威视系统技术有限公司 Face data processing method and device and computer readable storage medium
CN113420666A (en) * 2021-06-23 2021-09-21 上海应用技术大学 Memory assisting method and device based on face recognition technology
CN113469012A (en) * 2021-06-28 2021-10-01 广州云从鼎望科技有限公司 Method, system, medium, and apparatus for user face-brushing verification
CN113469012B (en) * 2021-06-28 2024-05-03 广州云从鼎望科技有限公司 User face brushing verification method, system, medium and device
CN114116849A (en) * 2021-12-01 2022-03-01 南威软件股份有限公司 Secondary studying and judging method and device for portrait early warning information
CN115019365A (en) * 2022-05-23 2022-09-06 北京计算机技术及应用研究所 Hierarchical face recognition method based on model applicability measurement
CN115019365B (en) * 2022-05-23 2024-04-09 北京计算机技术及应用研究所 Hierarchical face recognition method based on model applicability measurement
CN115880745A (en) * 2022-09-07 2023-03-31 以萨技术股份有限公司 Data processing system for acquiring human face image characteristics
CN116597185A (en) * 2023-07-17 2023-08-15 荣耀终端有限公司 Template updating method and electronic equipment
CN116597185B (en) * 2023-07-17 2023-12-15 荣耀终端有限公司 Template updating method and electronic equipment
CN117284131A (en) * 2023-09-26 2023-12-26 广东安能电业有限公司 Electric bicycle charging cabinet and control method thereof
CN117284131B (en) * 2023-09-26 2024-05-03 广东安能电业有限公司 Electric bicycle charging cabinet and control method thereof

Also Published As

Publication number Publication date
CN105868695A (en) 2016-08-17
CN105868695B (en) 2019-04-02

Similar Documents

Publication Publication Date Title
WO2017162076A1 (en) Face identification method and system
JP7109634B2 (en) Identity authentication method and device
WO2019119505A1 (en) Face recognition method and device, computer device and storage medium
CN103841108B (en) The authentication method and system of user biological feature
WO2021036436A1 (en) Facial recognition method and apparatus
WO2018001092A1 (en) Face recognition method and apparatus
CN101587485B (en) Face information automatic login method based on face recognition technology
CN105825176A (en) Identification method based on multi-mode non-contact identity characteristics
CN107358699B (en) Security verification method and system
WO2019090834A1 (en) Express cabinet pickup method and apparatus based on voiceprint
CN108875907B (en) Fingerprint identification method and device based on deep learning
WO2013178002A1 (en) Voice recognition and matching method and device, and computer program and storage medium
Baig et al. Fingerprint-Iris fusion based identification system using a single hamming distance matcher
WO2016201731A1 (en) Fingerprint recognition method and apparatus, and electronic device
CN101964056A (en) Bimodal face authentication method with living body detection function and system
TW202018577A (en) Human recognition method based on data fusion
US9135562B2 (en) Method for gender verification of individuals based on multimodal data analysis utilizing an individual&#39;s expression prompted by a greeting
KR20100041562A (en) Method and system for performing user authentication by face recognizing and fingerprint recognizing of user needing an authentication
CN113505717A (en) Online passing system based on face and facial feature recognition technology
CN112861742A (en) Face recognition method and device, electronic equipment and storage medium
KR20110100008A (en) User recognition apparatus and method using age and gender as semi biometrics
CN107657289A (en) Multimodal Biometrics device and its recognition methods
JP2005165447A (en) Age/sex discrimination device, age/sex discrimination method and person recognition device
Miao et al. Fusion of multibiometrics based on a new robust linear programming
Kisku et al. Feature level fusion of biometrics cues: human identification with Doddington’s caricature

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17769353

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17769353

Country of ref document: EP

Kind code of ref document: A1