Face recognition analysis method and system based on artificial intelligence

Through artificial intelligence technology, including grayscale processing, boundary cropping, convolutional neural network and three-dimensional feature analysis, the problem of poor facial expression recognition accuracy in traditional face recognition methods is solved, and more efficient face recognition analysis is achieved.

CN118570865BActive Publication Date: 2024-11-26JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411039605.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-26
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Traditional facial recognition methods are mainly based on feature extraction and pattern matching, and there is a problem of poor accuracy in facial expression recognition.

Method used

Using artificial intelligence-based face recognition analysis method, including obtaining the face image data set to be identified for grayscale processing and boundary cropping, using convolutional neural network to combine spatial pyramid pooling and attention mechanism for feature analysis, and performing three-dimensional Feature virtual space transformation and feature point cloud space vector analysis, and finally, the feature vector distance measurement calculation is performed through the preset expression matching database to achieve expression recognition.

Benefits of technology

Improve the accuracy and robustness of facial expression recognition, enhance the recognition ability of different lighting and postures, simplify the operation process, reduce repetitive work and manpower investment, and achieve more accurate and efficient facial recognition analysis .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570865B_ABST
    Figure CN118570865B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of face data analysis technology, and in particular to a face recognition analysis method and system based on artificial intelligence. The method comprises the following steps: obtaining a face image data set to be recognized and performing face grayscale processing and face boundary background cropping to obtain a face background cropped image data set to be recognized; performing face recognition feature characterization analysis and recognition feature enhancement processing on the face background cropped image data set to be recognized to obtain first recognition characterization feature data of the face image; performing three-dimensional feature virtual space conversion and feature point cloud space vector analysis on the first recognition characterization feature data of the face image to obtain a face image recognition feature point cloud space vector set; performing feature vector distance measurement calculation and face data expression recognition on the face image recognition feature point cloud space vector set to obtain a face data expression recognition matching result. The present invention can realize efficient and accurate recognition and analysis of face expression data.
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 data analysis, and in particular to a face recognition analysis method and system based on artificial intelligence. Background Art

[0002] As an application based on artificial intelligence, face recognition technology is being widely used in many fields such as security monitoring, identity authentication, social media and commercial services. With the rise of deep learning technology, especially the application of convolutional neural network (CNN), face recognition analysis methods based on new technologies have become an innovative direction in the industry, providing a new solution for improving recognition accuracy, enhancing robustness and improving application effects. By using deep convolutional neural network (CNN) for face feature learning and representation, it can automatically learn and extract high-level abstract features in face images, such as key feature points such as facial contours, eyes, and noses. The CNN model is optimized through a large amount of training data and can effectively process face images under different lighting, postures and expression changes, significantly improving the accuracy and robustness of recognition. By combining deep metric learning and metric learning algorithms, this method can optimize and model the face feature space. Deep metric learning technology maps face images of the same person with different expressions and postures into a compact feature space by learning the distance metric between face features, thereby improving the distinguishability of the same face; at the same time, by learning the differences between different individuals, the recognition ability of different individuals is further enhanced. However, traditional face recognition methods are mainly based on feature extraction and pattern matching, and suffer from the problem of poor accuracy in facial expression recognition. Summary of the invention

[0003] Based on this, the present invention provides a face recognition analysis method and system based on artificial intelligence to solve the technical problem that traditional face recognition methods are mainly based on feature extraction and pattern matching and have poor accuracy in facial expression recognition.

[0004] To achieve the above object, the present invention discloses a face recognition analysis method based on artificial intelligence, comprising the following steps:

[0005] Step S1: obtaining a dataset of face images to be identified, and performing face grayscale processing on the dataset of face images to be identified to obtain a dataset of grayscale images of faces to be identified; performing face boundary background cropping on the dataset of grayscale images of faces to be identified to obtain a dataset of background cropped images of faces to be identified;

[0006] Step S2: using a convolutional neural network to perform face recognition feature characterization analysis on the face background cropped image dataset to be recognized, and introducing spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing to obtain first recognition characterization feature data of the face image;

[0007] Step S3: performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; performing a feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set;

[0008] Step S4: performing feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; performing face data expression recognition on the face data to be recognized corresponding to the face image recognition feature point cloud space vector set based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image to obtain the face data expression recognition matching result.

[0009] The present invention first obtains the face image data set to be identified, which is a basic step in the face recognition system. This step ensures that sufficient data samples can be obtained for subsequent effective processing and analysis. The diversity and adequacy of the data set directly affect the accuracy and robustness of the subsequent facial expression recognition process in different scenarios. Therefore, obtaining high-quality face image data is an important prerequisite for ensuring the stability of the subsequent processing process and performance optimization.

[0010] The purpose of graying the face image dataset to be recognized is to simplify the complexity of the image and improve the efficiency of subsequent processing. Graying converts color image data into grayscale image data, which not only reduces the complexity of data processing, but also retains important facial features and structural information. The grayed image is easier to extract features and pattern matching, which helps to improve the robustness and stability of face recognition under different lighting conditions and angle changes.

[0011] At the same time, by cropping the face boundary background of the grayscaled face image, the accuracy and clarity of the face area can be further optimized. The background cropping technology can help remove unnecessary background information in the image and focus on the features and details of the face. This precise cropping operation can effectively eliminate the negative impact of environmental factors on recognition accuracy, ensuring that subsequent facial expression recognition analysis can accurately identify facial expressions and perform effective authentication or identification in practical applications.

[0012] Secondly, the convolutional neural network is used to capture the recognition features of the grayscale instance images of the faces to be recognized in the background cropped image dataset. The key to this step is to use the convolution operation to capture the feature information in the face image, such as edges, textures, etc. The convolutional neural network can extract feature representations of different levels and complexities, laying the foundation for subsequent feature data learning and processing. In addition, the recognition feature data obtained by the previous analysis is enhanced by introducing the spatial pyramid pooling technology and the attention mechanism. The spatial pyramid pooling technology can further enhance the ability of the convolutional neural network in multi-scale feature analysis, ensuring that the multi-scale recognition feature data of the face grayscale image can cover information of different levels and ranges, and the attention mechanism can dynamically adjust and weight the feature responses at different positions in the feature map, so that the network pays more attention to the key parts and important features in the face image, thereby further improving the quality and expression ability of the recognition representation feature data of the face image.

[0013] Then, by performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image, the conversion process from two-dimensional image data to three-dimensional virtual space can be realized. The key to this step is to use a deep learning model or geometric method to convert the planar features of the face image into a richer and more specific three-dimensional feature representation, so as to better capture the geometric shape, depth information and spatial distribution characteristics of the face. Through this conversion, not only can the robustness of facial expression recognition under complex postures and lighting conditions be enhanced, but also the accuracy and stability of recognition can be improved.

[0014] The core of this step is to convert the three-dimensional information of the feature point cloud of each key part into a high-dimensional feature space vector set by converting the feature point cloud of the three-dimensional virtual space of the face image recognition feature. This feature space vector set not only contains the spatial position information of the key parts, but also includes features such as color and texture. This information is crucial for the accuracy and comprehensiveness of face recognition. Through this vector conversion, complex three-dimensional feature data can be converted into a form that is easier to process and analyze, providing a more effective and reliable feature description for the final expression recognition and verification of face data, thereby improving the accuracy and efficiency of facial expression recognition.

[0015] Finally, the feature vector distance measurement calculation is performed on the face image recognition feature point cloud space vector set according to the preset facial expression matching database. The key to this step is to use mathematical distance measurement methods (such as Euclidean distance or cosine similarity, etc.) to measure the similarity between each face image recognition feature point cloud space vector and the corresponding feature point cloud space vector of each face expression image in the database. Through this calculation, a quantitative measurement value can be obtained, which reflects the degree of feature similarity between the face to be recognized and the known expression image.

[0016] Facial expression recognition is performed on the face data to be identified corresponding to the face image recognition feature point cloud space vector set based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image. This step determines which expression image in the database is most similar to the face to be identified by comparing the number of similarities between the feature point cloud corresponding to each face expression image and the feature point cloud of the face image data to be identified, thereby obtaining the expression recognition matching result of the face data. This process can quickly and accurately identify the expression state of the face image through effective database management and feature matching algorithm, providing reliable technical support and solutions for applications such as facial expression analysis and emotion recognition.

[0017] Furthermore, the present invention also discloses an artificial intelligence-based face recognition and analysis system, which is used to execute the artificial intelligence-based face recognition and analysis method as described above. The artificial intelligence-based face recognition and analysis system includes:

[0018] The background cropping module of the face data to be identified is used to obtain the face image data set to be identified, and perform face grayscale processing on the face image data set to be identified to obtain the face grayscale image data set to be identified; perform face boundary background cropping on the face grayscale image data set to be identified, so as to obtain the background cropped image data set of the face to be identified;

[0019] The first recognition and analysis module of face data is used to use a convolutional neural network to perform face recognition feature characterization analysis on the background cropped image dataset of the face to be recognized, and introduce spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing, so as to obtain the first recognition characterization feature data of the face image;

[0020] A face recognition feature space vector conversion module is used to perform a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; perform feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set;

[0021] The face data re-identification and matching module is used to perform feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database, so as to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image, face data expression recognition is performed on the face data to be identified corresponding to the face image recognition feature point cloud space vector set, so as to obtain the face data expression recognition matching result.

[0022] The beneficial effects of the present invention are:

[0023] The present invention provides a face recognition analysis method and system based on artificial intelligence. The face recognition analysis system based on artificial intelligence consists of a background cutting module for face data to be recognized, a first recognition and analysis module for face data, a face recognition feature space vector conversion module, and a face data re-recognition and matching module. It can realize any face recognition analysis method based on artificial intelligence described in the present invention, and is used to combine the operations between computer programs running on various modules to realize the face recognition analysis method based on artificial intelligence. The internal structures of the system cooperate with each other, which can greatly reduce duplication of work and manpower investment, and can quickly and effectively provide a more accurate and efficient face recognition analysis process based on artificial intelligence, thereby simplifying the operation flow of the face recognition analysis system based on artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of the steps of the face recognition analysis method based on artificial intelligence of the present invention;

[0025] Figure 2 for Figure 1 Detailed step flow diagram of step S1;

[0026] Figure 3 for Figure 2 Detailed step flow chart of step S15 in FIG. DETAILED DESCRIPTION

[0027] The technical method of the present invention is clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.

[0028] Example 1, a face recognition analysis method based on artificial intelligence, please refer to Figures 1 to 3 , the method comprises the following steps:

[0029] Step S1: obtaining a dataset of face images to be identified, and performing face grayscale processing on the dataset of face images to be identified to obtain a dataset of grayscale images of faces to be identified; performing face boundary background cropping on the dataset of grayscale images of faces to be identified to obtain a dataset of background cropped images of faces to be identified;

[0030] Step S2: using a convolutional neural network to perform face recognition feature characterization analysis on the face background cropped image dataset to be recognized, and introducing spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing to obtain first recognition characterization feature data of the face image;

[0031] Step S3: performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; performing a feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set;

[0032] Step S4: performing feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; performing face data expression recognition on the face data to be recognized corresponding to the face image recognition feature point cloud space vector set based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image to obtain the face data expression recognition matching result.

[0033] In the embodiment of the present invention, please refer to Figure 1 FIG. 1 is a schematic diagram of the steps of the face recognition analysis method based on artificial intelligence of the present invention. In this example, the face recognition analysis method based on artificial intelligence includes the following steps:

[0034] Step S1: obtaining a dataset of face images to be identified, and performing face grayscale processing on the dataset of face images to be identified to obtain a dataset of grayscale images of faces to be identified; performing face boundary background cropping on the dataset of grayscale images of faces to be identified to obtain a dataset of background cropped images of faces to be identified;

[0035] In an embodiment of the present invention, a large amount of face image data is collected, which may come from different sources, such as camera capture, image databases or online data sets, to obtain a face image data set to be identified. The previously acquired face image data set to be identified is subjected to noise elimination processing by using techniques including median filtering, Gaussian filtering or wavelet transform, so as to reduce unnecessary interference and information loss in the image data, and at the same time, the image data can be effectively smoothed and outliers can be removed, and the face image data set to be identified obtained after noise elimination is subjected to image data contrast enhancement processing by using a histogram equalization method, so as to adjust the grayscale distribution of the image data, so that the overall brightness of the image data is more balanced, thereby enhancing the local details and contrast of the image data.

[0036] At the same time, the face image dataset to be identified obtained after histogram equalization is grayed out to convert the color image into a grayscale image. The converted grayscale image only contains brightness information but not color information. This can simplify subsequent processing steps and reduce computational complexity. The conversion process is usually implemented by weighted averaging to obtain a grayscale image dataset of the face to be identified.

[0037] Then, the facial boundaries are identified by the grayscale image dataset of the face to be identified after grayscale processing, so as to determine the edge or boundary of the corresponding face to crop the image. For example, according to the edge line of the face or specific marking points, the image part containing only the face can be accurately cropped, reducing the interference of irrelevant information and removing background information, so that the face is more prominent and accurate in subsequent recognition or analysis tasks, and finally a background cropped image dataset of the face to be identified is obtained.

[0038] Step S2: using a convolutional neural network to perform face recognition feature characterization analysis on the face background cropped image dataset to be recognized, and introducing spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing to obtain first recognition characterization feature data of the face image;

[0039] In an embodiment of the present invention, a 3x3 convolutional network layer, a 2x2 pooling layer, and a 1x1 fully connected layer are constructed by using a convolutional neural network algorithm, wherein the convolutional layer is used to perform feature capture processing on the input grayscale face image, the pooling layer reduces the size of the feature map by selecting a value (such as the maximum value or the average value) in each area, while retaining the most important features, and the fully connected layer performs feature dimensionality reduction on the pooled feature map to reduce feature redundancy and noise impact, while retaining the most representative feature information.

[0040] For example, suppose there is a face image to be recognized. A 3x3 convolution kernel is slid on the image through a convolution operation. An output value is calculated for each slide. These output values ​​constitute a new feature map. Each feature map corresponds to different feature detections, such as edges, textures, etc., and is convolved down to the 2x2 pooling layer. The role of this pooling layer is to reduce the spatial size of the feature map while retaining the most significant feature information. The spatial pyramid pooling technology is introduced in the 2x2 pooling layer to perform multi-scale feature analysis on the facial grayscale image recognition features previously learned by convolution, so as to further enhance the network's ability in multi-scale feature analysis, ensure that the multi-scale recognition feature data of the facial grayscale image can cover information at different levels and ranges, and perform feature fusion analysis on the multi-scale recognition features obtained after spatial pyramid pooling to integrate feature information at different scales, thereby obtaining a more comprehensive and rich feature representation.

[0041] At the same time, it is also convolved down to the 1x1 fully connected layer. The role of this 1x1 fully connected layer is to convert the pooled feature data into a vector form and perform principal component dimensionality reduction through a fully connected operation. Principal component analysis (PCA) can help reduce the dimension of the feature and retain the most important feature information, thereby reducing the computational burden and reducing the complexity of the model. Then, by introducing the attention mechanism, the recognition feature data after dimensionality reduction is enhanced to automatically adjust the weight according to the importance of the feature, and improve the distinguishability and recognition accuracy of the key features. For example, based on the reduced dimensionality feature data, the attention mechanism can help the convolutional neural network model focus on the most distinguishing features, thereby enhancing the recognition ability of facial images, and finally obtaining the first recognition representation feature data of facial images.

[0042] Step S3: performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; performing a feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set;

[0043] In an embodiment of the present invention, the first recognition representation feature data of the facial image previously obtained through convolutional neural network feature learning is converted into a three-dimensional feature virtual space by using AI virtual technology, so as to convert the two-dimensional feature information in the image into a feature representation in a three-dimensional virtual space, so as to more accurately describe the spatial structure and morphological characteristics of the face, thereby better capturing the geometric shape, depth information and spatial distribution characteristics of the face, thereby obtaining a three-dimensional virtual space of facial image recognition features.

[0044] The feature point cloud at key parts of the previously converted three-dimensional virtual space of facial image recognition features is sampled and extracted to extract a set of key facial feature points from the converted three-dimensional virtual space. These points are usually key points that express facial structure and features, where key parts usually include important feature points such as eyes, nose, and mouth. The specific spatial position and features of each key point cloud are further analyzed to more accurately describe the structure and morphological changes of the face.

[0045] Then, by combining the three-dimensional spatial coordinates of each key part feature point cloud determined previously, the identification feature data corresponding to each key part feature point cloud in the key part feature point cloud set is converted into a spatial vector, so as to convert the three-dimensional information at each key part feature point cloud into a high-dimensional feature space vector. The feature space vector not only contains the spatial position information of the key parts, but also includes spatial identification feature data such as color and texture, and finally a spatial vector set of feature point clouds for facial image recognition is obtained.

[0046] Step S4: performing feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; performing face data expression recognition on the face data to be recognized corresponding to the face image recognition feature point cloud space vector set based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image to obtain the face data expression recognition matching result.

[0047] In an embodiment of the present invention, by compressing the size of each facial expression image in a preset facial expression matching database to make it consistent with the size of the facial image data to be identified and to ensure that they have a uniform size and format, the facial expression compressed image set after the size compression processing is subjected to image matching and alignment processing to ensure that all processed images are aligned in space, and the expression parts (such as eyes and mouth) of each image are aligned in space, and the facial expression image set after the image matching and alignment processing is subjected to spatial vector conversion of the feature point cloud by using a spatial vector conversion method, in order to extract the facial expression of each facial expression matching and alignment image. Feature point information, such as the spatial vector representation of key points such as facial contour, eye position, nose position, etc., and by combining the feature space vectors at each feature point cloud in each facial expression image extracted previously, using methods such as Euclidean distance or cosine similarity to measure the spatial distance of the feature space vectors at the corresponding feature point cloud in the facial image recognition feature point cloud space vector set, so as to evaluate the similarity or distance between the feature point vector of each facial image and the feature point vector of the preset expression image, thereby obtaining the vector space distance measurement value between each facial image recognition feature point cloud space vector and the corresponding feature point cloud space vector of each facial expression image.

[0048] By using a preset feature vector space distance threshold, the vector space distance measurement values ​​between the spatial vectors of each facial image recognition feature point cloud obtained by previous quantitative calculation and the spatial vectors of the feature point cloud corresponding to each facial expression image are compared and judged. If the spatial distance measurement value between the spatial vector at a certain recognition feature point cloud and the spatial vector of the feature point cloud corresponding to each facial expression image in the expression database is greater than or equal to the preset feature vector space distance threshold, the corresponding feature point cloud in the expression image is marked as the expression recognition similarity point of the facial image to be recognized; otherwise, the expression image is not marked, and the number of similarity points of all facial expression images marked with facial expression recognition similarities in the facial expression matching database is statistically calculated. The purpose of this step is to determine the number of recognition similarity points on each facial expression image similar to it in the matching database, so as to determine the expression image closest to the facial image to be recognized.

[0049] Then, by combining the number of recognition similarities of each facial expression image in the facial expression matching database obtained by previous statistical calculations, the facial expression recognition analysis is performed on the face data to be recognized corresponding to the facial image recognition feature point cloud space vector set, so as to screen out the facial expression image corresponding to the face image to be recognized with the most recognition similarities from the facial expression database, and determine it as the most matching expression category or emotion category. For example, if there are the most recognition feature pixels between the face image to be recognized and the smiling face expression in the database, then it can be concluded that the expression recognition result of the face image to be recognized is a smiling face, and finally the facial data expression recognition matching result is obtained.

[0050] The present invention first obtains the face image data set to be identified, which is a basic step in the face recognition system. This step ensures that sufficient data samples can be obtained for subsequent effective processing and analysis. The diversity and adequacy of the data set directly affect the accuracy and robustness of the subsequent facial expression recognition process in different scenarios. Therefore, obtaining high-quality face image data is an important prerequisite for ensuring the stability of the subsequent processing process and performance optimization.

[0051] The purpose of graying the face image dataset to be recognized is to simplify the complexity of the image and improve the efficiency of subsequent processing. Graying converts color image data into grayscale image data, which not only reduces the complexity of data processing, but also retains important facial features and structural information. The grayed image is easier to extract features and pattern matching, which helps to improve the robustness and stability of face recognition under different lighting conditions and angle changes.

[0052] At the same time, by cropping the face boundary background of the grayscaled face image, the accuracy and clarity of the face area can be further optimized. The background cropping technology can help remove unnecessary background information in the image and focus on the features and details of the face. This precise cropping operation can effectively eliminate the negative impact of environmental factors on recognition accuracy, ensuring that subsequent facial expression recognition analysis can accurately identify facial expressions and perform effective authentication or identification in practical applications.

[0053] Secondly, the convolutional neural network is used to capture the recognition features of the grayscale instance images of the faces to be recognized in the background cropped image dataset. The key to this step is to use the convolution operation to capture the feature information in the face image, such as edges, textures, etc. The convolutional neural network can extract feature representations of different levels and complexities, laying the foundation for subsequent feature data learning and processing. In addition, the recognition feature data obtained by the previous analysis is enhanced by introducing the spatial pyramid pooling technology and the attention mechanism. The spatial pyramid pooling technology can further enhance the ability of the convolutional neural network in multi-scale feature analysis, ensuring that the multi-scale recognition feature data of the face grayscale image can cover information of different levels and ranges, and the attention mechanism can dynamically adjust and weight the feature responses at different positions in the feature map, so that the network pays more attention to the key parts and important features in the face image, thereby further improving the quality and expression ability of the recognition representation feature data of the face image.

[0054] Then, by performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image, the conversion process from two-dimensional image data to three-dimensional virtual space can be realized. The key to this step is to use a deep learning model or geometric method to convert the planar features of the face image into a richer and more specific three-dimensional feature representation, so as to better capture the geometric shape, depth information and spatial distribution characteristics of the face. Through this conversion, not only can the robustness of facial expression recognition under complex postures and lighting conditions be enhanced, but also the accuracy and stability of recognition can be improved.

[0055] The core of this step is to convert the three-dimensional information of the feature point cloud of each key part into a high-dimensional feature space vector set by converting the feature point cloud of the three-dimensional virtual space of the face image recognition feature. This feature space vector set not only contains the spatial position information of the key parts, but also includes features such as color and texture. This information is crucial for the accuracy and comprehensiveness of face recognition. Through this vector conversion, complex three-dimensional feature data can be converted into a form that is easier to process and analyze, providing a more effective and reliable feature description for the final expression recognition and verification of face data, thereby improving the accuracy and efficiency of facial expression recognition.

[0056] Finally, the feature vector distance measurement calculation is performed on the face image recognition feature point cloud space vector set according to the preset facial expression matching database. The key to this step is to use mathematical distance measurement methods (such as Euclidean distance or cosine similarity, etc.) to measure the similarity between each face image recognition feature point cloud space vector and the corresponding feature point cloud space vector of each face expression image in the database. Through this calculation, a quantitative measurement value can be obtained, which reflects the degree of feature similarity between the face to be recognized and the known expression image.

[0057] Facial expression recognition is performed on the face data to be identified corresponding to the face image recognition feature point cloud space vector set based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image. This step determines which expression image in the database is most similar to the face to be identified by comparing the number of similarities between the feature point cloud corresponding to each face expression image and the feature point cloud of the face image data to be identified, thereby obtaining the expression recognition matching result of the face data. This process can quickly and accurately identify the expression state of the face image through effective database management and feature matching algorithm, providing reliable technical support and solutions for applications such as facial expression analysis and emotion recognition.

[0058] Preferably, step S1 comprises the following steps:

[0059] Step S11: Obtain a dataset of face images to be recognized;

[0060] Step S12: performing noise elimination processing on the face image dataset to be identified to obtain a noise elimination data set of the face image to be identified;

[0061] Step S13: performing histogram equalization processing on the denoising dataset of the face image to be identified to obtain a contrast equalized dataset of the face image to be identified;

[0062] Step S14: performing face grayscale processing on the face image contrast equalization dataset to be identified, so as to obtain a face grayscale image dataset to be identified;

[0063] Step S15: performing face boundary background cropping on the grayscale image dataset of the face to be identified to obtain a background cropped image dataset of the face to be identified.

[0064] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 Detailed step flow diagram of step S1 in FIG. 1 , in this embodiment, step S1 includes the following steps:

[0065] Step S11: Obtain a dataset of face images to be recognized;

[0066] In the embodiment of the present invention, a large amount of face image data is collected, which may come from different sources, such as camera capture, image databases or online data sets, to finally obtain a face image data set to be identified.

[0067] Step S12: performing noise elimination processing on the face image dataset to be identified to obtain a noise elimination data set of the face image to be identified;

[0068] In an embodiment of the present invention, the noise of the previously acquired face image data set to be identified is eliminated by using techniques including median filtering, Gaussian filtering or wavelet transform to reduce unnecessary interference and information loss in the image data. At the same time, the image data can be effectively smoothed and outliers can be removed. For example, if the image data set contains noise caused by uneven lighting, a Gaussian filter can be applied to smooth the image to obtain a clearer and more reliable face data set, and finally a denoised face image data set to be identified is obtained.

[0069] Step S13: performing histogram equalization processing on the denoising dataset of the face image to be identified to obtain a contrast equalized dataset of the face image to be identified;

[0070] In an embodiment of the present invention, a histogram equalization method is used to perform contrast enhancement processing on the denoised dataset of the face image to be identified after denoising, so as to adjust the grayscale distribution of the image data so that the overall brightness of the image data is more balanced, thereby enhancing the local details and contrast of the image data. This processing is particularly suitable for image data with uneven grayscale distribution, and can significantly improve the visual effect and recognition quality of the image data. For example, after a face image data with uneven illumination is processed by histogram equalization, the details of the dark and bright parts will be clearer and more prominent, which is helpful for subsequent facial feature extraction and recognition accuracy, and finally a contrast balanced dataset of the face image to be identified is obtained.

[0071] Step S14: performing face grayscale processing on the face image contrast equalization dataset to be identified, so as to obtain a face grayscale image dataset to be identified;

[0072] In an embodiment of the present invention, a grayscale processing is performed on a contrast-equalized dataset of a face image to be identified obtained after histogram equalization to convert a color image into a grayscale image. The converted grayscale image only contains brightness information but not color information. This can simplify subsequent processing steps and reduce computational complexity. The conversion process is usually implemented by a weighted averaging method. For example, a color face image will become a grayscale image after grayscale processing, and each pixel point contains only one grayscale value, and finally a grayscale image dataset of a face to be identified is obtained.

[0073] Step S15: performing face boundary background cropping on the grayscale image dataset of the face to be identified to obtain a background cropped image dataset of the face to be identified.

[0074] In an embodiment of the present invention, facial boundaries are identified by using a grayscale image dataset of a face to be identified that is obtained after grayscale processing to determine the edge or boundary of the corresponding face to crop the image. For example, based on the edge line of the face or specific marking points, the image portion containing only the face can be accurately cropped to reduce interference from irrelevant information and remove background information, thereby making the face more prominent and accurate in subsequent recognition or analysis tasks, and ultimately obtaining a background cropped image dataset of the face to be identified.

[0075] The present invention first obtains the face image data set to be identified, which is a basic step in the face recognition system. This step ensures that sufficient data samples can be obtained for subsequent effective processing and analysis. The diversity and adequacy of the data set directly affect the accuracy and robustness of the subsequent facial expression recognition process in different scenarios. Therefore, obtaining high-quality face image data is an important prerequisite for ensuring the stability of the subsequent processing process and performance optimization.

[0076] Secondly, the purpose of performing noise elimination on the face image dataset to be identified is to remove the interference information in the image and improve the accuracy and effect of subsequent processing steps. Noise elimination technology can help filter out random noise in the image, interference generated by the camera equipment or the influence of ambient light, making the image clearer and more reliable. This preprocessing step can effectively enhance the features of the image and lay a solid foundation for subsequent image data analysis and recognition work.

[0077] Then, by performing histogram equalization on the denoising dataset of the face images to be identified, the contrast and visual quality of the image data can be significantly improved. Histogram equalization redistributes the pixel intensity values ​​of the image to make the grayscale levels in the image more evenly distributed, thereby enhancing the local contrast and detail information of the image data. This processing can not only make the image data visually clearer and more vivid, but also improve the effects of subsequent feature extraction and pattern recognition, and improve the accuracy and stability of facial expression recognition.

[0078] Next, the face image to be recognized after histogram equalization is grayed to simplify the complexity of the image and improve the efficiency of subsequent processing. Face graying converts color images into grayscale images, which not only reduces the complexity of data processing, but also retains important facial features and structural information. The grayed image is easier to extract features and pattern matching, which helps to improve the robustness and stability of face recognition under different lighting conditions and angle changes.

[0079] Finally, by cropping the face boundary background of the grayscaled face image, the accuracy and clarity of the face area can be further optimized. Background cropping technology can help remove unnecessary background information in the image and focus on the features and details of the face. This precise cropping operation can effectively eliminate the negative impact of environmental factors on recognition accuracy, ensuring that subsequent facial expression recognition analysis can accurately identify facial expressions and perform effective authentication or identification in practical applications.

[0080] Preferably, step S15 comprises the following steps:

[0081] Step S151: performing pixel brightness distribution analysis on the grayscale image of the face to be identified corresponding to the grayscale image data set to obtain a pixel brightness distribution map of the face to be identified;

[0082] Step S152: performing edge point screening and labeling processing on each pixel brightness distribution value in the pixel brightness distribution map of the face to be identified according to a preset edge pixel brightness threshold, so as to obtain edge pixel labeling points of the face to be identified;

[0083] Step S153: Drawing edge lines for the grayscale image of the face to be identified corresponding to the grayscale image of the face to be identified in the grayscale image data set based on the edge pixel marking points of the face to be identified, so as to generate edge lines of the face to be identified image;

[0084] Step S154: by presetting four orientation constraints, wherein the four orientation constraints include east, north, west, and south, and determining the farthest non-zero pixel point of the edge line of the face image to be identified based on the four orientation constraints, the farthest non-zero pixel point of the edge line of the face to be identified in the four orientations is obtained;

[0085] Step S155: based on the farthest non-zero pixel points of the edge lines of the face to be identified in four directions, the face boundary background is cropped on the grayscale image dataset of the face to be identified to obtain a background cropped image dataset of the face to be identified.

[0086] As an embodiment of the present invention, refer to Figure 3 As shown, Figure 2 Detailed step flow diagram of step S15 in FIG. 1 , in this embodiment, step S15 includes the following steps:

[0087] Step S151: performing pixel brightness distribution analysis on the grayscale image of the face to be identified corresponding to the grayscale image data set to obtain a pixel brightness distribution map of the face to be identified;

[0088] In an embodiment of the present invention, a distribution analysis of pixel brightness is performed on each grayscale image of a face to be identified that corresponds to a grayscale image data set. This process involves scanning each pixel in the image and recording its brightness value. Generally, pixels with higher brightness values ​​represent brighter areas in the image, while pixels with lower brightness values ​​represent darker areas. By counting and analyzing the brightness distribution of all pixels, a pixel brightness distribution map of the face to be identified can be obtained. For example, for a grayscale image, the brightness value of each pixel will be recorded, and a brightness distribution curve or heat map will be generated to display the brightness distribution of different areas in the image, and finally a pixel brightness distribution map of the face to be identified will be obtained.

[0089] Step S152: performing edge point screening and labeling processing on each pixel brightness distribution value in the pixel brightness distribution map of the face to be identified according to a preset edge pixel brightness threshold, so as to obtain edge pixel labeling points of the face to be identified;

[0090] In an embodiment of the present invention, a preset edge pixel brightness threshold is used to screen, identify and mark the edge points of each pixel brightness distribution value in the pixel brightness distribution map of the face to be identified, so as to identify the pixels belonging to the edge in the image according to the set threshold. Generally speaking, the brightness value of the edge pixel will be lower than the pixels in the surrounding area. This is due to the influence of the edge background chromaticity. For example, assuming that a brightness threshold is set, the pixels below the threshold are considered to be edge pixels, and these pixels are marked for subsequent edge line connection and analysis, and finally the edge pixel marking points of the face to be identified are obtained.

[0091] Step S153: Drawing edge lines for the grayscale image of the face to be identified corresponding to the grayscale image of the face to be identified in the grayscale image data set based on the edge pixel marking points of the face to be identified, so as to generate edge lines of the face to be identified image;

[0092] In an embodiment of the present invention, edge lines are connected and drawn for the grayscale image of the face to be identified that corresponds to the grayscale image of the face to be identified in the grayscale image data set obtained by combining the edge pixel annotation points of the face to be identified obtained previously, so as to connect these points to form a continuous edge line according to the annotated edge points. This connection can be in the form of a line segment or a curve to accurately describe the edge contour of the face. For example, for the annotated edge points, a complete edge line will be drawn according to their position information, thereby forming the edge contour of the face image to be identified, and finally generating the edge line of the face image to be identified.

[0093] Step S154: by presetting four orientation constraints, wherein the four orientation constraints include east, north, west, and south, and determining the farthest non-zero pixel point of the edge line of the face image to be identified based on the four orientation constraints, the farthest non-zero pixel point of the edge line of the face to be identified in the four orientations is obtained;

[0094] In an embodiment of the present invention, four azimuth restriction conditions (east, north, west, and south) are pre-set to determine the farthest non-zero pixel point in the azimuth of the edge line of the face image to be identified that is previously drawn. The purpose of this step is to find the non-zero pixel point on the edge line that is farthest from the center of the face in each direction, so as to determine the boundary of the face. For example, according to the four directions of east, north, west, and south, the outermost non-zero pixel points on the edge line will be searched respectively, and their position information will be recorded as the farthest point of the edge line in each direction, and finally the farthest non-zero pixel points of the edge line of the face to be identified in the four directions will be obtained.

[0095] Step S155: based on the farthest non-zero pixel points of the edge lines of the face to be identified in four directions, the face boundary background is cropped on the grayscale image dataset of the face to be identified to obtain a background cropped image dataset of the face to be identified.

[0096] In an embodiment of the present invention, the face boundary background is cropped from the grayscale image of the face to be identified corresponding to the grayscale image data set of the face to be identified according to the farthest non-zero pixel point of the edge line of the face to be identified in four directions previously determined, so that the original grayscale image is cropped according to the farthest point information in four directions to obtain a background cropped image data set containing only the face area. For example, according to the determined farthest point information, the boundary range of the face is cropped to ensure that the cropped image contains only the main body of the face, which is convenient for subsequent face recognition or analysis tasks, and finally a background cropped image data set of the face to be identified is obtained.

[0097] The present invention first analyzes the pixel brightness distribution of the grayscale image of the face to be identified in the grayscale image data set to understand the brightness characteristics and distribution of each pixel in the image. This step can reveal the light and dark changes in different areas of the image by counting and analyzing the grayscale value of each pixel, which is helpful for the accuracy and efficiency of the subsequent edge detection and feature extraction process. Through the pixel brightness distribution map, the grayscale distribution of different parts in the face image can be intuitively observed, providing basic data for further processing.

[0098] Secondly, by screening and labeling each pixel in the brightness distribution map of the face pixels to be identified according to the preset edge pixel brightness threshold, the key points representing the edge of the face in the image are identified. By setting the threshold, the obvious difference between the edge of the face and the background can be effectively distinguished, thereby marking the outer contour of the face. The key to this step is to accurately locate the key points of the edge of the face, providing accurate basis and support for subsequent edge line connection and cropping operations.

[0099] Then, the edge lines of the corresponding grayscale image of the face to be identified in the grayscale image data set are connected and drawn based on the edge pixel annotation points of the face to be identified. The purpose is to generate accurate edge lines of the face image. By connecting the annotated points, the complete boundary lines of the face contour can be formed. These lines reflect the precise shape and structure of the face in the image. The generated edge lines not only help to extract the shape features of the face, but also provide a basis for subsequent orientation restrictions and determination of the farthest pixel points of the edge points.

[0100] Next, based on the determination of the edge line of the face, the farthest position of the non-zero pixel point on the edge line of the face image is determined through the preset four directional constraints (east, north, west, and south). This step aims to identify the farthest edge point of the face contour in each direction, so as to accurately determine the boundary range of the face. Through the directional constraints, background interference can be effectively eliminated to ensure that the selected farthest pixel point can truly reflect the actual outline of the face, providing accurate boundary definition for subsequent cropping operations.

[0101] Finally, the face boundary background is cropped on the grayscale image dataset of the face to be identified based on the farthest non-zero pixel point of the edge line of the face to be identified in four directions. The purpose of this step is to clearly separate the face area from the background to obtain a clear face background cropped image dataset. The cropped image set accurately contains the main features and structure of the face, removes unnecessary background information, and provides more accurate and reliable input data for the subsequent face recognition feature analysis process. Such a preprocessing step not only improves the sensitivity of the convolutional neural network algorithm in artificial intelligence to facial features, but also enhances its stability and usability in complex environments.

[0102] Preferably, step S155 includes the following steps:

[0103] Perform grayscale center recognition analysis on the grayscale image of the face to be identified corresponding to the grayscale image data set to obtain the grayscale center point of the grayscale image of the face to be identified;

[0104] In an embodiment of the present invention, the grayscale center point is analyzed and determined from the grayscale image of the face to be identified that corresponds to the grayscale image data set of the face to be identified after previous grayscale processing, so as to find the area where the grayscale values ​​in the image are concentrated, that is, the grayscale center point. This point usually represents the main feature or focus of the face image. For example, for a grayscale image, the grayscale value of each pixel is scanned, and the point with the highest grayscale value is marked as the center point of the image, and finally the grayscale center point of the grayscale image of the face to be identified is obtained.

[0105] Preferably, based on the grayscale center point of the grayscale image of the face to be identified, the grayscale image of the face to be identified corresponding to the grayscale image data set to be identified is transformed into a two-dimensional space coordinate system to obtain a grayscale image of the face to be identified with the grayscale center point as the origin. Figure 2 dimensional space coordinate system;

[0106] In an embodiment of the present invention, the grayscale image of the face to be identified corresponding to the grayscale image of the face to be identified in the grayscale image data set is transformed into a two-dimensional space coordinate system by combining the grayscale center point of the grayscale image of the face to be identified previously determined, so as to convert the grayscale image of the face to be identified into a two-dimensional space coordinate system with the grayscale center point as the origin. This step involves adjusting the coordinates of each pixel point so that the grayscale center point becomes the origin of the new coordinate system. For example, if the coordinates of the grayscale center point in the image coordinate system are (x_c, y_c), then the coordinates (x, y) of each pixel in the original image are converted into (x' = x - x_c, y' = y - y_c) in the new coordinate system, and finally the grayscale image of the face to be identified with the grayscale center point as the origin is obtained. Figure 2 dimensional space coordinate system.

[0107] Preferably, according to the grayscale center point of the face to be identified Figure 2 The azimuth space coordinate system is used to calculate the farthest non-zero pixel point of the edge line of the face to be identified in four directions, so as to obtain the azimuth space coordinates of the farthest non-zero pixel point of the edge line of the face to be identified in four directions;

[0108] In the embodiment of the present invention, by using the previously established grayscale center point of the face to be identified as the origin Figure 2The two-dimensional space coordinate system measures the horizontal and vertical axis coordinates of the farthest non-zero pixel points of the face edge line to be identified in the four directions to measure and record their horizontal and vertical axis coordinate values, and calculates the distance relative to the grayscale center point, so as to determine the specific spatial distance of the farthest non-zero pixel points of the face edge line to be identified in the four directions relative to the grayscale center point by using the distance calculation method between two points or the Pythagorean theorem, and at the same time calculates the spatial coordinate deflection between the farthest point and the center point in each direction by using the inverse tangent function, and takes the spatial distance value relative to the center origin as the polar diameter, and takes the spatial coordinate deflection as the polar angle, so as to convert the two-dimensional coordinate system with the grayscale center as the origin into the azimuthal space coordinate system, which is used to describe the specific position and direction of the face edge line in space, and finally obtains the azimuthal space coordinates of the farthest non-zero pixel points of the face edge line to be identified in the four directions.

[0109] Preferably, the maximum circumscribed rectangle is drawn for the azimuth space coordinates of the farthest non-zero pixel points of the edge line of the face to be identified in four directions, so as to generate the maximum circumscribed rectangle boundary of the edge of the face to be identified;

[0110] In an embodiment of the present invention, the azimuthal spatial coordinates of the farthest non-zero pixel points of the edge line of the face to be identified in four directions that have been previously determined are connected to draw a minimum rectangular area that can completely surround all non-zero pixel points within the edge of the face image to be identified, that is, the maximum circumscribed rectangular boundary range, so as to accurately calibrate the boundary range of the face image to be identified, and finally generate the maximum circumscribed rectangular boundary of the edge of the face to be identified.

[0111] Preferably, the face boundary background is cropped from the grayscale image dataset of the face to be identified according to the maximum circumscribed rectangular boundary of the edge of the face to be identified, so as to obtain a cropped image dataset of the face background to be identified.

[0112] In an embodiment of the present invention, the maximum circumscribed rectangular boundary of the edge of the face to be identified determined previously is used to perform circumscribed background cropping on the grayscale image of the face to be identified corresponding to the grayscale image of the face to be identified in the grayscale image data set, so that the pixels in the grayscale image of the face to be identified are cropped to the boundary defined by its maximum circumscribed rectangle, and the redundant background part is removed therefrom, that is, the face area is separated from the background around it, so as to obtain a cropped image containing only the face area, and the images obtained after the cropping process are collected, and finally a data set of cropped images of the background of the face to be identified is obtained.

[0113] The present invention first performs grayscale center recognition analysis on the grayscale image of the face to be identified that corresponds to the grayscale image data set in order to accurately locate the center point of the face image. By analyzing the pixel distribution of the grayscale image, the area in the image where the grayscale values ​​are concentrated, that is, the grayscale center point, can be found. This point usually represents the main feature or focus of the face image, which helps the subsequent processing steps to accurately locate and identify the core area of ​​the face.

[0114] Secondly, the two-dimensional spatial coordinate system transformation of the corresponding grayscale image of the face to be identified in the grayscale image data set is performed based on the grayscale center point of the grayscale image of the face to be identified. The purpose is to unify the face image into a standard coordinate system during the processing process. By taking the grayscale center point as the origin, the processing and analysis of the face image can be simplified, making subsequent geometric calculations and boundary detection more convenient and accurate. This conversion not only helps to unify the processing process, but also maintains the consistency and stability of the image in different processing stages.

[0115] Then, according to the grayscale center point of the face to be identified Figure 2 The azimuth space coordinate system is used to calculate the azimuth space coordinates of the farthest non-zero pixel point on the edge line of the face to be identified in the four directions. The purpose of this step is to determine the extreme points of the edge of the face in all directions, so as to more accurately define the outer contour of the face. By calculating the azimuth space coordinates, the specific position and shape of the edge line of the face can be determined, providing accurate basic data for the subsequent edge rectangle drawing. Next, the maximum circumscribed rectangle is drawn by drawing the azimuth space coordinates of the farthest non-zero pixel point on the edge line of the face to be identified in the four directions. This rectangle will be drawn around the extreme points of the edge of the face to define the maximum circumscribed rectangle boundary of the face. The maximum circumscribed rectangle is a simplified and optimized representation of the face area. It can effectively frame the overall contour of the face while retaining important structural features and detail information.

[0116] Finally, the face boundary background is cropped from the grayscale image dataset of the face to be identified according to the maximum circumscribed rectangular boundary of the edge of the face to be identified. The purpose of this step is to clearly separate the face area from the background, thereby generating a clear face background cropped image dataset. The cropped image set contains precise facial features and structures, removes irrelevant background interference, and provides accurate and reliable input data for subsequent face recognition and analysis work.

[0117] Preferably, the grayscale of the face to be identified is calculated based on the grayscale center point as the origin. Figure 2 The calculation of the azimuth space coordinates of the farthest non-zero pixel point of the edge line of the face to be identified in four directions in the dimensional space coordinate system includes the following steps:

[0118] According to the grayscale of the face to be identified with the grayscale center point as the origin Figure 2 The dimensional space coordinate system performs horizontal and vertical axis coordinate measurement processing on the farthest non-zero pixel point of the edge line of the face to be identified in four directions, and obtains the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel point of the edge line of the face to be identified in four directions;

[0119] In the embodiment of the present invention, by using the previously established grayscale center point of the face to be identified as the origin Figure 2 The 3D space coordinate system measures the horizontal and vertical coordinates of the farthest non-zero pixel points corresponding to the edge line of the face to be identified in the four directions. This means that in each direction, the non-zero pixel points farthest from the center will be found through the established space coordinate system, and their horizontal and vertical coordinate values ​​will be recorded. For example, for a face image, the farthest non-zero pixel points on the top can be found at coordinates (x_up, y_up), on the bottom at coordinates (x_down, y_down), on the left at coordinates (x_left, y_left), and on the right at coordinates (x_right, y_right). Finally, the spatial horizontal and vertical coordinate values ​​of the farthest non-zero pixel points on the edge line of the face to be identified in the four directions are obtained.

[0120] Preferably, the distance relative to the origin is calculated based on the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel points on the edge line of the face to be identified in the four directions, so as to obtain the spatial distance values ​​between the farthest non-zero pixel points on the edge line of the face to be identified in the four directions and the central origin;

[0121] In an embodiment of the present invention, the distance relative to the grayscale center point is calculated by combining the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel points of the edge line of the face to be identified in the four directions determined previously, so as to determine the specific spatial distances of the farthest non-zero pixel points of the edge line of the face to be identified in the four directions relative to the grayscale center point by using the distance calculation method between two points or the Pythagorean theorem, thereby calculating the distances from the farthest point to the center at the top as d_up, the bottom as d_down, the left as d_left, and the right as d_right, and finally obtaining the spatial distance values ​​between the farthest non-zero pixel points of the edge line of the face to be identified in the four directions relative to the center origin.

[0122] Preferably, the pixel point deflection angle arctangent solution processing is performed according to the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel points on the edge line of the face to be identified in the four directions, so as to obtain the spatial coordinate deflection angle between the farthest non-zero pixel points on the edge line of the face to be identified in the four directions and the central origin;

[0123] In an embodiment of the present invention, the inverse tangent of the pixel deflection angle is solved by combining the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel point in the four directions of the edge line of the face to be identified that are previously determined. The purpose of this step is to calculate the spatial coordinate deflection angle between the farthest point and the center point in each direction to determine its position direction relative to the center. For example, the deflection angle between the farthest point above and the center point is calculated by the inverse tangent function as θ_up, θ_down below, θ_left to the left, and θ_right to the right. Finally, the spatial coordinate deflection angle between the farthest non-zero pixel point in the four directions of the edge line of the face to be identified relative to the center origin is obtained.

[0124] Preferably, the spatial distance values ​​between the farthest non-zero pixel points on the edge line of the face to be identified in the four directions relative to the center origin and the spatial coordinate deflection angle are transformed into the azimuth space coordinate system to obtain the azimuth space coordinates of the farthest non-zero pixel points on the edge line of the face to be identified in the four directions.

[0125] In an embodiment of the present invention, the azimuthal space coordinate system is converted by using the previously calculated spatial distance values ​​between the farthest non-zero pixel points of the edge line of the face to be identified in four directions relative to the center origin and the spatial coordinate deflection angle, so that the spatial distance values ​​relative to the center origin are used as the polar diameter, and the spatial coordinate deflection angle is used as the polar angle, thereby converting the two-dimensional coordinate system with the grayscale center as the origin into the azimuthal space coordinate system for describing the specific position and direction of the edge line of the face in space, and finally obtaining the azimuthal space coordinates of the farthest non-zero pixel points of the edge line of the face to be identified in four directions.

[0126] The present invention firstly calculates the grayscale of the face to be identified based on the grayscale center point as the origin. Figure 2 The 3D space coordinate system measures the horizontal and vertical coordinates of the farthest non-zero pixel point on the edge of the face to be identified in the four directions in order to accurately calculate the spatial position of the farthest non-zero pixel point on the edge of the face in the four directions. By measuring the horizontal and vertical coordinate values, the extreme points of the edge of the face in each direction can be determined. These points will be used for subsequent distance and angle calculations to provide the necessary spatial reference for accurately cropping the face image.

[0127] Secondly, the relative distance to the origin is calculated based on the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel point on the edge line of the face to be identified in the four directions, in order to determine the specific distance of the farthest non-zero pixel point on the edge line of the face to be identified in the four directions relative to the grayscale center point. The key to this step is to quantify the distance relationship between the edge point and the center point, and provide basic data for subsequent spatial coordinate conversion and angle calculation. Accurate distance calculation can ensure the accuracy of the maximum circumscribed rectangle, thereby accurately cropping the face image.

[0128] Then, the inverse tangent of the pixel deflection is solved according to the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel point on the edge line of the face to be identified in the four directions, in order to calculate the spatial coordinate deflection of the farthest non-zero pixel point on the edge line of the face to be identified in the four directions relative to the center origin. The purpose of this step is to determine the angle of the edge point relative to the center point, that is, the inclination angle of the face contour in different directions, so as to carry out subsequent coordinate system transformation and geometric analysis.

[0129] Finally, the distance value and angle value are converted into the azimuth space coordinate system in order to convert the spatial position and angle of the farthest non-zero pixel point of the edge line of the face to be identified in the four directions into a specific representation in the azimuth space coordinate system. This conversion process ensures the accuracy and consistency of the edge point positions, so that the final azimuth space coordinates can be directly applied to the drawing of the maximum circumscribed rectangle and the precise cropping of the face image.

[0130] Preferably, step S2 comprises the following steps:

[0131] Step S21: using a convolutional neural network to construct a 3x3 convolutional network layer, a 2x2 pooling layer, and a 1x1 fully connected layer, and inputting the grayscale instance image of the face to be identified in the background cropped image data set to be identified into the 3x3 convolutional network layer for recognition feature capture processing, and obtaining initial recognition feature data of the face grayscale image;

[0132] In an embodiment of the present invention, a 3x3 convolutional network layer, a 2x2 pooling layer, and a 1x1 fully connected layer are constructed by using a convolutional neural network algorithm, wherein the convolution layer is used to perform feature capture processing on the input grayscale face image, the pooling layer reduces the size of the feature map by selecting a value (such as the maximum value or the average value) in each area, while retaining the most important features, and the fully connected layer performs feature dimensionality reduction on the feature map after pooling to reduce the redundancy and noise influence of the features, while retaining the most representative feature information. For example, assuming that there is a face image to be recognized, a 3x3 convolution kernel is slid on the image through a convolution operation, and an output value is calculated for each slide. These output values ​​constitute a new feature map, and each feature map corresponds to different feature detections, such as edges, textures, etc. This operation helps to extract more abstract and meaningful features from the original image. These feature maps reflect the visual information of different positions of the image, and finally obtain the initial recognition feature data of the grayscale face image.

[0133] Step S22: convolve the initial recognition feature data of the face grayscale image downward to the 2x2 pooling layer in the 3x3 convolutional network layer, and perform multi-scale feature analysis on the initial recognition feature data of the face grayscale image by introducing the spatial pyramid pooling technology in the 2x2 pooling layer to obtain multi-scale recognition feature data of the face grayscale image;

[0134] In an embodiment of the present invention, the initial recognition feature data of the grayscale image of the face is convolved downward to the 2x2 pooling layer in the 3x3 convolutional network layer. The pooling layer can reduce the spatial size of the feature map while retaining the most significant feature information. The spatial pyramid pooling technology is introduced in the 2x2 pooling layer to perform multi-scale feature analysis on the initial recognition feature data of the grayscale image of the face, so as to further enhance the ability of the network in multi-scale feature analysis, ensure that the multi-scale recognition feature data of the grayscale image of the face can cover information of different levels and ranges, and finally obtain multi-scale recognition feature data of the grayscale image of the face.

[0135] Step S23: performing multi-scale feature fusion processing on the multi-scale recognition feature data of the face grayscale image to obtain multi-scale feature fusion data of the face grayscale image;

[0136] In an embodiment of the present invention, feature fusion analysis is performed on multi-scale recognition feature data of a facial grayscale image previously obtained after spatial pyramid pooling to integrate feature information of different scales, thereby obtaining a more comprehensive and rich feature representation. For example, features from pooling of different scales are weighted fused or simply spliced ​​to obtain a feature vector that comprehensively considers local details and overall structure, which can be used for further dimensionality reduction and enhancement processing, and finally obtain multi-scale feature fusion data of a facial grayscale image.

[0137] Step S24: convolve the multi-scale feature fusion data of the face grayscale image downward to the 1x1 fully connected layer in the 2x2 pooling layer, and perform principal component dimensionality reduction processing on the multi-scale feature fusion data of the face grayscale image in the 1x1 fully connected layer to obtain multi-scale recognition feature dimensionality reduction data of the face grayscale image;

[0138] In an embodiment of the present invention, the multi-scale feature fusion data of the grayscale image of the face is convolved down to the 1x1 fully connected layer at the 2x2 pooling layer. The function of the 1x1 fully connected layer is to convert the pooled feature data into a vector form, and perform principal component dimensionality reduction processing through a fully connected operation. Principal component analysis (PCA) can help reduce the dimension of the features and retain the most important feature information, thereby reducing the computational burden and reducing the model complexity. For example, the feature vector obtained after PCA processing can more effectively represent the recognition features of the face image, and finally obtain the multi-scale recognition feature dimensionality reduction data of the grayscale image of the face.

[0139] Step S25: The attention mechanism is introduced to perform recognition feature enhancement processing on the multi-scale recognition feature dimensionality reduction data of the face grayscale image to obtain the first recognition representation feature data of the face image.

[0140] In an embodiment of the present invention, an attention mechanism is introduced to enhance the recognition features of the reduced-dimensional data of the multi-scale recognition features of the grayscale image of the face, so as to automatically adjust the weights according to the importance of the features and improve the distinguishability and recognition accuracy of the key features. For example, based on the reduced-dimensional feature data, the attention mechanism can help the convolutional neural network model focus on the most distinguishing features, thereby enhancing the recognition ability of the face image and ultimately obtaining the first recognition representation feature data of the face image.

[0141] The present invention first constructs a 3x3 convolutional network layer, a 2x2 pooling layer and a 1x1 fully connected layer by using a convolutional neural network, and inputs the grayscale instance image of the face to be identified in the background cropped image data set of the face to be identified into the 3x3 convolutional network layer for recognition feature capture processing. The key to this step is to use the convolution operation to capture the feature information in the face image, such as edges, textures, etc., so as to obtain the initial recognition feature data of the face grayscale image. Through the sliding and feature mapping of the 3x3 convolution kernel, the network can extract feature representations of different levels and complexities, laying the foundation for subsequent deep learning processing.

[0142] Secondly, the initial recognition feature data of the face grayscale image is convolved down to the 2x2 pooling layer in the 3x3 convolutional network layer, and the spatial pyramid pooling technology is introduced in the 2x2 pooling layer to perform multi-scale feature analysis on the initial recognition feature data of the face grayscale image. In this step, the pooling operation can reduce the spatial size of the feature map while retaining the most significant feature information, making the network more robust to transformations such as translation and rotation. The introduction of spatial pyramid pooling technology further enhances the network's ability in multi-scale feature analysis, ensuring that the multi-scale recognition feature data of the face grayscale image can cover information at different levels and ranges.

[0143] Subsequently, multi-scale feature fusion processing is performed on the multi-scale recognition feature data obtained from the 2x2 pooling layer. The main purpose of this step is to integrate the feature information extracted at different scales to obtain more comprehensive and integrated multi-scale feature fusion data of the face grayscale image. Through feature fusion, the feature dimension can be effectively reduced, the computational efficiency of the network can be improved, and the network's recognition ability for complex scenes and different expressions can be enhanced.

[0144] Next, the multi-scale feature fusion data is further passed to the 1x1 fully connected layer, and principal component dimensionality reduction is performed through the fully connected layer. This step aims to use the principal component analysis method to map the high-dimensional feature space to a lower-dimensional space to reduce the redundancy and noise impact of the features while retaining the most representative feature information. Principal component dimensionality reduction can effectively improve the feature discrimination and classification performance, laying the foundation for subsequent feature enhancement processing.

[0145] Finally, by introducing the attention mechanism, the recognition feature enhancement processing is performed on the multi-scale recognition feature reduction data of the face grayscale image. The attention mechanism can dynamically adjust and weight the feature responses at different positions in the feature map, so that the network pays more attention to the key parts and important features in the face image, thereby further improving the quality and expression ability of the recognition representation feature data of the face image.

[0146] Preferably, step S3 comprises the following steps:

[0147] Step S31: performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of the face image recognition feature;

[0148] In an embodiment of the present invention, the first recognition representation feature data of the facial image previously obtained through convolutional neural network feature learning is converted into a three-dimensional feature virtual space by using AI virtual technology, so as to convert the two-dimensional feature information in the image into a feature representation in a three-dimensional virtual space, so as to more accurately describe the spatial structure and morphological characteristics of the face, thereby better capturing the geometric shape, depth information and spatial distribution characteristics of the face, and finally obtaining a three-dimensional virtual space of facial image recognition features.

[0149] Step S32: extracting key part feature point cloud from the three-dimensional virtual space of facial image recognition features to obtain a key part feature point cloud set of the facial image;

[0150] In an embodiment of the present invention, a sampling and extraction process is performed on the feature point cloud at key parts of the previously converted three-dimensional virtual space of facial image recognition features to extract a set of key facial feature points from the converted three-dimensional virtual space. These points are usually key points that express facial structure and features. For example, a set of key part feature point clouds with significant meaning and distinction can be selected and extracted from the three-dimensional virtual space. The key parts usually include important feature points such as eyes, nose, and mouth of the face. These points play a key role in face recognition, and finally a set of key part feature point clouds of the face image is obtained.

[0151] Step S33: performing a three-dimensional virtual space coordinate analysis on each key part feature point cloud in the key part feature point cloud set of the face image to obtain the three-dimensional virtual space coordinates of each key part feature point cloud;

[0152] In an embodiment of the present invention, by performing three-dimensional spatial coordinate positioning analysis on each key part feature point cloud in the key part feature point cloud set of the facial image previously sampled and extracted, the specific spatial position and characteristics of each key point cloud are further analyzed to more accurately describe the structure and morphological changes of the face. For example, for each key point cloud, the distribution and relative position of its coordinates in three-dimensional space as well as the existing angles and rotation information can be analyzed, and finally the three-dimensional virtual space coordinates of each key part feature point cloud can be obtained.

[0153] Step S34: performing feature space vector conversion on the feature point cloud set of the key parts of the face image based on the three-dimensional virtual space coordinates of each key part feature point cloud to obtain a feature point cloud space vector set for face image recognition.

[0154] In an embodiment of the present invention, the identification feature data corresponding to each key part feature point cloud in the key part feature point cloud set of the face image is converted into a spatial vector by combining the three-dimensional virtual space coordinates of each key part feature point cloud previously determined, so as to convert the three-dimensional information at each key part feature point cloud into a high-dimensional feature space vector. The feature space vector not only includes the spatial position information of the key parts, but also includes spatial identification feature data such as color and texture, and finally a spatial vector set of face image recognition feature point clouds is obtained.

[0155] The present invention firstly realizes the conversion process from two-dimensional image data to three-dimensional virtual space by performing three-dimensional feature virtual space conversion on the first recognition representation feature data of the facial image. The key to this step is to use a deep learning model or a geometric method to convert the planar features of the facial image into a richer and more specific three-dimensional feature representation, so as to better capture the geometric shape, depth information and spatial distribution characteristics of the face. Through this conversion, not only the robustness of facial expression recognition under complex postures and lighting conditions can be enhanced, but also the accuracy and stability of recognition can be improved.

[0156] Secondly, by extracting the key parts feature point cloud of the three-dimensional virtual space of the face image recognition feature, the purpose of this step is to select and extract the key parts feature point cloud set with significant significance and distinction from the three-dimensional virtual space. The key parts usually include the eyes, nose, mouth and other important feature points of the face. These points play a key role in face recognition. By extracting the key parts feature point cloud, the complexity of the data can be further reduced, the efficiency of subsequent processing can be improved, and it is helpful to more accurately locate and identify faces in complex scenes.

[0157] Then, by performing three-dimensional virtual space coordinate analysis on each key part feature point cloud in the key part feature point cloud set of the face image, this step can obtain its position, direction and relative position relationship in the entire face model through in-depth analysis of the three-dimensional space coordinate information of each key part feature point cloud. Through this analysis, the spatial structural characteristics of the face can be more accurately described and understood, preparing sufficient data foundation for subsequent feature processing and recognition.

[0158] Finally, the feature point cloud set of the key parts of the face image is converted into a feature space vector based on the three-dimensional virtual space coordinates of each key part feature point cloud. The core of this step is to convert the three-dimensional information of each key part feature point cloud into a high-dimensional feature space vector set. This feature space vector set not only contains the spatial position information of the key parts, but also includes features such as color and texture. This information is crucial for the accuracy and comprehensiveness of face recognition. Through this vector conversion, complex three-dimensional feature data can be converted into a form that is easier to process and analyze, providing a more effective and reliable feature description for the final expression recognition and verification of face data.

[0159] Preferably, step S4 comprises the following steps:

[0160] Step S41: performing feature vector distance metric calculation on the face image recognition feature point cloud space vector set according to a preset face expression matching database to obtain a vector space distance metric value between each face image recognition feature point cloud space vector and a feature point cloud space vector corresponding to each face expression image;

[0161] In an embodiment of the present invention, by compressing the size of each facial expression image in a previously preset facial expression matching database to make it consistent with the size of the facial image data to be recognized and to ensure that they have a uniform size and format, and performing image matching and alignment processing on the facial expression size matching compressed image set that has previously undergone size compression processing to ensure that all processed images are aligned in space, and the expression parts (such as eyes and mouth) of each image are aligned in space, and also performing spatial vector conversion of the feature point cloud on the facial expression image set that has undergone image matching and alignment processing by using a spatial vector conversion method, the purpose is to extract the spatial vector of each facial expression matching pair. The feature point information of the quasi-image, such as the spatial vector representation of key points such as facial contour, eye position, nose position, etc., and by combining the feature space vectors at each feature point cloud in each facial expression image extracted previously, use methods such as Euclidean distance or cosine similarity to measure the spatial distance of the feature space vectors at the corresponding feature point cloud in the facial image recognition feature point cloud space vector set, so as to evaluate the similarity or distance between the feature point vector of each facial image and the feature point vector of the preset expression image, and finally obtain the vector space distance measurement value between each facial image recognition feature point cloud space vector and the corresponding feature point cloud space vector of each facial expression image.

[0162] Step S42: comparing and judging the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image according to a preset feature vector space distance threshold value; when the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image is greater than or equal to the preset feature vector space distance threshold value, marking the feature point cloud corresponding to the facial expression image in the facial expression matching database as a facial expression recognition similarity point; when the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image is less than the preset feature vector space distance threshold value, no marking is performed on the feature point cloud corresponding to the facial expression image in the facial expression matching database;

[0163] In an embodiment of the present invention, a vector space distance measurement value between each face image recognition feature point cloud space vector obtained by previous quantitative calculation and the feature point cloud space vector corresponding to each face expression image is compared and judged by using a preset feature vector space distance threshold. If the space distance measurement value between the space vector at a certain recognition feature point cloud in the face image to be recognized and the feature point cloud space vector corresponding to each face expression image in the expression database is greater than or equal to the preset feature vector space distance threshold, the corresponding feature point cloud in the expression image is marked as the expression recognition similarity point of the face image to be recognized; otherwise, if the distance is less than the threshold, the expression image is not marked. For example, a threshold is set. If the distance between the face image to be recognized and the smiling face expression is less than the set value, the corresponding feature points in the smiling face expression image will not be marked as similar points. If the distance is greater than or equal to the set value, the corresponding feature points in the smiling face expression will be marked as similar points.

[0164] Step S43: performing a statistical calculation of the number of similarity points on the facial expression images marked with facial expression recognition similarity points in the facial expression matching database, so as to obtain the number of recognition similarity points of each facial expression image in the facial expression matching database;

[0165] In an embodiment of the present invention, by performing statistical calculations on the number of similarities of all facial expression images marked with facial expression recognition similarities in the facial expression matching database, the purpose of this step is to determine the number of recognition similarities of each facial expression image in the matching database, so as to determine the expression image closest to the facial image to be recognized, and ultimately obtain the number of recognition similarities of each facial expression image in the facial expression matching database.

[0166] Step S44: performing facial data expression recognition on the face data to be recognized corresponding to the facial image recognition feature point cloud space vector set based on the number of recognition similarity points of each facial expression image in the facial expression matching database to obtain facial data expression recognition matching results.

[0167] In an embodiment of the present invention, facial expression recognition analysis is performed on the face data to be recognized corresponding to the face image recognition feature point cloud space vector set by combining the number of recognition similarities of each face expression image in the face expression matching database obtained by previous statistical calculation, so as to screen out the face expression image corresponding to the face image to be recognized having the most recognition similarities from the face expression database, and determine it as the most matching expression category or emotion category. For example, if there are the most recognition feature pixels between the face image to be recognized and the smiling face expression in the database, then it can be concluded that the expression recognition result of the face image to be recognized is a smiling face, and finally the facial data expression recognition matching result is obtained.

[0168] The present invention first performs feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to a preset face expression matching database. The key to this step is to use mathematical distance measurement methods (such as Euclidean distance or cosine similarity, etc.) to measure the similarity between each face image recognition feature point cloud space vector and the corresponding feature point cloud space vector of each face expression image in the database. Through this calculation, a quantitative measurement value can be obtained, which reflects the degree of feature similarity between the face to be recognized and the known expression image.

[0169] Secondly, the vector space distance measurement values ​​between the feature point cloud space vectors of each face image recognition and the feature point cloud space vectors corresponding to each facial expression image are compared and judged according to the preset feature vector space distance threshold. If the distance measurement value between the feature point cloud space vector of a face image recognition and the feature point cloud space vector corresponding to a facial expression image is greater than or equal to the preset threshold, the feature point cloud of the facial expression image in the database is marked as a facial expression recognition similarity point; conversely, if the distance measurement value is less than the preset threshold, no marking is performed. The purpose of this step is to screen out the expression image that is most similar to the facial data features to be identified according to the set threshold, so as to provide a basis and reference for subsequent expression recognition.

[0170] Then, the number of similarity points of facial expression images marked with facial expression recognition similarity points in the facial expression matching database is statistically calculated. The core of this step is to count the number of recognition similarity points of each facial expression image in the matching database. Through statistics, the degree of similarity between each expression image and the face to be recognized can be understood, providing quantitative indicators and reference basis for the final expression matching results. Finally, facial data expression recognition is performed on the face data to be recognized corresponding to the face image recognition feature point cloud space vector set based on the number of recognition similarity points of each facial expression image in the facial expression matching database. This step compares the number of similarity points of each expression image to determine which expression image in the database is most similar to the face to be recognized, thereby obtaining the expression recognition matching result of the face data. This process can quickly and accurately identify the expression state of the face image through effective database management and feature matching algorithms, providing reliable technical support and solutions for applications such as facial expression analysis and emotion recognition.

[0171] Preferably, step S41 includes the following steps:

[0172] Step S411: performing size matching compression processing on each facial expression image in a preset facial expression matching database to obtain a facial expression size matching compressed image set;

[0173] In an embodiment of the present invention, each facial expression image in a previously preset facial expression matching database is compressed to keep it consistent with the size of the facial image data to be identified and ensure that they have a uniform size and format. This process usually includes adjusting the resolution, cropping or scaling of the image to adapt it to subsequent processing and comparison requirements. For example, assuming that a facial image of a person is to be identified, and a facial expression database is set up, which contains images of various expressions, such as smiling, angry, surprised, etc. This step will adjust the size of all these expression images to the same pixel size as the facial image to be identified, such as uniformly adjusting them to 200x200 pixels, so that the subsequent steps can effectively process and compare their features, and finally obtain a facial expression size matching compressed image set.

[0174] Step S412: performing image matching and alignment processing on the facial expression size matching compressed image set to obtain a facial expression matching and aligned image set;

[0175] In an embodiment of the present invention, image matching and alignment processing is performed on a facial expression size matching compressed image set that has previously undergone size compression processing to ensure that all processed images are spatially aligned so that subsequent feature analysis can be performed under a consistent reference frame. For example, if there is a compressed image set containing smiling faces, anger, surprise, etc., the image matching and alignment processing will ensure that the expression parts (such as eyes and mouth) of each image are spatially aligned so that subsequent analysis can be compared and measured based on the same reference points, ultimately obtaining a facial expression matching and aligned image set.

[0176] Step S413: performing the same feature point cloud space vector analysis on the facial expression matching alignment image set to obtain a feature point cloud space vector set corresponding to each facial expression matching alignment image;

[0177] In an embodiment of the present invention, a spatial vector conversion method is used to perform spatial vector conversion of a feature point cloud on a facial expression image set that has undergone image matching and alignment processing. This step is intended to extract feature point information of each facial expression matching and alignment image, such as the spatial vector representation of key points such as facial contour, eye position, and nose position. For example, if an image of a smiling face is analyzed, the extracted feature point cloud spatial vector set includes information such as the relative position of the eyes and the position of the corners of the mouth, and ultimately a feature point cloud spatial vector set corresponding to each facial expression matching and alignment image is obtained.

[0178] Step S414: Perform feature vector distance measurement calculation on the facial image recognition feature point cloud space vector set based on the feature point cloud space vector set corresponding to each facial expression matching alignment image, so as to obtain the vector space distance measurement value between each facial image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image.

[0179] In an embodiment of the present invention, by combining the feature space vectors at each feature point cloud in the feature point cloud space vector set corresponding to each facial expression matching alignment image extracted previously, a spatial distance measurement calculation is performed on the feature space vectors at the corresponding feature point cloud in the facial image recognition feature point cloud space vector set using methods such as Euclidean distance or cosine similarity, so as to evaluate and calculate the similarity or distance between the feature point vector of each facial image and the feature point vector of the preset expression image. For example, for an unknown facial image, by comparing its feature point vector with the feature point vector of the existing expression image in the database, the spatial distance measurement value between them can be calculated, and then the most matching expression category can be determined or emotion recognition classification can be performed, and finally the vector space distance measurement value between each facial image recognition feature point cloud space vector and the corresponding feature point cloud space vector of each facial expression image is obtained.

[0180] The present invention first performs size matching compression processing on each facial expression image in a preset facial expression matching database. The purpose of this step is to ensure that all facial expression images remain consistent in size for subsequent image processing and feature extraction. Through size matching compression, the resolution and size of different images can be unified, reducing the complexity and calculation amount of subsequent processing, while ensuring that the image quality does not lose important information and features during the compression process.

[0181] Secondly, image matching and alignment are performed on the facial expression image set that has undergone size matching and compression processing. The key to this step is to ensure the visual alignment and alignment of images with different expressions to eliminate image offset or distortion caused by changes in expression. Through precise image matching and alignment, each expression image can have a consistent position and posture in the same spatial coordinate system, providing an accurate basis for subsequent feature analysis and comparison.

[0182] Then, the same feature point cloud space vector analysis is performed on the matched and aligned image set. The purpose of this step is to extract a set of feature point cloud space vectors from each expression matching and aligned image. These vector sets reflect the position and characteristics of the key feature points in the image. By analyzing the feature point cloud space vectors, we can further understand and compare the structural and morphological differences between different expression images, providing detailed data support for subsequent expression matching and recognition.

[0183] Finally, the feature vector distance measurement calculation is performed on the feature point cloud space vector set for facial image recognition based on the feature point cloud space vector set corresponding to each facial expression matching alignment image. This step uses mathematical distance measurement methods, such as Euclidean distance or cosine similarity, to calculate the similarity between the feature point cloud space vector of each facial image to be identified and the feature point cloud space vector of each matching alignment image in the database. Through this measurement calculation, the feature similarity between each facial image and different expression images can be obtained, thereby providing quantitative evaluation and basis for subsequent expression recognition analysis and matching results.

[0184] Preferably, the present invention further provides an artificial intelligence-based face recognition and analysis system for executing the artificial intelligence-based face recognition and analysis method as described above, the artificial intelligence-based face recognition and analysis system comprising:

[0185] The background cropping module of the face data to be identified is used to obtain the face image data set to be identified, and perform face grayscale processing on the face image data set to be identified to obtain the face grayscale image data set to be identified; perform face boundary background cropping on the face grayscale image data set to be identified, so as to obtain the background cropped image data set of the face to be identified;

[0186] The first recognition and analysis module of face data is used to use a convolutional neural network to perform face recognition feature characterization analysis on the background cropped image dataset of the face to be recognized, and introduce spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing, so as to obtain the first recognition characterization feature data of the face image;

[0187] A face recognition feature space vector conversion module is used to perform a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; perform feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set;

[0188] The face data re-identification and matching module is used to perform feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database, so as to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image, face data expression recognition is performed on the face data to be identified corresponding to the face image recognition feature point cloud space vector set, so as to obtain the face data expression recognition matching result.

[0189] In summary, the face recognition and analysis system based on artificial intelligence is composed of a background cropping module for face data to be recognized, a first recognition and analysis module for face data, a face recognition feature space vector conversion module, and a face data re-recognition and matching module. It can realize any face recognition and analysis method based on artificial intelligence described in the present invention, and is used to combine the operations between computer programs running on various modules to realize the face recognition and analysis method based on artificial intelligence. The internal structures of the system cooperate with each other, which can greatly reduce duplication of work and manpower investment, and can quickly and effectively provide a more accurate and efficient face recognition and analysis process based on artificial intelligence, thereby simplifying the operation flow of the face recognition and analysis system based on artificial intelligence.

[0190] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A face recognition analysis method based on artificial intelligence, characterized in that: The following steps are involved: Step S1: obtaining a dataset of face images to be identified, and performing face grayscale processing on the dataset of face images to be identified to obtain a dataset of grayscale images of faces to be identified; performing face boundary background cropping on the dataset of grayscale images of faces to be identified to obtain a dataset of background cropped images of faces to be identified; Step S2: using a convolutional neural network to perform face recognition feature characterization analysis on the face background cropped image dataset to be recognized, and introducing spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing to obtain first recognition characterization feature data of the face image; Step S2 includes the following steps: Step S21: using a convolutional neural network to construct a 3x3 convolutional network layer, a 2x2 pooling layer, and a 1x1 fully connected layer, and inputting the grayscale instance image of the face to be identified in the background cropped image data set to be identified into the 3x3 convolutional network layer for recognition feature capture processing, and obtaining initial recognition feature data of the face grayscale image; Step S22: convolve the initial recognition feature data of the face grayscale image downward to the 2x2 pooling layer in the 3x3 convolutional network layer, and perform multi-scale feature analysis on the initial recognition feature data of the face grayscale image by introducing the spatial pyramid pooling technology in the 2x2 pooling layer to obtain multi-scale recognition feature data of the face grayscale image; Step S23: performing multi-scale feature fusion processing on the multi-scale recognition feature data of the face grayscale image to obtain multi-scale feature fusion data of the face grayscale image; Step S24: convolve the multi-scale feature fusion data of the face grayscale image downward to the 1x1 fully connected layer in the 2x2 pooling layer, and perform principal component dimensionality reduction processing on the multi-scale feature fusion data of the face grayscale image in the 1x1 fully connected layer to obtain multi-scale recognition feature dimensionality reduction data of the face grayscale image; Step S25: performing recognition feature enhancement processing on the multi-scale recognition feature dimensionality reduction data of the face grayscale image by introducing an attention mechanism to obtain first recognition representation feature data of the face image; Step S3: performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; performing a feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set; Step S3 includes the following steps: Step S31: performing a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of the face image recognition feature; Step S32: extracting key part feature point cloud from the three-dimensional virtual space of facial image recognition features to obtain a key part feature point cloud set of the facial image; Step S33: performing a three-dimensional virtual space coordinate analysis on each key part feature point cloud in the key part feature point cloud set of the face image to obtain the three-dimensional virtual space coordinates of each key part feature point cloud; Step S34: performing feature space vector conversion on the feature point cloud set of the key parts of the face image based on the three-dimensional virtual space coordinates of each key part feature point cloud to obtain a face image recognition feature point cloud space vector set; Step S4: performing feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; performing face data expression recognition on the face data to be recognized corresponding to the face image recognition feature point cloud space vector set based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image to obtain the face data expression recognition matching result; Step S4 includes the following steps: Step S41: performing feature vector distance metric calculation on the face image recognition feature point cloud space vector set according to a preset face expression matching database to obtain a vector space distance metric value between each face image recognition feature point cloud space vector and a feature point cloud space vector corresponding to each face expression image; Step S42: comparing and judging the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image according to a preset feature vector space distance threshold value; when the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image is greater than or equal to the preset feature vector space distance threshold value, marking the feature point cloud corresponding to the facial expression image in the facial expression matching database as a facial expression recognition similarity point; when the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image is less than the preset feature vector space distance threshold value, no marking is performed on the feature point cloud corresponding to the facial expression image in the facial expression matching database; Step S43: performing a statistical calculation of the number of similarity points on the facial expression images marked with facial expression recognition similarity points in the facial expression matching database, so as to obtain the number of recognition similarity points of each facial expression image in the facial expression matching database; Step S44: performing facial data expression recognition on the face data to be recognized corresponding to the facial image recognition feature point cloud space vector set based on the number of recognition similarity points of each facial expression image in the facial expression matching database to obtain facial data expression recognition matching results.

2. The face recognition analysis method based on artificial intelligence according to claim 1 is characterized in that: Step S1 includes the following steps: Step S11: Obtain a dataset of face images to be recognized; Step S12: performing noise elimination processing on the face image dataset to be identified to obtain a noise elimination data set of the face image to be identified; Step S13: performing histogram equalization processing on the denoising dataset of the face image to be identified to obtain a contrast equalized dataset of the face image to be identified; Step S14: performing face grayscale processing on the face image contrast equalization dataset to be identified, so as to obtain a face grayscale image dataset to be identified; Step S15: performing face boundary background cropping on the grayscale image dataset of the face to be identified to obtain a background cropped image dataset of the face to be identified.

3. The face recognition analysis method based on artificial intelligence according to claim 2 is characterized in that: Step S15 includes the following steps: Step S151: performing pixel brightness distribution analysis on the grayscale image of the face to be identified corresponding to the grayscale image data set to obtain a pixel brightness distribution map of the face to be identified; Step S152: performing edge point screening and labeling processing on each pixel brightness distribution value in the pixel brightness distribution map of the face to be identified according to a preset edge pixel brightness threshold, so as to obtain edge pixel labeling points of the face to be identified; Step S153: Drawing edge lines for the grayscale image of the face to be identified corresponding to the grayscale image of the face to be identified in the grayscale image data set based on the edge pixel marking points of the face to be identified, so as to generate edge lines of the face to be identified image; Step S154: by presetting four orientation constraints, wherein the four orientation constraints include east, north, west, and south, and determining the farthest non-zero pixel point of the edge line of the face image to be identified based on the four orientation constraints, the farthest non-zero pixel point of the edge line of the face to be identified in the four orientations is obtained; Step S155: based on the farthest non-zero pixel points of the edge lines of the face to be identified in four directions, the face boundary background is cropped on the grayscale image dataset of the face to be identified to obtain a background cropped image dataset of the face to be identified.

4. The face recognition analysis method based on artificial intelligence according to claim 3 is characterized in that: Step S155 includes the following steps: Perform grayscale center recognition analysis on the grayscale image of the face to be identified corresponding to the grayscale image data set to obtain the grayscale center point of the grayscale image of the face to be identified; Based on the grayscale center point of the grayscale image of the face to be identified, the corresponding grayscale image of the face to be identified in the grayscale image data set is transformed into a two-dimensional space coordinate system to obtain a two-dimensional space coordinate system of the grayscale image of the face to be identified with the grayscale center point as the origin; The azimuth space coordinates of the farthest non-zero pixel point of the edge line of the face to be identified in four directions are calculated according to the two-dimensional space coordinate system of the grayscale image of the face to be identified with the grayscale center point as the origin, and the azimuth space coordinates of the farthest non-zero pixel point of the edge line of the face to be identified in four directions are obtained; Draw the maximum circumscribed rectangle of the azimuth space coordinates of the farthest non-zero pixel point of the edge line of the face to be identified in four directions to generate the maximum circumscribed rectangle boundary of the edge of the face to be identified; The face boundary background is cropped from the grayscale image dataset of the face to be identified according to the maximum circumscribed rectangle boundary of the edge of the face to be identified, so as to obtain the background cropped image dataset of the face to be identified.

5. The face recognition analysis method based on artificial intelligence according to claim 4 is characterized in that: The calculation of the azimuth space coordinates of the farthest non-zero pixel points of the edge line of the face to be identified in four directions according to the two-dimensional space coordinate system of the grayscale image of the face to be identified with the grayscale center point as the origin comprises the following steps: According to the two-dimensional space coordinate system of the grayscale image of the face to be identified with the grayscale center point as the origin, the horizontal and vertical axis coordinates of the farthest non-zero pixel points of the edge line of the face to be identified in four directions are measured, and the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel points of the edge line of the face to be identified in four directions are obtained; The distance relative to the origin is calculated based on the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel points on the edge line of the face to be identified in four directions, and the spatial distance values ​​between the farthest non-zero pixel points on the edge line of the face to be identified in four directions and the central origin are obtained; The pixel point deflection arc tangent is calculated based on the spatial horizontal and vertical axis coordinate values ​​of the farthest non-zero pixel point on the edge line of the face to be identified in four directions, so as to obtain the spatial coordinate deflection angle between the farthest non-zero pixel point on the edge line of the face to be identified in four directions and the center origin; The spatial distance values ​​between the farthest non-zero pixel points of the edge line of the face to be identified in the four directions and the spatial coordinate deflection angles are transformed into the azimuth space coordinate system to obtain the azimuth space coordinates of the farthest non-zero pixel points of the edge line of the face to be identified in the four directions.

6. The face recognition analysis method based on artificial intelligence according to claim 1 is characterized in that: Step S41 includes the following steps: Step S411: performing size matching compression processing on each facial expression image in a preset facial expression matching database to obtain a facial expression size matching compressed image set; Step S412: performing image matching and alignment processing on the facial expression size matching compressed image set to obtain a facial expression matching and aligned image set; Step S413: performing the same feature point cloud space vector analysis on the facial expression matching alignment image set to obtain a feature point cloud space vector set corresponding to each facial expression matching alignment image; Step S414: Perform feature vector distance measurement calculation on the facial image recognition feature point cloud space vector set based on the feature point cloud space vector set corresponding to each facial expression matching alignment image, so as to obtain the vector space distance measurement value between each facial image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each facial expression image.

7. A face recognition and analysis system based on artificial intelligence, characterized in that: Used to perform the artificial intelligence-based face recognition analysis method as claimed in claim 1, the artificial intelligence-based face recognition analysis system comprises: The background cropping module of the face data to be identified is used to obtain the face image data set to be identified, and perform face grayscale processing on the face image data set to be identified to obtain the face grayscale image data set to be identified; perform face boundary background cropping on the face grayscale image data set to be identified, so as to obtain the background cropped image data set of the face to be identified; The first recognition and analysis module of face data is used to use a convolutional neural network to perform face recognition feature characterization analysis on the background cropped image dataset of the face to be recognized, and introduce spatial pyramid pooling and attention mechanism to perform recognition feature enhancement processing, so as to obtain the first recognition characterization feature data of the face image; A face recognition feature space vector conversion module is used to perform a three-dimensional feature virtual space conversion on the first recognition representation feature data of the face image to obtain a three-dimensional virtual space of face image recognition features; perform feature point cloud space vector analysis on the three-dimensional virtual space of face image recognition features to obtain a face image recognition feature point cloud space vector set; The face data re-identification and matching module is used to perform feature vector distance measurement calculation on the face image recognition feature point cloud space vector set according to the preset face expression matching database, so as to obtain the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image; based on the vector space distance measurement value between each face image recognition feature point cloud space vector and the feature point cloud space vector corresponding to each face expression image, face data expression recognition is performed on the face data to be identified corresponding to the face image recognition feature point cloud space vector set, so as to obtain the face data expression recognition matching result.

Citation Information

Patent Citations

  • Improved CNN-based facial expression recognition method

    CN108108677A

  • Three-dimensional face recognition method and three-dimensional face recognition system

    CN108549873A

  • A smart phone capable of performing face feature 3D recognition and a recognition method thereof

    CN109948400A

  • Intelligent face recognition method and system based on edge training

    CN116895088A

  • Data management method and system for data sharing

    CN117332395A