Emotion judgment method based on face emotion recognition algorithm model, medium and electronic device

By correcting and refining the facial emotion recognition algorithm model, the problems of excessive frequency and high false recognition rate were solved, resulting in more accurate driver emotion results and improving the effectiveness of emotion intervention.

CN117935229BActive Publication Date: 2026-11-24SUZHOU INST OF ARTIFICIAL INTELLIGENCE SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410086194.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2026-11-24
Estimated Expiration
2044-01-22

AI Technical Summary

Technical Problem

Existing facial emotion recognition algorithms suffer from problems such as excessive frequency of false recognition, high false recognition rate, and results that do not reflect the actual emotions of drivers, resulting in poor emotion intervention effects.

Method used

By correcting and adjusting the emotion recognition results of the algorithm model, noise is filtered out using a fixed threshold screening method or a standard deviation screening method, and smoothing is performed using a sliding time window to output a reasonable comprehensive emotion result that matches the driver's actual emotional state.

Benefits of technology

The frequency of emotion recognition was reduced, false recognition was decreased, and the output results were closer to the driver's actual emotions, thus improving the effectiveness of emotion intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117935229B_ABST
    Figure CN117935229B_ABST
Patent Text Reader

Abstract

This invention relates to methods, media, and electronic devices for emotion judgment. It involves capturing real-time video streams from a camera, identifying image frames, and using an emotion recognition algorithm model to recognize several facial emotions. A series of judgment algorithms then correct and adjust the emotion recognition result sequence, making the emotion sequence smoother. Outliers or noise that differ from the baseline emotion are corrected to the baseline emotion, reducing noise interference and making the result more consistent with the driver's actual emotional state. The judgment algorithm can output a comprehensive result over a period of time, facilitating further analysis of the corrected emotions by a host computer and program, and sending control commands to the vehicle's infotainment system to adjust parameters of ambient lighting, audio, screen panels, and other devices in the cabin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to an emotion judgment method, medium, and electronic device based on a facial emotion recognition algorithm model. Background Technology

[0002] Computer vision technology recognizes that emotion is a crucial factor influencing driver behavior and decision-making. Numerous studies both domestically and internationally have validated the impact of emotion on attention, judgment, and decision-making. Surveys show that human factors account for 90% of all traffic accidents, with over 70% of these caused by drivers. Sudden emotional outbursts in drivers can negatively impact safe driving, increasing the probability of traffic accidents. Drivers in a state of anger are particularly prone to aggressive driving behaviors such as cutting in line or other dangerous maneuvers. Therefore, the rapid and effective identification of emotions affecting safe driving and the appropriate regulation and intervention to maintain driver emotions within a stable range are of paramount importance for improving road traffic safety.

[0003] Currently, most emotion recognition based on facial images focuses solely on the "recognition" of emotions, pursuing higher accuracy, robustness, and recognition speed in the algorithm model. This includes requirements such as the ability to detect each frame of a 25-frame-per-second video stream or achieving high accuracy on a given test set. However, it often overlooks the perspective of "intervention" in emotion recognition. What kind of results does emotion recognition need? For example, is it truly necessary to intervene with the driver based on the emotion recognition results of each frame? If the video stream is detected at 25 frames per second, an emotion result will be generated every 0.04 seconds, meaning 25 emotion results will be generated per second. If these 25 emotion results are identical, assuming they are all neutral, the higher-level emotion intervention program is relatively easy to handle. However, if among the 25 emotion results generated in one second, 10 are happy, 10 are neutral, and 5 are sad, how should the higher-level emotion intervention program handle this? How can we further control the ambient lighting, audio, screen panels, and other devices in the smart cockpit to regulate the driver's emotions? Therefore, it is necessary to start from the perspective of emotional "intervention" and set a reasonable frequency for outputting emotion recognition results.

[0004] Secondly, most existing research uses publicly available datasets such as CK+, FER 2013, and EMO-DB to train emotion recognition algorithms. However, the facial expressions in these datasets are generally exaggerated, and the faces are predominantly of non-Asian ethnicities. In actual testing, this often leads to misidentification of faces belonging to Chinese people. For example, under human subjective judgment, a driver might be expressing a neutral expression, but the algorithm might output "Sad" or "Disgusted." This is because the model selects the emotion category with the highest confidence as the emotion result for the current frame, while in reality, the confidence levels of the seven emotions may be relatively similar, none exceeding 50%, with no single emotion being the most significant. Therefore, it is necessary to appropriately correct the facial emotion recognition results based on a reasonable output frequency to reflect actual results.

[0005] More importantly, real-world testing with different drivers revealed that different emotions occupy varying proportions of time on facial expressions. During driving, the vast majority of the time is spent in a neutral state; the combined time of the remaining six emotions is less than the time spent in a single neutral state. Therefore, it is necessary to further process the algorithm model's output from an intervention perspective to better reflect real-world conditions and provide more reasonable results for interventions such as sound, light, and smell in the smart cockpit. Summary of the Invention

[0006] The technical problem this invention aims to solve is to design an emotion judgment method, medium, and electronic device based on a facial emotion recognition algorithm model. The algorithm model runs on hardware with computing power, and by pulling real-time video streams from a camera, it identifies image frames, such as Angry, Disgusted, Fear, Happy, Neutral, Sad, and Surprised. Then, the algorithm corrects and adjusts the emotion recognition result sequence of the algorithm model to better reflect the driver's actual emotional state, outputting results suitable for further emotion intervention by a host computer, thus solving existing technical problems.

[0007] To address the aforementioned technical problems, the emotion judgment method of this invention is based on a facial emotion recognition algorithm model. This model outputs an emotion recognition result for each input image frame. The emotion recognition results output by the algorithm model from the frame sequence are also a sequence, called the confidence sequence. The confidence sequence is composed of confidence vectors from different frames, denoted as...

[0008] When there is no face in the image frame or the algorithm model fails to recognize a face.

[0009] When the algorithm model recognizes a face

[0010] Specifically, the steps include the following:

[0011] Step S1: Calculate the original emotion recognition result sequence f n This represents the nth frame of the video stream. The corresponding emotion is assigned to

[0012] Step S2: Process the raw emotion recognition results Filtering is performed to obtain the emotion sequence.

[0013] Step S3: Process the filtered emotion sequence Smoothing is performed to obtain the emotion sequence.

[0014] Step S4: Output the final emotion result according to the output frequency F.

[0015] Furthermore, in step S2, a fixed threshold filtering method is used for filtering. Specifically, the threshold for the emotion filter is δ. Emotion (δ Angry δ Disgusted δ Fear δ Happy δ Neutral δ sad δ surprised ), δ Angry δ represents the threshold of the Angry emotion filter. Disgusted δ represents the threshold of the Disgusted emotion filter. Fear δHa represents the threshold of the Fear filter. ppy The threshold value δ represents the happy mood filter. Neutral δ represents the threshold of the Neutral sentiment filter. sad δ represents the threshold of the Sad emotion filter. Surprised This represents the threshold of the Surprised emotion filter, where δ represents the filter threshold for the seven emotions. Angry δ Disgusted δ Fear δ Happy δ Neutral δ Sad and δ surprised Set to specific values, namely TH Angry THDisgusted TH Fear TH Happy TH Neutral TH Sad and TH Surprised Let the current frame be f. n ;

[0016] if Then use none as

[0017] if f from the original emotional sequence n The confidence level corresponding to the emotional outcome, i.e., in the confidence level sequence With respect to the threshold δ of this emotion Emotion Comparison:

[0018] like Greater than or equal to the threshold δ of this emotion Emotion Then assign the emotion to

[0019] like Less than the threshold δ of this emotion Emotion Then assign Neutral to

[0020] Furthermore, the filter threshold δ Angry δ Disgusted δ Fear δ Happy δ Neutral δ Sad and δ Surprised The value range is [0.45, 0.55].

[0021] Furthermore, in step S2, the standard deviation screening method can also be used for filtering. The specific method is as follows: let the threshold of the emotion filter be δ. Emotion The standard deviation of each sentiment confidence level is calculated as STDEV;

[0022] if Then use none as

[0023] if Then calculate f in the original emotion sequence n The standard deviation of the confidence level (STDEV) for each emotion outcome, and the filter threshold (δ) Emotion Comparison:

[0024] If STDEV is greater than or equal to the threshold δ Emotion Then the The corresponding emotion is assigned to

[0025] If STDEV is less than the threshold δ Emotion Then assign Neutral to

[0026] Furthermore, the emotion filter threshold δ Emotion The value range is [0.155, 0.165].

[0027] Furthermore, step S3 specifically includes the following steps:

[0028] Add a baseline sentiment sequence Indicates the current frame f n The baseline sentiment is defined by the sliding time window denoted as TimeWindow. The baseline sentiment is the sentiment that appears most frequently within the TimeWindow seconds preceding the current time t.

[0029] if Then use none as

[0030] if Then The current frame f in the sequence n Pushing back the TimeWindow seconds to create a sliding time window, the most frequently occurring emotion within that window is used as the current frame f. n baseline sentiment Will Compared with baseline sentiment Compare:

[0031] like Compared with baseline sentiment If they are the same, then the baseline sentiment will be... As a result of the smoothed emotional sequence, it is about to Assign to

[0032] like Compared with baseline sentiment If they are not the same, then a judgment is required. Has the sentiment been consistent with the baseline sentiment for several consecutive frames? Different, the number of consecutive different frames exceeds the smoothing threshold δ smoothing ,and if For several consecutive frames, it has been consistent with the baseline sentiment. Different, the number of consecutive different frames exceeds the smoothing threshold δ smoothing ,and Then As the result of the smoothed emotional sequence, it is about to Assign to Otherwise, the baseline sentiment will be... As the result of the smoothed emotional sequence, it is about to Assign to

[0033] Furthermore, the threshold δ is smoothed. smoothing The range of values ​​is f represents the source video frame rate.

[0034] Furthermore, in step S4,

[0035] if The first frame of the statistically smoothed emotion sequence Up to the nth frame The most frequently occurring emotion is assigned a value.

[0036] if Then, in the statistically smoothed sentiment sequence arrive The most frequently occurring emotion is assigned a value.

[0037] When n is an integer multiple of F*f, output As the final emotional outcome;

[0038] This represents the emotional sequence generated by statistical processing of the smoothed emotional sequence, where F is the output frequency of the final emotional result and f is the frame rate of the source video.

[0039] The present invention also provides a computer-readable storage medium storing computer-executable instructions thereon, which, when executed by a processor, implement the aforementioned emotion judgment method based on a facial emotion recognition algorithm model.

[0040] The present invention also provides an electronic device, comprising:

[0041] At least one processor; and

[0042] At least one memory communicatively connected to the processor;

[0043] The memory stores instructions that can be executed by a processor, which are then executed by the processor to cause the electronic device to perform the aforementioned emotion judgment method based on a facial emotion recognition algorithm model.

[0044] This invention provides a specific processing method for the output results of the driver's face image algorithm model:

[0045] First, an emotion recognition algorithm model is trained based on deep learning algorithms such as YOLO, R-CNN, and ResNet to recognize several facial emotions, such as Angry, Disgusted, Fear, Happy, Neutral, Sad, and Surprised.

[0046] Secondly, the algorithm model is run on hardware devices with computing power, and image frames are identified by pulling real-time video streams from the camera.

[0047] Furthermore, by adding a series of judgment algorithms, the emotion recognition result sequence of the algorithm model is corrected and adjusted to better reflect the actual emotional state of the driver, and output results suitable for further emotional intervention by the host computer.

[0048] Finally, the host computer and program further analyze the corrected emotions and send control commands to the vehicle system to adjust the parameters of the ambient lighting, audio system, screen panel and other equipment in the cabin.

[0049] The beneficial effects of this invention are:

[0050] (1) It can output a comprehensive emotion result over a period of time. From the perspective of emotion "intervention", it is not necessary to have the emotion recognition result of each frame. The frequency of the emotion recognition result of each frame is too high, which is not meaningful for actual emotion intervention methods. The judgment algorithm of this invention can output a comprehensive result over a period of time, which is convenient for the host computer and program to further analyze the corrected emotion and send control commands to the vehicle system to adjust the parameters of the ambient lights, audio, screen panel and other devices in the cabin.

[0051] (2) To make the emotional sequence results smoother, correct outliers or noise that differ from the baseline emotion to the baseline emotion, and reduce the interference of noise;

[0052] (3) Since different emotions have different time proportions on a person's face, and the driver is in a neutral state for most of the time during driving, the present invention can make the result of the emotion sequence closer to the driver's actual emotions. Attached Figure Description

[0053] The specific embodiments of the present invention will be further explained below with reference to the accompanying drawings.

[0054] Figure 1 This is a flowchart of the emotion judgment method based on the facial emotion recognition algorithm model of the present invention.

[0055] Figure 2This is a flowchart of the fixed threshold filtering method used in Example 1 to filter the original emotion recognition results.

[0056] Figure 3 This is a flowchart of the standard deviation screening method used in Example 2 to filter the original emotion recognition results.

[0057] Figure 4 This is a flowchart illustrating the smoothing process performed on the filtered emotion sequence in the emotion judgment method of the present invention.

[0058] Figure 5 This is a flowchart illustrating the output of the final emotion result in the emotion judgment method of the present invention. Detailed Implementation

[0059] Example 1

[0060] The emotion judgment method in this embodiment is based on a facial emotion recognition algorithm model. Based on facial emotion recognition algorithms such as YOLO, R-CNN, and ResNet, it outputs an emotion recognition result for each input image frame. This result is a confidence vector. For example, if the recognition result for the first image frame is:

[0061] The confidence level for the Angry emotion in frame 1 is 0.6130.

[0062] The emotion recognition result output by the algorithm model from the frame sequence is also a sequence, called the confidence sequence. The confidence sequence is composed of confidence vectors from different frames, denoted as...

[0063] When there is no face in the image frame or the algorithm model fails to recognize a face.

[0064] When the algorithm model recognizes a face like Let P represent the confidence level of the Angry emotion in frame n. Angry .

[0065] In this embodiment, the source video frame rate of the surveillance camera is denoted as f. The f of the source video is typically 25 frames per second or 30 frames per second. The source video frame sequence is denoted as f. n The starting frame is f1, representing the first frame of the video stream, and so on. n This represents the nth frame of the video stream.

[0066] Assuming the algorithm model performs frame-by-frame detection, the original emotion recognition result (without any judgment processing) is a sequence identical to the frame sequence, with each frame corresponding to a recognition result, i.e., a set of emotion confidence scores. In this invention, the original emotion recognition result sequence is denoted as... This represents the recognition result of the nth frame of the video stream.

[0067] like Figure 1 As shown, the emotion judgment method based on the facial emotion recognition algorithm model in this embodiment specifically includes the following steps:

[0068] Step S1: Calculate the original emotion recognition result sequence f n This represents the nth frame of the video stream. The corresponding emotion, assigned a value

[0069] Step S2: Process the raw emotion recognition results Filtering is performed to obtain the emotion sequence.

[0070] In this embodiment, a fixed threshold filtering method is used for filtering, such as... Figure 2 As shown, the specific method is as follows: Let the threshold of the emotion filter be δ. Emotion (δ Angry δ Disgusted δ Fear δ Happy δ Neutral δ Sad δ Surprised ), δ Angry δ represents the threshold of the Angry emotion filter. Disgusted δ represents the threshold of the Disgusted emotion filter. Fear δ represents the threshold of the Fear filter. Happy The threshold value δ represents the happy mood filter. Neutral δ represents the threshold of the Neutral sentiment filter. sad δ represents the threshold of the Sad emotion filter. Surprised表 The thresholds for the Surprised emotion filter are shown, with the filter thresholds for 7 emotions being δAngry, δ... Disgusted δ Fear δ Happy δ Neutral δ Sad and δ Surprised Set to specific values, namely TH Angry TH Disgusted TH Fear TH Happy TH Neutral TH Sad and TH Surprised Filter threshold δ Angry δ Disgusted δFear δ Happy δ Neutral δ Sad and δ Surprised The values ​​range for all values ​​are [0.45, 0.55]. In this embodiment, the filter threshold is preferably set to 0.50; let the current frame be f. n ;

[0071] if Then use none as

[0072] if f from the original emotional sequence n The confidence level corresponding to the emotional outcome, i.e., in the confidence level sequence With respect to the threshold δ of this emotion Emotion Comparison:

[0073] like Greater than or equal to the threshold δ of this emotion Emotion Then assign the emotion to

[0074] like Less than the threshold δ of this emotion Emotion Then assign Neutral to

[0075] Step S3: Process the filtered emotion sequence Smoothing is performed to obtain the emotion sequence. like Figure 4 As shown, the specific steps include the following:

[0076] Add a baseline sentiment sequence Indicates the current frame f n The baseline sentiment is defined as the smoothing threshold δ. smoothing This means that when the emotion identified in a frame after adding a filter is inconsistent with the baseline emotion, if it does not appear consecutively, it will be considered an outlier or noise and corrected to the baseline emotion. The sliding time window is denoted as TimeWindow. The baseline emotion is the emotion that appears most frequently within a certain number of seconds prior to the current time t (the size of the sliding time window, i.e., TimeWindow). If the current time is t, then the baseline emotion is the emotion that appears most frequently within the time window [t-TimeWindow, t]. In this embodiment, the sliding time window size is preferably set to 3 seconds, i.e., TimeWindow = 3.

[0077] if Then use none as

[0078] if Then The current frame f in the sequence n Pushing back the TimeWindow seconds to create a sliding time window, the most frequently occurring emotion within that window is used as the current frame f. n baseline sentiment Will Compared with baseline sentiment Compare:

[0079] like Compared with baseline sentiment If they are the same, then the baseline sentiment will be... As a result of the smoothed emotional sequence, it is about to Assign to

[0080] like Compared with baseline sentiment If they are not the same, then a judgment is required. Has the sentiment been consistent with the baseline sentiment for several consecutive frames? Different, the number of consecutive different frames exceeds the smoothing threshold δ smoothing ,and if For several consecutive frames, it has been consistent with the baseline sentiment. Different, the number of consecutive different frames exceeds the smoothing threshold δ smoothing ,and Then As the result of the smoothed emotional sequence, it is about to Assign to Otherwise, the baseline sentiment will be... As the result of the smoothed emotional sequence, it is about to Assign to

[0081] In this embodiment, the smoothing processing threshold δ is preferably used. smoothing The range of values ​​is δ smoothing δ is an integer, where f is the source video frame rate, typically 25 frames per second or 30 frames per second. In this embodiment, f is 25 frames per second, and δ smoothing It is 6.

[0082] In this preferred embodiment, the sliding time window size is TimeWindow, and the current frame f n Pushing back the TimeWindow seconds, it becomes F. n-f*TimeWindow If n ≤ f * TimeWindow, it means the algorithm model has just started, and the startup time is less than the sliding time window size, then the statistics are... to The most frequently occurring emotion is assigned a value.

[0083] In this preferred embodiment, the current frame f n Push forward δ smoothing for If n≤δ smoothing This means that when the algorithm model first starts, the output emotion recognition result is less than δ. smoothing One, then regardless Has it been several consecutive frames (but less than δ)? smoothing All are consistent with the baseline sentiment. Different, still will Assign to

[0084] Step S4: Output the final emotion result according to the output frequency F (per second / result), which indicates the frequency at which the algorithm model outputs the result. For example, if F=1, then 1 result is output per second.

[0085] In this preferred embodiment, such as Figure 5 As shown, in step S4, the current frame is denoted as f. n ;

[0086] if The first frame of the statistically smoothed emotion sequence Up to the nth frame The most frequently occurring emotion is assigned a value.

[0087] if Then, in the statistically smoothed sentiment sequence arrive The most frequently occurring emotion is assigned a value.

[0088] The floor symbol is used for rounding down. Indicates the largest integer not greater than F*f;

[0089] When n is an integer multiple of F*f, output As the final emotional outcome;

[0090] This represents the emotional sequence generated by statistical processing of the smoothed emotional sequence, where F is the output frequency of the final emotional result and f is the source video frame rate. In this embodiment, F = 1 and f = 25.

[0091] Example 2

[0092] The difference between the emotion judgment method based on the facial emotion recognition algorithm model in this embodiment and the emotion judgment method in Embodiment 1 lies in the step S2, which involves processing the original emotion recognition result. The filtering methods are different, but the other technical features are the same.

[0093] In this preferred embodiment, the standard deviation screening method is used for filtering in step S2, such as... Figure 3 As shown, the specific method is as follows: Let the threshold of the emotion filter be δ. Emotion The standard deviation of each sentiment confidence level is calculated as STDEV;

[0094] if Then use none as

[0095] if Then calculate f in the original emotion sequence n The standard deviation of the confidence level (STDEV) for each emotion outcome, and the filter threshold (δ) Emotion Comparison:

[0096] If STDEV is greater than or equal to the threshold δ Emotion Then the The corresponding emotion is assigned to

[0097] If STDEV is less than the threshold δ Emotion Then assign Neutral to

[0098] In this embodiment, the emotion filter threshold δ is preferably set. Emotion The value range is [0.155, 0.165]. In this embodiment, the emotion filter threshold δ Emotion It is 0.160.

[0099] The fixed threshold screening method in Example 1 compares the emotion category with the highest confidence level in the original emotion sequence with the filter threshold for that emotion category before further processing. In contrast, the standard deviation screening method in this example calculates the standard deviation of the confidence level of each emotion in the original emotion sequence, compares it with a standard deviation threshold, and then performs further processing. Both methods have been experimentally verified to be effective. It more closely reflects the actual driving situation and avoids situations where the actual emotion is Neutral, but the algorithm model judges it as Sad for a long time, which is an incorrect emotion.

[0100] Example 3

[0101] The computer-readable storage medium of this embodiment stores computer-executable instructions. When the processor executes the computer-executable instructions, it implements the emotion judgment method based on the facial emotion recognition algorithm model in Embodiment 1 or Embodiment 2.

[0102] Example 4

[0103] The electronic device in this embodiment includes:

[0104] At least one processor; and

[0105] At least one memory communicatively connected to the processor;

[0106] The memory stores instructions that can be executed by a processor, which are then executed by the processor to cause the electronic device to perform the emotion judgment method based on the facial emotion recognition algorithm model in Embodiment 1 or Embodiment 2.

[0107] Many specific details have been set forth in the foregoing description to provide a thorough understanding of the present invention. However, the above description is merely a preferred embodiment of the present invention, and the present invention can be implemented in many other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed above. Furthermore, any person skilled in the art can make many possible variations and modifications to the technical solutions of the present invention, or modify them into equivalent embodiments, using the methods and techniques disclosed above, without departing from the scope of the present invention. Any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention, without departing from the content of the present invention, shall still fall within the protection scope of the present invention.

Claims

1. A method for emotion judgment based on a facial emotion recognition algorithm model, characterized in that: The facial emotion recognition algorithm model outputs an emotion recognition result for each input image frame. The emotion recognition results output by the algorithm model from the frame sequence are called the confidence sequence, denoted as . : When there is no face in the image frame or the algorithm model fails to recognize a face. ; When the algorithm model recognizes a face ; Specifically, the steps include the following: Step S1: Calculate the original emotion recognition result sequence : This represents the nth frame of the video stream. The corresponding emotion is assigned to ; Step S2: Process the raw emotion recognition results Filtering is performed to obtain the emotion sequence. ; Step S3: Process the filtered emotion sequence Smoothing is performed to obtain the emotion sequence. ; Step S4: Output the final emotion result according to the output frequency F; In step S2, a fixed threshold filtering method is used for filtering. Specifically, the threshold for the emotion filter is denoted as... Filter thresholds for 7 emotions Set to a specific value; if Then As ; if , from the original emotional sequence The confidence level corresponding to the emotional outcome, i.e., in the confidence level sequence With respect to the threshold of this emotion Comparison: like Greater than or equal to the threshold of this emotion Then assign the emotion to ; like Less than the threshold of this emotion Then assign Neutral to .

2. The emotion judgment method based on the facial emotion recognition algorithm model according to claim 1, characterized in that: Filter threshold The value range is [0.45, 0.55].

3. The emotion judgment method based on the facial emotion recognition algorithm model according to claim 1, characterized in that: In step S2, the standard deviation screening method is used for filtering. Specifically, the threshold for the emotion filter is set as follows: The standard deviation of each sentiment confidence level is calculated as STDEV; if Then As ; if Then calculate the original emotion sequence. The standard deviation (STDEV) of the confidence level corresponding to each sentiment outcome, and the filter threshold. Comparison: If STDEV is greater than or equal to this threshold Then the The corresponding emotion is assigned to ; If STDEV is less than this threshold Then assign Neutral to .

4. The emotion judgment method based on the facial emotion recognition algorithm model according to claim 3, characterized in that: Emotion Filter Threshold The value range is [0.155, 0.165].

5. The emotion judgment method based on the facial emotion recognition algorithm model according to claim 1, characterized in that: Step S3 specifically includes the following steps: if Then As ; if Then Current frame in the sequence Pushing back the TimeWindow seconds to create a sliding time window, the most frequently occurring emotion within that window is used as the current frame. Baseline sentiment ,Will Compared with baseline sentiment Compare: like Compared with baseline sentiment If they are the same, then the baseline sentiment will be... As a result of the smoothed emotional sequence, it is about to Assign to ; like Compared with baseline sentiment If they are different, then a judgment is needed. Has the sentiment been consistent with the baseline for several consecutive frames? Different, the number of consecutive different frames exceeds the smoothing threshold. ,and ; if For several consecutive frames, it has been consistent with the baseline sentiment. Different, the number of consecutive different frames exceeds the smoothing threshold. ,and Then As the result of the smoothed emotional sequence, it is about to Assign to ; Otherwise, the baseline sentiment will be... As the result of the smoothed emotional sequence, it is about to Assign to .

6. The emotion judgment method based on the facial emotion recognition algorithm model according to claim 5, characterized in that: Smoothing threshold The range of values ​​for is [ , ], The source video frame rate.

7. The emotion judgment method based on the facial emotion recognition algorithm model according to claim 1, characterized in that: In step S4, if Then the first frame of the statistically smoothed emotion sequence Up to the nth frame The most frequently occurring emotion is assigned a value. ; if Then, in the statistically smoothed sentiment sequence arrive The most frequently occurring emotion is assigned a value. ; When n is an integer multiple of F*f, output As the final emotional outcome; This represents the emotional sequence generated after statistical processing of the smoothed emotional sequence, where F is the output frequency of the final emotional result. The source video frame rate.

8. A computer-readable storage medium, characterized in that: It stores computer execution instructions, and when the processor executes the computer execution instructions, it implements the emotion judgment method based on the facial emotion recognition algorithm model as described in any one of claims 1-7.

9. An electronic device, characterized in that: include: At least one processor; as well as At least one memory communicatively connected to the processor; The memory stores instructions that can be executed by a processor, which are executed by the processor to cause the electronic device to perform the emotion judgment method based on the facial emotion recognition algorithm model as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for recognizing facial expressions of children or teenagers in real time

    CN114821742A

  • Expression recognition method and device, storage medium and electronic equipment

    CN116343314A