Face recognition initialization detection method and system

Through a method combining convolutional neural network, MTCNN and cosine similarity calculation, the face is initialized and detected, which solves the problem of poor detection effect of traditional methods in complex environments, and achieves high accuracy and stability face recognition.

CN119919971APending Publication Date: 2025-05-02CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411854729.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the case of complex lighting, different shooting angles and multiple people's interference, the traditional face detection method performs poorly in the system initialization stage, resulting in a decrease in detection effect and failure in recognition.

Method used

A face recognition initial detection method is adopted, including pre-detection of image data, feature point analysis and correction, and matching of face images after correction. Specific steps include grayscale conversion, convolutional neural network construction, non-maximum suppression, MTCNN feature point positioning, angle and illumination correction, and cosine similarity calculation.

Benefits of technology

It significantly improves the accuracy and stability of face area detection, avoids mis-detection and missed detection problems, ensures that the distribution of feature points conforms to the natural structure of the face, solves the recognition error caused by different shooting angles and lighting conditions, and realizes efficient identification results and the ability to adapt to different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919971A_ABST
    Figure CN119919971A_ABST
Patent Text Reader

Abstract

The invention provides a face recognition initialization detection method and system, and the method comprises the following steps: S1, obtaining image data; s2, performing face region pre-detection on the image data; s3, performing feature point analysis on the detected face region; s4, correcting a feature point analysis result; and S5, carrying out matching on the corrected face image. According to the method, the image features are effectively extracted through face region detection after the image is subjected to gray processing, the accuracy and stability of face region detection are remarkably improved in combination with non-maximum suppression and size and position optimization technologies, and the problems of false detection and missing detection are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In recent years, face recognition technology has attracted widespread attention due to its wide range of application scenarios, such as identity authentication, security monitoring, and smart access control. However, in practical applications, face detection in the system initialization phase still faces many challenges, especially in the case of complex lighting, different shooting angles, and interference from multiple people. Traditional face detection methods mostly use feature-based algorithms, such as Haar cascade classifiers and template matching-based methods. These methods can work effectively in ideal environments, but the detection effect is significantly reduced in complex scenes such as strong light, backlight, or low contrast. In addition, traditional methods perform poorly when processing faces at different angles, and often cannot accurately locate the face area or key feature points, resulting in subsequent recognition failures or increased error rates. Summary of the invention

[0003] In view of the deficiencies in the prior art, the present invention provides a face recognition initialization detection method.

[0004] The present invention provides a face recognition initialization detection method, comprising the following steps:

[0005] S1: Acquire image data;

[0006] S2: Pre-detecting the face area of ​​the image data;

[0007] S3: Perform feature point analysis on the detected face area;

[0008] S4: Correct the feature point analysis results;

[0009] S5: Matching the corrected face image.

[0010] Preferably, in the step S2, specifically, the image data is converted into grayscale, a convolutional neural network is used according to the grayscale image to construct a face region recognition model, a feature map of the image is extracted through a convolution layer, the feature map is reduced in dimension through a pooling layer, and the features are classified through a fully connected layer. According to the classification result, it can be determined whether there is a face region. If there is a face region, the preliminarily detected face region is output, non-maximum suppression processing is performed on the preliminarily detected face region, and the size and position of the remaining detection frames are optimized to obtain the final detected face region.

[0011] Preferably, in step S3, specifically, MTCNN is used to locate feature points in the face area, and feature points of the face area are extracted, and the extracted feature points are verified to obtain a feature point coordinate set.

[0012] Preferably, the extracted feature points are verified in step S3 to obtain a set of feature point coordinates, specifically, the relative positions between the feature points of the currently detected face area are calculated based on the relative positions between the preset feature points of the physiological structure of the face, and compared with the relative positions between the preset feature points to obtain a deviation value; if the deviation value exceeds the preset range threshold, the feature points of the currently detected face area are fine-tuned or repositioned; if the deviation value is within the preset range threshold, the feature points are grouped together and a set of feature point coordinates is generated.

[0013] Preferably, in step S4, specifically: according to the feature point coordinate set, the posture angles of the face including the pitch angle, the yaw angle and the roll angle are calculated; according to the calculated face posture angles, a geometric transformation is performed on the face image to obtain the angle-corrected face image; and the angle-corrected face image is subjected to illumination normalization processing to obtain the illumination and angle-corrected face image.

[0014] Preferably, in step S5, specifically, a convolutional neural network is used to extract a high-dimensional feature vector from the corrected face image, and cosine similarity is used to calculate the similarity between the high-dimensional feature vector and the feature vector in a pre-stored feature library to obtain the similarity; based on the similarity, it is determined whether the similarity is greater than a preset similarity threshold; if the similarity is greater than the preset similarity threshold, it is determined that the match is successful, and the recognition result and the similarity score are output; if the similarity is less than the preset similarity threshold, it is determined that the match fails, and the recognition result is output, and the unrecognized state is returned.

[0015] Preferably, the similarity calculation formula is:

[0016]

[0017] Among them, v1·v2 is the dot product of the high-dimensional feature vector and the feature vector in the feature library, and ||v1|| and ||v2|| are the Euclidean norms (i.e., lengths) of the high-dimensional feature vector and the feature vector in the feature library, respectively.

[0018] The present invention provides a face recognition initialization detection system, which is characterized by comprising:

[0019] Data acquisition module: used to acquire image data;

[0020] Face area detection module: used for pre-detecting face area of ​​the image data;

[0021] Face area analysis module: used to analyze the feature points of the detected face area;

[0022] Analysis result correction module: used to correct the feature point analysis results;

[0023] Face matching module: used to match the corrected face image.

[0024] The present invention discloses a face recognition initialization detection method and system, which have the following beneficial effects:

[0025] By detecting the face area after grayscale processing of the image, the image features are effectively extracted. Combined with non-maximum suppression and size and position optimization technology, the accuracy and stability of face area detection are significantly improved, avoiding false detection and missed detection problems. By locating the key feature points of the face, and checking and adjusting the feature points according to the preset face physiological structure rules, the distribution of feature points is ensured to be consistent with the natural structure of the face, avoiding the problem of feature point deviation caused by posture or other interference factors. In the process of angle correction, the face image is subjected to affine transformation or perspective transformation by comprehensively calculating the pitch angle, yaw angle and roll angle, and illumination normalization is performed at the same time, solving the problem of recognition error caused by different shooting angles and lighting conditions. By extracting high-dimensional feature vectors, the cosine similarity formula is used to quickly determine the similarity between the corrected face image and the feature vector stored in the feature library. Vector normalization simplifies the cosine similarity calculation and improves the calculation efficiency. The recognition result is judged according to the similarity threshold. By dynamically adjusting the similarity threshold, it can adapt to different application scenarios and balance the accuracy and tolerance of recognition. Real-time processing is achieved through convolutional layer feature extraction, pooling layer dimensionality reduction, and fully connected layer classification. At the same time, an efficient cosine similarity calculation formula is used, making the overall solution have high real-time and stability in performance. In addition, various interference factors in complex scenes (such as posture, lighting, feature point deviation) are considered, and comprehensive optimization methods such as angle correction and lighting normalization are used to make the solution more robust and applicable in various application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 A method flow chart of a face recognition initialization detection method provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0030] refer to Figure 1 The present invention provides a face recognition initialization detection method, comprising the following steps:

[0031] S1: Acquire image data;

[0032] S2: Pre-detect the face area of ​​the image data;

[0033] S3: Perform feature point analysis on the detected face area;

[0034] S4: Correct the feature point analysis results;

[0035] S5: matching the corrected face image;

[0036] In step S2, specifically, the image data is converted into grayscale, a convolutional neural network is used according to the grayscale image to build a face area recognition model, the feature map of the image is extracted through the convolution layer, the feature map is reduced in dimension through the pooling layer, and the features are classified through the fully connected layer. According to the classification result, it can be determined whether there is a face area. If there is a face area, the preliminarily detected face area is output, non-maximum suppression is performed on the preliminarily detected face area, and the size and position of the remaining detection frame are optimized to obtain the final detected face area to ensure that the face area is accurately framed.

[0037] The present invention provides a face recognition initialization detection method, which can more accurately locate and identify faces in images through pre-detection of face areas, feature point analysis, and result correction. This helps to reduce the false detection rate, that is, the probability of mistakenly identifying non-face objects as faces, and reduce the missed detection rate, that is, the probability of failing to detect actual faces.

[0038] In a preferred embodiment, in step S3, specifically, MTCNN is used to locate feature points in the face area; key feature points of the face area are extracted, including but not limited to feature points of eyes, nose, mouth, eyebrows and other parts, and the extracted feature points are verified to ensure that the distribution of the feature points conforms to the physiological structure of the face; and a set of feature point coordinates is generated.

[0039] In a preferred embodiment, the extracted feature points are verified in step S3 to obtain a set of feature point coordinates, specifically, the relative positions between the feature points are preset according to the physiological structure of the face, such as the relative position relationship between the feature points of the eyes, nose, mouth and other parts; the relative positions between the feature points of the currently detected face area are calculated, and compared with the relative positions between the preset feature points to obtain a deviation value; if the deviation value exceeds the preset range threshold, the feature points of the currently detected face area are fine-tuned or repositioned; if the deviation value is within the preset range threshold, the feature points are grouped together to generate a set of feature point coordinates.

[0040] In a preferred embodiment, in step S4, specifically: based on the feature point coordinate set, the posture angles of the face including the pitch angle, the yaw angle and the roll angle are calculated; based on the calculated face posture angles, a geometric transformation such as an affine transformation or a perspective transformation is performed on the face image to obtain an angle-corrected face image; the angle deviation of the face is corrected to make it frontal; the angle-corrected face image is subjected to illumination normalization processing, including but not limited to histogram equalization, gamma correction or illumination compensation based on Retinex theory, to obtain an illumination and angle-corrected face image.

[0041] In a preferred embodiment, in step S5, specifically, a convolutional neural network is used to extract a high-dimensional feature vector from the corrected face image, and the high-dimensional feature vector is calculated with a feature vector in a pre-stored feature library to obtain a similarity; based on the similarity, it is determined whether the similarity is greater than a preset similarity threshold; if the similarity is greater than the preset similarity threshold, it is determined that the match is successful, and the recognition result and the similarity score are output; if the similarity is less than the preset similarity threshold, it is determined that the match fails, and the recognition result is output, and the unrecognized state is returned.

[0042] In a preferred embodiment, the similarity calculation formula is:

[0043]

[0044] Among them, v1·v2 is the dot product of the high-dimensional feature vector and the feature vector in the feature library, and ||v1|| and ||v2|| are the Euclidean norms (i.e., lengths) of the high-dimensional feature vector and the feature vector in the feature library, respectively.

[0045] In a preferred embodiment, the calculation formula for the dot product of the high-dimensional feature vector v1 and each vector v2 in the feature library is as follows:

[0046]

[0047] Among them, v 1,i is the i-th component (or element) in the high-dimensional feature vector v1,

[0048] V 2,i is the i-th component (or element) in the feature vector v2 in the feature library;

[0049] Since the vectors are normalized, the lengths ||v1|| and ||v2|| are both 1, so the simplified formula is:

[0050] cosine_similarity(v1,v2)=v1·v2.

[0051] The value range of cosine similarity is [-1, 1], 1 means exactly the same, -1 means completely opposite, and 0 means no correlation.

[0052] The present invention provides a face recognition initialization detection system, comprising the following:

[0053] Data acquisition module: used to acquire image data;

[0054] Face area detection module: used for pre-detecting face area of ​​the image data;

[0055] Face area analysis module: used to analyze the feature points of the detected face area;

[0056] Analysis result correction module: used to correct the feature point analysis results;

[0057] Face matching module: used to match the corrected face image.

[0058] The present invention provides a face recognition initialization detection method and system, which can effectively extract image features by detecting the face area after grayscale processing of the image, and combine non-maximum suppression and size position optimization technology to significantly improve the accuracy and stability of face area detection, and avoid false detection and missed detection problems. By locating the key feature points of the face, and checking and adjusting the feature points according to the preset face physiological structure rules, it is ensured that the distribution of the feature points conforms to the natural structure of the face, and the feature point deviation problem caused by posture or other interference factors is avoided. In the angle correction process, the pitch angle, yaw angle and roll angle are calculated, and the face image is affine transformed or perspective transformed, and illumination normalization is performed at the same time, which solves the recognition error problem caused by different shooting angles and illumination conditions. By extracting high-dimensional feature vectors, the similarity between the corrected face image and the feature vector stored in the feature library is quickly judged by the cosine similarity formula. Vector normalization simplifies the cosine similarity calculation and improves the calculation efficiency. The recognition result is judged according to the similarity threshold. By dynamically adjusting the similarity threshold, it can adapt to different application scenarios and balance the accuracy and tolerance of recognition. Real-time processing is achieved through convolutional layer feature extraction, pooling layer dimensionality reduction processing and fully connected layer classification. At the same time, an efficient cosine similarity calculation formula is adopted, so that the overall solution has high real-time and stability in performance. In addition, various interference factors in complex scenarios (such as posture, lighting, feature point deviation) are considered, and comprehensive optimization methods such as angle correction and lighting normalization are adopted to make the solution more robust and applicable in various application scenarios.

Claims

1. A face recognition initialization detection method, characterized in that: The steps include: S1: Acquire image data; S2: Pre-detecting the face area of ​​the image data; S3: Perform feature point analysis on the detected face area; S4: Correct the feature point analysis results; S5: Matching the corrected face image.

2. A face recognition initialization detection method according to claim 1, characterized in that: In the step S2, specifically, the image data is converted into grayscale, a convolutional neural network is used according to the grayscale image to construct a face region recognition model, a feature map of the image is extracted through a convolution layer, the feature map is reduced in dimension through a pooling layer, and the features are classified through a fully connected layer. According to the classification result, it can be determined whether there is a face region. If there is a face region, the preliminarily detected face region is output, non-maximum suppression processing is performed on the preliminarily detected face region, and the size and position of the remaining detection frames are optimized to obtain the final detected face region.

3. A face recognition initialization detection method according to claim 1, characterized in that: In the step S3, specifically, MTCNN is used to locate feature points in the face area, and feature points of the face area are extracted, and the extracted feature points are verified to obtain a feature point coordinate set.

4. A face recognition initialization detection method according to claim 3, characterized in that: In the step S3, the extracted feature points are verified to obtain a set of feature point coordinates, specifically, the relative positions between the feature points of the currently detected face area are calculated based on the relative positions between the preset feature points of the physiological structure of the face, and the relative positions are compared with the relative positions between the preset feature points to obtain a deviation value; if the deviation value exceeds the preset range threshold, the feature points of the currently detected face area are fine-tuned or repositioned; if the deviation value is within the preset range threshold, the feature points are grouped together to generate a set of feature point coordinates.

5. A face recognition initialization detection method according to claim 4, characterized in that: In the step S4, specifically: according to the feature point coordinate set, the posture angles of the face including the pitch angle, the yaw angle and the roll angle are calculated; according to the calculated face posture angles, the face image is geometrically transformed to obtain the face image after angle correction; the face image after angle correction is subjected to illumination normalization processing to obtain the face image after illumination and angle correction.

6. A face recognition initialization detection method according to claim 1, characterized in that: In the step S5, specifically, a convolutional neural network is used to extract a high-dimensional feature vector from the corrected face image, and cosine similarity is used to calculate the similarity between the high-dimensional feature vector and the feature vector in a pre-stored feature library to obtain the similarity; based on the similarity, it is determined whether the similarity is greater than a preset similarity threshold. If the similarity is greater than the preset similarity threshold, it is determined that the match is successful, and the recognition result and the similarity score are output; if the similarity is less than the preset similarity threshold, it is determined that the match fails, and the recognition result is output, and the unrecognized state is returned.

7. A face recognition initialization detection method according to claim 6, characterized in that: The similarity calculation formula is: Among them, v1·v2 is the dot product of the high-dimensional feature vector and the feature vector in the feature library, and ||v1|| and ||v2|| are the Euclidean norms (i.e., lengths) of the high-dimensional feature vector and the feature vector in the feature library, respectively.

8. A face recognition initialization detection system, characterized in that: include: Data acquisition module: used to acquire image data; Face area detection module: used for pre-detecting face area of ​​the image data; Face area analysis module: used to analyze the feature points of the detected face area; Analysis result correction module: used to correct the feature point analysis results; Face matching module: used to match the corrected face image.