A face recognition method and device

By extracting and sparsely processing feature vectors of face images, and using fuzzy evaluation algorithm to determine the score, the target image is determined from the face library for recognition, solving the inefficiency caused by the small number of pictures stored in the face library and the complex recognition method. The problem is to achieve efficient face recognition.

CN113128325BActive Publication Date: 2025-02-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010057979.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-16
Publication Date
2025-02-21
Estimated Expiration
2040-01-16

AI Technical Summary

Technical Problem

In the prior art, the number of face pictures stored in the face library is small, and the complex face recognition method leads to low recognition efficiency.

Method used

By extracting the feature vectors of face pictures, sparse processing and fuzzy evaluation are performed, and face recognition efficiency is improved. The specific steps include: extracting the feature vectors according to the feature vector extraction algorithm, performing sparse processing to obtain the sparse feature vectors, using the fuzzy evaluation algorithm to determine the score, and determining the target image from the face library for recognition.

Benefits of technology

While improving the stock of face pictures in the face library, it significantly improves the efficiency of face recognition, overcoming the inefficiency problem caused by the small number of pictures stored in the face library and the complex recognition methods in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113128325B_ABST
    Figure CN113128325B_ABST
Patent Text Reader

Abstract

The present invention discloses a face recognition method and device, and relates to the field of computer technology. A specific implementation of the method includes: in response to a face recognition request initiated by a user, obtaining a face picture of the user; extracting a feature vector of the face picture according to a feature vector extraction algorithm, and performing sparse processing on the feature vector to obtain a sparse feature vector; determining a score of the face picture of the user corresponding to the sparse feature vector according to a fuzzy evaluation algorithm; and determining a target picture from a face library according to the score of the face picture of the user for face recognition. This implementation improves the efficiency of face recognition while increasing the storage capacity of face pictures in the face library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a face recognition method and device. Background Art

[0002] Face recognition is the process of comparing the face images detected in static images or video images with the face images in the face database to find the matching faces in order to achieve the purpose of identity recognition and authentication. It is increasingly valued because of its wide application in many fields such as business, identity authentication, and payment security.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] 1. To ensure recognition efficiency, the number of face images stored in the current face database is relatively small;

[0005] 2. The face recognition method in the prior art is relatively complicated, resulting in low efficiency of face recognition. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a face recognition method and device, which can improve the face recognition efficiency while increasing the storage of face images in a face database.

[0007] To achieve the above object, according to a first aspect of an embodiment of the present invention, a face recognition method is provided, comprising:

[0008] In response to a face recognition request initiated by a user, obtaining a face image of the user;

[0009] Extract the feature vector of the face image according to the feature vector extraction algorithm, and perform sparse processing on the feature vector to obtain a sparse feature vector;

[0010] Determine the score of the user's face picture corresponding to the sparse feature vector according to the fuzzy evaluation algorithm;

[0011] According to the ratings of the user's face pictures, the target pictures are determined from the face library for face recognition.

[0012] Furthermore, the step of extracting a feature vector of a face image according to a feature vector extraction algorithm includes: according to the instructions of the feature vector extraction algorithm, using a Gaussian difference function to perform dimensionality reduction processing on the face image to obtain a Gaussian difference image, performing fitting processing on the Gaussian difference image to obtain feature points, using gradient information of the neighborhood of the feature points to determine a gradient histogram of the feature points, and obtaining a feature vector of the face image according to the gradient histogram.

[0013] Furthermore, the step of performing sparse processing on the feature vector to obtain a sparse feature vector includes: performing sparse processing on the feature vector according to a learning basis function, sparse coding and a local variance similarity algorithm to obtain a sparse feature vector.

[0014] Furthermore, the step of determining the score of the face image corresponding to the sparse feature vector according to the fuzzy evaluation algorithm includes: placing the sparse feature vector into the factor set of the fuzzy evaluation algorithm, each factor subset of the factor set corresponds to a sparse feature vector, determining the fuzzy subset according to the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, and performing weighted calculation on each normalized element in the fuzzy subset and the evaluation value of the corresponding level in the corresponding evaluation set to obtain the score of the face image corresponding to the user, wherein the evaluation value corresponding to different levels is indicated in the evaluation set.

[0015] Furthermore, the evaluation set of the fuzzy evaluation algorithm is determined according to the face type.

[0016] Furthermore, the weight value corresponding to each factor subset is determined based on historical data, and the weight value corresponding to each element in the factor subset is determined based on an average value of all elements in the factor subset.

[0017] Furthermore, the face library includes scores of all face images in the library, and the step of determining a target image from the face library for face recognition based on the score of the user's face image includes: calculating the absolute value of the difference between the score of the user's face image and the score of all face images in the library, sorting the absolute values, and determining the target image for face recognition based on the sorting results.

[0018] According to a second aspect of an embodiment of the present invention, there is provided a face recognition device, comprising:

[0019] A face image acquisition module, used to respond to a face recognition request initiated by a user and acquire a face image of the user;

[0020] A feature vector extraction module is used to extract feature vectors of face images according to a feature vector extraction algorithm, and to perform sparse processing on the feature vectors to obtain sparse feature vectors;

[0021] A rating determination module determines the rating of the user's face image corresponding to the sparse feature vector according to a fuzzy evaluation algorithm;

[0022] The face recognition module is used to determine the target image from the face library for face recognition based on the rating of the user's face image.

[0023] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0024] one or more processors;

[0025] a storage device for storing one or more programs,

[0026] When one or more programs are executed by one or more processors, the one or more processors implement any of the above-mentioned face recognition methods.

[0027] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned face recognition methods is implemented.

[0028] An embodiment of the above invention has the following advantages or beneficial effects: because it adopts the method of obtaining the user's face picture in response to the face recognition request initiated by the user; extracting the feature vector of the face picture according to the feature vector extraction algorithm, and sparsely processing the feature vector to obtain a sparse feature vector; determining the score of the user's face picture corresponding to the sparse feature vector according to the fuzzy evaluation algorithm; and determining the target picture from the face library according to the score of the user's face picture for face recognition, the technical problem of the small number of face pictures stored in the face library and the low recognition efficiency caused by the complexity of the existing face recognition method in the prior art is overcome, thereby achieving the technical effect of improving the face recognition efficiency while increasing the storage capacity of face pictures in the face library.

[0029] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0031] Figure 1 is a schematic diagram of the main process of the face recognition method provided according to the first embodiment of the present invention;

[0032] Figure 2 is a schematic diagram of the main process of the face recognition method provided according to the second embodiment of the present invention;

[0033] Figure 3 is a schematic diagram of main modules of a face recognition device provided according to an embodiment of the present invention;

[0034] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0035] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0037] Figure 1 is a schematic diagram of the main process of the face recognition method provided according to the first embodiment of the present invention; Figure 1 As shown, the face recognition method provided by the embodiment of the present invention mainly includes:

[0038] Step S101, in response to a face recognition request initiated by a user, obtaining a face image of the user.

[0039] Specifically, according to an embodiment of the present invention, when a user initiates a face recognition request such as face payment or face recognition authentication, the user's face image is captured by the camera of the face recognition device, and then the face recognition server obtains the face image of the corresponding user.

[0040] Step S102, extracting a feature vector of the face image according to a feature vector extraction algorithm, and performing sparse processing on the feature vector to obtain a sparse feature vector.

[0041] According to an embodiment of the present invention, feature vector extraction algorithms such as SIFT (Scale-invariant feature transform) algorithm and PCA (Principal Component Analysis) algorithm may be used to extract feature vectors of face images.

[0042] According to an embodiment of the present invention, the step of extracting a feature vector of a face image according to a feature vector extraction algorithm includes: according to the instructions of the feature vector extraction algorithm, using a Gaussian difference function to perform dimensionality reduction processing on the face image to obtain a Gaussian difference image, fitting the Gaussian difference image to obtain feature points, using gradient information of the neighborhood of the feature points to determine the gradient histogram of the feature points, and obtaining the feature vector of the face image according to the gradient histogram.

[0043] Specifically, according to a specific implementation method of an embodiment of the present invention, a Gaussian difference function is used to reduce the dimension of the adjacent layer image of the face image to obtain a Gaussian difference image. Then, the pixel points of the Gaussian difference image are fitted with the pixel points around them to obtain extreme points (i.e., feature points). In order to ensure that the feature points are rotated and not deformed, the gradient histogram of the feature points is determined by the gradient information of the neighborhood of the feature points (gradient amplitude algorithm and gradient direction algorithm). The direction corresponding to the peak in the gradient histogram is the main direction of the feature point. With the position of the feature point as the center, an 8×8 square area is divided, and each pixel point is represented by a small grid. The gradient direction and amplitude of each pixel are represented by the direction and size of the arrow respectively. The gradient histograms of the 8 directions in the 4×4 rectangular part are calculated respectively to form 4 seed points. The 4 seed point directions are superimposed to form feature points, and then superimposed to obtain 4×4×8 data to form a feature vector.

[0044] Further, according to an embodiment of the present invention, the step of performing sparse processing on the feature vector to obtain a sparse feature vector includes: performing sparse processing on the feature vector according to a learning basis function, sparse coding and a local variance similarity algorithm to obtain a sparse feature vector.

[0045] Specifically, according to a specific implementation method of the first embodiment of the present invention, the above-mentioned feature vector is used to construct a learning basis function, the feature vector is processed by the alternating minimization formula of the learning basis function, and then sparse coding is used to represent the sparse linear combination of the feature vector elements. At the same time, in order to reduce the error and obtain better image sparse features, the local variance similarity algorithm is introduced to improve the details and content of the face image. The local variance similarity algorithm can also enhance the spatiality and structure of the image features, enhance the robustness of face recognition, and make face recognition more accurate. The feature vector is optimized by the sparse coding and local variance similarity algorithms, and the processing result obtained is the sparse feature vector.

[0046] Specifically, in order to reduce the amount of calculation and the amount of storage to facilitate subsequent fuzzy evaluation processing, according to an embodiment of the present invention, after the feature vector is optimized by the sparse coding and local variance similarity algorithm to obtain the processing result, the output dimension of the face image is reduced by calculating the average value, thereby obtaining a sparse feature vector with average processing.

[0047] Step S103, determining the score of the user's face picture corresponding to the sparse feature vector according to the fuzzy evaluation algorithm.

[0048] According to an embodiment of the present invention, the step of determining the score of the face picture corresponding to the sparse feature vector according to the fuzzy evaluation algorithm includes: placing the sparse feature vector into the factor set of the fuzzy evaluation algorithm, each factor subset of the factor set corresponds to a sparse feature vector, determining the fuzzy subset according to the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, and performing weighted calculation on each normalized element in the fuzzy subset and the evaluation value of the corresponding level in the corresponding evaluation set to obtain the score of the face picture corresponding to the user, wherein the evaluation values ​​corresponding to different levels are indicated in the evaluation set.

[0049] Further, according to an embodiment of the present invention, the evaluation set of the fuzzy evaluation algorithm is determined according to the face type.

[0050] Specifically, the evaluation set is divided into different levels according to the face type, and a corresponding evaluation value is configured for each level. The level division and the evaluation value corresponding to each level can be adjusted according to actual conditions.

[0051] Further, according to an embodiment of the present invention, the weight value corresponding to each factor subset is determined based on historical data, and the weight value corresponding to each element in the factor subset is determined based on an average value of all elements in the factor subset.

[0052] Specifically, according to a specific implementation of an embodiment of the present invention, by judging the influence of each sparse feature vector (i.e., each factor subset) on the grade in the evaluation set, the weight value corresponding to each factor subset is determined according to historical data and experience. Then, the weight value corresponding to each element is determined according to the ratio of each element in each factor subset to the average value of all elements.

[0053] According to a specific implementation of an embodiment of the present invention, a sparse feature vector is used as a factor set for fuzzy evaluation, wherein each factor subset in the factor set corresponds to a sparse feature vector. Then, a fuzzy subset is determined based on the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, wherein the fuzzy subset corresponds to the membership of each level in the evaluation set, and then the fuzzy subset is normalized to obtain the normalized membership of each level in the evaluation set. The score of the user's face image is obtained by weighting the normalized membership corresponding to each level with the score value corresponding to the level.

[0054] Step S104, determining a target image from a face database according to the rating of the user's face image for face recognition.

[0055] According to an embodiment of the present invention, the face library includes the scores of all face pictures in the library, and the step of determining the target picture from the face library for face recognition based on the score of the user's face picture includes: calculating the absolute value of the difference between the score of the user's face picture and the score of all face pictures in the library, sorting the absolute values, and determining the target picture for face recognition based on the sorting results.

[0056] Further, according to a specific implementation of an embodiment of the present invention, after sorting the absolute values, the step of determining the target image for face recognition according to the sorting results includes: after arranging the absolute values ​​in ascending order, determining TOP-N (where N is the number of target images, which can be adjusted according to actual conditions) face images in the library as target images, and performing face recognition according to the order.

[0057] According to the technical solution of the embodiment of the present invention, the face picture of the user is obtained in response to the face recognition request initiated by the user; the feature vector of the face picture is extracted according to the feature vector extraction algorithm, and the feature vector is sparsely processed to obtain a sparse feature vector; the score of the face picture of the user corresponding to the sparse feature vector is determined according to the fuzzy evaluation algorithm; and the target picture is determined from the face library according to the score of the user's face picture for face recognition. Therefore, the technical problems of the small number of face pictures stored in the face library and the low recognition efficiency caused by the complexity of the existing face recognition methods in the prior art are overcome, thereby achieving the technical effect of improving the face recognition efficiency while increasing the stock of face pictures in the face library.

[0058] Figure 2 is a schematic diagram of the main process of the face recognition method provided according to the second embodiment of the present invention; Figure 2 As shown, the face recognition method provided by the embodiment of the present invention mainly includes:

[0059] Step S201, in response to a face recognition request initiated by a user, obtaining a face image of the user.

[0060] Specifically, according to an embodiment of the present invention, when a user initiates a face recognition request such as face payment or face recognition authentication, the user's face image is captured by the camera of the face recognition device, and then the face recognition server obtains the face image of the corresponding user.

[0061] Step S202, extracting a feature vector of the face image according to a feature vector extraction algorithm.

[0062] According to an embodiment of the present invention, feature vector extraction algorithms such as SIFT (Scale-invariant feature transform) algorithm and PCA (Principal Component Analysis) algorithm may be used to extract feature vectors of face images.

[0063] Specifically, according to an embodiment of the present invention, according to the instruction of the feature vector extraction algorithm, the Gaussian difference function is used to perform dimensionality reduction processing on the face image to obtain a Gaussian difference image. Among them, the Gaussian difference function (DOG, Difference of Gaussian) has a specific form:

[0064] D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ)·I(x,y))=L(x,y,kσ)-L(x,y,σ)

[0065] Wherein, G(x, y, σ) is a Gaussian function of varying scale; I(x, y) represents a face image; σ represents a scale factor of the Gaussian function, and k is a proportional constant. According to an embodiment of the present invention, a Gaussian difference image can be obtained by subtracting two adjacent layer images.

[0066] Then, the Gaussian difference image is fitted to obtain feature points. Specifically, a pixel point is compared with all its neighboring points to obtain the extreme point of the Gaussian difference function. The central detection must be compared with 26 points, including 9×2=18 points corresponding to the neighboring scales above and below it and 8 neighboring points on one scale to ensure that all extreme points are detected. The local extreme points of the Gaussian difference space constitute the feature points. According to a specific implementation of an embodiment of the present invention, the scale space Gaussian difference function curve is fitted to improve stability, and the formula for the extreme point equation is obtained as follows:

[0067]

[0068] Where X is the offset relative to the interpolation center.

[0069] At the same time, in order to ensure that the feature points are rotationally invariant, the main direction of each feature point needs to be determined using the gradient histogram method. The gradient histogram is used to divide the direction from 0 to 360° into 36 columns, each column is 10°, and the direction corresponding to the peak value in the gradient histogram is the main direction of the feature point. Specifically, the gradient histogram of the feature point can be determined based on the gradient information of the feature point neighborhood, where the gradient information includes the gradient amplitude algorithm and the gradient direction algorithm. The gradient amplitude algorithm is:

[0070]

[0071] The gradient direction algorithm is:

[0072] θ(x,y)=tan -1 ((L(x,,y+1))-L(x,y-1)) / (L(x+1,y)-L(x-1,y))

[0073] Finally, the feature point is used as the center to divide the area into 8×8 squares. Each pixel is represented by a small grid. The gradient direction and amplitude of each pixel are represented by the direction and size of the arrow. The gradient histograms of the 8 directions in the 4×4 rectangular part are calculated to form 4 seed points. The 4 seed point directions are superimposed to form feature points. The superposition can obtain 4×4×8 data to form a feature vector.

[0074] Step S203, performing sparse processing on the feature vector according to the learning basis function, sparse coding and local variance similarity algorithm to obtain a sparse feature vector.

[0075] First, construct the learning basis function D, where the alternating minimization formula of the learning basis function D is:

[0076]

[0077] Among them, ||s i ||0 represents column vector s i The number of nonzero elements in .

[0078] After learning the basis function D, sparse coding is used to represent the sparse linear combination of elements in the feature vector. The feature coding part can be transformed into an optimization problem, and the formula is:

[0079]

[0080] Among them, θ(s i ) represents the sparse penalty function.

[0081] In order to reduce the error and obtain better image sparse features, local variance similarity (LVS) is introduced to improve the details and content of face images.

[0082] The LVS formula is:

[0083]

[0084] Among them, μ x represents the average value of x; μ y represents the average value of y; σ x represents the standard deviation of x; σ yRepresents the standard deviation of y. The original face image is divided into an n-dimensional column vector I, and the pixel point is represented by I i (i=1,…,N). Through φ k represents each element in the column vector I, φ i,j That is, the elements in the learning basis function D are reconstructed by Y i (i=1,…,N) represents.

[0085] Combining sparse coding with LVS, we can get an optimization formula with smaller error:

[0086]

[0087] Among them, λ1, λ2 and λ3 are weight coefficients.

[0088] Combining the above formula (1) and formula (2), we get:

[0089]

[0090] By solving equation (3), we can obtain the sparse feature vector.

[0091] Equation (3) can be solved by alternative optimization methods, that is, fixing one variable and solving for another variable. Definition:

[0092]

[0093] In the first step, the learning basis function D is fixed and S is calculated by conjugate gradient.

[0094]

[0095] in,

[0096] Then, the variable S is fixed and the learning basis function D is solved using a simple gradient method.

[0097]

[0098] in,

[0099] At the same time, in order to facilitate the subsequent fuzzy evaluation processing, the output dimension of the face image is reduced by calculating the average value, and then the sparse feature vector m of the average processing is obtained.

[0100] Specifically

[0101]

[0102] Step S204: placing the sparse feature vector into a factor set of the fuzzy evaluation algorithm, wherein each factor subset of the factor set corresponds to a sparse feature vector.

[0103] Specifically, according to an embodiment of the present invention, the n sparse feature vectors m obtained above are combined into a matrix M, and M is used as a factor set U of the fuzzy evaluation algorithm. Each factor subset U of the factor set is i Corresponding to a sparse feature vector m, U i =(μ1,μ2,μ3,…,μ β ), i = 1, 2, ... n. Where n is the number of sparse feature vectors, which is also the number of factor subsets. Β is the number of elements in each sparse feature vector (the specific value varies depending on the sparse feature vector.)

[0104] Step S205, determining an evaluation set of the fuzzy evaluation algorithm according to the face type, wherein the evaluation set indicates evaluation values ​​corresponding to different levels.

[0105] According to an embodiment of the present invention, according to the face type, four levels are divided into low appearance (V1), lower moderate appearance (V2), upper moderate appearance (V3) and high appearance (V4), forming an evaluation set, and a corresponding evaluation value is determined for each level. According to a specific implementation method of an embodiment of the present invention, V = {V1, V2, V3, V4} = {0.1, 0.4, 07, 1}, it should be noted that the above values ​​and level divisions are only examples, and can be determined by other standards according to actual conditions.

[0106] Specifically, according to a specific implementation mode of an embodiment of the present invention, the above-mentioned step of determining the evaluation set of the fuzzy evaluation algorithm according to the face type can also be: setting different face shape scores according to the face type (such as square face, melon-shaped face, round face, oval face, etc.), setting different attribute scores according to the multiple attributes under the face type (such as eyes, eyebrows, mouth, ears, etc.), and then determining the evaluation value corresponding to the corresponding face type by weighting the face shape score and the attribute score.

[0107] Step S206, determining the weight value corresponding to each factor subset, and determining the weight value corresponding to each element according to the average value of all elements in each factor subset.

[0108] Specifically, we assign weights to each factor subset based on historical data and experience, that is, determine the weight value of each factor subset, and obtain:

[0109]

[0110] The weight value corresponding to each element is determined according to the ratio of the value corresponding to each element in each factor subset to the average value of all elements, specifically:

[0111]

[0112] W represents the weight value corresponding to each element in the factor subset, W={W1,W2,…,W n}.

[0113] Step S207 , determining a fuzzy subset according to the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset.

[0114] Specifically, the formula is expressed as C = W·B = (c1, c2, c3, c4), where C is the fuzzy subset of the fuzzy evaluation algorithm, c1, c2, c3, c4 correspond to the four levels in the evaluation set, and the elements in the fuzzy subset are normalized to obtain:

[0115]

[0116] Step S208, performing weighted calculation on the evaluation values ​​of the corresponding levels of each normalized element in the fuzzy subset and its corresponding evaluation set to obtain the score of the face image corresponding to the user.

[0117] Specifically, each normalized element in the fuzzy subset is multiplied by the evaluation value of its corresponding level, and then the result is weighted to obtain the score γ of the user's face image.

[0118] γ=d1·V1+d2·V2+d3·V3+d4·V4

[0119] Step S209, calculating the absolute value of the difference between the score of the user's face picture and the score of all face pictures in the library.

[0120] Specifically, the calculation is performed according to the following formula:

[0121] κ=|γ-δ i |

[0122] Among them, δ i Represents the score of the i-th face image in the face database.

[0123] Step S210, after arranging the absolute value values ​​in order from small to large, determine TOP-N (where N is the number of target images, which can be adjusted according to actual conditions) face images in the library as target images, and perform face recognition according to the order.

[0124] According to the technical solution of the embodiment of the present invention, the face picture of the user is obtained in response to the face recognition request initiated by the user; the feature vector of the face picture is extracted according to the feature vector extraction algorithm, and the feature vector is sparsely processed to obtain a sparse feature vector; the score of the face picture of the user corresponding to the sparse feature vector is determined according to the fuzzy evaluation algorithm; and the target picture is determined from the face library according to the score of the user's face picture for face recognition. Therefore, the technical problems of the small number of face pictures stored in the face library and the low recognition efficiency caused by the complexity of the existing face recognition methods in the prior art are overcome, thereby achieving the technical effect of improving the face recognition efficiency while increasing the stock of face pictures in the face library.

[0125] Figure 3 is a schematic diagram of the main modules of the face recognition device provided according to an embodiment of the present invention; Figure 3 As shown, the face recognition device 300 provided by the embodiment of the present invention mainly includes:

[0126] The face image acquisition module 301 is used to obtain the face image of the user in response to the face recognition request initiated by the user.

[0127] Specifically, according to an embodiment of the present invention, when a user initiates a face recognition request such as face payment or face recognition authentication, the user's face image is captured by the camera of the face recognition device, and then the face recognition server obtains the face image of the corresponding user.

[0128] The feature vector extraction module 302 is used to extract the feature vector of the face image according to the feature vector extraction algorithm, and perform sparse processing on the feature vector to obtain a sparse feature vector.

[0129] According to an embodiment of the present invention, feature vector extraction algorithms such as SIFT (Scale-invariant feature transform) algorithm and PCA (Principal Component Analysis) algorithm may be used to extract feature vectors of face images.

[0130] According to an embodiment of the present invention, the feature vector extraction module 302 is also used to: perform dimensionality reduction processing on the face image using a Gaussian difference function to obtain a Gaussian difference image according to the instructions of the feature vector extraction algorithm, perform fitting processing on the Gaussian difference image to obtain feature points, determine the gradient histogram of the feature points using the gradient information of the neighborhood of the feature points, and obtain the feature vector of the face image according to the gradient histogram.

[0131] Specifically, according to a specific implementation method of the first embodiment of the present invention, the feature vector extraction module 302 performs dimensionality reduction processing on the adjacent layer image of the face image by using the Gaussian difference function to obtain a Gaussian difference image. Then, the pixel points of the Gaussian difference image are fitted with the pixel points around them to obtain extreme points (i.e., feature points). In order to ensure that the feature points are rotated and not deformed, the gradient histogram of the feature points is determined by the gradient information of the neighborhood of the feature points (gradient amplitude algorithm and gradient direction algorithm). The direction corresponding to the peak in the gradient histogram is the main direction of the feature point. With the position of the feature point as the center, an 8×8 square area is divided, and each pixel point is represented by a small grid. The gradient direction and amplitude of each pixel are represented by the direction and size of the arrow respectively. The gradient histograms of the 8 directions in the 4×4 rectangular part are calculated respectively to form 4 seed points. The 4 seed point directions are superimposed to form feature points, and then superimposed to obtain 4×4×8 data to form a feature vector.

[0132] Further, according to an embodiment of the present invention, the feature vector extraction module 302 is further configured to: perform sparse processing on the feature vector according to a learning basis function, sparse coding and a local variance similarity algorithm to obtain a sparse feature vector.

[0133] Specifically, according to a specific implementation method of the first embodiment of the present invention, the feature vector extraction module 302 uses the above feature vector to construct a learning basis function, processes the feature vector through the alternating minimization formula of the learning basis function, and then uses sparse coding to represent the sparse linear combination of the feature vector elements. At the same time, in order to reduce the error and obtain better image sparse features, the local variance similarity algorithm is introduced to improve the details and content of the face image. The local variance similarity algorithm can also enhance the spatiality and structure of the image features, enhance the robustness of face recognition, and make face recognition more accurate. The feature vector is optimized by the sparse coding and local variance similarity algorithm, and the processing result obtained is the sparse feature vector.

[0134] Specifically, in order to reduce the amount of calculation and the amount of storage to facilitate subsequent fuzzy evaluation processing, according to an embodiment of the present invention, after the feature vector is optimized by the sparse coding and local variance similarity algorithm to obtain the processing result, the feature vector extraction module 302 also reduces the output dimension of the face image by calculating the average value, thereby obtaining a sparse feature vector with average processing.

[0135] The rating determination module 303 determines the rating of the user's face picture corresponding to the sparse feature vector according to the fuzzy evaluation algorithm.

[0136] According to an embodiment of the present invention, the above-mentioned score determination module 303 is also used to: place the sparse feature vector into the factor set of the fuzzy evaluation algorithm, each factor subset of the factor set corresponds to a sparse feature vector, determine the fuzzy subset according to the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, and perform weighted calculation on each normalized element in the fuzzy subset and the evaluation value of the corresponding level in the corresponding evaluation set to obtain the score of the facial image corresponding to the user, wherein the evaluation values ​​corresponding to different levels are indicated in the above-mentioned evaluation set.

[0137] Further, according to an embodiment of the present invention, the evaluation set of the fuzzy evaluation algorithm is determined according to the face type. Specifically, the evaluation set is divided into different levels according to the face type, and a corresponding evaluation value is configured for each level. The level division and the evaluation value corresponding to each level can be adjusted according to actual conditions.

[0138] Further, according to an embodiment of the present invention, the weight value corresponding to each factor subset is determined based on historical data, and the weight value corresponding to each element in the factor subset is determined based on an average value of all elements in the factor subset.

[0139] Specifically, according to a specific implementation of an embodiment of the present invention, by judging the influence of each sparse feature vector (i.e., each factor subset) on the grade in the evaluation set, the weight value corresponding to each factor subset is determined according to historical data and experience. Then, the weight value corresponding to each element is determined according to the ratio of each element in each factor subset to the average value of all elements.

[0140] According to a specific implementation of an embodiment of the present invention, the score determination module 303 uses a sparse feature vector as a factor set for fuzzy evaluation, wherein each factor subset in the factor set corresponds to a sparse feature vector. Then, a fuzzy subset is determined based on the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, wherein the fuzzy subset corresponds to the membership of each level in the evaluation set, and then the fuzzy subset is normalized to obtain the normalized membership of each level in the evaluation set. The score of the user's face image is obtained by weighting the normalized membership corresponding to each level with the score value corresponding to the level.

[0141] The face recognition module 304 is used to determine a target image from a face database for face recognition according to the rating of the user's face image.

[0142] According to an embodiment of the present invention, the face library includes the scores of all face pictures in the library, and the face recognition module 304 is also used to: calculate the absolute value of the difference between the score of the user's face picture and the score of all face pictures in the library, sort the absolute values, and determine the target picture for face recognition according to the sorting results.

[0143] Further, according to a specific implementation of an embodiment of the present invention, after sorting the absolute values, the face recognition module 304 is also used to: after arranging the absolute values ​​in ascending order, determine TOP-N (where N is the number of target images, which can be adjusted according to actual conditions) face images in the library as target images, and perform face recognition according to the order.

[0144] According to the technical solution of the embodiment of the present invention, the face picture of the user is obtained in response to the face recognition request initiated by the user; the feature vector of the face picture is extracted according to the feature vector extraction algorithm, and the feature vector is sparsely processed to obtain a sparse feature vector; the score of the face picture of the user corresponding to the sparse feature vector is determined according to the fuzzy evaluation algorithm; and the target picture is determined from the face library according to the score of the user's face picture for face recognition. Therefore, the technical problems of the small number of face pictures stored in the face library and the low recognition efficiency caused by the complexity of the existing face recognition methods in the prior art are overcome, thereby achieving the technical effect of improving the face recognition efficiency while increasing the stock of face pictures in the face library.

[0145] Figure 4 An exemplary system architecture 400 is shown to which the face recognition method or face recognition device according to the embodiment of the present invention can be applied.

[0146] like Figure 4 As shown, the system architecture 400 may include terminal devices 401, 402, 403, a network 404 and a server 405 (this architecture is only an example, and the components included in the specific architecture may be adjusted according to the specific application). The network 404 is used to provide a medium for a communication link between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0147] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0148] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0149] Server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using terminal devices 401, 402, and 403. The backend management server may analyze and process received data such as face recognition requests and face images, and feed back processing results (such as feature vectors, scores of face images, and target images - only an example) to the terminal device.

[0150] It should be noted that the face recognition method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the face recognition device is generally disposed in the server 405 .

[0151] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0152] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0153] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0154] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0155] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0156] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0157] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0158] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor including a face image acquisition module, a feature vector extraction module, a score determination module, and a face recognition module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the face image acquisition module may also be described as "a module for acquiring a face image of a user in response to a face recognition request initiated by the user".

[0159] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: in response to a face recognition request initiated by a user, obtaining a face picture of the user; extracting a feature vector of the face picture according to a feature vector extraction algorithm, and performing sparse processing on the feature vector to obtain a sparse feature vector; determining a score of the face picture of the user corresponding to the sparse feature vector according to a fuzzy evaluation algorithm; and determining a target picture from a face library according to the score of the face picture of the user for face recognition.

[0160] According to the technical solution of the embodiment of the present invention, the face picture of the user is obtained in response to the face recognition request initiated by the user; the feature vector of the face picture is extracted according to the feature vector extraction algorithm, and the feature vector is sparsely processed to obtain a sparse feature vector; the score of the face picture of the user corresponding to the sparse feature vector is determined according to the fuzzy evaluation algorithm; and the target picture is determined from the face library according to the score of the user's face picture for face recognition. Therefore, the technical problems of the small number of face pictures stored in the face library and the low recognition efficiency caused by the complexity of the existing face recognition methods in the prior art are overcome, thereby achieving the technical effect of improving the face recognition efficiency while increasing the stock of face pictures in the face library.

[0161] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A face recognition method, characterized in that: include: In response to a face recognition request initiated by a user, obtaining a face image of the user; Extracting a feature vector of the face image according to a feature vector extraction algorithm, and performing sparse processing on the feature vector to obtain a sparse feature vector; Determine the score of the face picture of the user corresponding to the sparse feature vector according to the fuzzy evaluation algorithm; specifically include: placing the sparse feature vector into the factor set of the fuzzy evaluation algorithm, each factor subset of the factor set corresponds to a sparse feature vector, determining the fuzzy subset according to the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, and performing weighted calculation on each normalized element in the fuzzy subset and the evaluation value of the corresponding level in the evaluation set corresponding to it to obtain the score of the face picture corresponding to the user, wherein the evaluation set indicates the evaluation values ​​corresponding to different levels; The face database includes the scores of all face images in the database. The absolute values ​​of the differences between the scores of the user's face images and the scores of all face images in the database are calculated respectively. After the absolute values ​​are sorted, the target image is determined according to the sorting results for face recognition.

2. The face recognition method according to claim 1, characterized in that: The step of extracting the feature vector of the face image according to the feature vector extraction algorithm includes: according to the instructions of the feature vector extraction algorithm, using a Gaussian difference function to perform dimensionality reduction processing on the face image to obtain a Gaussian difference image, fitting the Gaussian difference image to obtain feature points, using gradient information of the neighborhood of the feature point to determine the gradient histogram of the feature point, and obtaining the feature vector of the face image according to the gradient histogram.

3. The face recognition method according to claim 1, characterized in that: The step of performing sparse processing on the feature vector to obtain a sparse feature vector includes: performing sparse processing on the feature vector according to a learning basis function, sparse coding and a local variance similarity algorithm to obtain the sparse feature vector.

4. The face recognition method according to claim 1, characterized in that: The evaluation set of the fuzzy evaluation algorithm is determined according to the face type.

5. The face recognition method according to claim 1, characterized in that: The weight value corresponding to each factor subset is determined based on historical data, and the weight value corresponding to each element in the factor subset is determined based on the average value of all elements in the factor subset.

6. A face recognition device, characterized in that: include: A face image acquisition module, used to respond to a face recognition request initiated by a user and acquire a face image of the user; A feature vector extraction module, used to extract the feature vector of the face image according to a feature vector extraction algorithm, and perform sparse processing on the feature vector to obtain a sparse feature vector; A scoring determination module, which determines the score of the face picture of the user corresponding to the sparse feature vector according to a fuzzy evaluation algorithm; and is also used to place the sparse feature vector into a factor set of the fuzzy evaluation algorithm, each factor subset of the factor set corresponds to a sparse feature vector, and determine the fuzzy subset according to the weight value corresponding to each factor subset and the weight value corresponding to each element in the factor subset, and perform weighted calculation on each normalized element in the fuzzy subset and the evaluation value of the corresponding level in the evaluation set corresponding to it to obtain the score of the face picture corresponding to the user, wherein the evaluation set indicates the evaluation values ​​corresponding to different levels; The face recognition module is used to respond to the scores of all face pictures in the face library, calculate the absolute value of the difference between the score of the user's face picture and the score of all face pictures in the library, sort the absolute values, and determine the target picture for face recognition based on the sorting results.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • General reference-free image quality evaluation method based on local contrast mode

    CN105574901A

  • Aerial image classification method based on unsupervised depth spatial feature coding

    CN106096658A

  • Face recognition method, device and system, and computer storage medium

    CN108875542A