Micro-expression detection method based on random forests fusion of spatiotemporal information
Through the spatio-temporal domain information fusion random forest method, the problem of small micro-expression movement amplitude and lack of data in micro-expression detection technology is solved, the recognition rate is improved and the uneven classification samples are balanced, and efficient recognition of micro-expressions is achieved.
Patent Information
- Application Number
- CN202111603134.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-12-24
AI Technical Summary
Micro-expression detection technology faces the problems of small movement amplitude, unclear change characteristics, difficulty in tracking and extraction of micro-expressions, and lack of standard data sets, resulting in a shortage of training resources and unsatisfactory classification robustness.
The spatiotemporal domain information fusion random forest method is used to construct a micro-expression classifier through face tracking and detection, pyramid-level two-dimensional sub-region representation, improved enhancement methods to fuse spatiotemporal domain information, and embedded feature selection and classifiers based on random forests. , reduce the dependence on the training sample set and balance the imbalanced classification samples.
It significantly improves the recognition rate of micro-expressions, reduces the dependence on the basic database, solves the problem of many small objects in the micro-expression feature scale, and balances the error of uneven classification samples through the multi-processing capabilities of random forests.
Smart Images

Figure CN114429655B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing and artificial intelligence technology, and specifically relates to a micro-expression detection method of fusing spatiotemporal information with random forests. Background Art
[0002] Facial micro-expressions are the extension and reflection of the real inner emotions. Different from macro-expressions, they are not under conscious control and usually last very short, only between 1 / 5 second and 1 / 25 second, and occur at specific locations on the face. Therefore, micro-expression recognition has important applications in public security criminal investigation, criminal interrogation, lie detection monitoring and other fields. In the past, micro-expression analysis technology was only applicable to experienced psychology experts. With the development of artificial intelligence technology and its continuous breakthroughs and applications in the fields of machine learning and expression recognition, it has provided dynamic support for micro-expression detection and recognition technology. In recent years, research results in the field of micro-expression recognition have been increasing year by year.
[0003] The micro-expression recognition process is generally divided into the following steps: image acquisition, image preprocessing, micro-expression detection, feature extraction, and micro-expression classification. Among them, the current methods for micro-expression feature extraction mainly include traditional analysis methods and deep learning methods. Traditional analysis methods mainly include methods based on local binary patterns (LBP), methods based on optical flow field features, and methods based on tensor change analysis. Deep learning methods mainly include methods based on convolutional neural networks (CNN), methods based on recurrent neural networks (RNN), and methods based on 3D-CNN. Micro-expression classification methods mainly extract non-rigid motion changes of subtle expressions such as optical flow or light intensity, or use facial dynamic maps (FDM) to model the motion of facial components, combine the micro-expression detection results of multi-scale sliding windows with data set samples, and then complete the classification of micro-expressions.
[0004] Micro-expression experimental datasets are relatively scarce. Representative datasets include CASME, CASMEII, SMIC, and CAS(ME). 2 The important attribute parameters that affect the quality of the dataset include the number of participants included in the dataset, the total number of samples collected, the number of expression categories in the dataset, the resolution of the collected images, and the frame rate.
[0005] Micro-expression detection refers to detecting whether a video stream contains micro-expressions and marking the onset, peak, and offset of the micro-expressions. The onset refers to the time when the micro-expression begins to appear, the peak refers to the time when the micro-expression has the largest amplitude, and the offset refers to the time when the micro-expression disappears completely. Micro-expression recognition refers to the classification of micro-expressions in video sequences through a certain algorithm for the micro-expression sequences that have been detected. Taking the CASMEII micro-expression dataset as an example, it is divided into: contempt, disgust, fear, happiness, repression, sadness, surprise, and tension.
[0006] Since micro-expressions have small movements and unclear characteristics, they are usually difficult to track and extract. In addition, standard micro-expression datasets are relatively scarce, resulting in a shortage of micro-expression training resources. In addition, due to the extremely unbalanced classification of micro-expression samples in limited datasets, the classification robustness of different types of micro-expressions is not ideal. Summary of the invention
[0007] To solve the above problems, the present invention provides a micro-expression detection method of random forest fusion with spatiotemporal information with high effectiveness, high recognition rate and high performance.
[0008] To achieve the above object, the technical solution of the present invention is as follows:
[0009] A micro-expression detection method based on spatiotemporal information fusion random forest includes the following steps:
[0010] S1: Complete input video sequence preprocessing through face tracking and detection;
[0011] S2: Use feature space to represent the entire video sequence, represented by uniform local binary patterns represented by 2D sub-regions presented as a pyramidal hierarchy;
[0012] S3: Using an improved enhancement method to fuse spatiotemporal information as the random forest source object;
[0013] S4: Use an embedded feature selection method based on random forest to select the most discriminative features;
[0014] S5: Construct a micro-expression classifier based on the random forest algorithm based on spatiotemporal information fusion.
[0015] Furthermore, the step S1 includes the following sub-steps:
[0016] S11: Segment the micro-expression database into spatial and temporal domains; then perform face tracking detection, locate the face in the spatial domain through the FAC interface, perform face registration through the Dlib tool, and perform ROI cropping on the image frame sequence; perform noise reduction processing at the same time;
[0017] S12: normalize all image frame sequences, and use the time domain interpolation model TIM to standardize the time scale of the time domain interval; after normalization and standardization, integrate all image frame sequences and use them as input for training network;
[0018] S13: Perform TVL optical flow calculation to obtain the optical flow sequence of micro-expressions as the secondary input of the network; represent the horizontal and vertical components of the optical flow, and the optical flow vector representation is: K = [m, n] T , Where m and n are the horizontal and vertical optical flow components respectively, dv and dw represent the pixel gradient along the horizontal and vertical dimensions, and dt is the span of the time domain length.
[0019] Furthermore, the step S2 includes the following sub-steps:
[0020] S21: decomposing each video sequence into sub-regions and decomposing them into different sizes according to the pyramid level; introducing a pyramid representation of a three-dimensional pixel matrix with video sequence frames as symbols, wherein the index level of the pyramid indication is included in the spatial vector;
[0021] S22: reducing the dimensionality of the three-dimensional matrix to a two-dimensional image by a two-dimensional sub-region representation method, extracting the first row of each frame and labeling it with a two-dimensional label, and then using this as a standard to perform two-dimensional processing on subsequent video frames;
[0022] S23: Calculate the LBP feature value of the two-dimensional sub-region of each two-dimensional image, and synchronize the horizontal final endpoint X and the vertical final endpoint Y. The expression is: as well as Among them, Height and Length represent the height and width of the video sequence frame respectively;
[0023] S24: Establish a connection between the two-dimensional sub-region LBP histograms of each level, and determine the priority of the LBP feature space size according to the pyramid level.
[0024] Furthermore, in the step S23, the unit jump value and the jump radius unit value of each domain pixel are set in the process of calculating the LBP feature value of the two-dimensional sub-region of each two-dimensional image.
[0025] Furthermore, the step S3 includes the following sub-steps:
[0026] S31: Object parameter initialization and parameter definition, where S: improved and enhanced source object; S : Airspace object information; I T : Time domain object information; H S1 :One-time fusion processing of spatial domain objects; H S2 : Secondary fusion processing of spatial objects; H T1 :One-time fusion processing of time domain objects; H T2 : Secondary fusion processing of time domain objects; M f : fused micro-expression information frame; f: micro-expression information frame; once fused micro-expression information frame M fS1 、M fT1 ; Secondary fusion micro-expression information frame M fS2 、M fT2 ;
[0027] S=I S ∪I T
[0028] H S1 ={M fS1 ,fS1}
[0029] H S2 ={M fS2 ,fS2}
[0030] H T1 ={M fT1 ,fT1}
[0031] H T2 ={M fT2 ,fT2}
[0032] S32: fusing the spatiotemporal information in an improved enhanced manner as a random forest source object, performing a primary fusion process and a secondary fusion process on the spatiotemporal object and the spatiotemporal object, and performing an enhanced fusion process on the processing result if the intersection vector of the spatiotemporal information in the specified frame is greater than the frame vector itself, specifically including:
[0033] When the intersection vector of the temporal and spatial information in the specified frame is greater than the frame vector I specified in the i-th frame i When the frame vector itself is not 0, the spatiotemporal object of the i-th frame information is subjected to a fusion process of primary information extraction and secondary information extraction mean value through the following formula:
[0034] Mix fi=(fi1+fi2) / 2
[0035] When the absolute value of the difference between the fusion processing result of the i-th frame information and its first extracted information is greater than the absolute value of the difference between its second extracted information, the fusion processing and enhanced fusion processing are performed using the following formula:
[0036] Handle(H S1 ,H S2 )
[0037] Handle(H T1 ,H T2 )
[0038]
[0039] Among them, the fusion processing and enhanced fusion processing are defined as follows:
[0040]
[0041] Furthermore, the step S4 includes the following sub-steps:
[0042] S41: Generate a classification forest by binary tree method, set the feature matrix corresponding to the embedded object, and randomly select different numbers of features from each separated node to create tree nodes;
[0043] S42: using the spatiotemporal information obtained in S32 and fused based on the improved enhancement method as the source input object of the classification forest established in S41, and calculating the importance weight for each feature, assuming the prediction error of the corresponding feature matrix for each tree; at the same time, performing a random sequence change on the first row of the feature matrix, assuming that the prediction error will reappear in the modified feature matrix; the sequence change operation is repeated in the binary tree classification process until all feature rows are processed one by one, and the embedded feature sequence of the random forest is formed according to the obtained importance weights;
[0044] S43: Select the associated discriminative features generated by the optimal random forest classifier; first define a binary classification tree, which is associated with the following features: features with the primary highest importance weights, and features with secondary high weights; the primary weight features are associated with the secondary weight features, and then connected to the third-level weight features, and so on; thereby establishing and generating a random forest classifier for the features associated with each training video sequence; using the best associated maximum accuracy and minimum accuracy features, this association represents the selection of sequences and nodes.
[0045] Furthermore, the step S5 includes the following sub-steps:
[0046] S51: Establish a random forest classifier through a standard random forest algorithm, accurately calculate the index leaf node of each training video sequence tree in the forest, and thus obtain a leaf node matrix;
[0047] S52: for the test video sequence, calculate the index leaf node of each tree in the forest, thereby obtaining a forest node vector group to be tested;
[0048] S53: Calculate an approximate measurement deviation value between the video sequence to be tested and the standard training video sequence, and use the deviation value as the number of leaf nodes shared by the classification of the predicted training video sequence and the test video sequence;
[0049] S54: Predicting the classification of a test video sequence based on the approximate measurement value of the vector, if the corresponding approximate measurement value is close to the maximum value obtained by the vector calculation, then a test video sequence is considered to be similar to the training video sequence; the test video sequence is regarded as the classification with the maximum weight; if a facial expression with the maximum weight is found during the process, it is regarded as randomly generated; the facial expression weight is used instead of the number of facial expressions.
[0050] Furthermore, in step S53, the Kronecker delta function equation is used to define an approximate measurement deviation value between the video sequence to be tested and the training video sequence.
[0051] The beneficial effects of the present invention are:
[0052] 1. The present invention utilizes the dual information channels of micro-expression video sequences in the time domain and the spatial domain and the natural multivariate processing capability of the random forest classifier to classify micro-expressions by identifying the low-dimensional appearance feature space of the frontal face. Based on the method of the present invention, the recognition rate of facial micro-expressions is greatly improved, and the dependence on the basic database is reduced.
[0053] 2. The present invention introduces an embedded feature selection method based on random forest to select the most distinctive features. Since each tree in the forest is a classifier, for the batch input of micro-expression sequences, random forest can achieve a one-to-one classification design, which effectively solves the problem that the micro-expression feature scale is small and the objects are numerous and difficult to track and extract.
[0054] 3. The present invention divides the micro-expression sequence object to be tested into spatial domain and temporal domain. The spatial domain dimension is composed of RGB single frames, which only serve as spatial information carriers, while the temporal dimension is composed of optical flow images to depict the motion trajectory of the object to be tested. Since it essentially plays the effect of deep dimensionality reduction, this segmentation method greatly reduces the dependence on the training sample set and shields the obstacles to field research caused by insufficient standard sample sets. At the same time, through the unbalanced classification characteristics of random forests, the errors caused by uneven classification samples are balanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a main framework flow chart of the micro-expression detection method of the spatiotemporal information fusion random forest provided by the present invention.
[0056] Figure 2 This is a visualization statistical graph of micro-expression classification, labeling and classification probability performed using the method of the present invention. DETAILED DESCRIPTION
[0057] The technical solution provided by the present invention will be described in detail below in conjunction with specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that here.
[0058] The accompanying drawings are only used for illustrative purposes and are illustrations or examples of the present invention. They cannot be used to limit the scope of protection of the present invention. In order to highlight the key points of the invention, relevant parts of the accompanying drawings have been deleted, and the example drawings do not represent the actual complete dimensions of the products. For researchers and technicians in this field, deletions in the accompanying drawings based on common knowledge in the industry are acceptable by default.
[0059] The micro-expression detection method of the present invention using spatiotemporal information fusion random forest has the following main framework process: Figure 1 As shown, the following steps are included:
[0060] S1: Complete input video sequence preprocessing through face tracking detection, including the following sub-steps:
[0061] S11: Segment the micro-expression database in the spatial domain and temporal domain; then perform face tracking detection, locate the face in the spatial domain through the FAC interface, perform face registration through the Dlib tool (a deep learning open source tool), and perform ROI (region of interest) cropping on the image frame sequence. At the same time, perform noise reduction processing to eliminate irrelevant information and pave the way for feature extraction.
[0062] S12: Normalize all image frame sequences and standardize the time scale of the time domain interval using the time domain interpolation model TIM. After normalization and standardization, all image frame sequences are integrated and used as input for training the network. By normalizing the time length of the image frame sequence and performing optical flow calculation, the optical flow sequence of micro-expressions is obtained, which is used as the secondary input of the network.
[0063] S13: Improve the noise robustness through TVL optical flow calculation, effectively blocking the motion coding disorder caused by optical flow jitter. The optical flow is represented by horizontal and vertical components, and the optical flow vector is represented as: K = [m, n] T , m and n are the horizontal and vertical optical flow components respectively, dv and dw represent the pixel gradient along the horizontal and vertical dimensions, and dt is the span of the time domain length.
[0064] S2: Use feature space to represent the entire video sequence, represented by a unified local binary pattern represented by a two-dimensional sub-region represented as a pyramid hierarchy. The pyramid hierarchy mentioned here refers to the spatial pyramid pooling layer, which is used to obtain a hierarchical representation of an image at one time step. It solves the problem that the input image size of the convolutional neural network must be fixed, so that the input image aspect ratio and size can be arbitrary. It includes the following sub-steps:
[0065] S21: Decompose each video sequence into sub-regions and decompose them into different sizes according to the pyramid level. Introduce a pyramid representation of a three-dimensional pixel matrix with video sequence frames as symbols, wherein the index level of the pyramid indication is included in the spatial vector.
[0066] S22: Reduce the dimensionality of the three-dimensional matrix to a two-dimensional image through a two-dimensional sub-region representation method, extract the first row of each frame and label it with a two-dimensional label, and then use this as a standard to perform two-dimensional processing on subsequent video frames.
[0067] S23: Calculate the LBP (Local Binary Pattern) feature value of each two-dimensional sub-region of each two-dimensional image, and set the unit jump value and jump radius unit value of each domain pixel during the calculation process. In this example, the unit jump value is 8 pixels, and the jump radius unit value is set to 1. Both are empirical values and can be modified as needed. And it is necessary to synchronize the horizontal final endpoint X and the vertical final endpoint Y, the expression is as well as Height and Length represent the height and width of the video sequence frame respectively, and Radius represents the jump radius.
[0068] S24: Establish a connection between the LBP histograms of the two-dimensional sub-regions at each level, and determine the priority of the LBP feature space size according to the pyramid level.
[0069] S3: An improved enhancement method is used to fuse the spatiotemporal information as the random forest source object, which specifically includes the following sub-steps:
[0070] S31: Object parameter initialization and parameter definition, where S: improved and enhanced source object; S : Airspace object information; I T : Time domain object information; H S1 :One-time fusion processing of spatial domain objects; H S2 : Secondary fusion processing of spatial objects; H T1 :One-time fusion processing of time domain objects; H T2 : Secondary fusion processing of time domain objects; M f: fused micro-expression information frame; f: micro-expression information frame; once fused micro-expression information frame M fS1 、M fT1 ; Secondary fusion micro-expression information frame M fS2 、M fT2 Etc. Among them, T1, T2, S1, and S2 are the first and second processing objects in the time domain and space domain, respectively.
[0071] S=I S ∪I T
[0072] H S1 ={M fS1 ,fS1}
[0073] H S2 ={M fS2 ,fS2}
[0074] H T1 ={M fT1 ,fT1}
[0075] H T2 ={M fT2 ,fT2}
[0076] S32: Fusing the spatiotemporal information in an improved enhanced manner as a random forest source object, performing a primary fusion process and a secondary fusion process on the spatiotemporal object and the spatiotemporal object, and if the intersection vector of the spatiotemporal information in the specified frame is greater than the frame vector itself, performing enhanced fusion processing on the processing result. Specifically:
[0077] When I S ∧I T >I i When i ≥ 0, the intersection vector of the time domain and spatial domain information in the specified frame is greater than the frame vector I specified in the i-th frame. i When the frame vector itself is not 0, the spatiotemporal object of the i-th frame information is subjected to a fusion process of primary information extraction and secondary information extraction mean value through the following formula:
[0078] Mixfi=(fi1+fi2) / 2
[0079] When |fi-fi1|>|fi-fi2|, that is, if the absolute value of the difference between the fusion processing result of the i-th frame information and its first extracted information is greater than the absolute value of the difference between its second extracted information, the fusion processing and enhanced fusion processing are performed by the following formula:
[0080] Handle(H S1 ,H S2 )
[0081] Handle(HT1 ,H T2 )
[0082]
[0083] Among them, the fusion processing and enhanced fusion processing are defined as follows:
[0084]
[0085] S4: Use the embedded feature selection method based on random forest to select the most discriminative features, which includes the following sub-steps:
[0086] S41: Generate a classification forest through a binary tree method, set the corresponding feature matrix of the embedded object, and randomly select different numbers of features from each separated node to create tree nodes.
[0087] S42: The spatiotemporal information obtained in S32 and fused based on the improved enhancement method is used as the source input object of the classification forest established in S41, and the importance weight is calculated for each feature, and the prediction error of the corresponding feature matrix is assumed for each tree. At the same time, the first row of the feature matrix is randomly sequenced, assuming that the prediction error will reappear in the modified feature matrix. The sequence change operation is repeated in the binary tree classification process until all feature rows are processed one by one, and the embedded feature sequence of the random forest is formed according to the obtained importance weights.
[0088] S43: Select the associated discriminant features generated by the optimal random forest classifier. First, define a binary classification tree that associates the following features: features with the primary highest importance weights, and features with secondary high weights. The primary weighted features are associated with the secondary weighted features, which are then connected to the tertiary weighted features, and so on. Thus, a random forest classifier is established and generated for each feature associated with the training video sequence. The best associated maximum accuracy and minimum accuracy features are used, and this association represents the selection of sequences and nodes.
[0089] S5: Construct a micro-expression classifier based on the random forest algorithm based on spatiotemporal information fusion, which specifically includes the following sub-steps:
[0090] S51: A random forest classifier is established by using a standard random forest algorithm. The index leaf nodes of each training video sequence tree in the forest are accurately calculated, thereby obtaining a leaf node matrix.
[0091] S52: for the test video sequence, calculate the index leaf node of each tree in the forest, thereby obtaining a forest node vector group to be tested.
[0092] S53: Calculate the approximate measurement value (deviation value) between the video sequence to be tested and the standard training video sequence. Use the Kronecker delta function equation to define the approximate measurement deviation value between the video sequence to be tested and the training video sequence, and use the deviation value as the number of leaf nodes shared by the prediction training video sequence and the test video sequence classification.
[0093] S54: Predicting the classification of the test video sequence based on the vector approximate measurement value, if the corresponding approximate measurement value is close to the maximum value obtained by the vector calculation, then a test video sequence can be considered to be similar to the training video sequence. The test video sequence category is just one of the facial expression sets, represented by the vector class with the largest weight, and the test video sequence can be regarded as the classification with the largest weight. If a facial expression with the largest weight is found in the process, it can be regarded as randomly generated. The facial expression weight is used instead of the number of facial expressions to avoid the impact caused by the imbalance between different facial expression classifications.
[0094] Figure 2 A micro-expression analysis tool developed for a micro-expression detection method based on spatiotemporal information fusion random forest (the tool includes a preprocessing module, a feature extraction module, an enhanced fusion module, a random forest selection module, and a classification module, which are respectively used to implement the functions of the above steps S1-S5), which classifies and annotates micro-expressions after locating the face frame, detecting micro-expressions, spatiotemporal domain segmentation, and random forest classification, and performs visual statistics on the classification probability. This application example is only used to clarify the key points of the solution and demonstrate the effect of the solution, and should not be used to limit the scope of protection of the present invention.
[0095] It should be noted that the above content only illustrates the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.
Claims
1. A micro-expression detection method based on spatiotemporal information fusion random forest, characterized in that: The following steps are involved: S1: Complete input video sequence preprocessing through face tracking and detection; S2: Use feature space to represent the entire video sequence, represented by uniform local binary patterns represented by 2D sub-regions presented as a pyramidal hierarchy; S3: Using an improved enhancement method to fuse spatiotemporal information as a random forest source object; specifically, it includes the following sub-steps: S31: Object parameter initialization and parameter definition, where S: improved and enhanced source object; S : Airspace object information; I T : Time domain object information; H S1 :One-time fusion processing of spatial domain objects; H S2 : Secondary fusion processing of spatial objects; H T1 :One-time fusion processing of time domain objects; H T2 : Secondary fusion processing of time domain objects; M f : fused micro-expression information frame; f: micro-expression information frame; one-time fusion micro-expression information frame M fS1 、M fT1 ; Secondary fusion micro-expression information frame M fS2 、M fT2 ; S=I S ∪I T H S1 ={M fS1 ,fS1} H S2 ={M fS2 ,fS2} H T1 ={M fT1 ,fT1} H T2 ={M fT2 ,fT2} S32: fusing the spatiotemporal information in an improved enhanced manner as a random forest source object, performing a primary fusion process and a secondary fusion process on the spatiotemporal object and the spatiotemporal object, and performing an enhanced fusion process on the processing result if the intersection vector of the spatiotemporal information in the specified frame is greater than the frame vector itself, specifically including: When the intersection vector of the temporal and spatial information in the specified frame is greater than the frame vector I specified in the i-th frame i When the frame vector itself is not 0, the spatiotemporal object of the i-th frame information is subjected to a fusion process of primary information extraction and secondary information extraction mean value through the following formula: Mix fi=(fi1+fi2) / 2 When the absolute value of the difference between the fusion processing result of the i-th frame information and its first extracted information is greater than the absolute value of the difference between its second extracted information, the fusion processing and enhanced fusion processing are performed using the following formula: Handle(H S1 ,H S2 ) Handle(H T1 ,H T2 ) Among them, the fusion processing and enhanced fusion processing are defined as follows: S4: Use an embedded feature selection method based on random forest to select the most discriminative features; S5: Construct a micro-expression classifier based on the random forest algorithm based on spatiotemporal information fusion.
2. The micro-expression detection method of spatiotemporal information fusion random forest according to claim 1 is characterized in that: The step S1 includes the following sub-steps: S11: Segment the micro-expression database into spatial and temporal domains; then perform face tracking detection, locate the face in the spatial domain through the FAC interface, perform face registration through the Dlib tool, and perform ROI cropping on the image frame sequence; perform noise reduction processing at the same time; S12: normalize all image frame sequences, and use the time domain interpolation model TIM to standardize the time scale of the time domain interval; after normalization and standardization, integrate all image frame sequences and use them as input for training network; S13: Perform TVL optical flow calculation to obtain the optical flow sequence of micro-expressions as the secondary input of the network; represent the horizontal and vertical components of the optical flow, and the optical flow vector representation is: K = [m, n] T , Where m and n are the horizontal and vertical optical flow components respectively, dv and dw represent the pixel gradient along the horizontal and vertical dimensions, and dt is the span of the time domain length.
3. The micro-expression detection method of spatiotemporal information fusion random forest according to claim 1 is characterized in that: The step S2 includes the following sub-steps: S21: decomposing each video sequence into sub-regions and decomposing them into different sizes according to the pyramid level; introducing a pyramid representation of a three-dimensional pixel matrix with video sequence frames as symbols, wherein the index level of the pyramid indication is included in the spatial vector; S22: reducing the dimensionality of the three-dimensional matrix to a two-dimensional image by a two-dimensional sub-region representation method, extracting the first row of each frame and labeling it with a two-dimensional label, and then using this as a standard to perform two-dimensional processing on subsequent video frames; S23: Calculate the LBP feature value of the two-dimensional sub-region of each two-dimensional image, and synchronize the horizontal final endpoint X and the vertical final endpoint Y. The expression is: as well as Among them, Height and Length represent the height and width of the video sequence frame respectively; S24: Establish a connection between the two-dimensional sub-region LBP histograms of each level, and determine the priority of the LBP feature space size according to the pyramid level.
4. The micro-expression detection method of spatiotemporal information fusion random forest according to claim 3 is characterized in that: In the step S23, the unit jump value and the jump radius unit value of each domain pixel are set in the process of calculating the LBP feature value of the two-dimensional sub-region of each two-dimensional image.
5. The micro-expression detection method of spatiotemporal information fusion random forest according to claim 1, characterized in that: The step S4 includes the following sub-steps: S41: Generate a classification forest by binary tree method, set the feature matrix corresponding to the embedded object, and randomly select different numbers of features from each separated node to create tree nodes; S42: using the spatiotemporal information obtained in S32 and fused based on the improved enhancement method as the source input object of the classification forest established in S41, and calculating the importance weight for each feature, assuming the prediction error of the corresponding feature matrix for each tree; at the same time, performing a random sequence change on the first row of the feature matrix, assuming that the prediction error will reappear in the modified feature matrix; the sequence change operation is repeated in the binary tree classification process until all feature rows are processed one by one, and the embedded feature sequence of the random forest is formed according to the obtained importance weights; S43: Select the associated discriminant features generated by the optimal random forest classifier; first define a binary classification tree, which is associated with the following features: features with primary highest importance weights, and features with secondary high weights; the primary weight features are associated with the secondary weight features, and then connected with the third-level weight features, and so on; A random forest classifier is thus built and generated for each training video sequence associated with the features; the best associated maximum accuracy and minimum accuracy features are used, and this association represents the selection of sequences and nodes.
6. The micro-expression detection method of spatiotemporal information fusion random forest according to claim 1, characterized in that: The step S5 comprises the following sub-steps: S51: Establish a random forest classifier through a standard random forest algorithm, accurately calculate the index leaf node of each training video sequence tree in the forest, and thus obtain a leaf node matrix; S52: for the test video sequence, calculate the index leaf node of each tree in the forest, thereby obtaining a forest node vector group to be tested; S53: Calculate an approximate measurement deviation value between the video sequence to be tested and the standard training video sequence, and use the deviation value as the number of leaf nodes shared by the classification of the predicted training video sequence and the test video sequence; S54: predicting the classification of the test video sequence based on the vector approximate measurement value, if the corresponding approximate measurement value is close to the maximum value calculated by the vector, then a test video sequence is considered to be similar to the training video sequence; The test video sequence is taken as the classification with the maximum weight; If a facial expression with the largest weight is found during the process, it is considered to be randomly generated; the facial expression weight is used instead of the number of facial expressions.
7. The micro-expression detection method of spatiotemporal information fusion random forest according to claim 6, characterized in that: In step S53, the Kronecker delta function equation is used to define the approximate measurement deviation value between the video sequence to be tested and the training video sequence.
Citation Information
Patent Citations
Micro-expression recognition method based on peak frame and depth forest
CN110852271A
Multi-layer random forest-based part recognition method and system
WO2021022970A1
