# Real-Time Analysis of Facial Expressions for Mood Estimation
## 3 Vision-Based Mood Estimation
### Identification of the Activation of Action Units
\[\textbf{p}(FPi)=\frac{1}{\sqrt{2\pi\sigma_{i}^{2}}}\cdot\exp-\frac{(FPi-\mu_{i} )^{2}}{2\sigma_{i}^{2}}. \tag{3}\]  
Note that the parameter FP1 (Inner eyes distance) is used to scale the distances in order to avoid that user motions alter the learned parameters. Once scaled, we use the rules defined in Table 3 to recognize the AUs. To evaluate the proposed AUs detection in video sequences, we used the MMI database. MMI is a continuously developing online searchable database dedicated to the recognition of AUs and basic emotions from video sequences [32]. MMI contains video sequences annotated according to the FACS system. Some example sequences from the data set are shown in Figure 3.  
Unlike other widely used databases, such as the one by [PERSON] ([33,34]) in its extended version, known as CK+, the sequences are complete in terms of the temporal development of facial expression and are presented as video streams at 25 FPS. CK+ sequences, for example, are recorded at 1 FPS and show the development of facial expression from the neutral position to its apex, omitting the subsequent deactivation phase. MMI sequences contain two types of annotation: the list of AUs active at each point during the sequence, and the OAO Annotation (onset-apex-offset). The OAO annotation indicates the list of active AUs at some point during the sequence. The database contains 329 sequences of this type of annotation, from which 252 contain annotations with the AUs studied in this work. However, as we have explained before, our method requires an initial calibration time of 1 s in which all AUs are assumed to be in neutral phase. To ensure compliance with this condition, only sequences with OAO annotation were used, since it is necessary to know the initial time in neutral phase of the sequences. The sequences in which this condition is met were selected, obtaining a set of 65 sequences (6557 frames) on which the validation was performed using the Specificity and Accuracy metrics. The results are  
Figure 3: MMI data set examples. From left to right: happiness, sadness, fear, disgust, surprise, and anger. \begin{table}
\begin{tabular}{c c} \hline \hline
**Action Unit** & **Probabilistic Rule** \\ \hline
**AU1** & \(\textbf{p}(FP3)<0.05\) \& \(\textbf{p}(FP5)<0.05\) \& \(FP5>\mu_{5}\) \\
**AU2** & \(\textbf{p}(FP2)<0.05\) \& \(\textbf{p}(FP4)<0.05\) \& \(FP4>\mu_{4}\) \\
**AU4** & \(\textbf{p}(FP2)<0.05\) \& \(\textbf{p}(FP4)<0.05\) \& \(FP4<\mu_{4}\) \\
**AU5** & \(\textbf{p}(FP6)<0.05\) \& \(\textbf{p}(FP7)<0.05\) \& \(FP7>\mu_{7}\) \\
**AU6** & \(\textbf{p}(FP8)<0.05\) \& \(\textbf{p}(FP6)<0.05\) \& \(\textbf{p}(FP7)<0.05\) \& \(FP7<\mu_{7}\) \\
**AU10** & \(\textbf{p}(FP10)<0.05\) \& \(FP10>\mu_{10}\) \\
**AU12** & \(\textbf{p}(FP8)<0.05\) \& \(FP8>\mu_{8}\) \\
**AU15** & \(\textbf{p}(FP12)<0.05\) \& \(FP12>\mu_{12}\) \\
**AU25** & \(\textbf{p}(FP9)<0.05\) \& \(FP9>\mu_{9}\) \\
**AU26** & \(\textbf{p}(FP11)<0.05\) \& \(FP11>\mu_{11}\) \\
**AU43** & \(\textbf{p}(FP8)<0.05\) \& \(\textbf{p}(FP6)<0.05\) \& \(\textbf{p}(FP7)<0.05\) \& \(FP7<\mu_{7}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Rules for AUs recognition from the facial parameters. presented in Table 4, where the accuracy and specificity values for the detection of each AU are shown. Table 4 shows that high specificity values are obtained for the entire set of AUs, even though the test set is highly unbalanced in favor of the negative samples. This is important for the mood estimation as false positives have a high impact on its detection. The accuracy is also maintained at acceptable values for the entire sample.