Facial expression analysis method, device, electronic device and readable storage medium

By preprocessing and feature extraction of facial expression data, the target feature model is established, which solves the problems of low data quality and complex model establishment, improves the accuracy and reliability of the model, and is suitable for facial expression analysis in the field of education.

CN118135642BActive Publication Date: 2024-08-23ZHUHAI GUTIAN TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410553369.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-08-23
Estimated Expiration
2044-05-07

AI Technical Summary

Technical Problem

The quality of facial expression data collection in the existing technology is not high, resulting in insufficient accuracy and reliability of the model, and the feature extraction and model establishment processes are complex, making it difficult to popularize it among ordinary educators.

Method used

By obtaining target data for preprocessing, spatial domain enhancement processing and feature extraction, a target feature model is established to improve data quality and model accuracy, and the reliability of the optimized model is verified.

Benefits of technology

It improves the quality of facial expression data collection and the accuracy and reliability of the model, and simplifies the feature extraction and model building process, making it suitable for practical applications in the field of education.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135642B
    Figure CN118135642B
Patent Text Reader

Abstract

The present application relates to the fields of big data processing technology, image analysis technology and education technology, and in particular to a facial expression analysis method, device, electronic device and readable storage medium, the facial expression analysis method comprising: acquiring target data; performing preprocessing operations on the target data to determine the scaled data corresponding to the target data; removing the noise of the data and achieving data normalization. Performing spatial domain enhancement processing on the scaled data to obtain preprocessed data, thereby improving the quality of the data; performing feature extraction operations on the preprocessed data to determine the accurate feature data corresponding to the preprocessed data; associating the feature data with the feature state corresponding to the feature data, determining the target feature model corresponding to the feature data and the feature state, and obtaining a more accurate and reliable target feature model; analyzing facial expressions according to the target feature model to obtain a more accurate facial analysis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of big data processing technology, image analysis technology and educational technology, and in particular to a facial expression analysis method, device, electronic device and readable storage medium. Background Art

[0002] Under the existing technology, with the development of science and technology, great progress has been made in the fields of big data processing technology, image analysis technology and educational technology. In the field of big data processing technology, by collecting and analyzing a large amount of student facial micro-expression data, we can deeply understand the students' emotional state and provide a scientific basis for personalized teaching and student emotional management. In the field of image analysis technology, through advanced image processing technology and feature extraction algorithms, students' facial micro-expressions can be more accurately identified, providing reliable data support for the establishment of models. In the field of educational technology, by using big data and image analysis technology, real-time monitoring and intervention of students' emotions can be achieved, improving teaching effects and students' emotional health. However, the existing technology still has some problems in the technical fields of big data processing, image analysis, education, etc. First, the quality and quantity of data collection directly affect the accuracy and reliability of the model, but the current data collection equipment and technology may not guarantee the quality and consistency of the data. Secondly, the process of feature extraction and model establishment is complicated and requires professional computer vision and machine learning knowledge, which may be difficult for ordinary educators. Finally, the verification and optimization of the model is also a challenge, requiring a large amount of verification data and effective optimization strategies. Therefore, how to establish a suitable mathematical model through a large amount of high-quality data, improve the accuracy and reliability of the mathematical model, and optimize and verify the established data model has become an urgent problem to be solved. Summary of the invention

[0003] The main purpose of the embodiments of the present invention is to provide a facial expression analysis method and related devices, aiming to solve the problem that the data collected in the prior art is small and the data quality is not high, and thus a suitable mathematical model cannot be obtained, thereby reducing the reliability of the model.

[0004] In a first aspect, an embodiment of the present invention provides a facial expression analysis method, comprising:

[0005] Acquire target data, where the target data includes at least one of first facial data, second facial data, and third facial data;

[0006] Performing a preprocessing operation on the target data to determine scaling data corresponding to the target data;

[0007] Performing spatial domain enhancement processing on the scaled data to obtain preprocessed data corresponding to the scaled data;

[0008] Performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data;

[0009] Associating the feature data with a feature state corresponding to the feature data, and determining a target feature model corresponding to the feature data and the feature state;

[0010] Facial expressions are analyzed according to the target feature model.

[0011] In a second aspect, an embodiment of the present invention provides a facial expression analysis device, comprising:

[0012] A data acquisition module, used to acquire target data, wherein the target data includes at least one of first facial data, second facial data and third facial data;

[0013] A first data determination module, configured to perform a preprocessing operation on the target data to determine scaling data corresponding to the target data;

[0014] A preprocessing module performs spatial domain enhancement processing on the scaled data to obtain preprocessed data corresponding to the scaled data;

[0015] A second data determination module, used to perform a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data;

[0016] A model determination module, used to associate the feature data with the feature state corresponding to the feature data, and determine a target feature model corresponding to the feature data and the feature state;

[0017] The analysis module is used to analyze facial expressions according to the target feature model.

[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any facial expression analysis method provided in the specification of the present invention are implemented.

[0019] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any facial expression analysis method provided in the specification of the present invention.

[0020] The embodiment of the present invention provides a facial expression analysis method, device, electronic device and readable storage medium. The facial expression analysis method includes: obtaining target data, the target data includes at least one of first facial data, second facial data and third facial data; performing preprocessing operation on the target data to determine the scaling data corresponding to the target data; performing spatial domain enhancement processing on the scaling data to obtain preprocessing data corresponding to the scaling data; performing feature extraction operation on the preprocessing data to determine the feature data corresponding to the preprocessing data; associating the feature data with the feature state corresponding to the feature data to determine the target feature model corresponding to the feature data and the feature state; and analyzing facial expressions according to the target feature model. In the facial expression analysis method, feature data is obtained by performing preprocessing operation and feature extraction operation on the target data of facial expressions. In the process of obtaining the feature data, the quality of data collection is improved. Then, the feature data and the feature state corresponding to the feature data are associated to obtain the target feature model, which improves the accuracy and stability of the target feature model. Finally, facial expressions are analyzed according to the target feature model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 A schematic flow chart of a facial expression analysis method provided by an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of the module structure of a facial expression analysis device provided by an embodiment of the present invention;

[0024] Figure 3 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0027] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0028] The embodiment of the present invention provides a facial expression analysis method and a related device. The facial expression analysis method can be applied to a terminal device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The terminal device can be a server or a server cluster.

[0029] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] Please refer to Figure 1 , Figure 1 A schematic flow chart of a facial expression analysis method provided by an embodiment of the present invention.

[0031] like Figure 1 As shown, the facial expression analysis method includes steps S101 to S106.

[0032] Step S101: Acquire target data, where the target data includes at least one of first facial data, second facial data, and third facial data.

[0033] Among them, the first facial data can be relevant data of the cheeks and corners of the mouth, the second facial data can be relevant data of the forehead, and the third facial data can be relevant data of the eyes and the periorbital area or the distance between the eyes and the cheekbones, chin, etc.

[0034] When a user receives good news and feels very happy, the micro-expressions on his or her face will change. Specifically, his or her cheeks will bulge slightly, the corners of his or her mouth will involuntarily rise, his or her eyes will shrink slightly, and smile lines will appear around his or her eyes.

[0035] When the user is in a heavy mood and feels anxious, the corners of his mouth will not rise, he may pout, his brows will be furrowed, and even tears may well up in his eyes.

[0036] Therefore, the target data of the user in different moods can be collected in real time through the data collection equipment, wherein the data collection equipment includes: a camera system or a data sensor, etc.

[0037] For example, a camera system can be installed in a specific area. When a user passes through the camera range of the camera system, the camera system can promptly collect the user's facial data. A large amount of facial data of different users collected by the camera system is the target data. The camera system sends the collected target data to an electronic device connected to the camera system network, so that the data processing system of the electronic device can perform relevant data processing on the acquired target data.

[0038] It should be noted that in addition to using a camera system to collect target data, facial data of a large number of different users can also be collected through specific sensors. The facial data of a large number of different users is the target data that the electronic device needs to obtain. Through the network that has been established between the specific sensor and the electronic device, the specific sensor transmits the collected facial data of a large number of different users to the electronic device, and the electronic device obtains the target data. Among them, the specific sensor can be any sensor that can collect data, such as an infrared sensor, a 3D sensor, etc., and this application does not limit this.

[0039] For example, when collecting facial data of all students in a school, a camera system can be installed near the school gate. When students come to school for class every day, the camera system can collect facial data of each student, and then send the collected facial data of all students to the electronic equipment processing system in the school. After receiving the target data, the electronic equipment performs a series of subsequent data processing on the target data. The facial data of all students here is the target data.

[0040] Step S102: pre-process the target data to determine scaling data corresponding to the target data.

[0041] Specifically, after the electronic device obtains a large amount of target data, it performs data preprocessing operations on the target data, further screens the target data, and obtains preprocessed data with higher quality and greater consistency.

[0042] In some embodiments, the target data is preprocessed to determine the scaling data corresponding to the target data, including: adding the target data to a preset filter to remove noise, determining first intermediate data corresponding to the target data;

[0043] Performing normalization processing on the rows to determine the second intermediate data after the normalization processing; determining a preset data interval, scaling the second intermediate data to within the preset data interval, and obtaining scaled data corresponding to the second intermediate data.

[0044] Exemplarily, after obtaining the target data, the electronic device first transmits the target data to its own filter, performs noise removal processing on the target data in the filter, and obtains first intermediate data after the noise removal processing by the filter.

[0045] Specifically, the target data may be filtered to remove noise using a Gaussian filter to obtain the first intermediate data. The expression of the Gaussian filter is:

[0046] ;

[0047] in, represents Gaussian weight, represents the standard deviation of the Gaussian function, Indicates the coordinates of the target data.

[0048] It should be noted that, in addition to the Gaussian filter mentioned in this embodiment for filtering the target data to remove noise, any suitable filter such as a low-pass filter, a band-stop filter, etc. may also be used.

[0049] In practical applications, a suitable filter can be selected according to specific circumstances, and this application does not impose any restrictions on this.

[0050] After filtering the target data to obtain first intermediate data corresponding to the target data, standardization is continued to be performed on the first intermediate data.

[0051] Specifically, the first intermediate data may be standardized based on the standardized processing formula to obtain the standardized second intermediate data. The expression corresponding to the standardized processing is:

[0052] ;

[0053] in, is the second intermediate data after the standardization process, is the first intermediate data, is the mean of the first intermediate data, is the standard deviation of the first intermediate data.

[0054] After the first intermediate data is standardized and the second intermediate data corresponding to the first intermediate data is obtained, the data quality and accuracy of the second intermediate data are greatly improved compared with the first intermediate data, and the consistency of the data is also improved.

[0055] Next, the second intermediate data is normalized to determine the scaled data of the second intermediate data after the normalization operation. Specifically, the preset interval corresponding to the second intermediate data is determined, and the second intermediate data is scaled to the preset interval, and the scaled data corresponding to the second intermediate data is obtained within the preset interval. For example, in the process of normalizing the second intermediate data, the data set of the second intermediate data is [2, 4, 6, 1, 3], and the preset interval corresponding to the second intermediate data is [0.1]. After the normalization operation is performed on the second intermediate data, the scaled data obtained is [0.5, 1, 0.25, 0.75].

[0056] Step S103: perform spatial domain enhancement processing on the scaled data to obtain pre-processed data corresponding to the scaled data.

[0057] Specifically, the scaled data after the second intermediate data is normalized is subjected to spatial domain enhancement processing to obtain preprocessed data corresponding to the scaled data. The image corresponding to the preprocessed data after the spatial domain enhancement processing will be clearer, thereby achieving the purpose of improving image quality.

[0058] In some embodiments, the expression corresponding to the spatial domain enhancement processing is:

[0059] g(x,y)=T[f(s,v)]

[0060] Among them, f(s,v) represents the pixel point of the image corresponding to the scaled data, g(x,y) represents the pixel point of the image corresponding to the preprocessed data, and T represents the spatial domain enhancement function.

[0061] Specifically, the pixel point of the image corresponding to the scaled data is represented by f(s, v), and the pixel point f(s, v) of the image corresponding to each scaled data is input into the spatial domain enhancement function T in sequence. The spatial domain enhancement function T outputs the pixel point of the image corresponding to the corresponding preprocessed data, which is represented by g(x, y).

[0062] Step S104: performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data.

[0063] Specifically, in the process of performing feature extraction operations on the preprocessed data, feature extraction operations can be performed on the preprocessed data through facial motion features, morphological features, and texture features, and feature data corresponding to the motion features, feature data corresponding to the morphological features, and feature data corresponding to the texture features are extracted respectively.

[0064] In some embodiments, performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data includes: adding the preprocessed data to a preset target classifier, performing a feature extraction operation on the preprocessed data based on the preset target classifier, and determining the feature data corresponding to the preprocessed data; the expression corresponding to the preset target classifier is: ;in, Represents the function expression corresponding to the preprocessing function, represents the preprocessed data, represents the function expression corresponding to the preset target classifier, and t represents the feature data.

[0065] Specifically, the preprocessed data may be iteratively operated through an iterative algorithm in a preset target classifier to obtain feature data corresponding to the preprocessed data, wherein the iterative algorithm may be an Adaboost algorithm.

[0066] Exemplarily, when extracting features from preprocessed data, the weight distribution corresponding to the preprocessed data is determined, and each data in the preprocessed data is assigned the same weight. The expression for determining the weight distribution corresponding to the preprocessed data is: .

[0067] Next, the preprocessed data is iterated for M rounds according to the iterative algorithm.

[0068] The first step is based on the weighted distribution The data training set of the preprocessed data is used for training to obtain the basic classifier. The threshold with the lowest error rate is selected to design the basic classifier. The corresponding expression is .

[0069] The second step is to calculate Classification error rate on preprocessed data, , from this we can see that Error rate on preprocessed data is The sum of weights of misclassified samples.

[0070] Step 3: Calculate The coefficient of , Indicates the importance of the preset target classifier. The expression corresponding to the coefficient of is: .

[0071] The fourth step is to update the weight distribution in the preprocessed data for the next iteration.

[0072] The specific expression is: ,in, , is the normalization factor,

[0073] At this point, multiple rounds of iterations on the preprocessed data are completed based on the above expressions.

[0074] Then, combine the multiple rounds of iterations and the basic classifier , after multiple rounds of iterations and the basic classifier Perform summation and combine each basic classifier. The corresponding expression is: .

[0075] Finally, according to each basic classifier , and get the expression of the preset target classifier: ,in, Represents the function expression corresponding to the preset target classifier, and t represents the feature data.

[0076] According to the expression corresponding to the preset target classifier finally obtained, the preprocessed data can be subjected to feature extraction operations to obtain feature data corresponding to the preprocessed data. The feature data after feature extraction has more obvious feature manifestations than the preprocessed data, which facilitates the establishment of a more accurate model later. For example, when the user is happier, the corresponding facial texture features are some smile lines around the eyes and the corners of the mouth will be slightly raised. Therefore, when extracting the corresponding feature data based on the preprocessed data, the preset target classifier will focus on extracting the preprocessed data around the eyes and the corners of the mouth, and use the preprocessed data around the eyes and the corners of the mouth as the feature data of the user in a happy state.

[0077] It should be noted that the specific data and assumptions mentioned in the above embodiment are merely exemplary descriptions of the embodiment, and the present application does not impose any limitation thereto.

[0078] Step S105: Associating the feature data with the feature state corresponding to the feature data, and determining a target feature model corresponding to the feature data and the feature state.

[0079] Exemplarily, when the feature data is associated with the feature state corresponding to the feature data, it can be implemented based on a data association algorithm, wherein the data association algorithm can be any one of the Apriori algorithm, the FP-Growth algorithm, the ECAOA algorithm, and the Eclat algorithm.

[0080] In some embodiments, the feature data is associated with the feature state corresponding to the feature data to determine the target feature model corresponding to the feature data and the feature state, including: establishing a preset feature model based on a preset deep learning model; within the preset feature model, the feature data is associated with the feature state to obtain the target feature model corresponding to the feature data and the feature state.

[0081] Specifically, after obtaining the feature data, a preset feature model corresponding to the machine learning technology can be used.

[0082] The feature data and the feature state corresponding to the feature data are respectively input into the preset feature model, and in the preset feature model, the feature data and the feature state corresponding to the feature data are associated with each other through the data association algorithm in the preset feature model.

[0083] Specifically, the characteristic state corresponding to the characteristic data may be happiness, depression, anxiety, etc., wherein, when the characteristic state is happiness, the characteristic data corresponding to the characteristic state of happiness is recorded as the first characteristic data; when the characteristic state is depression, the characteristic data corresponding to the characteristic state of depression is recorded as the second characteristic data; when the characteristic state is anxiety, the characteristic data corresponding to the characteristic state of anxiety is recorded as the third characteristic data.

[0084] When associating feature data and feature states corresponding to the feature data according to the data association algorithm, the happy feature state is associated with the first feature data, the depressed feature state is associated with the second feature data, and the anxious feature state is associated with the third feature data, that is, labels of happy, depressed, and anxious are established for the first feature data, the second feature data, and the third feature data, respectively.

[0085] Specifically, after all the feature data are associated with the corresponding feature states, the target feature model corresponding to the feature data and the feature states is obtained. At this point, the target feature model is established.

[0086] In some embodiments, after associating the feature data with the feature state corresponding to the feature data and determining the target feature model corresponding to the feature data and the feature state, the method includes:

[0087] Determine a preset verification threshold; verify the target feature model based on a preset verification method to obtain a verification error after verification; if the verification error is not within the range of the preset verification threshold, repeat the step of establishing the target feature model and re-establish the target feature model; if the verification error is within the range of the preset verification threshold, the target feature model is successfully established.

[0088] Specifically, the preset verification method may be a suitable verification method such as cross-validation, sensitivity analysis, and goodness of fit analysis.

[0089] Exemplarily, if the target feature model is verified by cross-validation, it is necessary to collect multiple sets of input data through the camera system again, and input the collected multiple input data into the target feature model that has been established in turn. After the data analysis of the target feature model, the verification errors corresponding to the input data are output in turn. After obtaining the verification errors, the multiple sets of verification errors obtained are compared with the preset verification thresholds, and the size relationship between the multiple sets of verification errors and the preset verification thresholds is compared. If there are verification errors in the multiple sets of verification errors that are not within the range of the preset verification threshold, that is, there are verification errors greater than the preset verification threshold, then the target feature model at this time does not meet the requirements of the facial expression analysis method, and the target feature model needs to be re-determined. On the contrary, if the multiple sets of verification errors are all within the range of the preset verification threshold, then the target feature model at this time meets the requirements of the facial expression analysis method. The purpose of verifying the target feature model is to obtain a reliable target feature model and improve the accuracy of the target feature model.

[0090] Among them, the preset verification threshold can be reasonably set from a specific value according to the actual needs of the facial expression analysis method, and this application does not impose any restrictions on this.

[0091] Specifically, in order to make the verification errors obtained from various input data more uniform and easier to observe, the verification errors may be in the form of a sum of squares.

[0092] It should be noted that the specific form of the above verification error is not the only form. In actual applications, it can be reasonably set according to actual conditions, and this application does not impose any restrictions on this.

[0093] Step S106: analyzing facial expressions according to the target feature model.

[0094] Specifically, when the target feature model meets the verification requirements of the preset verification method, the target model can be applied to actual facial expression analysis scenarios to analyze the facial expressions of different users.

[0095] In some embodiments, analyzing facial expressions according to the target feature model includes: acquiring current facial feature data, wherein the current facial feature data is acquired in real time by at least one of a camera system or a sensor; adding the current facial feature data to the target feature model to obtain a facial analysis result corresponding to the current facial feature data; and analyzing facial expressions according to the facial analysis result.

[0096] Exemplarily, the user's current facial data can be collected in real time based on a camera system or sensor, and the collected current facial data can be transmitted to a target feature model, and data analysis can be performed on the current facial data in the target feature model. After the data analysis of the current facial data is completed in the target feature model, the data analysis system of the target feature model will output a facial analysis result, and then analyze the facial expression corresponding to the facial analysis result based on the facial analysis result.

[0097] The output form of the facial analysis result may be voice, graphic display or text display. For example, if the output form of the facial analysis result corresponding to the current facial feature data is voice, the voice corresponding to the facial analysis result may be "I am very happy" or "I am a little unhappy". After obtaining the facial analysis result corresponding to the current facial feature data, by clicking the output button on the electronic device where the target feature model is located, the electronic device where the target feature model is located directly outputs the voice corresponding to the facial analysis result.

[0098] In addition, it should be noted that the output form of the above facial analysis results can also be a graphical display or a text display, and its basic output principle is basically the same as the output principle of the above facial analysis results in the form of voice, which will not be repeated here.

[0099] Exemplarily, the target feature model can be applied in the field of education, specifically in schools, by acquiring the current facial feature data of students and timely transmitting the current facial feature data to the target feature model, so that the target feature model can analyze the current facial feature data of students, and then analyze the emotions and psychological states of students according to the obtained facial analysis results, so as to timely discover the psychological problems of students and sort out the students in a timely manner.

[0100] In addition, the current facial feature data of different students can also be obtained during the class. When the time is over, the current facial feature data of different students in a class are obtained, and the current facial feature data of different students are analyzed in the target feature model. The facial analysis results obtained are that the students are more anxious, confused or happy. If the facial analysis result obtained based on the current facial feature data of most students is confused, it means that the content of the class is more in-depth or the way of explanation is more deviated from the students' understanding range, then the teacher will adjust the teaching method or review the course in time according to the facial analysis results. On the contrary, if the facial analysis result obtained based on the current facial feature data of most students is happy, it means that the content of the class is understandable to most students, then the teacher can start the explanation of the next class in time, and for a small number of students who do not understand the course content, they can be tutored at other times. Therefore, according to different facial analysis results, it can be known whether the students have basically mastered the content of this class in a class, so that the teacher can start the explanation of the next content in time or continue to review the content of the class. To achieve the purpose of improving teaching effect and students' emotional health.

[0101] It should be noted that the above-mentioned target feature model can be applied not only to the field of education, but also to various corporate companies, medical fields, etc., and this application does not impose any restrictions on this.

[0102] The above embodiment provides a facial expression analysis method, which obtains target data and performs a series of data preprocessing operations on the target data to remove data noise and improve data quality; then performs feature extraction operations on the preprocessed data, selects more accurate preprocessed data as feature data, and provides more accurate data for subsequent target feature models; and associates the feature data with the feature state where the feature data is located to obtain a more accurate target feature model, and verifies and optimizes the obtained target feature model to improve the reliability of the model. In subsequent practical applications, facial expressions are analyzed based on the target feature model. It can meet practical needs in many aspects of the education field.

[0103] See also Figure 2 , Figure 2A facial expression analysis device 200 provided in an embodiment of the present application includes a data acquisition module 201, a first data determination module 202, a preprocessing module 203, a second data determination module 204, a model determination module 205, and an analysis module 206, wherein the data acquisition module 201 is used to acquire target data, and the target data includes at least one of first facial data, second facial data, and third facial data; the first data determination module 202 is used to perform a preprocessing operation on the target data to determine scaled data corresponding to the target data; the preprocessing module 203 is used to perform a spatial domain enhancement process on the scaled data to obtain the preprocessed data corresponding to the scaled data;

[0104] The second data determination module 204 is used to perform feature extraction operations on the preprocessed data to determine the feature data corresponding to the preprocessed data; the model determination module 205 is used to associate the feature data with the feature state corresponding to the feature data to determine the target feature model corresponding to the feature data and the feature state; the analysis module 206 is used to analyze facial expressions according to the target feature model.

[0105] In some implementations, the first data determination module 202 performs a preprocessing operation on the target data to determine the scaled data corresponding to the target data, and processes;

[0106] Adding the target data to a preset filter to remove noise, and determining first intermediate data corresponding to the target data;

[0107] Performing standardization processing on the first intermediate data to determine second intermediate data after the standardization processing;

[0108] A preset data interval is determined, and the second intermediate data is scaled to within the preset data interval to obtain scaled data corresponding to the second intermediate data.

[0109] In some embodiments, the pre-processing module 203 processes;

[0110] g(x,y)=T[f(s,v)]

[0111] Among them, f(s,v) represents the pixel point of the image corresponding to the scaled data, g(x,y) represents the pixel point of the image corresponding to the preprocessed data, and T represents the spatial domain enhancement function.

[0112] In some implementations, the second data determination module 204 performs a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data, and processes;

[0113] Adding the preprocessed data to a preset target classifier, performing a feature extraction operation on the preprocessed data based on the preset target classifier, and determining the feature data corresponding to the preprocessed data;

[0114] The expression corresponding to the preset target classifier is: ;

[0115] in, Represents the function expression corresponding to the preprocessing function, represents the preprocessed data, represents the function expression corresponding to the preset target classifier, and t represents the feature data.

[0116] In some implementations, the analysis module 206 processes, during the process of analyzing the facial expression according to the target feature model;

[0117] Acquire current facial feature data, where the current facial feature data is acquired in real time by at least one of a camera system or a sensor;

[0118] Adding the current facial feature data to the target feature model to obtain a facial analysis result corresponding to the current facial feature data;

[0119] The facial expression is analyzed according to the facial analysis result.

[0120] In some implementations, the model determination module 205 processes, during the process of associating the feature data with the feature state corresponding to the feature data and determining the target feature model corresponding to the feature data and the feature state;

[0121] A preset feature model is established based on a preset deep learning model; within the preset feature model, the feature data and the feature state are associated to obtain the target feature model corresponding to the feature data and the feature state.

[0122] In some embodiments, the model determination module 205 associates the feature data with the feature state corresponding to the feature data, and after determining the target feature model corresponding to the feature data and the feature state, processes;

[0123] Determine a preset verification threshold; verify the target feature model based on a preset verification method to obtain a verification error after verification; if the verification error is not within the range of the preset verification threshold, repeat the step of establishing the target feature model and re-establish the target feature model; if the verification error is within the range of the preset verification threshold, the target feature model is successfully established.

[0124] In some implementations, the facial expression analysis apparatus 200 may be applied to an electronic device.

[0125] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the facial expression analysis device 200 described above can refer to the corresponding process in the aforementioned facial expression analysis method embodiment, and will not be repeated here.

[0126] See also Figure 3 , Figure 3 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0127] like Figure 3 As shown, the electronic device 300 includes a processor 301 and a memory 302 , and the processor 301 and the memory 302 are connected via a bus 303 , such as an I2C (Inter-integrated Circuit) bus.

[0128] Specifically, the processor 301 is used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit (CPU), and the processor 301 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0129] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0130] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the terminal device to which the embodiment of the present invention is applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0131] The processor is used to run a computer program stored in a memory, and implement any one of the facial expression analysis methods provided by the embodiments of the present invention when executing the computer program.

[0132] In one embodiment, the processor is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:

[0133] Acquire target data, where the target data includes at least one of first facial data, second facial data, and third facial data;

[0134] Performing a preprocessing operation on the target data to determine scaling data corresponding to the target data;

[0135] Performing spatial domain enhancement processing on the scaled data to obtain the pre-processed data corresponding to the scaled data;

[0136] Performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data;

[0137] Associating the feature data with a feature state corresponding to the feature data, and determining a target feature model corresponding to the feature data and the feature state;

[0138] Facial expressions are analyzed according to the target feature model.

[0139] In some implementations, the processor 301 performs, during the process of performing a preprocessing operation on the target data and determining the scaling data corresponding to the target data:

[0140] Adding the target data to a preset filter to remove noise, and determining first intermediate data corresponding to the target data;

[0141] Performing standardization processing on the first intermediate data to determine second intermediate data after the standardization processing;

[0142] A preset data interval is determined, and the second intermediate data is scaled to within the preset data interval to obtain scaled data corresponding to the second intermediate data.

[0143] In some embodiments, the processor 301 further executes:

[0144] g(x,y)=T[f(s,v)];

[0145] Among them, f(s,v) represents the pixel point of the image corresponding to the scaled data, g(x,y) represents the pixel point of the image corresponding to the preprocessed data, and T represents the spatial domain enhancement function.

[0146] In some implementations, the processor 301 performs, during the process of performing a feature extraction operation on the preprocessed data and determining feature data corresponding to the preprocessed data, the following steps:

[0147] Adding the preprocessed data to a preset target classifier, performing a feature extraction operation on the preprocessed data based on the preset target classifier, and determining the feature data corresponding to the preprocessed data;

[0148] The expression corresponding to the preset target classifier is: ;

[0149] in, Represents the function expression corresponding to the preprocessing function, represents the preprocessed data, represents the function expression corresponding to the preset target classifier, and t represents the feature data.

[0150] When analyzing facial expressions according to the target feature model, the processor 301 executes:

[0151] Acquire current facial feature data, where the current facial feature data is acquired in real time by at least one of a camera system or a sensor;

[0152] Adding the current facial feature data to the target feature model to obtain a facial analysis result corresponding to the current facial feature data;

[0153] The facial expression is analyzed according to the facial analysis result.

[0154] In some implementations, the processor 301, in the process of associating the feature data with the feature state corresponding to the feature data and determining the target feature model corresponding to the feature data and the feature state, executes:

[0155] Establish a preset feature model based on the preset deep learning model;

[0156] In the preset feature model, the feature data and the feature state are associated to obtain the target feature model corresponding to the feature data and the feature state.

[0157] In some implementations, after associating the feature data with the feature state corresponding to the feature data and determining the target feature model corresponding to the feature data and the feature state, the processor 301 executes:

[0158] determining a preset verification threshold;

[0159] Verifying the target feature model based on a preset verification method to obtain a verification error after verification;

[0160] If the verification error is not within the range of the preset verification threshold, repeating the step of establishing the target feature model to re-establish the target feature model;

[0161] If the verification error is within the range of the preset verification threshold, the target feature model is established.

[0162] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned facial expression analysis method embodiment, and will not be repeated here.

[0163] An embodiment of the present invention also provides a computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any facial expression analysis method provided in the description of the embodiment of the present invention.

[0164] The storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.

[0165] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0166] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0167] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A facial expression analysis method, characterized in that: include: Acquire target data, where the target data includes at least one of first facial data, second facial data, and third facial data; Performing a preprocessing operation on the target data to determine scaling data corresponding to the target data; Performing spatial domain enhancement processing on the scaled data to obtain preprocessed data corresponding to the scaled data; Performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; Associating the feature data with a feature state corresponding to the feature data, and determining a target feature model corresponding to the feature data and the feature state; Analyzing facial expressions according to the target feature model; The preprocessing operation on the target data to determine the scaling data corresponding to the target data includes: Adding the target data to a preset filter to remove noise, and determining first intermediate data corresponding to the target data; Performing standardization processing on the first intermediate data to determine second intermediate data after the standardization processing; Determine a preset data interval, scale the second intermediate data to within the preset data interval, and obtain scaled data corresponding to the second intermediate data; Among them, the expression corresponding to the spatial domain enhancement processing is: f(s,v) represents the pixel point of the image corresponding to the scaled data, g(x,y) represents the pixel point of the image corresponding to the preprocessed data, and T represents the spatial domain enhancement function.

2. The facial expression analysis method according to claim 1, characterized in that: The performing a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data includes: Adding the preprocessed data to a preset target classifier, performing a feature extraction operation on the preprocessed data based on the preset target classifier, and determining the feature data corresponding to the preprocessed data; The expression corresponding to the preset target classifier is: G(t)=sign(f(x)); Among them, f represents the function expression corresponding to the preprocessing function, x represents the preprocessing data, G represents the function expression corresponding to the preset target classifier, and t represents the feature data.

3. The facial expression analysis method according to claim 1, characterized in that: Analyzing facial expressions according to the target feature model includes: Acquire current facial feature data, where the current facial feature data is acquired in real time by at least one of a camera system or a sensor; Adding the current facial feature data to the target feature model to obtain a facial analysis result corresponding to the current facial feature data; The facial expression is analyzed according to the facial analysis result.

4. The facial expression analysis method according to claim 1, characterized in that: The step of associating the feature data with a feature state corresponding to the feature data to determine a target feature model corresponding to the feature data and the feature state includes: Establish a preset feature model based on the preset deep learning model; In the preset feature model, the feature data and the feature state are associated to obtain the target feature model corresponding to the feature data and the feature state.

5. The facial expression analysis method according to claim 1, characterized in that: After associating the feature data with the feature state corresponding to the feature data and determining the target feature model corresponding to the feature data and the feature state, the method further comprises: determining a preset verification threshold; Verifying the target feature model based on a preset verification method to obtain a verification error after verification; If the verification error is not within the range of the preset verification threshold, repeating the step of establishing the target feature model to re-establish the target feature model; If the verification error is within the range of the preset verification threshold, the target feature model is established.

6. A facial expression analysis device, characterized in that: include: A data acquisition module, used to acquire target data, wherein the target data includes at least one of first facial data, second facial data and third facial data; The first data determination module is used to perform a preprocessing operation on the target data to determine the scaling data corresponding to the target data, including: Adding the target data to a preset filter to remove noise, and determining first intermediate data corresponding to the target data; Performing standardization processing on the first intermediate data to determine second intermediate data after the standardization processing; Determine a preset data interval, scale the second intermediate data to within the preset data interval, and obtain scaled data corresponding to the second intermediate data; A preprocessing module is used to perform spatial domain enhancement processing on the scaled data to obtain preprocessed data corresponding to the scaled data, wherein the expression corresponding to the spatial domain enhancement processing is: g(x,y)=T[f(s,v)] f(s,v) represents a pixel point of the image corresponding to the scaled data, g(x,y) represents a pixel point of the image corresponding to the preprocessed data, and T represents a spatial domain enhancement function; A second data determination module, used to perform a feature extraction operation on the preprocessed data to determine feature data corresponding to the preprocessed data; A model determination module, used to associate the feature data with the feature state corresponding to the feature data, and determine a target feature model corresponding to the feature data and the feature state; The analysis module is used to analyze facial expressions according to the target feature model.

7. An electronic device, characterized in that: The electronic device comprises a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the facial expression analysis method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the facial expression analysis method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Facial expression recognition method and device, electronic equipment and storage medium

    CN114743241A

  • Multi-scale feature extraction and attention mechanism fused expression recognition method

    CN115909455A

  • Multi-person real-time facial expression recognition method and system based on attention mechanism

    CN117636436A

  • Asymmetric facial expression recognition

    CN117769725A

  • System method for automatically detecting neutral expressionless faces in digital images

    US20030133599A1