{'fraction_non_alphanumeric': 0.02734690217878598, 'fraction_numerical': 0.013718282076571326, 'mean_word_length': 4.94246137453383, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deformable Convolutional LSTM for Human Body Emotion Recognition

People represent their emotions in a myriad of ways. Among the most important ones is whole body expressions which have many applications in different fields such as human-computer interaction (HCI). One of the most important challenges in human emotion recognition is that people express the same feeling in various ways using their face and their body. Recently many methods have tried to overcome these challenges using Deep Neural Networks (DNNs). However, most of these methods were based on images or on facial expressions only and did not consider deformation that may happen in the images such as scaling and rotation which can adversely affect the recognition accuracy. In this work, motivated by recent researches on deformable convolutions, we incorporate the deformable behavior into the core of convolutional long short-term memory (ConvLSTM) to improve robustness to these deformations in the image and, consequently, improve its accuracy on the emotion recognition task from videos of arbitrary length. We did experiments on the GEMEP dataset and achieved state-of-the-art accuracy of 98.8% on the task of whole human body emotion recognition on the validation set.


Introduction
Understanding and interpreting human emotions from videos have many different applications especially in the field of Human Computer/Robotic Interaction (HCI/HRI) [14]. Humans can represent different emotions by their behavior using verbal and non-verbal signs during a conversation. Generally, human communication can be classified as verbal and nonverbal. The verbal communication includes voice and its tune, while nonverbal includes body movement, facial expression and gestures [12,6].

arXiv:2010.14607v1 [cs.CV] 27 Oct 2020
So far, many researchers have tried to analyze and classify emotion from a single image or a stream of frames. For instance, Jain et al. [8], used images of the face and a deep convolutional neural network (CNN) based on ResNet [7] for classification of emotions based on human faces, while [10] used a similar idea to classify whole body emotion. Nevertheless, both of these methods were based on fixed images, while we are trying to classify emotion from videos. Moreover, Jeong et al. [9] used 3D CNNs on a stream of facial videos for classification, but their method was limited to facial videos. Considering whole human body emotion recognition, Ahmed et al. [1] used features extracted from human body movement to classify different emotions, while Santhoshkumar et al. [13] used features extracted from two consecutive frames using their difference. Some other methods relied on multi modalities such as video and audio. For instance, Chen et al. [3] leveraged both audio and video in a multiple feature fusion method to classify videos. However, in this paper, we try to use video frames only and the whole human body to classify emotions.
Motivated by the recent research on deformable 2D convolutions [4,17] which showed its effectiveness in classification and object recognition, in this paper, we tried to incorporate deformable convolutions into the core of ConvLSTMs [15] in order to improve its flexibility to detect and extract features from a given frame. That is to say, since the offsets in the deformable convolutional layer allow free deformation of the sampling grid (receptive field) in comparison to fix grid in regular convolution layers, they can perform better at capturing and focusing on the salient part of frames. Furthermore, we combined deformable ConvLSTMs with 3D convolutions to extract both long-term and short-term spatio-temporal features from videos. Afterward, we used a shallow 2D CNN architecture to extract features from each 2D spatio-temporal feature map individually and finally, we used feature fusion for final classification. We experimented with GEMEP [2] dataset which contains 145 videos representing 17 different emotions and achieved state-of-the-art accuracy of 98.8% on the validation set.

Input preprocessing
Different individuals may represent different emotions at various speeds. Hence, videos in our dataset contain an arbitrary number of frames and we had to set all videos to a fixed number of frames. One of the ways was to split each video into an array of videos with fixed frames, but one clip sometimes cannot represent the whole emotion. Consequently, we used the idea of Uniform sampling with temporal jitter [16] to fix the length of all videos to 32 frames. If the length of one video was less than 32, we repeated the last frame. Moreover, we reduced the original frame size of videos from 720 × 576 to 112 × 112 to reduce the parameter size of our network.

Network architecture
As can be seen in Figure 1, our network is consists of three major components which in this section we elaborate on each of them thoroughly.
3D CNN component Inspired by [16], since 3D convolutions can perform better at learning local and short-term spatio-temporal features, in the first layer we used a 3D CNN component. As can be seen in Figure 2a, we only used two max pooling operations which only one of them shrinks the video length. Consequently, this component only focuses on the short-term spatio-temporal features and we leave the learning of long-term spatio-temporal features to the deformable convolutional LSTMs.

Deformable convolutional LSTMs Recurrent Neural Networks (RNNs) and
LSTMs are more suitable for learning long-term spatio-temporal features [16]. Nevertheless, ConvLSTMs are inherently limited to model large, unknown transformations since we use regular CNNs with a fixed receptive field at the core of them. Hence, so as to improve the robustness of traditional ConvLSTMs to these transformations, we used deformable 2D convolutions in the core of Con-vLSTMs. Additionally, since deformable convolutions require a large number of parameters, we could not use them instead of every normal ConvLSTM layer.
Consequently, we decided to use deformable ConvLSTMs on certain frames only. Since the characters usually start to represent the emotion after some frames and salient parts for classification usually happen in the middle parts of a video, we decided to choose frames after 25% of video have passed, after half of the video has passed and after 75% of video have passed. In each of these parts, we chose three different frames. Moreover, as stated in [16], we removed the convolutional structure of all gates except for the input-to-state gate for spatio-temporal feature fusion which we used deformable 2D convolutions.
2D CNN component So far, we have reduced the spatial dimension of our input to 28 × 28, but already, we have learned short-term and long-term spatiotemporal features. Therefore, in this part, we try to learn and focus on spatial features only using a 2D CNN component. As can be seen in Figure 2b, we have chosen a shallow network with three convolutional and average pooling layers. After this stage, we did a final global average pooling for final feature fusion among all frames before using a fully connected layer for final classification.

Dataset
For experimental studies, we used the GEMEP dataset which contains 145 videos representing 17 different emotions which are called compound emotions in the literature [5]. The different emotion classes are admiration, amusement, tenderness, anger, disgust, despair, pride, anxiety, interest, irritation, joy, contempt, fear, pleasure, relief, surprise and sadness. Since the number of videos for training our network was insufficient for training a deep neural network, we did data augmentation. For augmentation, we translated each frame to four different corners by 25 pixels, rotated each video between −30 • to 30 • , used gaussian filter with different intensities and changed the brightness. Finally, we had 9052 videos which since there were not any standard division into training and validation set for this dataset, we decided to use 80% for training and 20% for validation. Some frames of the dataset utilized in this work are depicted in Figure 3.  Table 1: Comparison between using deformable ConvLSTM and normal ConvL-STM. Note that we only applied deformable ConvLSTM to 9 different frames.

Comparison between deformable ConvLSTM and ConvLSTM
In this section, we compare the result of using normal ConvLSTM and deformable ConvLSTM. Since deformation may happen in any given image, it makes it difficult for a fixed size receptive field to focus on the salient parts of the image. On the other hand, deformable convolutions due to their flexible nature can easily focus on these deformed parts and extract features using their arbitrary shaped receptive field. As can be seen in Table 1, even though we used deformable ConvLSTM only on a limited number of frames (9 frames) we were able to achieve a higher classification accuracy in comparison to normal ConvLSTM which prove their effectiveness.

Comparison between other methods
As can be seen in Table 2, our method based on deformable ConvLSTMs outperformed other methods in terms of accuracy. For comparison, we selected methods that used the whole human body for classification. The method in [10] used a deep architecture for classification using images extracted from videos. The superior result of our approach indicates that in some frames the emotion may become ambiguous and by using spatio-temporal features we can clarify this ambiguity and achieve higher accuracy. Additionally, both MBMIC [13] and HOG-KLT [11] used frame difference to extract temporal features. However, results show that using 3D convolutions and ConvLSTMs for learning and extracting spatio-temporal features is the superior choice.

Accuracy Ours
98.8 FDCNN (Image) [10] 95.4 MBMIC [13] 94.6 HOG-KLT [11] 95.9 Table 2: Comparison between our proposed method and other methods on the GEMEP dataset. Note that we only chose approaches which considered whole human body and the results of our method is based on validation set.

Conclusion
In this paper, we proposed a method for the classification of human wholebody emotion from videos. In the first layer, we used 3D convolutions to extract short-term spatio-temporal features. Afterward, motivated by the recent success of deformable 2D convolutions we incorporated these flexible convolutions in the core of normal ConvLSTMs to form deformable ConvLSTMs. Because the receptive in these forms of convolutions are adjustable, it gives the network more freedom to extract features from different regions of a given frame. Finally, we used a shallow 2D convolutional network to further extract features from the 2D features map and used a final feature fusion. Results using GEMEP dataset show a state-of-the-art result of 98.8% accuracy on the validation set.
In future works, we will try to study the effectiveness of our deformable ConvLSTMs on other classification tasks which involve videos such as human gesture recognition or facial emotion recognition. Additionally, we will explore with different frame selection strategies for using deformable ConvLSTMs so as to find the optimal choice.