A face recognition method based on local binary features and related device

By using the circular LBP operator for dimensionality reduction and eigenvector calculation, the problems of low accuracy and precision in face recognition in the existing technology are solved, and the recognition speed and accuracy are improved.

CN114241580BActive Publication Date: 2025-09-16CCORE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111645262.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-09-16
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

The existing face recognition technology has low accuracy and precision, which affects the recognition effect.

Method used

The circular LBP operator is used to reduce the dimension of the face image to be tested, and a local binary feature table is obtained. The feature vector is obtained by LBP feature calculation, and finally the similarity calculation is performed based on the feature vector to obtain the recognition result.

Benefits of technology

The algorithm complexity is reduced and the recognition speed and accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114241580B_ABST
    Figure CN114241580B_ABST
Patent Text Reader

Abstract

The present application discloses a face recognition method based on local binary features, comprising: using a circular LBP operator to perform dimensionality reduction processing on a face image to be tested to obtain a local binary feature table; performing LBP feature calculation on the local binary feature table to obtain a feature vector; and performing similarity calculation on face images in an image library based on the feature vector to obtain a recognition result. By first performing unprocessed processing to obtain a local binary feature table, then calculating a feature vector based on the table, and finally performing similarity calculation on face images in an image library based on the feature vector to obtain a recognition result, recognition using a similarity method is achieved, reducing the complexity of the algorithm and improving the recognition speed. The present application also discloses a face recognition device, computing device, and computer-readable storage medium based on local binary features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a face recognition method based on local binary features, a face recognition device, a computing device, and a computer-readable storage medium. Background Art

[0002] With the continuous development of technology, biometric recognition technology is becoming increasingly important. As an inherent human attribute with strong stability and individual variability, biometrics have become the ideal basis for automated identity verification. Current biometric recognition technologies mainly include fingerprint recognition, retinal recognition, iris recognition, gait recognition, vein recognition, and facial recognition. Compared with other recognition methods, facial recognition is more direct, user-friendly, and convenient.

[0003] Among related technologies, face recognition involves two approaches: one is a holistic approach that considers the overall properties of the pattern, including eigenface methods, SVD (Singular Value Decomposition) decomposition methods, and facial isodensity line analysis and matching methods. Another approach is feature analysis-based, combining the relative ratios of facial reference points with other shape or category parameters describing facial features to form a recognition feature vector. However, existing face recognition methods suffer from low accuracy and precision, which reduces their effectiveness.

[0004] Therefore, how to improve the effect of face recognition is a key issue that technicians in this field are concerned about. Summary of the Invention

[0005] The purpose of this application is to provide a face recognition method, face recognition device, computing equipment and computer-readable storage medium based on local binary features to improve the effect of face recognition.

[0006] To solve the above technical problems, the present application provides a face recognition method based on local binary features, comprising:

[0007] The circular LBP operator is used to reduce the dimension of the face image to obtain the local binary feature table;

[0008] Performing LBP feature calculation on the local binary feature table to obtain a feature vector;

[0009] Based on the feature vector, similarity calculation is performed on the face images in the image library to obtain recognition results.

[0010] Optionally, performing LBP feature calculation on the local binary feature table to obtain a feature vector includes:

[0011] The LBP feature calculation is performed on the local binary feature table using a preset block model to obtain a feature vector.

[0012] Optionally, the process of obtaining the face image to be detected includes:

[0013] Perform face detection on the original image to obtain the face area;

[0014] Correcting and preprocessing the face area in the original image to obtain the face image to be detected.

[0015] Optionally, perform face detection on the original image to obtain the face area, including:

[0016] Performing grayscale processing and filtering processing on the original image to obtain a preprocessed original image;

[0017] A trained face detection model is used to perform face detection on the preprocessed original image to obtain the face region.

[0018] Optionally, correcting and preprocessing the face region in the original image to obtain the face image to be detected includes:

[0019] Cropping the face region in the original image based on a preset size to obtain a cropped image;

[0020] Perform image difference processing on the cropped image to obtain the face image to be detected.

[0021] The present application also provides a face recognition device based on local binary features, comprising:

[0022] Image dimensionality reduction processing module, used to use circular LBP operator to perform dimensionality reduction processing on the face image to be tested to obtain a local binary feature table;

[0023] A feature calculation module is used to perform LBP feature calculation on the local binary feature table to obtain a feature vector;

[0024] The similarity calculation module is used to perform similarity calculation on the face images in the image library based on the feature vector to obtain recognition results.

[0025] Optionally, the feature calculation module is specifically configured to perform LBP feature calculation on the local binary feature table using a preset block model to obtain a feature vector.

[0026] Optionally, also include:

[0027] The image processing module is used to perform face detection processing on the original image to obtain the face area; and to correct and preprocess the face area in the original image to obtain the face image to be detected.

[0028] The present application also provides a computing device, comprising:

[0029] Memory for storing computer programs;

[0030] A processor is used to implement the steps of the face recognition method described above when executing the computer program.

[0031] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the face recognition method described above are implemented.

[0032] The present application provides a face recognition method based on local binary features, comprising: using a circular LBP operator to perform dimensionality reduction processing on a face image to be tested to obtain a local binary feature table; performing LBP feature calculation on the local binary feature table to obtain a feature vector; and performing similarity calculation on face images in an image library based on the feature vector to obtain a recognition result.

[0033] By first performing unprocessing to obtain a local binary feature table, then calculating the feature vector based on the table, and finally performing similarity calculation on the face images in the image library based on the feature vector to obtain the recognition result, the recognition is achieved using the similarity method, which reduces the complexity of the algorithm and improves the recognition speed.

[0034] The present application also provides a face recognition device, a computing device, and a computer-readable storage medium based on local binary features, which have the above beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0036] Figure 1 A flowchart of a face recognition method based on local binary features provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of an integral graph provided in an embodiment of the present application;

[0038] Figure 3 A structural diagram of a face recognition device based on local binary features provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The core of this application is to provide a face recognition method, face recognition device, computing equipment and computer-readable storage medium based on local binary features to improve the effect of face recognition.

[0040] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0041] Among related technologies, face recognition involves two approaches: one is a holistic approach that considers the overall properties of the pattern, including eigenfaces, SVD decomposition, and facial isodensity line analysis and matching. Another approach is feature analysis, which combines the relative ratios of facial reference points with other shape or category parameters describing facial features to form a recognition feature vector. However, existing face recognition methods suffer from low accuracy and precision, which reduces their effectiveness.

[0042] Therefore, the present application provides a face recognition method based on local binary features, which first performs unprocessing to obtain a local binary feature table, then calculates a feature vector based on the table, and finally calculates the similarity of the face images in the image library based on the feature vector to obtain the recognition result, thereby realizing recognition using the similarity method, reducing the complexity of the algorithm and improving the recognition speed.

[0043] The following describes a face recognition method based on local binary features provided by the present application through an embodiment.

[0044] Please refer to Figure 1 , Figure 1 A flowchart of a face recognition method based on local binary features provided in an embodiment of the present application.

[0045] In this embodiment, the method may include:

[0046] S101, using a circular LBP operator to perform dimensionality reduction processing on the face image to be tested to obtain a local binary feature table;

[0047] This step aims to use the circular LBP operator to reduce the dimension of the face image to be tested and obtain a local binary feature table.

[0048] During the LBP (Local Binary Pattern) calculation process, for an 8-connected local region, LBP has a total of 256 feature results, which is 2 to the power of 8. To address the problem of too many binary patterns and improve statistical performance, this embodiment uses an "equivalent pattern" method to reduce the dimensionality of the LBP operator. Specifically, when the cyclic binary number corresponding to an LBP has at most two transitions from 0 to 1 or 1 to 0, the binary corresponding to that LBP is considered an equivalent pattern class. Other LBPs with more than two transitions are considered mixed pattern classes. This dimensionality reduction reduces the original 256 feature results to 59, achieving dimensionality reduction for the LBP operator. Furthermore, to further optimize the operator, this embodiment uses a rotationally invariant circular LBP operator. This method improves recognition accuracy and speeds up the calculation process. Because the number of local binary feature LBP operators is fixed, this embodiment uses a table to list the eigenvalues ​​of all LBP operators. In actual calculations, LBP eigenvalues ​​can be calculated simply by looking up the table.

[0049] S102, performing LBP feature calculation on the local binary feature table to obtain a feature vector;

[0050] Based on S101, this step aims to perform LBP feature calculation on the local binary feature table to obtain a feature vector.

[0051] Specifically, any LBP feature calculation method provided by the prior art can be adopted, and is not specifically limited here.

[0052] Furthermore, this step may include:

[0053] The preset block model is used to calculate the LBP features of the local binary feature table to obtain the feature vector.

[0054] The LBP eigenvalues ​​are calculated in blocks. This embodiment adopts a 4x4 block model. A 3x3 window is used in each block to slide and calculate the LBP operator. The main calculation process is as follows:

[0055] Step 1: Calculate the pixel values ​​of 8 points around the center point according to the formula;

[0056] Step 2: Compare the eight surrounding points with the center point in turn. If the value is greater than the center point, the result is 1; otherwise, the result is 0.

[0057] Step 3: Obtain the LBP eigenvalue by looking up the table based on the 8-bit binary result obtained in the above steps;

[0058] Then, the number of each LBP feature operator in each block is counted using a histogram, and the record is saved as a one-dimensional vector. The 16 blocks are connected together to form the feature vector of the LBP texture of the entire image.

[0059] S103, performing similarity calculation on the face images in the image library based on the feature vector to obtain a recognition result.

[0060] Based on S102, this step aims to perform similarity calculation on the face images in the image library based on the feature vectors to obtain recognition results.

[0061] That is, after the image feature vector obtained in the above steps is compared with the facial images stored in the image library to confirm that the image under test is a person in the image library. This embodiment uses the chi-square test as a similarity calculation method. If the calculated result is greater than the threshold, it means that the image under test and the face in the image library are the same person; otherwise, they are not the same person. The chi-square value is calculated with the faces in the image library in turn to obtain the final result.

[0062] Furthermore, in this embodiment, the process of obtaining the face image to be detected may include:

[0063] Step 1: Perform face detection on the original image to obtain the face area;

[0064] Step 2: Correct and preprocess the face area in the original image to obtain the face image to be detected.

[0065] Furthermore, the process of obtaining the face image to be detected may include:

[0066] Step 1: grayscale processing and filtering are performed on the original image to obtain a preprocessed original image;

[0067] Step 2: Use the trained face detection model to perform face detection on the preprocessed original image to obtain the face area.

[0068] Step 3, performing grayscale processing and filtering on the original image to obtain a preprocessed original image;

[0069] Step 4: Use the trained face detection model to perform face detection on the preprocessed original image to obtain the face area.

[0070] For example, the process of processing an image in this embodiment may include:

[0071] Step 1: Input the face image to be tested and perform grayscale processing on the image. The grayscale image of the R, G, and B channels is obtained by different weight proportions to reduce the storage space required for the image.

[0072] Step 2: Image filtering. This example uses a 3x3 window median filter. The window slides across the grayscale image, and the value at the center of the window is the median of the nine points within the window. The median filtered image is then output. Median filtering can eliminate some noise points in the grayscale image, preparing for subsequent recognition.

[0073] Step 3: Import the trained Haar-cascade model. This model is composed of several strong classifiers connected in series. For the input image to be tested, it must pass all strong classifiers before it will be considered as a face area by the model. If a strong classifier fails, the subsequent strong classifiers will be skipped directly. This is also done to speed up the algorithm. Each strong classifier is composed of several weak classifiers. For a weak classifier with a depth of 1, there is a threshold. The Haar integral image of the image to be tested is calculated and compared with the threshold to obtain the output value of the weak classifier. The output values ​​of all weak classifiers are added together to obtain the threshold of the strong classifier. Through the combination of multiple strong and weak classifiers, this algorithm model can more accurately and effectively detect the face area of ​​the image.

[0074] Step 4: Final determination of the face region. For the face region initially screened in the previous step, there may be multiple regions. At this time, it is necessary to find the most suitable region from these regions. This embodiment adopts a clustering method. First, the IOU value of each region is calculated, and the overlapping regions are removed according to the threshold. Finally, a small number of regions are obtained. This embodiment uses simple judgment to select the final face region.

[0075] Step 5: Crop and scale the image to the specified size. To facilitate subsequent face recognition, the facial regions obtained in the previous steps need to be uniformly cropped and scaled. To facilitate subsequent image segmentation, the image size is typically standardized to a multiple of 2 or 3.

[0076] Step 6: Image interpolation algorithm. During image cropping and scaling, an interpolation algorithm is generally used to calculate the scaled pixel value of a pixel point whose coordinates are not positive integers. This embodiment uses a quadratic interpolation algorithm, performing interpolation once in the X and Y directions. The pixel value of the point is weighted averaged based on the pixel values ​​of the four surrounding points. The weight coefficient is the distance between the point and the other four points. The image interpolation algorithm makes the scaled image smoother, significantly improving the accuracy of subsequent face recognition.

[0077] In summary, this embodiment first performs unprocessing to obtain a local binary feature table, then calculates the feature vector based on the table, and finally calculates the similarity of the face images in the image library based on the feature vector to obtain the recognition result, thereby realizing recognition using the similarity method, reducing the complexity of the algorithm and improving the recognition speed.

[0078] The following is a specific example to further illustrate the face recognition method based on local binary features provided by the present application.

[0079] In this embodiment, the method may include:

[0080] Step 1: Input the face image to be tested and perform grayscale processing on the image. The grayscale image of the R, G, and B channels is obtained by applying different weight ratios to reduce the storage space required for the image.

[0081] Step 2: Image filtering. This embodiment uses a 3x3 window median filter. The window slides on the grayscale image. The value of the window center point is the median value of the 9 points in the area, and the median filtered image is output.

[0082] Step 3: Import the trained Haar-cascade model, which is composed of several strong classifiers connected in series. For the input image to be tested, it must pass all strong classifiers before it is considered to be a face area by the model. If a strong classifier fails, the subsequent strong classifiers will be skipped directly. This is also done to speed up the algorithm. Each strong classifier is composed of several weak classifiers. For a weak classifier with a depth of 1, there is a threshold. The Haar integral image of the image to be tested is calculated and compared with the threshold to obtain the output value of the weak classifier. The output values ​​of all weak classifiers are added together to obtain the threshold of the strong classifier.

[0083] Step 4: Final determination of the face area. For the face area initially screened in the previous step, there may be multiple areas. At this time, it is necessary to find the most suitable area from these areas.

[0084] Step 5: Image cropping and scaling to a specified size. For the face regions obtained in the above steps, in order to facilitate subsequent face recognition, the sizes of these regions need to be uniformly cropped and scaled.

[0085] Step 6: Image interpolation algorithm. During image cropping and scaling, interpolation algorithms are generally used to calculate the scaled pixel value of a pixel whose coordinates are not positive integers. This embodiment uses a quadratic interpolation algorithm, performing a single interpolation algorithm in both the X and Y directions. The scaled pixel value of the pixel is then calculated by taking a weighted average of the pixel values ​​of the four surrounding points.

[0086] Step 7: Construct a table of local binary features. For an 8-connected local region, LBP has a total of 256 feature results, which is 2 to the power of 8. To address the problem of excessive binary patterns and improve statistical performance, this embodiment uses an "equivalence pattern" to reduce the dimensionality of the LBP operator. Through this improvement, the original 256 feature results are reduced to 59, achieving dimensionality reduction of the LBP operator. Furthermore, to further optimize the operator, this embodiment uses a rotationally invariant circular LBP operator.

[0087] Step 8: Calculate LBP eigenvalues ​​by block. This embodiment uses a 4x4 block model, and within each block, a 3x3 window is used to sequentially slide and calculate the eigenvalues ​​of the LBP operator. Next, a histogram is used to count the number of LBP eigenvalues ​​within each block, and the count is saved as a one-dimensional vector. The 16 blocks are concatenated to form the LBP texture feature vector for the entire image.

[0088] Step 9: Calculate Similarity. After obtaining the image feature vector from the previous step, it needs to be compared with the facial images stored in the image library to confirm that the image under test is a specific person in the image library. This embodiment uses the chi-square test as the similarity calculation method. If the calculated result is greater than the threshold, it indicates that the image under test and the face in the image library are the same person; otherwise, they are not the same person. The chi-square value is calculated for each face in the image library to obtain the final result.

[0089] The Haar-Cascade detection model is a machine learning method that uses parameters obtained through training on many positive and negative examples, and then applies them to other untrained images to ultimately determine whether the image is a face. The training process of this model is roughly as follows:

[0090] First, the algorithm requires many positive examples (images containing faces) and negative examples (images without faces) to train the classifier, which is the weak classifier mentioned above. Haar features are then extracted from these images. Haar features are similar to convolution kernels; each feature is calculated by subtracting the sum of the pixels in the black square area from the sum of the pixels in the white square area. However, the size and position of each kernel can vary greatly. For a 24x24 sliding window, the number of features exceeds 160,000, making training extremely complex. Therefore, it is necessary to screen the Haar features that produce the best detection and classification results. The Adaboost method in this embodiment applies each feature to all training set images. For each feature, the threshold for optimal face classification is determined, specifically the features with the lowest classification error rate. These features are able to better distinguish between face and non-face images. In practice, each Haar feature is initially given the same weight. After each classification, the weight of the incorrectly classified feature is increased. Classification is then repeated based on the new weights, and the new error rate and weights are calculated until the error rate meets the required level or the maximum number of iterations is reached. These weights are the weights of the weak classifiers, and the weighted sum is the threshold of the strong classifier. In this way, a strong classifier is trained. Repeating the above steps can train multiple strong classifiers.

[0091] After training, all threshold parameters of weak and strong classifiers and Haar feature parameters are saved. When using the detection model, you need to read the model parameters first. When detecting a face, it can be divided into 4 steps to determine whether it is a face:

[0092] Step 1: The image needs to be scaled in each loop. Because the size of the Haar-Cascade training image is generally fixed to 20x20, the actual sampled image may be a variety of common sizes such as 320x240, 640x480, etc. In order to adapt to the model parameters, the image to be tested needs to be scaled in each loop.

[0093] Step 2: Use a 20x20 window to traverse the image to be tested and read the parameters of each weak classifier, including the upper left corner coordinates x, y, length and width w, h, as well as the weight, threshold, and output value. After obtaining these parameters, it is necessary to calculate each eigenvalue. This embodiment uses the integral graph method to quickly obtain this value.

[0094] Step 3: Multiply the feature values ​​obtained by the weak classifier by the weight, sum them, and compare the obtained weighted sum with the threshold of the strong classifier. If the weighted sum is greater than the threshold, the strong classifier is passed. Otherwise, the loop is exited and the window is moved to calculate the next area. Only when the area passes all strong classifiers, the x, y, w, and h of the current area are saved and regarded as the candidate area.

[0095] Step 4: Filter candidate regions. After all the above steps are completed, several candidate regions will be obtained. This embodiment uses a clustering method to first remove the regions with large overlaps. The IOU (Intersection over Union) value is compared with the threshold. The remaining regions are simply averaged to obtain the final face region. The values ​​of this region and all pixels are saved.

[0096] In the above steps, the integral graph algorithm is time-consuming. Therefore, in this embodiment, hardware acceleration can be used to accelerate the algorithm. The principle of the integral graph of a discrete image is similar to that of a discrete function. Since the image is composed of a series of discrete pixels, the integral of the image is actually a sum. The value of each point in the image integral graph is the sum of all the pixel values ​​in the upper left corner of the original image. If you use Indicates that the coordinates in the image are The pixel value of the point, then the integral image SAT(x, y) of the point is:

[0097] .

[0098] Based on this hardware acceleration algorithm, the value of the integral graph of each point in the image is calculated every time the image size is scaled. When finding the integral graph of a certain area, it is only necessary to find the value of the integral graph of the four vertices. The specific steps are combined with the attached Figure 2 , where Ra, Rb, Rc, and Rd are the four regions in the integral graph.

[0099] Please refer to Figure 2 , Figure 2 A schematic diagram of an integral graph provided in an embodiment of the present application.

[0100] The integral of point 1 Sat1 = Sum (Ra);

[0101] The integral of point 2 Sat2 = Sum (Ra) + Sum (Rb);

[0102] The integral of point 3 Sat3 = Sum (Ra) + Sum (Rc);

[0103] The integral of point 4 Sat4 = Sum (Ra) + Sum (Rb) + Sum (Rc) + Sum (Rd).

[0104] Then in order to calculate the sum of the pixels of a rectangle, for example, the sum (integral) of the pixel values ​​of all points in the region Rd can be expressed as:

[0105] Sum(Rd)=Sat1+Sat4-Sat2-Sat3.

[0106] So no matter the size of the giant, you only need to search the integral image 4 times to quickly calculate the sum of the pixel values ​​in any area.

[0107] After the face detection is completed, it is necessary to unify the size of the detected face area and use an image scaling algorithm. However, when using the image scaling algorithm, the coordinates obtained after scaling are often not positive integers. Therefore, the integer coordinates of the scaled image can only be obtained based on the pixel values ​​of the points around it. The simplest algorithm is the nearest neighbor interpolation algorithm. The missing pixels are directly generated by using the original color closest to them, that is, copying the pixels next to them. However, this will result in obvious visible aliasing. Therefore, this embodiment uses a quadratic linear interpolation algorithm. As the name suggests, quadratic linear interpolation performs linear interpolation in the x and y directions respectively. The pixel value of the point is obtained by weighting the four neighboring points, and the weighting coefficient is determined by the distance between the four points and the point. The algorithm is more complex and computationally intensive than the nearest neighbor interpolation algorithm, but the results basically meet the requirements.

[0108] After all the image preprocessing work is completed, the following is the basic process of face recognition. First, it explains how the local binary feature LBP operator is calculated.

[0109] Among them, the LBP local binary feature is defined within a 3×3 neighborhood. The grayscale values ​​of the 8 adjacent pixels are compared with the neighborhood center pixel as the threshold. If the surrounding pixel values ​​are greater than the center pixel value, the position of the pixel is marked as 1, otherwise it is marked as 0. In this way, the 8 points in the neighborhood can generate an 8-bit binary number (usually converted to a decimal number, namely the LBP code, which has 256 types in total) after comparison. That is, the LBP value of the neighborhood center pixel is obtained, and this value is used to reflect the texture information of the area. It can be expressed as:

[0110] .

[0111] Furthermore, in order to adapt to texture features of different scales and meet the requirements of grayscale and rotation invariance, a circular neighborhood can be used instead of a square neighborhood. The improved LBP operator allows any number of pixels in a circular neighborhood with a radius of R. Thus, an LBP operator containing P sampling points in a circular area with a radius of R is obtained, that is:

[0112] .

[0113] The coordinates of any sampling point can be calculated by the above formula, but the calculated coordinates may not be completely integers, so the pixel value of the sampling point can be obtained by bilinear interpolation.

[0114] An LBP operator can generate different binary patterns. For a circular area with a radius of R and containing P sampling points, an LBP operator will generate patterns. Clearly, as the number of sampling points in the neighborhood set increases, the number of binary patterns increases dramatically. Such a large number of binary patterns is detrimental to texture extraction, recognition, classification, and information access. Therefore, dimensionality reduction of the original LBP pattern is necessary to optimize the image representation while minimizing the amount of data.

[0115] In order to solve the problem of too many binary patterns and improve statistics, this embodiment uses an equivalent pattern (Uniform Pattern) to reduce the dimensionality of the pattern types of the LBP operator. In actual images, the vast majority of LBP patterns contain at most two jumps from 1 to 0 or from 0 to 1. Therefore, the "equivalent pattern" is defined as: when the cyclic binary number corresponding to a certain LBP has at most two jumps from 0 to 1 or from 1 to 0, the binary corresponding to the LBP is called an equivalent pattern class. For example, 00000000 (0 jumps), 00000111 (only one jump from 0 to 1), and 10001111 (first jump from 1 to 0, then jump from 0 to 1, a total of two jumps) are all equivalent pattern classes. Patterns other than the equivalent pattern class are classified into another class, called the mixed pattern class, such as 10010111 (a total of four jumps). Through such improvements, the types of binary patterns are greatly reduced without losing any information. The number of patterns is reduced from the original The number of methods is reduced to P(P-1)+3, where P represents the number of sampling points in the neighborhood set. This reduces the dimension of the feature vector and reduces the impact of high-frequency noise.

[0116] This embodiment divides a facial image into 4×4 subregions and calculates the histograms within the subregions based on the LBP values, using the histograms as discriminant features. This approach has the advantage of preventing incomplete image alignment within a certain range while also reducing the dimensionality of the LBP features. There are multiple methods for determining similarity between the obtained histogram features. Assuming the known face histogram is Mi and the face histogram to be matched is Si, matching can be performed using the histogram intersection kernel method. This method can be simply understood as taking the intersection of two histograms, but it is not suitable for the improved LBP method because the number of equivalent mode values ​​is small and cannot withstand such large variations in histogram width. However, it is more suitable for the original LBP method.

[0117] In LBP face recognition, chi-square test can also be used for matching. Each image can be divided into N blocks of the same size, and LBP is used to extract histogram features in these small areas. In this way, each image obtains a lot of histogram information. Suppose the histogram of the image to be matched is , the histogram of the known image is , where i=1, 2, ..., N is a small area of ​​the image, and j is the value of a column of the histogram in the small area. The similarity between the two images is:

[0118] .

[0119] in, is the weight of each small area. For example, in the face area, the eyes, mouth and other areas contain more information, so the weights of these areas can be set larger. The denominator in the above formula is , which takes into account the differences between the same face in different photos.

[0120] It can be seen that the design of this embodiment is simple. It is a recognition method based on local binary features, with low computational complexity and linear overall process. Most processes use mature models and only require importing model parameters, which is simple to calculate. Image storage and calculation all use 8-bit binary values ​​of 0~255. The overall algorithm has low memory overhead and high recognition accuracy. This embodiment adopts the Haar-Cascade face detection model, which is commonly used in today's mainstream face recognition framework. The present invention simplifies and optimizes its redundant models, and the thresholds in the model are expanded and rounded, so that the overall speed of the model is guaranteed without losing precision and accuracy. The calculation process of the LBP operator based on binary features in this embodiment adopts a table lookup operation, without the need for additional calculations, and only one query method is needed to obtain the feature value. Most algorithms in this embodiment call hardware acceleration modules, such as image preprocessing algorithm, integral graph algorithm, block algorithm, etc., which can speed up the calculation process and have obvious advantages over other existing technologies.

[0121] The following is an introduction to the face recognition device based on local binary features provided in an embodiment of the present application. The face recognition device based on local binary features described below and the face recognition method based on local binary features described above can be referenced to each other.

[0122] Please refer to Figure 3 , Figure 3 A structural diagram of a face recognition device based on local binary features provided in an embodiment of the present application.

[0123] In this embodiment, the device may include:

[0124] The image dimension reduction processing module 100 is used to perform dimension reduction processing on the face image to be tested using a circular LBP operator to obtain a local binary feature table;

[0125] The feature calculation module 200 is used to perform LBP feature calculation on the local binary feature table to obtain a feature vector;

[0126] The similarity calculation module 300 is used to perform similarity calculation on the face images in the image library based on the feature vector to obtain recognition results.

[0127] Optionally, the feature calculation module 200 is specifically configured to perform LBP feature calculation on the local binary feature table using a preset block model to obtain a feature vector.

[0128] Optionally, also include:

[0129] The image processing module is used to perform face detection processing on the original image to obtain the face area; and to correct and preprocess the face area in the original image to obtain the face image to be detected.

[0130] The present application also provides a computing device, including:

[0131] memory for storing computer programs;

[0132] A processor is configured to implement the steps of the face recognition method as described in the above embodiment when executing the computer program.

[0133] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the face recognition method described in the above embodiment are implemented.

[0134] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0135] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this embodiment can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0136] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0137] The above is a detailed introduction to the face recognition method based on local binary features, face recognition device, computing device and computer-readable storage medium provided by the present application. In this embodiment, specific examples are used to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0138] This application involves the collection, use and processing of facial information-related data, which complies with local laws, regulations and standards, and the data is obtained with the owner's authorization.

Claims

1. A face recognition method based on local binary features, characterized in that: include: The circular LBP operator is used to reduce the dimension of the face image to obtain the local binary feature table; Performing LBP feature calculation on the local binary feature table to obtain a feature vector; Performing similarity calculation on the face images in the image library based on the feature vector to obtain a recognition result; The process of performing similarity calculation on the facial images in the image library based on the feature vector to obtain the recognition result includes: The chi-square test is used as the similarity calculation method; each image is divided into N blocks of the same size, and the histogram features are extracted in the area using LBP; the histogram of the face image to be tested is , the histogram of the known face images in the image library is , where i is the i-th block area of ​​the image and j is the value of the j-th column of the histogram in the area, then the similarity between the two images is: ; in, is the weight of each area, and the amount of information contained in the area is positively correlated with the weight of the area, and the denominator part Taking into account the differences between the same face in different photos; The performing LBP feature calculation on the local binary feature table to obtain a feature vector includes: Calculate the pixel values ​​of each center point and the surrounding 8 points in each 3×3 window of the preset 4×4 block model, compare the pixel values ​​of the surrounding 8 points with the pixel value of the center point in turn, and if the pixel value is greater than the center point, the result is 1, otherwise the result is 0, to obtain each eight-bit binary result, and query the LBP feature value corresponding to each of the eight-bit binary results from the local binary feature table; In each block of the preset 4x4 block model, the number of each LBP feature operator in the block is counted using the histogram of the face image to be tested, and the record is saved as a one-dimensional vector. The one-dimensional vectors are then concatenated to obtain the feature vector.

2. The face recognition method according to claim 1, characterized in that The process of obtaining the face image to be detected includes: Perform face detection on the original image to obtain the face area; Correcting and preprocessing the face area in the original image to obtain the face image to be detected.

3. The face recognition method according to claim 1, characterized in that Perform face detection on the original image to obtain the face area, including: Performing grayscale processing and filtering processing on the original image to obtain a preprocessed original image; A trained face detection model is used to perform face detection on the preprocessed original image to obtain the face region.

4. The face recognition method according to claim 2, characterized in that: Correcting and preprocessing the face area in the original image to obtain the face image to be detected, including: Cropping the face region in the original image based on a preset size to obtain a cropped image; Perform image difference processing on the cropped image to obtain the face image to be detected.

5. A face recognition device based on local binary features, characterized in that: include: Image dimension reduction processing module, used to use circular LBP operator to perform dimension reduction processing on the face image to be tested to obtain a local binary feature table; A feature calculation module is used to perform LBP feature calculation on the local binary feature table to obtain a feature vector; A similarity calculation module is used to perform similarity calculation on the face images in the image library based on the feature vector to obtain a recognition result; The similarity calculation module is specifically used to use the chi-square test as a similarity calculation method; wherein each image is divided into N blocks of the same size, and the histogram features are extracted in the area using LBP; the histogram of the face image to be tested is , the histogram of the known face images in the image library is , where i is the i-th block area of ​​the image and j is the value of the j-th column of the histogram in the area, then the similarity between the two images is: ; in, is the weight of each area, and the amount of information contained in the area is positively correlated with the weight of the area, and the denominator part Taking into account the differences between the same face in different photos; The performing LBP feature calculation on the local binary feature table to obtain a feature vector includes: Calculate the pixel values ​​of each center point and the surrounding 8 points in each 3×3 window of the preset 4×4 block model, compare the pixel values ​​of the surrounding 8 points with the pixel value of the center point in turn, and if the pixel value is greater than the center point, the result is 1, otherwise the result is 0, to obtain each eight-bit binary result, and query the LBP feature value corresponding to each of the eight-bit binary results from the local binary feature table; In each block of the preset 4x4 block model, the number of each LBP feature operator in the block is counted using the histogram of the face image to be tested, and the record is saved as a one-dimensional vector. The one-dimensional vectors are then concatenated to obtain the feature vector.

6. The face recognition device according to claim 5, characterized in that Also includes: Image processing module, used to perform face detection processing on the original image to obtain the face area; Correcting and preprocessing the face area in the original image to obtain a face image to be detected.

7. A computing device, characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the face recognition method according to any one of claims 1 to 4 when executing the computer program.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the face recognition method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Near infrared eye positioning and eye state identification method

    CN104091147A

  • Face recognition method applicable to multiple expressions and multiple gestures

    CN104636727A

  • Double-authentication face anti-counterfeiting method based on large-scale RGB and near-infrared data sets

    CN110516616A