Face recognition method based on data analysis

By dividing the face image into rectangular detection areas and extracting feature values, generating feature vectors for comparison, the problem of high computational complexity of face recognition algorithms in the prior art is solved, and more efficient and real-time face recognition is achieved.

CN120198951AActive Publication Date: 2025-06-24BEIJING ZHONGSHITONG TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510670741.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-06-24
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

When existing facial recognition algorithms process large-scale facial data sets, the computational complexity is high, resulting in the recognition speed being unable to meet the real-time requirements, especially in monitoring large-scale events or public places.

Method used

By dividing the face image into several rectangular detection areas, the grayscale values ​​and feature values ​​of pixel points in the feature area are extracted, the feature change values ​​are calculated, the target area is filtered, and the target points are generated to form feature vectors, and database comparisons are performed to improve the recognition efficiency.

Benefits of technology

It reduces the calculation time of face images, improves the real-time and accuracy of face recognition, and reduces the calculation complexity and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198951A_ABST
    Figure CN120198951A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of face recognition, and particularly discloses a face recognition method based on data analysis, which comprises the following steps: S1, dividing a detection area, and calculating a feature value based on a gray value; s2, extracting a second feature value, calculating a feature change value, and screening a target area; s3, target points are generated and sorted, feature vectors are obtained, and comprehensive similarity is calculated based on the feature vectors. The face recognition method based on data analysis is used for improving the face recognition efficiency, face recognition is carried out by carrying out a series of simplification and calculation on the face image of the face, a large amount of complex calculation is reduced, the recognition efficiency is improved, and the real-time performance of face recognition is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of face recognition, and particularly relates to a face recognition method based on data analysis. Background Art

[0002] Face recognition technology is a biometric identification technology based on human facial feature information. Cameras or webcams are used to collect images or video streams containing human faces, and the system automatically detects and tracks human faces in the images, and then performs a series of related technical processes on the detected human faces.

[0003] First, face detection is required. Face detection is the first step in face recognition. The system searches for the position of the human face in the input image. This process involves using specific algorithms to identify the face area in the image and ignoring other non-face elements. Then, through face alignment technology, the positions of key feature points such as eyes, nose, and mouth in the image are made consistent, thereby reducing the difficulty of subsequent recognition. After that, the system extracts the key features of the human face, such as the shape and positional relationship of the eyes, nose, mouth, etc., and converts these features into mathematical vector representations to form a feature template. These vectors can capture the unique attributes of the human face, such as shape, size, skin color, etc. The extracted feature template is matched and compared with the known human face features in the database to determine whether the identities match. Common methods include calculating the cosine similarity between vectors.

[0004] In the prior art, in some application scenarios, such as access control systems, real-time monitoring, etc., it is required that the face image recognition system can respond quickly and recognize the human face. However, some existing recognition algorithms, especially those based on deep learning, although having high accuracy, also have relatively high computational complexity, resulting in the recognition speed may not meet the real-time requirements. For real-time recognition of a large number of people, such as monitoring in large-scale events or public places, the recognition speed becomes a challenge. When processing a large-scale face dataset, the amount of calculation will increase sharply, resulting in low computational efficiency and unable to meet the real-time requirements. Therefore, in order to reduce the amount of calculation and computational complexity, it is necessary to design a face recognition method based on data analysis to reduce the calculation time of face images, thereby enhancing the real-time performance of face recognition. Summary of the Invention

[0005] The purpose of the present invention is to provide a face recognition method based on data analysis to solve the above technical problems.

[0006] The purpose of the present invention can be achieved by the following technical solutions: A face recognition method based on data analysis includes the following steps: S1: Obtain a facial picture, and divide the facial picture into a plurality of detection regions, and the detection regions are a rectangle, L is a preset length, the corresponding detection areas of the facial features and cheeks in the facial picture are recorded as feature areas, the gray value W of the pixel points in the feature areas is obtained, and the average value W of the gray values is calculated ave , calculate the feature values of the pixel points in the feature areas , where the scaling coefficient λ = W ave / W sta , W sta is a preset standard value, R is the value of the red channel of the pixel point, G is the value of the green channel of the pixel point, and B is the value of the blue channel of the pixel point; S2: Take the average value D ave of the feature values in the feature areas as the second feature value T, and calculate the feature change value of the feature area at the i-th row and j-th column, where, T i,j is the second feature value of the feature area at the i-th row and j-th column. If the feature change value is greater than the preset judgment value T sta , then mark the corresponding feature area as the target area; S3: Establish a two-dimensional coordinate system and generate the target point A(x, y) corresponding to the target area, where the abscissa x is the column number where the target area is located, and the ordinate y is the row number where the target area is located; Sort the target points in descending order of the ordinate y, obtain two adjacent target points i and target point i + 1 in the sorting, connect target point i and target point i + 1 to get a feature vector, the feature vector points from target point i to target point i + 1, calculate the comprehensive similarity X based on the face images and feature vectors in the database, and use the face image with the maximum comprehensive similarity X as the recognition object.

[0007] As a further solution of the present invention: In the step S1, obtain the number N of pixel points in the detection area, and ensure that the number N of pixel points satisfies 4 ≤ N ≤ 16.

[0008] As a further solution of the present invention, in the step S1, obtain the number of bytes Byte for representing the pixel points. If the number of bytes Byte ≠ 3, calculate the ratio K = 3 / Byte, and replace the formula for calculating the feature value D of the pixel points in the feature area with .

[0009] As a further solution of the present invention: In the step S2, if the number of target areas is less than the preset minimum number M min , then stop the subsequent steps.

[0010] As a further solution of the present invention: In the step S1, adjust the contrast of the facial picture of the face to the preset standard contrast.

[0011] As a further solution of the present invention: in the step S3, if there are target points with the same ordinate y, the target point with a larger abscissa x is placed in the front position.

[0012] As a further solution of the present invention: in the step S3, the step of calculating the comprehensive similarity X based on the face images and feature vectors in the database specifically includes: Obtain the target point A n-1 and the target point A n corresponding feature vector A n-1,n , calculate the comprehensive similarity , where M represents the number of feature vectors, represents the feature vector corresponding to the face image stored in the database.

[0013] As a further solution of the present invention: in the step S3, if the maximum value of the comprehensive similarity X is less than 60%, then the facial picture of the face does not exist in the database, and it is prompted as an outsider.

[0014] Beneficial effects of the present invention: In the present invention, it is first necessary to obtain a facial picture as a reference. Since the facial picture contains a large number of pixel points, if each pixel point is processed one by one, it will consume a large amount of time and computing power resources, which will reduce the processing efficiency. Therefore, for the purpose of simplifying the operation process and improving the computing efficiency, the facial picture of the face is divided into several rectangular areas of a specified size.

[0015] These rectangular areas are regarded as independent processing units, thereby reducing the amount of data to be processed. Specifically, originally it was necessary to process all the pixel points in the entire picture, but now only the pixel points in some of the divided rectangular areas need to be processed, and the detection areas of the facial features and cheek areas are important parts for distinguishing faces. This method not only simplifies the operation process, but also greatly reduces the processing amount and improves the processing speed.

[0016] In addition, when processing pixel points, there are three primary colors, red, blue, and green, in the pixel points. If these three colors are processed separately, then each color needs to be processed once, which will lead to a significant increase in the amount of calculation. To further reduce the amount of calculation, all these three colors are converted into feature values for processing, which helps to simplify the operation.

[0017] To more comprehensively extract the features of facial images and improve the accuracy of identity recognition, the mean value of the feature values is used as the feature value of the entire detection area. This approach can not only better reflect the overall concept but also effectively reduce the interference caused by overly trivial local details. At the same time, during the specific process of dividing the detection area, attention should be paid to the selection of the size of the detection area. If the detection area is divided too large, the calculated mean value of the feature values may not be able to accurately reflect the specific features within that area; conversely, if the detection area is divided too small, the mean value of the feature values may be affected by noise and unable to represent the true features of the entire detection area.

[0018] After determining the appropriate size of the detection area, the feature change values of these detection areas are then calculated. The feature change value here refers to the change in grayscale values between the current detection area and its surrounding detection areas. Effectively screen out those detection areas with overly large feature change values and mark them as target areas. These selected target areas are actually the parts of the facial image that change more significantly compared to the surrounding areas. They often contain rich identity information and can therefore be used as important judgment bases to determine the specific identity of the object to be recognized. By this method that combines the mean value of the feature values and the feature change values, not only can the features of the facial image be extracted more accurately, but also the accuracy of identity recognition can be effectively improved.

[0019] After completing the screening of the target areas, a two-dimensional coordinate system is established, and corresponding target points are generated for each target area. The core of this step is to convert the target area with an area into a specific point to simplify subsequent operations and calculations. Using the column where the target area is located as the abscissa (x-axis) and the row as the ordinate (y-axis), the position of each target point is accurately marked in the two-dimensional coordinate system. This conversion not only makes the expression of the data more intuitive and concise but also greatly simplifies the subsequent calculation process.

[0020] Next, the generated target points are sorted according to the size of their ordinate (y value). This ensures that the overall direction remains consistent when generating the feature vector later, avoiding calculation errors caused by the disorder of the feature point order. Through this ordered arrangement, the key steps in face recognition, namely the generation and comparison of the feature vector, can be carried out more effectively. The feature vector formed by these target points actually contains all the key information of the entire face, especially those unique points. They jointly form a vector in a high-dimensional space. This vector not only represents a person's facial features but can also be used to compare with other facial images. By calculating the similarity between different feature vectors, the facial image most similar to the object to be recognized can be found.

[0021] To ensure the accuracy of recognition, the comprehensive similarity is calculated. Considering the contributions of all target points, the similarity is evaluated by comparing the distances or angles between them. Finally, the face image corresponding to the maximum value of the comprehensive similarity is determined as the recognition object. This method not only improves the accuracy of recognition but also enhances the robustness of the system to complex scenes and expression changes.

[0022] In summary, the present invention designs a face recognition method based on data analysis to improve the efficiency of face recognition. By performing a series of simplifications and calculations on the facial images of faces, a large amount of complex calculations are reduced, the recognition efficiency is improved, and the real-time performance of face recognition is enhanced. Brief Description of the Drawings

[0023] The present invention will be further described below with reference to the accompanying drawings.

[0024] Figure 1 It is a schematic flowchart of a face recognition method based on data analysis according to the present invention. Detailed Embodiment

[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0026] Please refer to Figure 1 As shown, the present invention is a face recognition method based on data analysis, including the following steps: S1: Obtain a facial picture, divide the facial picture into a plurality of detection areas, the detection area is a rectangle, L is a preset length, the detection areas corresponding to the facial features and cheeks in the facial picture are recorded as feature areas, obtain the gray value W of the pixel points in the feature areas and calculate the average value W of the gray values ave , calculate the feature value of the pixel points in the feature area , where the scaling coefficient λ = W ave / W sta , W sta is a preset standard value, R is the value of the red channel of the pixel point, G is the value of the green channel of the pixel point, and B is the value of the blue channel of the pixel point; S2: Take the average value D ave of the feature values in the feature area as the second feature value T, and calculate the feature change value of the feature area in the i-th row and j-th column , where, T i,jis the second eigenvalue of the feature region at the i-th row and j-th column. If the feature change value is greater than the preset judgment value T sta , then the corresponding feature region is marked as the target region; S3: Establish a two-dimensional coordinate system and generate the target point A(x, y) corresponding to the target region. Among them, the abscissa x is the column number where the target region is located, and the ordinate y is the row number where the target region is located; Sort the target points in descending order of the ordinate y, obtain two adjacent target points i and target point i + 1 in the sorting, connect target point i and target point i + 1 to get the feature vector. The feature vector points from target point i to target point i + 1. Calculate the comprehensive similarity X based on the face images and feature vectors in the database, and use the face image with the maximum comprehensive similarity X as the recognition object.

[0027] It should be noted that first, a facial picture needs to be obtained as a reference. Since the facial picture contains a large number of pixels, if each pixel is processed one by one, it will consume a large amount of time and computing power resources, which will reduce the processing efficiency. Therefore, for the purpose of simplifying the operation process and improving the calculation efficiency, the facial picture of the human face is divided into several rectangular regions of a specified size.

[0028] Regard these rectangular regions as independent processing units, thereby reducing the amount of data to be processed. Specifically, originally, all pixels in the entire picture needed to be processed. Now, only the pixels in some of the divided rectangular regions need to be processed. Among them, the detection regions of the facial features and cheeks are important parts for distinguishing human faces. This method not only simplifies the operation process but also greatly reduces the processing volume and improves the processing speed.

[0029] In addition, when processing pixels, there are three primary colors, red, blue, and green, in the pixels. If these three colors are processed separately, then each color needs to be processed once, which will lead to a significant increase in the amount of calculation. To further reduce the amount of calculation, all three colors are converted into eigenvalues for processing, which helps to simplify the operation.

[0030] In order to more comprehensively extract the features of the facial picture and improve the accuracy of identity recognition, the mean value of the eigenvalues is used as the eigenvalue of the entire detection region. This approach can not only better reflect the overall concept but also effectively reduce the interference caused by overly trivial local details. At the same time, during the specific process of dividing the detection region, attention needs to be paid to the selection of the size of the detection region. If the detection region is divided too large, the calculated mean value of the eigenvalues may not be able to reflect the specific features within the region in detail; conversely, if the detection region is divided too small, the mean value of the eigenvalues may be affected by noise and cannot represent the true features of the entire detection region.

[0031] After determining the appropriate size of the detection regions, the characteristic change values of these detection regions are then calculated. The characteristic change value mentioned here refers to the change amount of the grayscale value between the current detection region and its surrounding detection regions. Effectively screen out those detection regions with overly large characteristic change values and mark them as target regions. These screened target regions are actually the parts on the facial image that change more significantly compared to the surrounding regions. They often contain rich identity information and can thus be used as important judgment bases to determine the specific identity of the object to be recognized. By this method that combines the mean of the characteristic values and the characteristic change values, not only can the features of the facial image be extracted more accurately, but also the accuracy of identity recognition can be effectively improved.

[0032] After completing the screening of the target regions, establish a two-dimensional coordinate system and generate corresponding target points for each target region. The core of this step lies in converting the target region with an area into a specific point to simplify subsequent operations and calculations. Take the column where the target region is located as the abscissa (x-axis) and the row as the ordinate (y-axis), thereby accurately calibrating the position of each target point in the two-dimensional coordinate system. This conversion not only makes the expression of the data more intuitive and concise but also greatly simplifies the subsequent calculation process.

[0033] Next, sort the generated target points according to the magnitude of their ordinates (y values). Because it ensures that the overall direction can be maintained consistent when generating the feature vector subsequently, avoiding calculation errors caused by the disorder of the feature point order. Through this ordered arrangement, the key steps in face recognition, namely the generation and comparison of the feature vector, can be carried out more effectively. The feature vector formed by these target points actually contains all the key information of the entire face, especially those unique points. They jointly form a vector in a high-dimensional space. This vector not only represents a person's facial features but can also be used to compare with other facial images. By calculating the similarity between different feature vectors, the facial image most similar to the object to be recognized can be found.

[0034] To ensure the accuracy of recognition, calculate the comprehensive similarity. Consider the contributions of all target points and evaluate the similarity by comparing the distances or angles between them. Finally, determine the face image corresponding to the maximum value of the comprehensive similarity as the recognized object. This method not only improves the accuracy of recognition but also enhances the robustness of the system to complex scenes and expression changes.

[0035] In another preferred embodiment of the present invention, obtain the number N of pixel points within the detection region, ensuring that the number N of pixel points satisfies N≥4 and N≤16.

[0036] It should be noted that during the process of specifically dividing the detection area, attention needs to be paid to the selection of the size of the detection area. If the detection area is divided too large, the calculated average gray value may not be able to reflect the specific features within the area in detail; conversely, if the detection area is divided too small, the average gray value may be affected by noise and unable to represent the true features of the entire detection area.

[0037] In another preferred embodiment of the present invention, obtain the number of bytes Byte used to represent a pixel point. If the number of bytes Byte ≠ 3, calculate the ratio K = 3 / Byte, and replace the formula for calculating the feature value D of the pixel points within the feature area with .

[0038] It can be understood that during the actual operation process, not all systems use the same number of bytes to represent the three primary colors. Different systems or devices may, for various reasons, such as display accuracy, storage space, processing power, etc., choose different ways to represent color information. This means that in some systems, the representation of colors may be more precise, while in others it may be relatively rough.

[0039] This difference may pose quite a challenge for subsequent image processing or calculation tasks. To ensure the accuracy of the final result, it is necessary to adjust the color information under these different representation methods. Specifically, it is to perform an equal-proportion conversion on the intensities of the three primary colors (red, green, and blue) among them.

[0040] The purpose of the equal-proportion conversion is that regardless of the number of bytes used by the original system to represent colors, a unified standard can be used to quantify and compare colors. Doing so not only helps to improve the accuracy of subsequent calculations but also ensures the consistency and accuracy of colors when exchanging color information between different systems or devices.

[0041] Through the equal-proportion conversion, the color information under different representation methods can be converted into a common format, enabling subsequent image processing or calculation tasks to be carried out on a unified basis. This not only improves the accuracy of calculations but also greatly simplifies the image processing process across platforms and devices, bringing great convenience to our work and life.

[0042] In another preferred embodiment of the present invention, if the number of target areas is less than the preset minimum number M min , then stop the subsequent steps.

[0043] It should be noted that when performing the steps of feature area screening and processing, a key parameter - the preset minimum number M is set minThis parameter represents the minimum number of target regions required for effective face recognition or image analysis. Its significance lies in that if the number of target regions is less than this preset value, it means that the current image may lack sufficient information for accurate recognition or analysis.

[0044] Specifically, after a series of preprocessing and feature extraction steps, if the number of available target regions obtained is less than M min , this usually indicates that the image quality is poor, the amount of information contained is insufficient, or the facial region in the image may be difficult to extract sufficient features due to various reasons (such as angle, lighting, occlusion, etc.). In this case, even if we continue to execute the subsequent calculation and analysis steps, it is very difficult to obtain reliable and accurate results.

[0045] Therefore, to ensure the accuracy and effectiveness of recognition or analysis, a conservative strategy is adopted: once it is found that the number of feature regions is less than the preset minimum number M min , the subsequent steps are immediately stopped. Doing so can not only avoid unnecessary waste of computing resources, but also timely remind the user or system administrator to check the image quality and take corresponding measures (such as adjusting the shooting angle, improving the lighting conditions, reducing occlusions, etc.) to obtain better image data, thereby improving the success rate of recognition or analysis.

[0046] In another preferred embodiment of the present invention, the contrast of the facial picture of the human face is adjusted to a preset standard contrast.

[0047] It should be noted that in order to ensure the accuracy and consistency of face recognition or image analysis, we need to preprocess the input facial picture of the human face, including adjusting the contrast of the picture to a preset standard contrast. This step is crucial because it can help reduce the influence of irrelevant variables on the result accuracy, thereby making the subsequent feature extraction and recognition processes more robust and reliable.

[0048] In another preferred embodiment of the present invention, if there are target points with the same ordinate y, the target point with a larger abscissa x is placed in the front position.

[0049] It can be understood that a coping method in a special case is proposed to increase the anti-interference ability of the present invention.

[0050] In another preferred embodiment of the present invention, the step of calculating the comprehensive similarity X based on the face images and feature vectors in the database specifically includes: Obtain target point A n-1 and the feature vector A n corresponding to target point A n-1,n , and calculate the comprehensive similarity , where M represents the number of feature vectors, It represents the feature vector corresponding to the face image stored in the database.

[0051] In another preferred embodiment of the present invention, if the maximum value of the comprehensive similarity X is less than 60%, it indicates that the facial picture of the face does not exist in the database, and the person is prompted as an outsider.

[0052] It should be noted that in the face recognition system, the comprehensive similarity X is a key indicator to measure the matching degree between the face to be recognized and the pre-stored face images in the database. When the comprehensive similarity X is less than 60%, this threshold is set as an important demarcation point to determine whether the facial picture of the face may exist in the database.

[0053] Specifically, if the calculated comprehensive similarity X is lower than 60%, the system will consider that the currently compared face image is not similar enough to any face image in the database. This situation usually means two possibilities: either the currently captured face does not actually belong to any known individual in the database, that is, it may be an outsider; or due to some external factors (such as lighting, angle, occlusion, etc.), the quality of the face image acquisition has decreased, thus affecting the accuracy of the similarity.

[0054] The above has described an embodiment of the present invention in detail, but the content described is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made according to the scope of the application of the present invention should still fall within the scope covered by the present invention.

Claims

1. A face recognition method based on data analysis, characterized in that, It includes the following steps: S1: Obtain a facial image, divide the facial image into a number of detection regions, the detection region being a rectangle with L being a preset length, mark the detection regions corresponding to the facial features and cheeks in the facial image as feature regions, obtain the gray value W of the pixel points in the feature regions and calculate the average value W of the gray values ave , calculate the feature value of the pixel points in the feature regions , where the scaling factor λ = W ave / W sta , W sta is a preset standard value, R is the value of the red channel of the pixel point, G is the value of the green channel of the pixel point, and B is the value of the blue channel of the pixel point; S2: Take the mean value D of the eigenvalues within the feature region ave as the second eigenvalue T, and calculate the feature change value of the feature region at the i-th row and j-th column , where T i,j is the second eigenvalue of the feature region at the i-th row and j-th column. If the feature change value is greater than the preset judgment value T sta , then mark the corresponding feature region as the target region; S3: Establish a two-dimensional coordinate system and generate the target point A(x, y) corresponding to the target area. Among them, the abscissa x is the column number where the target area is located, and the ordinate y is the row number where the target area is located; Sort the target points in descending order of the ordinate y, obtain two adjacent target points i and target point i + 1 in the sorting, connect target point i and target point i + 1 to obtain a feature vector. The feature vector points from target point i to target point i + 1. Calculate the comprehensive similarity X based on the face images and feature vectors in the database, and use the face image with the maximum comprehensive similarity X as the recognition object.

2. The face recognition method based on data analysis according to claim 1, characterized in that In the step S1, obtain the number of pixel points N in the detection area, and ensure that the number of pixel points N ≥ 4 and N ≤ 16.

3. A face recognition method based on data analysis according to claim 1, characterized in that, In the step S1 described above, obtain the number of bytes Byte representing a pixel point. If the number of bytes Byte ≠ 3, calculate the ratio K = 3 / Byte, and replace the formula for calculating the eigenvalue D of the pixel points in the feature region with .

4. A face recognition method based on data analysis according to claim 1, characterized in that, In the step S2 described above, if the number of target areas is less than the preset minimum number M min , then the subsequent steps are stopped.

5. A face recognition method based on data analysis according to claim 1, characterized in that, In the step S1, adjust the contrast of the facial picture of the face to a preset standard contrast.

6. The face recognition method based on data analysis according to claim 1, wherein, In the step S3, if there are target points with the same ordinate y, make the target point with a larger abscissa x in the front position.

7. A face recognition method based on data analysis according to claim 1, characterized in that, In the step S3, the step of calculating the comprehensive similarity X based on the face images and feature vectors in the database specifically includes: Obtain the target point A n-1 and the target point A n corresponding feature vector A n-1,n , calculate the comprehensive similarity , where M represents the number of feature vectors, represents the feature vector corresponding to the face image stored in the database.

8. A face recognition method based on data analysis according to claim 1, characterized in that In the step S3, if the maximum value of the comprehensive similarity X is less than 60%, it means that the facial picture of the face does not exist in the database, and prompt as an outsider.

Citation Information

Patent Citations

  • Rapid picture correction method realized based on classical statistical method

    CN115272120A

  • Intelligent elevator behavior recognition method based on artificial intelligence

    CN117935125A

  • Face static recognition method and system based on feature vector method

    CN118629075A

  • Image processing apparatus

    US20060093184A1