Micro-expression peak automatic detection method, system, device and storage medium
The optical flow vector change curve is constructed through key point detection and optical flow method, combined with smooth filtering and single-peak mode restriction, to achieve accurate automatic detection of micro-expression peak frames, solving the problem that existing methods are susceptible to noise, and improving detection efficiency. Accuracy and efficiency.
Patent Information
- Application Number
- CN202210387781.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-14
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-04-14
AI Technical Summary
Existing micro-expression peak detection methods are susceptible to noise, have high false detection rates, and lack automated detection methods that are robust to noise.
The micro-expression area of interest is constructed through key point detection, the optical flow method is used to calculate the optical flow vector amplitude change curve, smooth filtering is performed, and the single-peak mode limit is used to detect the micro-expression peak frame to remove the influence of background noise.
It improves the accuracy of micro-expression peak detection, overcomes noise interference, improves detection efficiency, and avoids the subjective impact of manual annotation.
Smart Images

Figure CN114519890B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of micro-reaction emotion analysis, and in particular to a method, system, device and storage medium for automatically detecting micro-expression peak values. Background Art
[0002] Micro-expressions are typical micro-reactions to psychological stress, which refer to the weak reactions that quickly leak out on the face when an individual tries to hide his or her true emotions in a high-pressure environment. Since micro-expressions can reveal an individual's true intentions and cognitive processes, they can be used for non-contact and non-perceptual deception detection and emotion analysis, and have a wide range of applications in various fields.
[0003] Micro-expression peak frames are the frames with the most obvious changes and the strongest movements in micro-expression video sequences, and contain the most micro-reaction emotional information. Therefore, accurate detection of peak frames is important for facial micro-reaction emotional analysis. Early micro-expression analysis work mainly relied on manually annotated peak frames, which is often time-consuming and laborious, and the annotated peak frames are subjective, so an automated peak frame detection method is needed.
[0004] Recently, although various peak frame automatic detection algorithms have been proposed, these methods are easily affected by the global background noise and local instantaneous mutation noise of micro-expression movements, and there are cases of false detection and low detection accuracy. Therefore, it is urgent to propose a method that is robust to noise and can accurately and automatically detect micro-expression peaks. Summary of the invention
[0005] The purpose of the present invention is to provide a method, system, device and storage medium for automatic detection of micro-expression peak values, which is a technical solution that is robust to noise and can accurately and automatically detect micro-expression peak values.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A micro-expression peak automatic detection method, comprising:
[0008] Detect key points of micro-expression sequences and construct multiple micro-expression interest regions based on the detected key points;
[0009] The starting frame of the micro-expression sequence is used as a reference frame for micro-expression movement, and the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the micro-expression interest region corresponding to the reference frame is calculated in sequence by the optical flow method. For each micro-expression interest region, the corresponding optical flow vector amplitude is used to construct an optical flow vector amplitude change curve, and a plurality of optical flow vector amplitude change curves are obtained; wherein, the reference region is constructed in combination with the detected key points, and for each frame except the reference frame, the optical flow vector of each micro-expression interest region is respectively subtracted from the average optical flow of the reference region of the corresponding frame, and then the optical flow vector amplitude of the micro-expression interest region corresponding to the reference frame is calculated;
[0010] The multiple optical flow vector amplitude change curves are smoothed and filtered respectively, and then the micro-expression peak frame is detected using the single peak mode restriction.
[0011] A micro-expression peak automatic detection system, the system comprising:
[0012] A key point detection and micro-expression interest region construction unit, used to detect key points of a micro-expression sequence and construct multiple micro-expression interest regions based on the detected key points;
[0013] An optical flow vector amplitude change curve generating unit is used to use the starting frame of the micro-expression sequence as a reference frame for micro-expression movement, and sequentially calculate the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the micro-expression interest region corresponding to the reference frame by an optical flow method, and for each micro-expression interest region, construct an optical flow vector amplitude change curve using the corresponding optical flow vector amplitude alone to obtain a plurality of optical flow vector amplitude change curves; wherein, the reference region is constructed in combination with the detected key points, and for each frame except the reference frame, the optical flow vector of each micro-expression interest region is respectively subtracted from the average optical flow of the reference region of the corresponding frame, and then the optical flow vector amplitude of the micro-expression interest region corresponding to the reference frame is calculated;
[0014] The micro-expression peak frame detection unit is used to perform smoothing filtering on multiple optical flow vector amplitude change curves respectively, and then use the single peak mode to limit the detection of micro-expression peak frames.
[0015] A processing device, comprising: one or more processors; a memory for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0017] A readable storage medium stores a computer program, which implements the above method when the computer program is executed by a processor.
[0018] It can be seen from the technical solution provided by the present invention that it can effectively overcome the influence of local accidental noise with large instantaneous values and global background noise with random patterns, can accurately detect micro-expression peak frames, improve detection efficiency, and avoid the subjective influence of manual labeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0020] Figure 1 A flowchart of a method for automatically detecting micro-expression peak values provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of the construction of a micro-expression interest region and a reference region provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a curve showing changes in the amplitude of optical flow vectors in a micro-expression interest region and a reference region provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram showing the comparison of a single optical flow vector amplitude change curve before and after smoothing filtering provided by an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of finding a maximum single peak mode interval centered on a candidate peak point provided by an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of a micro-expression peak automatic detection system provided by an embodiment of the present invention;
[0026] Figure 7 A schematic diagram of a processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0028] First, the terms that may be used in this article are explained as follows:
[0029] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0030] The following is a detailed description of a micro-expression peak automatic detection method, system, device and storage medium provided by the present invention. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in the field. If no specific conditions are specified in the embodiments of the present invention, the conventional conditions in the field or the conditions recommended by the manufacturer shall be followed.
[0031] Embodiment 1
[0032] The present invention aims to solve the problems that the existing micro-expression emotion analysis relies on manually annotated peak frames, and the existing automated detection methods are easily affected by the global background noise and local instantaneous mutation noise of micro-expression movements, resulting in false detection and low detection accuracy. The present invention proposes an automatic detection method for micro-expression peaks, which is robust to noise and has a higher detection accuracy. Figure 1 As shown, the method mainly includes the following steps:
[0033] Step 1: Detect key points of the micro-expression sequence and construct multiple micro-expression interest regions based on the detected key points.
[0034] Step 2: Using the starting frame of the micro-expression sequence as the reference frame of the micro-expression movement, the optical flow method is used to sequentially calculate the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the corresponding micro-expression interest region in the reference frame. For each micro-expression interest region, the corresponding optical flow vector amplitude is used alone to construct an optical flow vector amplitude change curve, thereby obtaining multiple optical flow vector amplitude change curves.
[0035] Step 3: Smooth and filter the multiple optical flow vector amplitude change curves respectively, and then use the single peak mode to limit the detection of micro-expression peak frames.
[0036] In order to more clearly demonstrate the technical solution and technical effects provided by the present invention, the method provided by the embodiment of the present invention is described in detail with reference to specific embodiments below.
[0037] 1. Construction of micro-expression interest regions.
[0038] Since micro-expressions are a reaction to self-psychological suppression, their emotional change information only occurs in local areas of the face. Statistics show that more than 80% of micro-expressions occur in the three areas of the left and right "eyes + eyebrows" and "mouth". Based on the above theory, the micro-expression interest area is constructed.
[0039] In an embodiment of the present invention, key point detection is performed on each frame in the micro-expression sequence; for each frame, four micro-expression interest regions including a left eyebrow region, a right eyebrow region, a left corner of the mouth region and a right corner of the mouth region are constructed in combination with the detected key points.
[0040] like Figure 2 As shown, the face detector provided by Dlib (a software library) is first used to detect 68 key points of the face, and 14 of them are selected as points of interest (from the perspective of the subject, the 14 points of interest in dlib are numbered as: right eyebrow area: 17, 19, 21, 37; left eyebrow area: 22, 24, 26, 44; right corner of mouth area: 48, 49, 59; left corner of mouth area: 53, 54, 55). Then, the points of interest in each area are connected by line segments to construct micro-expression interest areas. In addition, the present invention accurately defines the interest area of the mouth to the two corners of the mouth, mainly because the corners of the mouth often have a large amplitude in the micro-expression movement of the mouth, which can improve the final annotation effect. It should be noted that the tool used for key point detection here is only an example, and the number of key points detected, the number of key points selected and their numbers are also examples, not limiting; in addition, the subjects are picture examples of users selected in the experiment, which are only used for scientific research tasks and will not involve the issue of face privacy.
[0041] 2. Estimation of micro-expression movement intensity.
[0042] In an embodiment of the present invention, the starting frame of the micro-expression sequence is used as a reference frame for micro-expression movement, and the optical flow method is used to sequentially calculate the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the corresponding micro-expression interest region in the reference frame. For each micro-expression interest region, the corresponding optical flow vector amplitude is used to construct an optical flow vector amplitude change curve, thereby obtaining multiple optical flow vector amplitude change curves.
[0043] In an embodiment of the present invention, the optical flow method is an algorithm that compares two frames of images to obtain the movement of the latter frame compared to the reference frame. The amplitude of the optical flow vector is actually calculated by comparing the two frames. Assume that the reference frame is A, and each subsequent frame is recorded as B1, B2... For a single micro-expression interest area, the optical flow method can be regarded as a function f that compares the two frames, with f(A, B1), f(A, B2)... as the values corresponding to the B1, B2... frames on the change curve.
[0044] Considering that the Farneback optical flow method has the advantage of being faster, the present invention can select this method for micro-expression motion optical flow estimation. If four micro-expression interest regions are constructed as described above, then for each frame, four points can be obtained after averaging, and each point corresponds to a micro-expression interest region; four optical flow vector amplitude change curves can be obtained by combining all frames except the reference frame.
[0045] According to the above method, the optical flow vector amplitude corresponding to each micro-expression interest region in each frame is obtained; for each micro-expression interest region, the corresponding optical flow vector amplitude is expanded on the time axis according to the frame number (the reference frame is the 0th frame), and the optical flow vector amplitude change curve corresponding to each micro-expression interest region is obtained. In each optical flow vector amplitude change curve, the horizontal axis is time, which corresponds to the frame number, and the vertical axis is the optical flow vector amplitude.
[0046] 3. Remove background noise.
[0047] In the embodiment of the present invention, a reference area is constructed in combination with the detected key points, and the average optical flow of the reference area is used to denoise a plurality of optical flow vector amplitude change curves.
[0048] like Figure 2 As shown, the bridge of the nose region can be selected as the reference region (i.e., the rectangular region constructed by key point 29), and the optical flow vector of the reference region is estimated in the same way as the micro-expression region of interest, and the average is taken as the average optical flow of the reference region of the corresponding frame; after the optical flow vector of each micro-expression region of interest is calculated in the previous text, the average optical flow of the bridge of the nose region is subtracted to eliminate some background noise effects, and then the amplitude of the optical flow vector of the micro-expression region of interest corresponding to the reference frame is calculated.
[0049] like Figure 3 As shown, the optical flow vector amplitude change curves corresponding to the four micro-expression interest areas and the optical flow vector amplitude change curve corresponding to the reference area are shown (this curve is only used for display and does not participate in subsequent processing).
[0050] 4. Smoothing filter processing.
[0051] After obtaining the amplitude change curve of the micro-expression interest area through the method introduced above, since the original curve is not smooth enough and contains a lot of noise, directly using it for peak location will find many noise peaks and the accuracy is not high, so the curve needs to be smoothed and filtered.
[0052] In an embodiment of the present invention, each frame in each optical flow vector amplitude change curve is filtered respectively, and the optical flow intensity corresponding to each frame is taken as a point. The optical flow intensity is measured by the corresponding optical flow vector amplitude as an indicator, the sliding window size is set, and the corresponding polynomial fitting equation is established; the optimal fitting polynomial coefficients of the polynomial fitting equation are solved by the least squares method; the points in each sliding window are fitted using the optimal fitting polynomial coefficients to obtain the optical flow intensity after smooth filtering.
[0053] For example, Savitzky-Golay smoothing filter can be selected to smooth the curve. Savitzky-Golay smoothing filter is simple to calculate, has few requirements on the properties of the original data, and provides flexible adjustable parameters, so that the smoothing strength of the curve can be adjusted according to needs. The idea of this smoothing filter algorithm is to solve an optimal polynomial in the sense of least squares for each sampling point, that is, for the optical flow intensity of each frame. The calculation principle is expressed as:
[0054]
[0055] Among them, the optical flow intensity of each frame in each optical flow vector amplitude change curve is measured by the corresponding optical flow vector amplitude as an indicator. t i Indicates t Frame No. i The optical flow intensity, a i is the first polynomial to be solved i Term coefficient, k is the degree of the polynomial, P k ( t ) indicates the t The optical flow intensity of the frame (the optical flow intensity before smoothing filtering). Then use this polynomial to fit to get the smoothed result. The actual calculation takes a sliding window centered on it, and calculates a least square fitting polynomial for the function values of all points in this sliding window, and then uses the value of the fitting polynomial at each point as the result after filtering.
[0056] In the embodiment of the present invention, the time unit is set to the time between two frames of pictures. This part is to fit a function composed of several points (discrete points) with time as the independent variable. Therefore, in order to meet the mathematical definition, the above-mentioned unit time expression is selected. The purpose is to show that the independent variables of two adjacent points are equally spaced and correspond to the actual time interval of two frames. In the embodiment of the present invention, in the optical flow vector amplitude change curve of each micro-expression interest area, the optical flow vector amplitude corresponding to each frame is a point in the optical flow vector amplitude change curve, and the optical flow vector amplitude corresponding to all frames can be regarded as a series of discrete points. The smoothing filtering of this part can be understood as fitting these discrete points by finding a suitable continuous curve. In the smoothing filtering process of the present invention, the optical flow vector amplitude is used as an indicator to measure the optical flow intensity. Therefore, starting from the smoothing filtering part, the corresponding optical flow intensity is used as a point. The principle involved in the process of using the optical flow vector amplitude as an indicator to measure the optical flow intensity and calculating the corresponding optical flow intensity value can refer to conventional technology, and the present invention will not repeat it.
[0057] Based on the above principle, for a single optical flow vector amplitude change curve, t Frame is used as an example to introduce the sliding window size, which is 2n+1, that is, one point is selected for fitting every unit time from t−n to t+n. In order to achieve the smoothing effect, the window size 2n+1 should be larger than the selected polynomial degree. k . Using the optical flow vector amplitude as an indicator to measure the optical flow intensity of each point, then for the t The optical flow intensity of the frame m t The fitting equation can be obtained:
[0058]
[0059] For the other 2n points, we can also get 2n equations, remember:
[0060]
[0061] The overall system of equations can be written as: .
[0062] Since the number of equations is greater than the degree of the polynomial, it is necessary to use the least squares method to solve an optimal fitting polynomial, that is, to solve the optimal polynomial coefficient vector α According to the theory of least squares fitting, the optimal As shown below:
[0063] = (X T X) -1 X T M
[0064] Optimal That is, the optimal polynomial coefficients of , and the first t The optical flow intensity of a frame is expressed as .
[0065] All the optical flow vector amplitude change curves are processed separately according to the above method to complete the smoothing filtering of all the optical flow vector amplitude change curves. Figure 4 As shown, the comparison of a single optical flow vector amplitude change curve before and after smoothing filtering is shown. The optical flow vector amplitude change curve before smoothing filtering fluctuates greatly, and becomes relatively smooth after smoothing filtering, so it is easier to locate the correct micro-expression peak frame.
[0066] 5. Micro-expression peak frame detection.
[0067] In the embodiment of the present invention, the micro-expression peak frame is detected by limiting the single peak mode, and the main steps include:
[0068] 1) For each smoothed filtered optical flow vector amplitude change curve, take each frame of smoothed filtered optical flow intensity as a point, and use the single peak mode restriction method to find all local maximum points to form a set of candidate peak points C , expressed as:
[0069]
[0070] in, t -1. t , t +1 indicates the sequence numbers of three consecutive frames. Represents the intensity of the optical flow after smooth filtering; for the current optical flow vector amplitude change curve after smooth filtering, when the t Optical flow intensity after frame smoothing filtering Greater than or equal to t -1 frame of smoothed filtered optical flow intensity and greater than or equal to t +1 frame of smoothed filtered optical flow intensity When , the point in the tth frame is selected as the candidate peak point; as mentioned before, the optical flow intensity of each frame is measured by the corresponding optical flow vector amplitude as an indicator.
[0071] 2) If Figure 5 As shown, for each candidate peak point, the maximum single-peak mode interval centered at the candidate peak point is expanded symmetrically to both sides.
[0072] Here, the point in the tth frame selected as the candidate peak point is used as the current candidate peak point. When the maximum single peak mode interval centered on the current candidate peak point is searched symmetrically on both sides, the maximum integer And meet the following conditions:
[0073]
[0074] Among them, the symbol Represents the logical AND operation, j Indicates the number of any point in the maximum unimodal mode interval of the current candidate peak point. According to the above definition, the maximum unimodal mode interval width is .
[0075] 3) Introduce interval width limitation to filter the maximum single peak mode interval corresponding to each candidate peak point.
[0076] In order to eliminate the interference of global background noise and local accidental noise mentioned above, the interval width limitation is introduced to filter the candidate peak frames.
[0077] Specific: Introduce interval width restrictions w Filter the maximum single peak mode interval corresponding to each candidate peak point, where the interval width limit w It is expressed as:
[0078] w ≥max{ J , λL}
[0079] in, L is the length of the micro-expression sequence (i.e., the total number of frames), λ is a hyperparameter that can be adjusted (for example, it can be set to 0.007), J For setting thresholds (for example, J =5). It can be seen from the above formula that the present invention can adapt micro-expression videos recorded at different frame rates.
[0080] 4) Comprehensively consider the remaining candidate peak points after filtering in all candidate peak point sets, and select the frame corresponding to the point with the largest optical flow intensity after smoothing filtering as the micro-expression peak frame.
[0081] Taking the four optical flow vector amplitude change curves listed in the previous article as an example, four candidate peak point sets can be obtained through the above step 1), and the four candidate peak point sets are processed separately through the above steps 2~3), and the frame corresponding to the point with the largest optical flow intensity after smoothing filtering is selected from the remaining candidate peak points after filtering the four candidate peak point sets as the micro-expression peak frame through step 4; that is, the above steps 1)~3) are to process each optical flow vector amplitude change curve separately, and step 4) combines the processing results of all optical flow vector amplitude change curves to produce the final result.
[0082] The above scheme can effectively overcome the influence of local accidental noise with large instantaneous values and global background noise with random patterns, accurately detect micro-expression peak frames, improve detection efficiency, and avoid the subjective influence of manual labeling.
[0083] In order to verify the effect of the above technical solution of the present invention, relevant experiments were carried out.
[0084] In the experiment, the detection task on the public datasets CASME II and SAMM is taken as an example, and the evaluation indicator Normalized Mean Absolute Error (NMAE) is selected to measure the detection results. This evaluation indicator measures the accuracy of the annotation by calculating the average error between the normalized annotation value and the true value. The value of this evaluation indicator is in the range of [0,1]. The smaller the value, the more accurate the annotation. The formal definition is shown in the following formula:
[0085]
[0086] in, K is the total number of micro-expression videos, and Respectively represent f The peak predicted value of micro-expressions in a video (i.e., the detection result obtained by the solution provided by the present invention) and the true value, l f It is f The total number of frames of each micro-expression.
[0087] Table 1 shows the experimental results:
[0088] Validation Dataset NMAE CASME II 0.1119 SAMM 0.1343
[0089] Table 1 Experimental results
[0090] As can be seen from Table 1, the accuracy of the detection results of the present invention is high.
[0091] Embodiment 2
[0092] The present invention also provides a micro-expression peak automatic detection system, which is mainly implemented based on the method provided in the above embodiment 1. Figure 6 As shown, the system mainly includes:
[0093] A key point detection and micro-expression interest region construction unit, used to detect key points of a micro-expression sequence and construct multiple micro-expression interest regions based on the detected key points;
[0094] An optical flow vector amplitude change curve generating unit is used to use the starting frame of the micro-expression sequence as a reference frame for micro-expression movement, and sequentially calculate the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the corresponding micro-expression interest region in the reference frame by an optical flow method, and for each micro-expression interest region, construct an optical flow vector amplitude change curve using the corresponding optical flow vector amplitude alone, to obtain a plurality of optical flow vector amplitude change curves;
[0095] The micro-expression peak frame detection unit is used to perform smoothing filtering on multiple optical flow vector amplitude change curves respectively, and then use the single peak mode to limit the detection of micro-expression peak frames.
[0096] Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0097] The main principles of each unit in the system have been introduced in detail in the previous embodiment 1, so they will not be repeated here.
[0098] Embodiment 3
[0099] The present invention also provides a processing device, such as Figure 7 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided in the aforementioned embodiments.
[0100] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.
[0101] In the embodiment of the present invention, the specific types of the memory, input device and output device are not limited; for example:
[0102] The input device may be a touch screen, an image acquisition device, a physical button or a mouse, etc.;
[0103] The output device may be a display terminal;
[0104] The memory may be a random access memory (RAM) or a non-volatile memory such as a disk storage.
[0105] Embodiment 4
[0106] The present invention also provides a readable storage medium storing a computer program, which implements the method provided in the above embodiment when the computer program is executed by a processor.
[0107] In the embodiment of the present invention, the readable storage medium as a computer-readable storage medium can be set in the aforementioned processing device, for example, as a memory in the processing device. In addition, the readable storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk, etc., which can store program codes.
[0108] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for automatically detecting micro-expression peaks, characterized in that: include: Detect key points of micro-expression sequences and construct multiple micro-expression interest regions based on the detected key points; Taking the starting frame of the micro-expression sequence as the reference frame of the micro-expression movement, the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the corresponding micro-expression interest region of the reference frame is calculated in sequence by the optical flow method, and for each micro-expression interest region, the corresponding optical flow vector amplitude is used to construct an optical flow vector amplitude change curve separately, and a plurality of optical flow vector amplitude change curves are obtained; Smoothing and filtering are performed on multiple optical flow vector amplitude change curves respectively, and then the peak frame of micro-expression is detected by using single peak mode restriction; Among them, a reference area is constructed in combination with the detected key points, and for each frame except the reference frame, the optical flow vector of each micro-expression interest area is respectively subtracted from the average optical flow of the reference area of the corresponding frame, and then the amplitude of the optical flow vector of the micro-expression interest area corresponding to the reference frame is calculated; The method of limiting the detection of micro-expression peak frames by using a single peak mode includes: For each smoothed filtered optical flow vector amplitude change curve, the optical flow intensity of each frame after smoothing filtering is taken as a point, and the single peak mode restriction method is used to find all local maximum points to form a candidate peak point set C; wherein, the optical flow intensity of each frame is measured by the corresponding optical flow vector amplitude as an indicator; For each candidate peak point, expand symmetrically to both sides to find the maximum single-peak mode interval centered on the candidate peak point; The interval width limitation is introduced to filter the maximum single peak mode interval corresponding to each candidate peak point; Comprehensively analyze the remaining candidate peak points after filtering in all candidate peak point sets, and select a frame corresponding to the point with the largest optical flow intensity after smoothing filtering as the micro-expression peak frame; Using the method of unimodal mode restriction, all local maximum points are found to form a candidate peak point set C, and for each candidate peak point, the maximum unimodal mode interval centered on the candidate peak point is expanded symmetrically on both sides, including: For each smoothed filtered optical flow vector amplitude change curve, the corresponding candidate peak point set C is expressed as: , where t-1, t, and t+1 represent the sequence numbers of three consecutive frames. Represents the intensity of optical flow after smooth filtering; for the current optical flow vector amplitude change curve after smooth filtering, when the optical flow intensity after smooth filtering of the tth frame Greater than or equal to the optical flow intensity after smoothing filtering of the t-1th frame And the optical flow intensity after smooth filtering is greater than or equal to the t+1th frame When , the point in the tth frame is selected as the candidate peak point; The point in the tth frame selected as the candidate peak point is used as the current candidate peak point, and the maximum single peak mode interval centered on the current candidate peak point is expanded symmetrically to both sides. By finding the maximum integer And meet the following conditions: ; Among them, the symbol represents a logical AND operation, and j represents the number of any point in the maximum single-peak mode interval of the current candidate peak point.
2. The micro-expression peak automatic detection method according to claim 1, characterized in that: The step of detecting key points of the micro-expression sequence and constructing a plurality of micro-expression interest regions in combination with the detected key points includes: Performing key point detection on each frame in the micro-expression sequence; For each frame, four micro-expression interest regions including the left eyebrow region, the right eyebrow region, the left corner of the mouth region and the right corner of the mouth region are constructed in combination with the detected key points.
3. The micro-expression peak automatic detection method according to claim 1, characterized in that: The method of constructing an optical flow vector amplitude change curve for each micro-expression interest region using the corresponding optical flow vector amplitude separately includes: for each micro-expression interest region, using the frame number as the horizontal coordinate and the corresponding optical flow vector amplitude as the vertical coordinate to construct an optical flow vector amplitude change curve corresponding to each micro-expression interest region.
4. The micro-expression peak automatic detection method according to claim 1, characterized in that: The smoothing filtering comprises: Each frame in each optical flow vector amplitude change curve is filtered separately, and the optical flow intensity corresponding to each frame is taken as a point. The optical flow intensity is measured by the corresponding optical flow vector amplitude as an indicator. The sliding window size is set, and the corresponding polynomial fitting equation is established; the optimal fitting polynomial coefficients of the polynomial fitting equation are solved by the least squares method; the points in each sliding window are fitted using the optimal fitting polynomial coefficients to obtain the optical flow intensity after smooth filtering.
5. The micro-expression peak automatic detection method according to claim 1, characterized in that: The introducing of interval width limitation to filter the maximum single peak mode interval corresponding to each candidate peak point includes: The interval width limit w is introduced to filter the maximum single peak mode interval corresponding to each candidate peak point, where the interval width limit w is expressed as: ; Where L is the length of the micro-expression sequence, is a hyperparameter, and J is the set threshold.
6. A micro-expression peak automatic detection system, characterized in that: The method according to any one of claims 1 to 5 is implemented, and the system comprises: A key point detection and micro-expression interest region construction unit, used to detect key points of a micro-expression sequence and construct multiple micro-expression interest regions based on the detected key points; An optical flow vector amplitude change curve generating unit is used to use the starting frame of the micro-expression sequence as a reference frame for micro-expression movement, and sequentially calculate the optical flow vector amplitude of each micro-expression interest region in each of the remaining frames and the micro-expression interest region corresponding to the reference frame by an optical flow method, and for each micro-expression interest region, construct an optical flow vector amplitude change curve using the corresponding optical flow vector amplitude alone to obtain a plurality of optical flow vector amplitude change curves; wherein, the reference region is constructed in combination with the detected key points, and for each frame except the reference frame, the optical flow vector of each micro-expression interest region is respectively subtracted from the average optical flow of the reference region of the corresponding frame, and then the optical flow vector amplitude of the micro-expression interest region corresponding to the reference frame is calculated; The micro-expression peak frame detection unit is used to perform smoothing filtering on multiple optical flow vector amplitude change curves respectively, and then use the single peak mode to limit the detection of micro-expression peak frames.
7. A processing device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
