Andrei Savchenko from the Nizhny Novgorod branch of the Higher School of Economics published the results of his research in the field of machine learning related to emotion recognition in the faces of people present in photographs and videos. The code is written in Python using PyTorch and is distributed under the Apache 2.0 license. Several ready-made models are available, including those suitable for use on mobile devices.
Based on the library, another developer created the sevimon program, which allows tracking changes in emotions using a video camera and helps control facial muscle tension, for example, to eliminate overstrain, indirectly affecting mood, and, with prolonged use, preventing the appearance of facial wrinkles. For face positioning in the video, the CenterFace library is used. The sevimon code is written in Python and is distributed under the AGPLv3 license. Upon the first launch, models are downloaded, after which the program does not require an internet connection and works completely autonomously. Instructions for running on Linux/UNIX and Windows, as well as a Docker image for Linux, have been prepared.
Sevimon works as follows: first, a face is detected in the camera image, then the face is compared with each of eight emotions (anger, contempt, disgust, fear, joy, neutrality, sadness, surprise), after which a similarity score is provided for each emotion. The obtained values are saved in a log in text format for subsequent analysis by the sevistat program. For each emotion, upper and lower value boundaries can be set in the configuration file, and when these boundaries are crossed, a reminder is immediately issued.
Allikas: opennet.ru
