Training method of micro-expression recognition model, micro-expression recognition method and related equipment

By screening macro-expression sequences and micro-expression sequences, constructing teacher-student models and training micro-expression recognition models, the problem of low feature strength and insufficient samples in micro-expression recognition technology is solved, and the ability to prevent fraud in financial transactions is improved.

CN118608919AActive Publication Date: 2024-09-06PING AN TECH (SHENZHEN) CO LTD

Patent Information

Application Number
CN202410846730.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-06
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Due to the low intensity of micro-expression features and insufficient samples, existing micro-expression recognition technology is difficult to achieve accurate recognition and cannot effectively prevent fraud in financial transactions.

Method used

By obtaining the complete macro-expression sequence and micro-expression sequence, filter out some macro-expression sequences with consistent emotional labels, build a teacher-student model, use the teacher model for pre-training and guidance, and gradually train the student model until the convergence conditions are met, and micro-expressions are obtained Identify the model.

Benefits of technology

It effectively improves the accuracy of micro-expression recognition, makes up for the problems of insufficient micro-expression samples and low feature strength, and enhances the ability to prevent fraud in financial transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608919A
    Figure CN118608919A
Patent Text Reader

Abstract

The invention discloses a training method of a micro-expression recognition model, a micro-expression recognition method and related equipment, and the training method comprises the steps: obtaining a complete macro-expression sequence and a micro-expression sequence, and screening out a part of macro-expression sequence consistent with the emotion label of the micro-expression sequence from the complete macro-expression sequence; constructing a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure; inputting the complete macro expression sequence into a teacher model for pre-training; and taking part of the macro expression sequence and the micro expression sequence as training data, performing model training on the student model under the guidance of the pre-trained teacher model, and completing model training until the student model meets a preset convergence condition. According to the method, the micro-expressions and the macro-expressions are combined together, and the model training of the micro-expression recognition task is performed through the teacher-student model in the knowledge distillation framework, so that the problems of insufficient micro-expression samples and low feature intensity can be effectively solved, and the accuracy of micro-expression recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology, and in particular to a training method for a micro-expression recognition model, a micro-expression recognition method and related equipment. Background Art

[0002] Emotional interaction is a hot topic in the field of human-computer interaction and is a key link in making computers more human. Vision-based emotional interaction mainly uses expression recognition as a starting point. The recognition technology of common expressions (macro-expressions) is already very mature. However, since such expressions can be controlled manually, macro-expression recognition may not be able to show people's inner feelings. For example, when financial companies conduct related financial transactions, there may be fraudulent behaviors such as impersonation, forgery of documents, and concealment of information. At this time, due to deliberate human control, macro-expression recognition cannot accurately detect abnormalities. Therefore, micro-expression recognition that can reveal people's true feelings and emotions is also receiving more and more attention. Micro-expression recognition technology helps to judge the abnormal psychology of traders, thereby preventing fraud and improving security.

[0003] In the field of micro-expressions, micro-expression recognition tasks are difficult to accurately identify even for professionally trained people because of the low intensity of micro-expression features. In addition, there are too few publicly available micro-expression datasets and the sample distribution is extremely uneven, making model training more difficult. This makes it difficult to meet application requirements with the accuracy of micro-expression recognition. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a training method, a micro-expression recognition method and related equipment for a micro-expression recognition model that can be applied to financial technology or other related fields, and its main purpose is to improve the accuracy of micro-expression recognition.

[0005] The technical solution of the present invention is as follows:

[0006] A first aspect of the present invention provides a method for training a micro-expression recognition model, comprising:

[0007] Acquire a complete macro expression sequence and a micro expression sequence, and select a partial macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence;

[0008] Constructing a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure;

[0009] Inputting the complete macro expression sequence into the teacher model for pre-training;

[0010] The partial macro-expression sequence and micro-expression sequence are used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain a micro-expression recognition model.

[0011] In one embodiment, after obtaining the complete macro expression sequence and micro expression sequence, the method further includes:

[0012] The complete macro-expression sequence and the micro-expression sequence are subjected to face cropping and alignment processing.

[0013] In one embodiment, the step of inputting the complete macro expression sequence into the teacher model for pre-training includes:

[0014] Inputting the complete macro expression sequence into the feature extraction network of the teacher model to extract the features of each frame image;

[0015] Input the features of each frame of the image into the time series network of the teacher model, and output features with time series characteristics;

[0016] Inputting the time-series features into the recognition network of the teacher model and outputting the expression recognition results;

[0017] Obtaining a loss function value according to the expression recognition result and the emotion label of the complete macro expression sequence;

[0018] The model parameters of the teacher model are updated according to the loss function value until the pre-training of the teacher model is completed.

[0019] In one embodiment, the part of the macro expression sequence and the micro expression sequence is used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain the micro expression recognition model, including:

[0020] Inputting the partial macro expression sequence into the student model, performing a first-stage training on the student model under the guidance of the pre-trained teacher model, and adjusting parameters of all layers in the student model;

[0021] Freeze the parameters of other layers in the student model except the recognition network after the first stage of training;

[0022] The micro-expression sequence is input into a student model with some parameters frozen for second-stage training, and the parameters of the recognition network of the student model are individually adjusted until the student model meets a preset convergence condition, thereby obtaining a micro-expression recognition model.

[0023] In one embodiment, the partial macro expression sequence is a front portion of data in the complete macro expression sequence.

[0024] A second aspect of the present invention provides a micro-expression recognition method, comprising:

[0025] Obtaining an image sequence to be recognized;

[0026] Inputting the image sequence to be recognized into a pre-trained micro-expression recognition model for micro-expression recognition, and outputting the micro-expression recognition result of the image sequence;

[0027] Wherein, the pre-trained micro-expression recognition model is obtained by adopting the training method as described above.

[0028] A third aspect of the present invention provides a training device for a micro-expression recognition model, comprising:

[0029] A data acquisition module, used to acquire a complete macro expression sequence and a micro expression sequence, and to select a part of the macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence;

[0030] A model building module, used to build a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure;

[0031] A first training module, used for inputting the complete macro expression sequence into the teacher model for pre-training;

[0032] The second training module is used to use the partial macro-expression sequence and micro-expression sequence as training data, and perform model training on the student model under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, thereby completing the model training and obtaining a micro-expression recognition model.

[0033] A fourth aspect of the present invention provides a micro-expression recognition device, comprising:

[0034] An image acquisition module, used for acquiring an image sequence to be identified;

[0035] A recognition module, used for inputting the image sequence to be recognized into a pre-trained micro-expression recognition model to perform micro-expression recognition, and outputting the micro-expression recognition result of the image sequence;

[0036] Wherein, the pre-trained micro-expression recognition model is obtained by adopting the training method as described above.

[0037] A fifth aspect of the present invention provides an electronic device, comprising at least one processor; and

[0038] a memory communicatively connected to the at least one processor; wherein,

[0039] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned micro-expression recognition model training method or execute the above-mentioned micro-expression recognition method.

[0040] A sixth aspect of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned micro-expression recognition model training method or execute the above-mentioned micro-expression recognition method.

[0041] Beneficial effects: The present invention discloses a training method for a micro-expression recognition model, a micro-expression recognition method and related equipment. Compared with the prior art, the embodiment of the present invention obtains a complete macro-expression sequence and a micro-expression sequence, and selects a part of the macro-expression sequence that is consistent with the emotion label of the micro-expression sequence from the complete macro-expression sequence; constructs a teacher model and a student model, and the teacher model and the student model have the same neural network structure; inputs the complete macro-expression sequence into the teacher model for pre-training; uses a part of the macro-expression sequence and the micro-expression sequence as training data, and performs model training on the student model under the guidance of the pre-trained teacher model until the student model meets the preset convergence conditions, and then completes the model training. By combining micro-expressions and macro-expressions together, and performing model training for micro-expression recognition tasks through the teacher-student model in the knowledge distillation framework, the problems of insufficient micro-expression samples and low feature strength can be effectively compensated, thereby improving the accuracy of micro-expression recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0043] Figure 1 A flow chart of a training method for a micro-expression recognition model provided by an embodiment of the present invention;

[0044] Figure 2 A flowchart of step S300 in the training method of the micro-expression recognition model provided in an embodiment of the present invention;

[0045] Figure 3 A flowchart of step S400 in the training method of the micro-expression recognition model provided in an embodiment of the present invention;

[0046] Figure 4 A diagram of the architecture of a teacher model and a student model in a training method for a micro-expression recognition model provided in an embodiment of the present invention;

[0047] Figure 5 A flow chart of a micro-expression recognition method provided by an embodiment of the present invention;

[0048] Figure 6 A schematic diagram of the functional modules of a training device for a micro-expression recognition model provided by an embodiment of the present invention;

[0049] Figure 7 A schematic diagram of the functional modules of a micro-expression recognition device provided by an embodiment of the present invention;

[0050] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0052] Visual-based emotional interaction mainly uses expression recognition as a starting point. The recognition technology of common expressions (macro expressions) is already very mature. However, since such expressions can be controlled manually, macro expression recognition may not be able to show people's inner feelings. For example, when financial enterprises conduct relevant financial transactions, there may be fraudulent behaviors such as impersonation, forgery of documents, and concealment of information. At this time, due to deliberate human control, macro expression recognition cannot accurately detect abnormalities. Therefore, micro expression recognition that can reveal people's true feelings and emotions is also receiving more and more attention. Micro expression recognition technology helps to judge the abnormal psychology of traders, thereby preventing fraud and improving security.

[0053] In the field of micro-expressions, micro-expression recognition tasks are difficult to accurately identify even for professionally trained people because of the low intensity of micro-expression features. In addition, there are too few publicly available micro-expression datasets and the sample distribution is extremely uneven, making model training more difficult. This makes it difficult to meet application requirements with the accuracy of micro-expression recognition.

[0054] In order to solve the above problems, the present invention proposes a training method for a micro-expression recognition model. Figure 1 , Figure 1A flowchart of an embodiment of the training method for the micro-expression recognition model provided by the present invention. The training method for the micro-expression recognition model provided in this embodiment is applied to a system consisting of a terminal device, a network and a server, wherein the network is a medium for providing a communication link between the terminal device and the server, which may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.; the operating system on the terminal device may include a handheld device operating system (iPhone operating system, iOS system), Android system or other operating system, and the terminal device is connected to the server through the network to achieve interaction, thereby performing operations such as receiving or sending data, and specifically may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, portable computers and desktop servers, etc. Figure 1 As shown, the method specifically comprises the following steps:

[0055] S100, obtaining a complete macro expression sequence and a micro expression sequence, and selecting a partial macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence.

[0056] In this embodiment, a data set of a complete macro-expression sequence and a micro-expression sequence is obtained, and samples that are consistent with the emotional expressions of the micro-expression sequence, namely, a partial macro-expression sequence, are further screened out from the complete macro-expression sequence, and the data set composed of three different expression sequences is used as training data for the micro-expression recognition model. Specifically, an expression sequence refers to multiple frames of facial images arranged in a time series. Expressions that usually flash by and last for less than 0.5 seconds are called micro-expressions; in contrast, expressions that last slightly longer, between 1s and 5s, are called macro-expressions. Therefore, the complete macro-expression sequence includes facial images from expressionless faces to complete macro-expression faces, and the micro-expression sequence includes facial images from expressionless faces to micro-expression faces. It can be seen that both micro-expressions and macro-expressions are a continuous change process starting from expressionless faces. If micro-expressions are regarded as the preliminary process of macro-expressions, that is, the user is manually controlling the expression. If a micro-expression is made unconsciously before a macro-expression is made, the complete macro-expression sequence includes facial images from expressionless faces to facial images with micro-expressions and then to facial images with complete macro-expressions. In other words, if micro-expressions are regarded as incomplete macro-expressions, then macro-expressions and micro-expressions can be organically combined, and a part of facial images with micro-expression labels, i.e., a part of macro-expression sequences, can be screened out from the complete macro-expression sequence. This part of the macro-expression sequence is usually the front part of the data in the complete macro-expression sequence, such as the first 20%, 30%, etc. of the data in the complete macro-expression sequence, so as to make up for the problem of too little micro-expression data and uneven sample distribution.

[0057] Preferably, after obtaining the complete macro expression sequence and micro expression sequence, the method further comprises:

[0058] The complete macro-expression sequence and the micro-expression sequence are subjected to face cropping and alignment processing.

[0059] In this embodiment, after preparing a data set of complete macro expression sequences and micro expression sequences, the face images in the data set are pre-processed by face cropping and alignment, that is, various faces are cut out from images of different sizes in the data set, and then the faces are cut out and the tilted faces are processed into normal postures, so that the eyes and other positions in each cut face are in the same position, thereby improving the accuracy of subsequent micro expression recognition tasks. The specific alignment method can be, for example, a method based on feature points, which marks key feature points on the face, such as eyes, nose, mouth, etc., and then aligns according to these feature points. This method is simple and intuitive, but it is not effective for low-resolution or blurred images; or a method based on deep learning, which uses a deep neural network to align faces, such as DeepID, DeepFace and other convolutional neural network-based methods, which automatically complete alignment by learning facial features. The specific method can be flexibly selected according to actual needs, and this embodiment does not limit this.

[0060] S200: construct a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure.

[0061] In this embodiment, a teacher-student model in a knowledge distillation framework is constructed to perform learning and training for the micro-expression recognition task. The teacher model and the student model have the same neural network structure, such as Figure 4 As shown in the figure, both models include a feature extraction network, an actual sequence network, and a recognition network to complete the classification and recognition of the input expression sequence. The teacher-student model usually refers to the use of a fully trained and well-performing model (teacher model) to guide the training of another model to be trained (student model) in deep learning, that is, the student model is trained to imitate the behavior of the teacher model through knowledge distillation. The generalization ability of the student model can be improved by using the internal representation of the teacher model. When applied to micro-expression recognition tasks with low feature intensity and difficult feature extraction, the trained teacher model can be used to effectively improve the student model's feature extraction ability and recognition accuracy for micro-expressions.

[0062] S300, inputting the complete macro expression sequence into the teacher model for pre-training.

[0063] In this embodiment, before conducting learning and training for the micro-expression recognition task, the teacher model is pre-trained using a complete macro-expression sequence. The complete macro-expression sequence and the corresponding emotion labels are used to allow the teacher model to learn the changes in facial features from no expression to complete macro-expressions under different expression sequences, so that the pre-trained teacher model can accurately classify and recognize expressions in the complete macro-expression sequence.

[0064] In one embodiment, Figure 2 As shown, step S300 includes:

[0065] S301, inputting the complete macro expression sequence into the feature extraction network of the teacher model to extract the features of each frame image;

[0066] S302, inputting the features of each frame of the image into the time series network of the teacher model, and outputting features with time series;

[0067] S303, inputting the time-series feature into the recognition network of the teacher model, and outputting the expression recognition result;

[0068] S304, obtaining a loss function value according to the expression recognition result and the emotion label of the complete macro expression sequence;

[0069] S305. Update the model parameters of the teacher model according to the loss function value until the pre-training of the teacher model is completed.

[0070] In this embodiment, when the teacher model is pre-trained by a complete macro expression sequence, the complete macro expression sequence is first input into the feature extraction network to extract the features of each frame image, and then the extracted features of each frame image are input into the time series network LSTM to output features with time series. The LSTM neural network is a deep learning model commonly used for sequence data modeling, and its full name is Long Short-Term Memory Network (LSTM). Compared with the traditional recurrent neural network, the LSTM network has better long-term dependency and memory capacity, so it can accurately and effectively process time series data, and better extract the corresponding temporal features based on the changes in image features in the complete macro expression sequence, so that the teacher model can learn the facial features of the complete expression, and finally input the temporal features into the recognition network for classification and recognition, and output the expression recognition results, specifically outputting the probability distribution of different expression categories. The probability distribution can reflect the relative possibility and boundary fuzziness between different categories. Since the complete macro expression sequence also contains some micro expression images, the probability distribution of different expression categories can not only predict which category is most likely to be correct, but also give the probability values ​​corresponding to all categories including macro expressions and micro expressions, thereby providing more information for the subsequent training of the student model to improve the model capabilities.

[0071] Based on the expression recognition results of the teacher model, the recognition accuracy of the teacher model is evaluated by a loss function such as a cross entropy function, and the model parameters of the teacher model are updated by back propagation based on the loss function value until the pre-training of the teacher model is completed. Specifically, the pre-training can be terminated when the loss function value is less than a preset value, or the pre-training can be terminated when the training cycle reaches a preset cycle, etc., so as to obtain a teacher model with good performance on the complete macro expression sequence recognition task, providing a reliable training foundation for subsequent student model training.

[0072] S400, using the partial macro-expression sequence and the micro-expression sequence as training data, and performing model training on the student model under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, thereby completing the model training and obtaining a micro-expression recognition model.

[0073] In this embodiment, under the guidance of the pre-trained teacher model, partial macro-expression sequences and micro-expression sequences with micro-expression features are used as training data and input into the learning model for model training. This not only effectively alleviates the problem of small micro-expression data sets and uneven sample distribution by extracting partial macro-expression sequences with micro-expression features from complete macro-expression sequences, but also during the training process, the teacher model can pass on the knowledge it has learned about how to extract and recognize expression features in the sequence to the student model, and the student model tries to imitate the behavior of the teacher model so that it can learn how to more effectively express the inherent laws of the data within a limited parameter space. This can enable the student model to demonstrate better generalization and robustness in micro-expression recognition tasks, thereby improving the feature extraction and recognition capabilities of the learning model itself by learning the behavior of the teacher model. After the model converges, a trained student model is obtained and used as the final micro-expression recognition model, which effectively makes up for the problems of insufficient micro-expression samples and low feature strength, thereby improving the accuracy of micro-expression recognition.

[0074] In one embodiment, Figure 3 As shown, step S400 includes:

[0075] S401, inputting the part of the macro expression sequence into the student model, performing the first phase training on the student model under the guidance of the pre-trained teacher model, and adjusting the parameters of all layers in the student model;

[0076] S402, freezing the parameters of other layers in the student model except the recognition network after the first stage of training;

[0077] S403, inputting the micro-expression sequence into a student model with some parameters frozen for second-stage training, adjusting parameters of the recognition network of the student model individually until the student model meets a preset convergence condition, and obtaining a micro-expression recognition model.

[0078] In this embodiment, the training of the student model is divided into two stages. In the first stage of training, the extracted partial macro expression sequence with micro expression features is input into the student model, and the recognition training of early expression movements is carried out under the guidance of the pre-trained teacher model. In the first stage of training, the parameters of all layers in the student model are adjusted based on the output results of the learning model and the loss function value. Specifically, since the partial macro expression training is an early image extracted from the complete macro expression training, the teacher model can already extract and recognize the expression probability distribution therein. At this time, the teacher model can guide the learning model through, for example, soft labeling methods and feature matching methods, and then transfer the knowledge in the teacher model to the student model.

[0079] The soft label method refers to the teacher model generating probability distributions for the input data instead of hard category labels. These probability distributions contain more information, reflecting the relative likelihood and boundary fuzziness between different categories. The student model learns based on these soft labels to imitate the decision-making process of the teacher model. During knowledge distillation, the student model will not only imitate the category with the highest probability, but learn the "softened" probability distribution of the entire teacher model, such as by increasing the temperature parameter (temperature scaling) to make the distribution smoother, that is, the maximum probability value will become smaller, while the probabilities of other categories will increase accordingly, so that the student model not only pays attention to the most likely category, but also learns the relative differences between different categories, and then fully captures the subtle differences between different micro-expression categories from the input part of the macro-expression sequence, so as to improve the model's ability to extract micro-expression features. The feature matching method refers to the student model not only matching the real data label, but also trying to make the feature representation of its internal layer close to the feature representation of the teacher model under the same input. That is, when the student model adjusts its parameters through back propagation, it needs to make the feature space structure extracted in the middle layer replicate the feature space of the teacher model as much as possible. In this way, the student model can use the key feature information extracted by the teacher model to achieve miniaturization and acceleration of the model while maintaining a high accuracy.

[0080] After completing the first stage of training under the guidance of the teacher model, the parameters of other layers in the student model except the recognition network are frozen, that is, the feature vectors of the intermediate layer learned from the teacher model are retained. In the second stage of training, the recognition network in the student model is trained separately through the micro-expression sequence, and the parameters of the recognition network are further accurately adjusted until the student model meets the preset convergence conditions to obtain a micro-expression recognition model, such as the number of training times reaches the preset number of times or the loss function value is less than the preset value, etc. The converged student model is used as the final micro-expression recognition model. This embodiment uses the data complementarity of micro-expressions and macro-expressions to perform model training for micro-expression recognition tasks based on the teacher-student model in the knowledge distillation framework, and in the training of the student model, the model parameters are more accurately adjusted through parameter adjustment at different stages, so that the micro-expression recognition model finally trained can accurately and efficiently perform micro-expression recognition on images, effectively making up for the problems of insufficient micro-expression samples and low feature strength, thereby improving the accuracy of micro-expression recognition.

[0081] Another embodiment of the present invention provides a micro-expression recognition method, such as Figure 5 As shown, the method comprises the following steps:

[0082] S500, obtaining an image sequence to be identified;

[0083] S600: input the image sequence to be recognized into a pre-trained micro-expression recognition model to perform micro-expression recognition, and output the micro-expression recognition result of the image sequence;

[0084] Wherein, the pre-trained micro-expression recognition model is obtained by adopting the training method as mentioned above.

[0085] In this embodiment, after the micro-expression recognition model is trained by the training method as described above, end-to-end micro-expression recognition can be implemented in a variety of application scenarios. For example, in scenarios such as financial transactions and remote video face-to-face signing, the user's video stream is collected in real time, and the image sequence is captured from the video stream and input into the micro-expression recognition model for micro-expression recognition, and the corresponding micro-expression recognition results can be output. Accurate micro-expression recognition can provide reliable reference information for a variety of application scenarios such as transaction security detection and dialogue strategy adjustment.

[0086] Another embodiment of the present invention provides a training device for a micro-expression recognition model, such as Figure 6 As shown, the training device 1 comprises:

[0087] The data acquisition module 11 is used to acquire a complete macro expression sequence and a micro expression sequence, and select a part of the macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence;

[0088] A model building module 12 is used to build a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure;

[0089] A first training module 13 is used to input the complete macro expression sequence into the teacher model for pre-training;

[0090] The second training module 14 is used to use the partial macro-expression sequence and micro-expression sequence as training data, and perform model training on the student model under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, thereby completing the model training and obtaining a micro-expression recognition model.

[0091] The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, which are more suitable for describing the training and execution process of the micro-expression recognition model than a program. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.

[0092] In one embodiment, the training device 1 further includes:

[0093] The preprocessing module is used to perform face cropping and alignment processing on the complete macro expression sequence and micro expression sequence.

[0094] In one embodiment, the first training module 13 includes:

[0095] A first input unit is used to input the complete macro expression sequence into the feature extraction network of the teacher model to extract the features of each frame image;

[0096] A first input unit is used to input the features of each frame of the image into the time series network of the teacher model and output features with time series;

[0097] A third input unit is used to input the time-series feature into the recognition network of the teacher model and output the expression recognition result;

[0098] A loss calculation unit, used to obtain a loss function value according to the expression recognition result and the emotion label of the complete macro expression sequence;

[0099] A parameter updating unit is used to update the model parameters of the teacher model according to the loss function value until the pre-training of the teacher model is completed.

[0100] In one embodiment, the second training module 14 includes:

[0101] A first training unit, used for inputting the partial macro expression sequence into the student model, performing a first-stage training on the student model under the guidance of the pre-trained teacher model, and adjusting parameters of all layers in the student model;

[0102] A parameter freezing unit, used to freeze the parameters of other layers in the student model except the recognition network after the first stage of training;

[0103] The second training unit is used to input the micro-expression sequence into the student model with some parameters frozen for second-stage training, and individually adjust the parameters of the recognition network of the student model until the student model meets the preset convergence conditions to obtain a micro-expression recognition model.

[0104] In one embodiment, the partial macro expression sequence is a front portion of data in the complete macro expression sequence.

[0105] Another embodiment of the present invention provides a micro-expression recognition device, such as Figure 7 As shown, the device 2 comprises:

[0106] An image acquisition module 21 is used to acquire an image sequence to be identified;

[0107] The recognition module 22 is used to input the image sequence to be recognized into a pre-trained micro-expression recognition model to perform micro-expression recognition, and output the micro-expression recognition result of the image sequence;

[0108] Wherein, the pre-trained micro-expression recognition model is obtained by adopting the training method as described above.

[0109] The image acquisition module 21 is connected to the recognition module 22. The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of micro-expression recognition than a program. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.

[0110] Another embodiment of the present invention provides an electronic device, such as Figure 8 As shown, the electronic device 10 includes:

[0111] One or more processors 110 and memory 120, Figure 8 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0112] The processor 110 is used to complete various control logics of the electronic device 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0113] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the training method of the micro-expression recognition model in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the electronic device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the training method of the micro-expression recognition model or the micro-expression recognition method in the above method embodiment.

[0114] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the electronic device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the electronic device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0115] One or more units are stored in the memory 120, and when executed by one or more processors 110, the training method of the micro-expression recognition model in any of the above method embodiments is performed, for example, the following steps are performed:

[0116] Acquire a complete macro expression sequence and a micro expression sequence, and select a partial macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence;

[0117] Constructing a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure;

[0118] Inputting the complete macro expression sequence into the teacher model for pre-training;

[0119] The partial macro-expression sequence and micro-expression sequence are used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain a micro-expression recognition model.

[0120] In one embodiment, after obtaining the complete macro expression sequence and micro expression sequence, the method further includes:

[0121] The complete macro-expression sequence and the micro-expression sequence are subjected to face cropping and alignment processing.

[0122] In one embodiment, the step of inputting the complete macro expression sequence into the teacher model for pre-training includes:

[0123] Inputting the complete macro expression sequence into the feature extraction network of the teacher model to extract the features of each frame image;

[0124] Input the features of each frame of the image into the time series network of the teacher model, and output features with time series characteristics;

[0125] Inputting the time-series features into the recognition network of the teacher model and outputting the expression recognition results;

[0126] Obtaining a loss function value according to the expression recognition result and the emotion label of the complete macro expression sequence;

[0127] The model parameters of the teacher model are updated according to the loss function value until the pre-training of the teacher model is completed.

[0128] In one embodiment, the part of the macro expression sequence and the micro expression sequence is used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain the micro expression recognition model, including:

[0129] Inputting the partial macro expression sequence into the student model, performing a first-stage training on the student model under the guidance of the pre-trained teacher model, and adjusting parameters of all layers in the student model;

[0130] Freeze the parameters of other layers in the student model except the recognition network after the first stage of training;

[0131] The micro-expression sequence is input into a student model with some parameters frozen for second-stage training, and the parameters of the recognition network of the student model are individually adjusted until the student model meets a preset convergence condition, thereby obtaining a micro-expression recognition model.

[0132] In one embodiment, the partial macro expression sequence is a front portion of data in the complete macro expression sequence.

[0133] Alternatively, the micro-expression recognition method in any of the above method embodiments is executed, for example, the following steps are performed:

[0134] Obtaining an image sequence to be recognized;

[0135] Inputting the image sequence to be recognized into a pre-trained micro-expression recognition model for micro-expression recognition, and outputting the micro-expression recognition result of the image sequence;

[0136] Wherein, the pre-trained micro-expression recognition model is obtained by adopting the training method as described above.

[0137] An embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the training method of the micro-expression recognition model in any of the above method embodiments is executed, for example, the following steps are performed:

[0138] Acquire a complete macro expression sequence and a micro expression sequence, and select a partial macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence;

[0139] Constructing a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure;

[0140] Inputting the complete macro expression sequence into the teacher model for pre-training;

[0141] The partial macro-expression sequence and micro-expression sequence are used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain a micro-expression recognition model.

[0142] In one embodiment, after obtaining the complete macro expression sequence and micro expression sequence, the method further includes:

[0143] The complete macro-expression sequence and the micro-expression sequence are subjected to face cropping and alignment processing.

[0144] In one embodiment, the step of inputting the complete macro expression sequence into the teacher model for pre-training includes:

[0145] Inputting the complete macro expression sequence into the feature extraction network of the teacher model to extract the features of each frame image;

[0146] Input the features of each frame of the image into the time series network of the teacher model, and output features with time series characteristics;

[0147] Inputting the time-series features into the recognition network of the teacher model and outputting the expression recognition results;

[0148] Obtaining a loss function value according to the expression recognition result and the emotion label of the complete macro expression sequence;

[0149] The model parameters of the teacher model are updated according to the loss function value until the pre-training of the teacher model is completed.

[0150] In one embodiment, the part of the macro expression sequence and the micro expression sequence is used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain the micro expression recognition model, including:

[0151] Inputting the partial macro expression sequence into the student model, performing a first-stage training on the student model under the guidance of the pre-trained teacher model, and adjusting parameters of all layers in the student model;

[0152] Freeze the parameters of other layers in the student model except the recognition network after the first stage of training;

[0153] The micro-expression sequence is input into a student model with some parameters frozen for second-stage training, and the parameters of the recognition network of the student model are individually adjusted until the student model meets a preset convergence condition, thereby obtaining a micro-expression recognition model.

[0154] In one embodiment, the partial macro expression sequence is a front portion of data in the complete macro expression sequence.

[0155] Alternatively, the micro-expression recognition method in any of the above method embodiments is executed, for example, the following steps are performed:

[0156] Obtaining an image sequence to be recognized;

[0157] Inputting the image sequence to be recognized into a pre-trained micro-expression recognition model for micro-expression recognition, and outputting the micro-expression recognition result of the image sequence;

[0158] Wherein, the pre-trained micro-expression recognition model is obtained by adopting the training method as described above.

[0159] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0160] In summary, the training method of the micro-expression recognition model, the micro-expression recognition method and the related equipment disclosed in the present invention include: obtaining a complete macro-expression sequence and a micro-expression sequence, and screening out a part of the macro-expression sequence that is consistent with the emotion label of the micro-expression sequence from the complete macro-expression sequence; constructing a teacher model and a student model, the teacher model and the student model have the same neural network structure; inputting the complete macro-expression sequence into the teacher model for pre-training; using a part of the macro-expression sequence and the micro-expression sequence as training data, and training the student model under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition. By combining micro-expressions and macro-expressions together, and performing model training for micro-expression recognition tasks through the teacher-student model in the knowledge distillation framework, the problem of insufficient micro-expression samples and low feature strength can be effectively compensated, thereby improving the accuracy of micro-expression recognition.

[0161] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.

[0162] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A training method for a micro-expression recognition model, characterized in that: include: Acquire a complete macro expression sequence and a micro expression sequence, and select a partial macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence; Constructing a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure; Inputting the complete macro expression sequence into the teacher model for pre-training; The partial macro-expression sequence and micro-expression sequence are used as training data, and the student model is trained under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, and the model training is completed to obtain a micro-expression recognition model.

2. The training method of the micro-expression recognition model according to claim 1, characterized in that: After obtaining the complete macro expression sequence and micro expression sequence, the method further includes: The complete macro-expression sequence and the micro-expression sequence are subjected to face cropping and alignment processing.

3. The training method of the micro-expression recognition model according to claim 1, characterized in that: The step of inputting the complete macro expression sequence into the teacher model for pre-training comprises: Inputting the complete macro expression sequence into the feature extraction network of the teacher model to extract the features of each frame image; Input the features of each frame of the image into the time series network of the teacher model, and output features with time series characteristics; Inputting the time-series features into the recognition network of the teacher model and outputting the expression recognition results; Obtaining a loss function value according to the expression recognition result and the emotion label of the complete macro expression sequence; The model parameters of the teacher model are updated according to the loss function value until the pre-training of the teacher model is completed.

4. The training method of the micro-expression recognition model according to claim 1, characterized in that: The method uses the part of the macro expression sequence and the micro expression sequence as training data, performs model training on the student model under the guidance of the pre-trained teacher model, and completes the model training until the student model meets the preset convergence condition to obtain a micro expression recognition model, including: Inputting the partial macro expression sequence into the student model, performing a first-stage training on the student model under the guidance of the pre-trained teacher model, and adjusting parameters of all layers in the student model; Freeze the parameters of other layers in the student model except the recognition network after the first stage of training; The micro-expression sequence is input into a student model with some parameters frozen for second-stage training, and the parameters of the recognition network of the student model are individually adjusted until the student model meets a preset convergence condition, thereby obtaining a micro-expression recognition model.

5. The training method of the micro-expression recognition model according to claim 1, characterized in that: The partial macro expression sequence is a front portion of data in the complete macro expression sequence.

6. A micro-expression recognition method, characterized in that: include: Obtaining an image sequence to be recognized; Inputting the image sequence to be recognized into a pre-trained micro-expression recognition model for micro-expression recognition, and outputting the micro-expression recognition result of the image sequence; Wherein, the pre-trained micro-expression recognition model is obtained by using the training method described in any one of claims 1-5.

7. A training device for a micro-expression recognition model, characterized in that: include: A data acquisition module, used to acquire a complete macro expression sequence and a micro expression sequence, and to select a part of the macro expression sequence that is consistent with the emotion label of the micro expression sequence from the complete macro expression sequence; A model building module, used to build a teacher model and a student model, wherein the teacher model and the student model have the same neural network structure; A first training module, used for inputting the complete macro expression sequence into the teacher model for pre-training; The second training module is used to use the partial macro-expression sequence and micro-expression sequence as training data, and perform model training on the student model under the guidance of the pre-trained teacher model until the student model meets the preset convergence condition, thereby completing the model training and obtaining a micro-expression recognition model.

8. A micro-expression recognition device, characterized in that: include: An image acquisition module, used for acquiring an image sequence to be identified; A recognition module, used for inputting the image sequence to be recognized into a pre-trained micro-expression recognition model to perform micro-expression recognition, and outputting the micro-expression recognition result of the image sequence; Wherein, the pre-trained micro-expression recognition model is obtained by using the training method described in any one of claims 1-5.

9. An electronic device, characterized in that: comprising at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method of the micro-expression recognition model described in any one of claims 1-5, or execute the micro-expression recognition method described in claim 6.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the training method for the micro-expression recognition model described in any one of claims 1-5, or execute the micro-expression recognition method described in claim 6.

Citation Information

Patent Citations

  • Micro-expression recognition method based on transfer learning

    CN114898433A

  • Method, system and device for amplifying micro expression to macro expression and medium

    CN115116112A

  • Mental health monitoring equipment based on micro-expression recognition and monitoring method thereof

    CN117838122A

Cited By

  • Student psychological state monitoring method based on multi-modal emotion recognition

    CN122696269A

  • A student psychological state monitoring method based on multi-modal emotion recognition

    CN122696269B