Friday, 21 December 2018

Emotional Attention Regulation for Multi-party Interaction in Cloud Robotics


Abstract


Attention mechanism in humans is very clear and understandable. It can be selective, divided or alternating. Humans pay attention to other humans according to their emotions and desires. Since we considered robots as machine and manmade them for his own ease i.e. in industry. Keep in mind the increase involvement of robots in our life, our project focuses on towards the generation of emotional attention in robots. We analyzed the attention mechanism of humans due to emotions and replicate this mechanism to robots i.e. robot will be able to pay attention to its near environment and to human according to emotions. Methodology we used for it i.e. firstly there is live camera feed through which we are detecting human faces, after this detecting emotions and expressions and then attention mechanism  is analyzed using Fuzzy Logic. This methodology is not covering all attention factors at all, although more factors can be included. We have made a desktop based application using Affectiva Emotion Libraries and Android Application as well. In future we will be looking for an interface embedding in a robot.

LIST OF FIGURES



1.1  Facial and Landmark Detection …………………………………………………..13
1.2  Fuzzy System for Attention ……………………………………………………….16
1.3  Single Face Detection ……………………………………………………………...21
1.4  Multiple Face Detection …………………………………………………………...22
1.5  Emotions on a Face ………………………………………………………………..23
1.6  Emotions on a Face ………………………………………………………………..23
1.7  Attention Graph ……………………………………………………………………24

  

Table of Contents



1          Chapter 1: INTRODUCTION
1.1   Selective Attention
        1.1.1   Principle
1.2   Attention Dependency Factors Problem
        1.2.1   Solution
        1.2.2   Weakness
1.3   Face Detection Problem
        1.3.1   Solution
1.4   Effects of changes in head angles and face luminance
        1.4.1   Solution
1.5   Cultural Differences
2          Chapter 2: PROCEDURE AND IMPLEMENTATION
2.1   Procedure
2.2   Implementation
2.3   Detection Features
        2.3.1   Face Detection
        2.3.2   Face Size
        2.3.3   Multiple Face Detection
        2.3.4   Emotion Expressions
        2.3.5   Gender and Glasses
        2.3.6   Age Detection    
2.4   Head Orientation
2.5   Brightness
2.6   Face Emoji’s

3          Chapter 3: FUZZIFICATION
3.1   Introduction
3.2   Fuzzification
3.3   Membership Function
3.4   Defuzzification
4          Chapter 4: EXPERIMENTS AND RESULTS
4.1   Single Face Detection
4.2   Multiple Face Detection
4.3   Various Face Emotions
4.4   Attention to a Face
5          Chapter 5: CONCLUSION
5.1   Goal
5.2   Achieved
5.3   Easy Tasks
5.4   Hard Tasks
5.5   Future Applications
5.6   Future Work and Directions



Chapter 1

Introduction

Introduction
Emotions play an important role in everyday life and human-computer interaction can benefit greatly from emotion sensing. Systems that respond to the emotions of a subject can be made to appear more empathetic and provide a much more natural user interface. Our research is about the phenomena of paying attention in human beings, using built in emotions. Generation of emotional attention in humans is natural, since they have feelings, emotions etc. However emotional attention generation in robots has no meaning.
Due to increase demand and involvement of robots in industry and in our social life robots are becoming part of our life. And now it is the need of hour that robots should have emotions and the ability to interact with multiple persons on the basis of emotional attention. This can be achieved through different machine learning algorithms and techniques. Through such type of learning algorithms robots can regulate emotional attention to the users and they can be claimed to have feelings.

1.1   Selective Attention
It selects personal designated attention from multiple faces but does not stop or interrupt process information at the same time. It continuously process the external environment camera feed for searching the human faces and  to calculate the attention rate of each face. Then decide to whom it should give attention and to whom it should not attend. Attention selectivity and its relevance to goal-oriented behavior have become the most explored areas in western psychology and neuroscience research.


1.1.1    Principle
Motivated by the attention mechanism of humans i.e. how humans pay attention to a specific human, in interaction with multiple humans. We explored various psychological theories, related research papers and algorithms to understand the human emotional attention mechanism. Then using Viola-Jones algorithm face detection algorithm, we coded and integrated various units together. We can demonstrate that the ac-claimed algorithm working on video as input for the detection of emotional attention is possible. The results may or may not actually hold perfect in reality. But still these results are reliable enough to use for other purposes.

1.2        Attention Dependency Factors Problem
There are lot of factors on which attention could depend and divert from one to another person like motion, sound, facial expressions and emotions. Humans normally consider all these factors to give attention e.g. a sudden voice could divert one’s attention towards the source of voice or hand motion of a person to other could get his attention.

1.2.1  Solution
“Face is the transmitter of body and eyes are transmitter of face”
But in case of interaction between multiple persons and a robot in specific environment human facial expressions plays an important role in attention diversion from one person to another. This allows us to focus upon face emotions and expressions as reflects the complete human body feelings and interests. Face provides enough information about the state of individual.

1.2.2  Weakness
The weak point of this solution is that only facial emotions and expressions are being used to detect the attention of an individual. Attention is a vast term and neglecting other attention factors is not less than unfair with an individual. Thus, sound, linguistic and motion can also be taken as input in future work.

     1.3   Face Detection Problem
The Viola Jones algorithm is not perfect. Its perfection is 90 percent for front faces. Sometimes, faces are detected in walls, chairs, shirts and other non faces likewise.

1.3.1   Solution
First detect the face Detect Mouth/Lips if mouth is detected. Its real face else it’s a non-human face. Eyes can also be detected in order to make it sure that it’s human face or not. This basic filtering is applied to make things workable and easy.

1.4   Effects of changes in head angles and face luminance

The best performance is in a range of +/- 25 degrees frontal, outside of which accuracy begins to suffer. Furthermore, for the effect of the differences in lighting conditions on accuracy, the classifier accuracy drops only when the face is extremely poorly illuminated or backlit. This occurs when the average pixel brightness of the face falls below 30 on a scale of 0 (pitch black) to 255 (white).

1.5 Cultural Differences

Many scientific studies demonstrate the universality of facial expressions of emotions; however, each culture employs what we call “display rules”—culturally-specific rules that govern when people amplify, dampen or altogether mask a facial expression of emotion. The research demonstrating the effect of display rules is extensive, covers the past 50 years, and is widely acknowledged. In Southeast Asia there are very clear display rules around how to display emotion, especially in the presence of strangers (a work meeting, a moderator in a research study, etc.): namely, dampen their expressions, especially negative ones.


1.5.1 Solution
Algorithm is trained against massive emotion data repository consisting of millions of faces that reflects data from 75 countries. This has hardened technology to account for cultural differences with high accuracy. 

Chapter 2

PROCEDURE AND IMPLEMENTATION


2.1 Procedure
Complete procedure for calculating emotional attention includes steps like face detection, feature detection, fuzzification in our application. Detection of face and emotion have done through C# code.  After getting different types of emotion values through live camera feed, passed these values as input to matlab fuzzifier. This fuzzifier returns attention numeric value after applying fuzzy logic rules, as output. Then all these emotions values and attention as output is shown in a graph.

2.2   Implementation
Library used for detecting face emotions, promise of providing 34 facial points on detected human face. The emotional attention through facial expressions decided on following basis.

2.3   Detection

2.3.1   Face Detection               
Face detection is performed using the Viola-Jones face detection algorithm. Landmark detection is then applied to each facial bounding box and 34 landmarks identified. If the confidence of the landmark detection is below a threshold then the bounding box is ignored. Once a face is detected a boundary box obtained around it. The boundary bow of detected face moves with the movement of the face.
Detection of faces and localization of the key facial landmarks have been done for each face. Extraction of texture features using HOG. Classification of facial actions

2.3.2   Emotion Expressions
The emotion expressions (Anger, Disgust, Fear, Joy, Sadness, Surprise and Contempt) are based on combinations of facial actions. This coding was built on the EMFACS emotional facial action coding system. The emotion expressions are given a similar score from 0 (absent) to 100 (present).

2.3.3   Gender and Glasses
In addition to facial action and emotion expression classifiers the library has classifiers for determining gender and whether the person is wearing glasses. The classifiers have two operating modes: static and causal. The static classifiers allow classification of single images. The causal classifiers leverage temporal information available in video sequences to further increase the accuracy of the facial expression measures.

2.3.4   Age Detection
Other than the emotion, gender and glasses detection it has the ability to detect the age of the interacting humans through camera feed, although age detection is not a primarily concern nor it is used in attention calculation.

2.3.5   Face Size
This face detection algorithm has an additional feature i.e. it has the ability to detect both small and large faces.

2.3.6   Multiple Face Detection
Our application has support for detecting faces up to 20 and can extract emotions, gender, glasses and age information from other faces in case they have head orientation within range.

2.4   Head Orientation
It can detect the human face within a specific range of angle. If head orientation is such that it is out of its angle range than it could not able to detect face neither the emotions nor other features. It
detect emotions and other face features with accuracy if the face is within +/- 25 degree angle.

2.5   Brightness
It works in a certain amount of light and when light intensity is below a certain threshold than it is not able to detect faces within the camera frame.



2.6   Face Emoji’s
Depending on the emotions extracted from the faces through live camera feed it can make emoji’s on the user interface. If the feature extracted from face is one of the six emotions (Anger, Disgust, Fear, Joy, Sadness and Surprise) than it makes face emoji besides the face detected to show user proper emotional state.


Chapter 3

Fuzzification

3.1 Introduction
The modern-day technologies in the areas of information storage and retrieval, web search, image processing, control, pattern recognition, bio information and computational biology, e-markets, autonomous navigation, and guidance are benefited using fuzzy logic system. Basically Fuzzy Logic (FL) is a method of reasoning that resembles human reasoning. The approach of FL imitates the way of decision making in humans that involves all intermediate possibilities between digital values YES and NO.

3.2  Fuzzification
Process of fuzzification is of great importance for getting required results. As described in above chapters, calculation of attention from emotions has been done through fuzzy logic. We have used this in such a way that, two largest emotions numeric values (out of six emotions) of human face, identified through a function used as input to fuzzy logic system. For these two inputs, 25 rules have been written in order to get required output as attention. Using these rules we get attention as output. Furthermore a .net library has been made in matlab, for further processing.






In figure 3.1 the abstract model of fuzzy inference system for calculating attention from two largest emotions values of detected human face has shown. One can see clearly from the figure that two emotion values is using here as input namely joy and anger and these values passed further. After applying mamdani fuzzy rules to these inputs attention we get as output.

Here in our scenario, the attention levels have been calculated through fuzzy inference system, where the inputs, outputs and there ranges for varying linguistic values are as under:

Joy = {“Very Low”, “Low”, “Medium”, “High”, “Very High”} [0, 1]
Anger = {“Very Low”, “Low”, “Medium”, “High”, “Very High”} [0, 1]
Direct_Attention = {“Very Low”, “Low”, “Medium”, “High”, “Very High”} [0, 1]
3.2: Ranges for Fuzzy Inference System for calculating weights of direct attention

The above mentioned dimensions are arranged for all possible combinations to construct rules for Inference Engine. The possible rules fed to the fuzzy system are written in Matlab.


3.3  Membership Function
A membership function (MF) is a curve that defines how each point in the input space (also called universe of discourse) is mapped to a membership value (or degree of membership) between 0 and 1.


3.4  Defuzzification
In order to check the correctness of rules written in mamdani fuzzy inference system for calculating attention, the process of defuzzification in contrast to fuzzification has been applied. After applying all mathematical equations and expressions the error rate we get only 6%, which shows the correctness of mamdani fuzzy rules.


                                                                  Chapter 4

Experiments and Results

4.1 Single Face Detection
The testing data contains sets, each set having face of human. Face is detected from 34 points on human face.  Here is the screen shot of application.


                                                                             


Figure 4.1: Single face detected



4.2 Multiple Face Detection
Detection of faces is not limited to only one face rather the application can detect more than two faces. This show the robustness in application. The criteria for detecting face is that it can detect face in live camera feed through 34 points on face.

                                                                            



Figure 4.2: Multiple Face Detection



4.3 Various Emotions on Face
Once a face is detected, emotions on that face showing in the form of a graph. The various emotions of a person respectively changes on the graph too. The emotion on face is said to be joy, anger, disgust etc. This categorization helps defining the attention.

                                                                              

Figure 4.3: Emotions on a face



Figure 4.4: Emotions on a face



4.4 Attention to a Face
Once multiple faces detected through live camera feed, the attention algorithm will decide to whom attention should be given. For Example 3 faces detected through live camera feed, 2 faces have normal emotions but one face has superb value of joy then attention algorithm will make a red square around that face showing the sign of attention. As different persons have different levels of emotions, so this attention might be moved to another person if he/she will show extra ordinary emotion. Here is the screen shot of it.




                                                                             

                                                           


                      

Figure 4.4: Attention to a Face


4.5 Attention on a Graph
Every face has an attention rate according to the emotions on its face. Attention rate for a specific face is calculated using Fuzzy Logic as discussed in above chapters. This attention rate is showing in the form of a graph. If there are two faces in camera frame, each face has its graph associated with it. Graph is showing all emotions continuous values along with continuous attention vale for each face. As emotions are detecting through live camera feed, the attention values for making graph are continuous, as shown in figure below.



Figure 4.5: Attention graph


Chapter 5

Conclusion and Future Work

1.1   Goal
The initial motive was to develop a complete system i.e. Hardware plus Software along with machine learning algorithm. Also to create human like attention on the basis of emotions, as humans pay attention on the basis of emotions, in robots. On the basis of machine learning algorithms, the robot will be able to pay desired attention in real time.


5.2 ACHIEVED
The individual attention module has been completed. Both for single face and multiple faces the attention criteria is same. The attention module is working on video (live camera feed) as input and give an output graph showing values of emotions and attention for each face detected in live camera feed. Monitoring emotions is the baseline of this project and all the information that can be derived from face has been covered like open eyes, brightness, head orientation and all emotions (joy, anger, sadness, disgust, surprise and fear) are the salient features from face and its near environment. Attention graph is being maintained for every person in video frame.

5.3 Easy Tasks
The part of module which are relatively easy are the face detection, eye detection, face filtering for human and non-human faces. Emotion and expression extraction from detected face also not a tough one because of 34 facial points it’s possible to detect eye brow raised or down, lips closed or open and etc. These facial emotions made possible to calculate attention rate on each detected face.



5.4   Hard Tasks
The hard task is to find the reliable attention value based on the emotion values. Fuzzy Rules
have to be defined for input emotion values, it has to decide at which emotions value attention should be given and at which shouldn’t. There are many difficult scenarios in which we have to decide for attention to certain face in many detected faces like both of the detected faces are smiling so which should be attended and shouldn’t. After deciding the attention value on input emotions another challenging task was to make attention graph continuous but this tough task also completed in an efficient manner.

5.5 Future Applications
·         Warning system in vehicles which issues warning when driver attention is not on the road, it could avoid many accidents because of driver carelessness
·         Classroom Camera that can calculate and generate a brief report on each student attention during lectures
·         Interactive Mobile Application
·         Many other fields where Visual Attention directly or indirectly involved
·         This attention mechanism could be used for machine learning in a robot and to improve its attention function
·         Many businesses could use that for calculating customer feedback towards their product

5.6 Future Work and Directions
The complete pipeline for calculating attention from emotion contains the actual algorithm, but there is no way for unseen situations and scenarios. To handle this type of situation we will be working on machine learning algorithms and techniques to make the application more robust.
Voice is another important and useful factor, considered in attention mechanism of human psychology. We will be adding this factor in our project for the improvement of attention behavior. Such that voice will play an important part in decision making for attention along with all other factors.
Up till now we worked only on software perspective. In future, we will also develop a hardware i.e. a robot that will pay attention to its near persons on the basis of all factors.