Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.30 KB | None | 0 0
  1. \documentclass[conference]{IEEEtran}
  2. \IEEEoverridecommandlockouts
  3. % The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
  4. \usepackage{cite}
  5. \usepackage{amsmath,amssymb,amsfonts}
  6. \usepackage{algorithmic}
  7. \usepackage{graphicx}
  8. \usepackage{float}
  9. \usepackage{textcomp}
  10. \usepackage{xcolor}
  11. \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
  12. T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
  13. \begin{document}
  14.  
  15. \title{Interpreting Facial Expressions and Emotional States Using Machine Learning\\
  16. {\footnotesize \textsuperscript{*}}}
  17.  
  18.  
  19.  
  20. \author{\IEEEauthorblockN{\textsuperscript{}Adrian Del Bosque}
  21. \IEEEauthorblockA{\textit{Computer Science Department} \\
  22. \textit{University of Texas Rio Grande Valley}\\
  23. Edinburg, United States \\
  24. adrian.delbosque01@utrgv.edu}
  25. \and
  26. \IEEEauthorblockN{\textsuperscript{}Kevin Jackson}
  27. \IEEEauthorblockA{\textit{Computer Science Department} \\
  28. \textit{University of Texas Rio Grande Valley}\\
  29. Edinburg, United States \\
  30. kevin.jackson01@utrgv.edu}
  31. }
  32.  
  33. \maketitle
  34.  
  35. \begin{abstract}
  36. In interpersonal interactions, body language accounts for 60 percent of non verbal communication. Facial Expressions, one form of nonverbal communication, are one of the biggest metrics in determining the emotional state of a person. Therefore modeling such expressions can aid in the understanding of human behavior. Currently there exist models that can determine the emotional state of a person using facial recognition. In this report the authors will share and discuss their rendition as well as explore different machine learning techniques to further improve their model.
  37. \end{abstract}
  38.  
  39.  
  40.  
  41. \section{Introduction}
  42. It is a human characteristic to be able to pick up on facial expressions being conveyed by others in order to determine how they feel, what they request or their intent. An interesting idea is that these expressions (fear, anger, happy, sad, etc) may be biologically hardwired within all of us. Facts that support this claim are that these very same expressions can be found from people all over the world and from different cultures. Which contradicts the views that emotional expressions are a product of social learning.
  43.  
  44. With the current advancement in technology it is no surprise that researchers have been trying to push the "limitations" of computers today. A popular practice right now in the computer science field is Machine Learning. Which allows the program to learn and improve from experience on its own without being explicitly programmed.
  45.  
  46. In order to allow the program to learn. We first needed to understand for ourselves the features on the face that make up one of the seven basic emotions. [Anger, Fear, Disgust, Happy, Sad, Surprised, Neutral]
  47. \section{Background}
  48.  
  49. \subsection{Facial Landmarks}
  50.  
  51. The facial action coding system (FACS) defined by Ekman and Friesen in 1978, is a system used to characterize facial expressions of human emotions. Changes in the facial landmarks (FLs) the ends of the eyebrows, bridge of the nose, eyes and points of the mouth by action units (AUs) can be used to determine the expression of an emotion[1](Fig. 1).
  52.  
  53. \begin{figure}[h!]
  54. \centering
  55. \includegraphics[scale=0.8]{facialLandmarks.jpg}
  56. \caption{Facial Landmarks}
  57. \label{fig:landmarks}
  58. \end{figure}
  59.  
  60.  
  61. \subsection{Existing Research}
  62. Conventional FER systems use geometric features, appearance features or a mix between the two. The geometrix approach utilizes a feature vector based on facial components in image sequences using multi-class AdaBoost. Where as appearance features are extracted from the global facial region and recognized using stepwise linear discriminant analysis. The overall recognition performance for Conventional FER systems average around 59 to 70 percent accuracy for still frame images whereas Deep Learning based FERs average between 69 to 77 percent. The highest average Deep Learning FER uses a hybrid approach by utilizing the spatial image characteristics using CNN and spatial temporal features learned using LSTM. Even though Deep Learning FER shows great success there are still limitations keeping it from a higher success rate such as computing power, datasets and solid algorithm theory.
  63.  
  64. \section{Motivation and Goals}
  65. After bouncing ideas off of one another. We came to the conclusion that we wanted to base our project off of image recognition. Although, to ensure that our project wasn't "generic" and as original as possible. We continued brainstorming until we came up with the idea of creating a model that could detect human emotions. After searching online we had stumbled upon the existing research mentioned in the previous section.
  66. Even though our "original idea" already had years of research established, we still decided to continue forth with the project. In our eyes, if two university students with no previous experience in machine learning could create a model that could achieve a minimum of 45 percent test accuracy. We would, by our personal standards, consider our project a success. The only thing left to do was to scour the internet in search of a data we could use.
  67.  
  68. \section{Dataset}
  69. Thankfully, the data we collected was from a previous machine learning competition hosted by the website kaggle[2], back in 2013. Which consisted of roughly 32,000 grey scale images. Luckily for us, there was no need to preprocess the images in any way. Since each image came in the dimensions 48 x 48 and were already aligned with one another, meaning that every test subjects facial emotion was centered. The contents of the csv file contained three columns: emotion, pixel, usage. Emotion corresponded with the images facial expression ranging from a value 0 to 6 (0 = sad, 1 = happy, 2 = anger, etc). The next column pixel represented the grey scale value for the each pixel (2,304 sub-columns) of the image (refer to Fig. 2). Lastly, usage determined whether the image was to be used for training or testing. In total there was around 27,000 training and 5,000 testing images.
  70.  
  71. \begin{figure}[h!]
  72. \centering
  73. \includegraphics[scale = 0.3]{pixelvalues.jpg}
  74. \caption{pixel values}
  75. \label{fig:pixelvalue}
  76. \end{figure}
  77.  
  78.  
  79. \section{Methods}
  80. Our goal was to find a way to connect an emotion to a facial expression using facial landmarks. The two things that came to mind was using a CNN or an RNN for our project. While both are very respected methods, each have their own uses. An RNN model would be good for a series of data that would feed back into itself, while a CNN is only based off the current input.
  81.  
  82. Therefore it was determined that a CNN would best work for our needs since neural networks are able to correlate nonlinear relations based off an input. In our case the input would be a photo and the output would be a classification number.
  83.  
  84. \begin{figure}[H]
  85. \centering
  86. \includegraphics[scale = 1.0]{cnnimage.jpg}
  87. \caption{CNN Example}
  88. \label{fig:cnnimage}
  89. \end{figure}
  90.  
  91.  
  92. In the creation of the neural network, factors such as the number of convolution and pooling layers, activation functions, window size, and optimizer all affected the accuracy. To grow on the complexity of the project, we broke down the problem into sub problems in the form of the number of classes. For example we started with two classes and a 3 layer network[]. We would then continue to increase the number of classes and make changes to the network after each iteration.
  93.  
  94. \subsection{Libraries Used}
  95. \begin{itemize}
  96. \item Tensorflow is an open-source math library that handled our data-flow.
  97. \item Keras is an open-source neural-network library that we used in order to create our CNN as well as compile our results.
  98. \item Numpy is a library that adds support for large, multi-dimensional arrays and matrices.
  99. \item Matplotlib is a graphical plotting library that we used in order to graph our results after each iteration.
  100. \end{itemize}
  101.  
  102. \subsection{Appending Data}
  103. In order to find the results after each iteration of classes, we first needed to append our data accordingly for each pass. This was achieved by creating a variable that would store the number of classes we were going to test at the time. Then running a loop to select and append our desired number of classes into four separate numpy arrays, two for training and two for testing. The two sets of two contained the same format, one array for emotions and the other for pixels. Our arrays were then reshaped into 48 x 48 two dimensional arrays and were ready to pass through the CNN.
  104.  
  105. \subsection{CNN}
  106. The model we designed was a fully connected three layer Convolutional Neural Network. Utilizing ReLU (Rectified Linear Unit) which is a linear function that outputs the input directly if it is positive, or else it ouputs a zero. The reason we chose ReLU was because it has became the default activation function for different types of neural networks. Which achieves a higher performance and is easier for training. Max pooling was used on the first layer to select the maximum pixel value of the batch and Average Pooling was used on the remaining two layers. We also found that the best number of Epochs to run our model was 25. Increasing the number of Epochs didn't change the training accuracy or testing accuracy significantly. We also didn't want to run too many epochs cause we feared that the model would over-fit the training data, essentially it would just memorize the data. We also decided to use a batch size for training rather than feeding it all the data at once. This helped us achieve a faster training time as well as save some memory in the process.
  107.  
  108. \section{Results}
  109. Here are the results for each class iteration we ran through our finished model. Each figure (4 through 9) contains two images: a graph for the training(train) and testing accuracy(val) as well as a graph of the model loss for the corresponding class total.
  110.  
  111. \begin{figure}[H]
  112. \centering
  113. \includegraphics[scale = 0.7]{graph2.jpg}
  114. \caption{2 Classes}
  115. \label{fig:graph2}
  116. \end{figure}
  117.  
  118. \begin{figure}[H]
  119. \centering
  120. \includegraphics[scale = 0.7]{graph3.jpg}
  121. \caption{3 Classes}
  122. \label{fig:graph3}
  123. \end{figure}
  124.  
  125. \begin{figure}[H]
  126. \centering
  127. \includegraphics[scale = 0.7]{graph4.jpg}
  128. \caption{4 Classes}
  129. \label{fig:graph4}
  130. \end{figure}
  131.  
  132. \begin{figure}[H]
  133. \centering
  134. \includegraphics[scale = 0.7]{graph5.jpg}
  135. \caption{5 Classes}
  136. \label{fig:graph5}
  137. \end{figure}
  138.  
  139. \begin{figure}[H]
  140. \centering
  141. \includegraphics[scale = 0.7]{graph6.jpg}
  142. \caption{6 Classes}
  143. \label{fig:graph6}
  144. \end{figure}
  145.  
  146. \begin{figure}[H]
  147. \centering
  148. \includegraphics[scale = 0.7]{graph7.jpg}
  149. \caption{7 Cases}
  150. \label{fig:graph7}
  151. \end{figure}
  152.  
  153. As you can clearly see by the graphs, the training accuracy and testing accuracy dropped after each class iteration, which proved our original hypothesis. We were also able to surpass our original goal of 45 percent test accuracy for all 7 classes with around 56 percent.
  154.  
  155. \section{Future Goals}
  156. We would really like to achieve an accuracy of around 70 percent, since that's what the original winner of the kaggle competition produced. In the next iteration of the project we would like to attempt adding far more layers. As well as including batch normalization on the layers and some random rotations on test images so the model can better learn. During our poster presentation we had the chance to talk to some professors and students about our project results. One of the key things we left with was the idea of gathering and comparing the different results we would get if we were to round robin (for lack of a better term) different emotions for our 2 class iteration. Since, our 2 class pass was only testing the emotions corresponding to 0 and 1.
  157.  
  158. \section*{Acknowledgment}
  159. We would like to thank Dr. Dongchul Kim for his help and guidance throughout this project. As well as giving us the idea of improving upon our model after each class iteration and understanding the results we got. We would also like to thank the students and professors who came during the poster presentation and took the time to talk to us and suggest ideas for our future project goals.
  160.  
  161.  
  162. \begin{thebibliography}{00}
  163. \bibitem{b1} Foley GN, Gentile JP. Nonverbal communication in psychotherapy. Psychiatry (Edgmont). 2010;7(6):38-44
  164.  
  165. \bibitem{b2} Challenges in Representation Learning: Facial Expression Recognition Challenge.” Kaggle, https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge/data
  166.  
  167. \bibitem{b3} Sohail, and Prabir Bhattacharya. “Classifying Facial Expressions Using Point-Based Analytic Face Model and Support Vector Machines: Semantic Scholar.” Undefined, 1 Jan. 1970
  168.  
  169. \bibitem{b4} Hinz, Tobias and Barros, Pablo and Wermter, Stefan (2016). The Effects of Regularization on Learning Facial Expressions with Convolutional Neural Networks.
  170.  
  171. \bibitem{b5} “Keras: The Python Deep Learning Library.” Home - Keras Documentation, https://keras.io/.
  172.  
  173. \bibitem{b6} Peixeiro, Marco. “Step-by-Step Guide to Building Your Own Neural Network From Scratch.” Medium, Towards Data Science, 21 Feb. 2019
  174.  
  175. \bibitem{b7} Algorithmia, February 28, 2018, accessed September 30, 2019 https://blog.algorithmia.com/introduction-to-emotion-recognition
  176. \bibitem{b8} NCBI, Byoung Chul Ko, Jan 30, 2018, accessed September 30, 2019
  177. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5856145/B72-sensors-18-00401
  178.  
  179.  
  180.  
  181.  
  182.  
  183. \end{thebibliography}
  184.  
  185.  
  186. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement