python+opencv+dlib Realize face detection and expression recognition
one ,dlib Brief introduction :Dlib Contains a wide range of machine learning algorithms . All designs are highly modular , Fast execution , And through a clean and modern C ++
API, It's very simple to use . It is used in a variety of applications , Including robotics , Embedded device , Mobile phones and large high-performance computing environments .
two , Identification rules :

1, The larger the proportion of mouth opening distance to the width of facial recognition frame , It means that the more excited you are , Maybe very happy , Or very surprised .

2, Eyebrows up ,17-21 perhaps 22-26
The smaller the ratio of the number feature point from the top of the face recognition frame to the height of the recognition frame , It means that the more eyebrows rise , Can express surprise , happy . Angle of inclination of eyebrows , When you are happy, your eyebrows usually rise , Frown when angry , At the same time, the eyebrows are pressed down badly .

3, Squint , People will unconsciously narrow their eyes when they laugh , Eyes open when angry or surprised .

System disadvantages : Can't capture subtle expression changes , Can only roughly judge people's emotions , happy , anger , surprised , natural .

System advantages : Simple structure , Easy to use .

application area : Smile capture , Capture the beauty of the moment , Alleviating childhood autism , Interactive game development . Because of the complexity of human feelings , These expressions really can't completely represent the emotional fluctuations in one's heart , To improve the accuracy of judgment , Heart rate detection is required , Comprehensive evaluation of speech processing .

three , Implementation ideas

four , design sketch

Technology