EMOTION RECOGNITION USING A GENERAL-PURPOSE OBJECT DETECTION ALGORITHM

Arvydas Lozys1, Ema Spiliauskaite1, Migle Skystimaite1, Daichi Tsujimoto1, Antanas Zinovicius1, Vytautas Bucinskas1

1 Vilnius Gediminas Technical University, Faculty of Mechanics, Plytines g. 25, 10105 Vilnius, Lithuania

[email protected]

Emotions are complex psychological states that involve subjective feelings, physiological changes, and behavioural responses to stimuli. They are important because they play a crucial role in how we perceive, interpret, and respond to the world around us [1]. Emotions help us to communicate with others, make decisions, and motivate us to take action. It is important to detect emotions for the reason that they can help us understand and respond appropriately to the needs of others. Detecting emotions can also help us regulate our own emotions, which can improve our relationships and overall well-being. Besides, being able to accurately detect emotions is important in many fields, including psychology, counselling, education, and business [1].

Identifying emotions can sometimes be challenging, so there are technologies that help us to understand what people are feeling. It is possible to train artificial intelligence (AI) systems to recognise people's emotions based on facial expressions, text, gesticulations, and verbal expressions. When it detects a certain emotion, the AI can adjust its behaviour to better suit the specific ongoing situation. People are better at recognizing different emotions, but AI has ability to analyse large amounts of data using computer vision and deep learning algorithms and other techniques [2].

The algorithm we chose for our emotion detection project was YOLOv5 (You Only Look Once) by Ultralytics [3]. Even though this AI algorithm is intended to locate instances of objects in images or real-time video feed, meaning that it is not designed to detect and recognize emotions like other machine learning algorithms. Before the model could be trained, we gathered synthetic data, data from an open-source database and our custom data which was then combined to produce a database made up of 1400 images [4]. The dataset was prepared to train a model which could detect and recognize 3 emotions (happy, neutral, sad) given that we have appropriate camera lighting and positioning.

Our trained model can detect and correctly identify an emotion in real-time from a computer camera with an accuracy of 80%. There is a lot of room for improvement since we used a general-purpose object detection algorithm. In the future we intend to build an algorithm that is created specifically for extracting facial features which will help to increase the accuracy and reliability of the model.


[1] M. Garcia-Garcia, "IMPLICATIONS FOR BRAND SUCCESS AUDIENCEXSCIENCE 2020 The Advertising Research Foundation Global Lead of Neuroscience Global Science Organization, Ipsos," 2020.

[2] A. McStay, "Emotional AI, soft biometrics and the surveillance of emotional life: An unusual consensus on privacy," Big Data Soc, vol. 7, no. 1, p. 205395172090438, Jan. 2020, Doi: 10.1177/2053951720904386.

[3] Zhang, Z., Lin, P., Ma, S., & Xu, T. (2022). An Improved Yolov5s Algorithm for Emotion Detection. 2022 5th International Conference on Pattern Recognition and Artificial Intelligence, PRAI 2022, 1002–1006. https://doi.org/10.1109/PRAI55851.2022.9904113

[4] IGOR. (2022). emotions dataset Dataset [Open-Source Dataset]. In Roboflow Universe. Roboflow. https://universe.roboflow.com/igor-dwg3d/emotions-dataset-o