<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Multi-resolution Training for Expression Recognition in the Wild</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>(Discussion Paper)</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabio Valerio Massoli</string-name>
          <email>fabio.massolli@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Donato Cafarelli</string-name>
          <email>donato.caf@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Amato</string-name>
          <email>giuseppe.amato@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabrizio Falchi</string-name>
          <email>fabrizio.falchi@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ISTI-CNR</institution>
          ,
          <addr-line>via G. Moruzzi 1, 56124 Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Facial expressions play a fundamental role in human communication, and their study, which represents a multidisciplinary subject, embraces a great variety of research fields, e.g., from psychology to computer science, among others. Concerning Deep Learning, the recognition of facial expressions is a task named Facial Expression Recognition (FER). With such an objective, the goal of a learning model is to classify human emotions starting from a facial image of a given subject. Typically, face images are acquired by cameras that have, by nature, diferent characteristics, such as the output resolution. Moreover, other circumstances might involve cameras placed far from the observed scene, thus obtaining faces with very low resolutions. Therefore, since the FER task might involve analyzing face images that can be acquired with heterogeneous sources, it is plausible to expect that resolution plays a vital role. In such a context, we propose a multi-resolution training approach to solve the FER task. We ground our intuition on the observation that, often, face images are acquired at diferent resolutions. Thus, directly considering such property while training a model can help achieve higher performance on recognizing facial expressions. To our aim, we use a ResNet-like architecture, equipped with Squeeze-and-Excitation blocks, trained on the Afect-in-the-Wild 2 dataset. Not being available a test set, we conduct tests and model selection by employing the validation set only on which we achieve more than 90% accuracy on classifying the seven expressions that the dataset comprises.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Facial Expression Recognition</kwd>
        <kwd>Deep Convolutional Neural Networks</kwd>
        <kwd>Multi-resolution training</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Facial expressions play a fundamental role in human communication. Indeed, they typically
reveal the actual emotional status of people beyond the spoken language. Moreover, the
comprehension of human afect based on visual patterns is a crucial ingredient for any
humanmachine interaction [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] system and, for such reasons, the task of Facial Expression Recognition
(FER) draws both scientific and industrial interest. In recent years, Deep Learning techniques
reached very high performance on FER by exploiting diferent architectures and learning
paradigms. In such a context, we propose a multi-resolution approach to solve the FER task.
We ground our intuition on the observation that, often, face images are acquired at diferent
resolutions. Thus, directly considering such property while training a model can help achieve
higher performance on recognizing facial expressions. To our aim, we use a ResNet-like
architecture, equipped with Squeeze-and-Excitation blocks, trained on the Afect-in-the-Wild
2 dataset. Not being available a test set, we conduct tests and model selection by employing
the validation set only on which we achieve more than 90% accuracy on classifying the seven
expressions that the dataset comprises. To let our researcher reproduce our results, we made our
code publicly available on github1. Concerning the remaining part of the paper, we organized
it as follows. In Section 2 we report several works related to the FER task, while in Section 3
and Section 4 we describe our approach and the dataset we use, respectively. Moreover, we
describe the experimental campaigns we perform and the corresponding model performance in
Section 5. Finally, in Section 6 we conclude our work by reporting our plans.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Works</title>
      <p>Nowadays, the most promising approaches to the FER task are based on the use of Deep
Convolutional Neural Networks (DCNN). A typical approach consists of a pre-processing phase,
where the images are subject to various transformations, and a training phase where these
images are iteratively given as input to a DCNN model for feature extraction and expression
classification.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], the authors propose a new approach for face cropping to remove useless regions in
an image and a novel rotation strategy to cope with data scarcity. Furthermore, they built a
simplified DCNN structure to reduce training/inference time and achieve real-time FER on
devices with limited resources. Their experiments were conducted on two databases, CK+ [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
and JAFFE [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and achieved state-of-the-art results. In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], a novel activation function based on
the ReLU function, called LS-ReLU, is presented. It exploits an adjustable log and the soft-sign
functions. Neural networks based on LS–ReLU function can avoid the over-fitting problem
during the training process and reduce the oscillations problem. Their experiments on JAFFE [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
and FER2013 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] datasets showed that a DCNN based on this novel activation function has a
better performance compared to most state-of-the-art activation functions. With the transition
of FER datasets from laboratory-controlled to in-the-wild conditions, this task has become
more challenging due to variations in pose, brightness, and background, to mention some.
Therefore, in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] the authors focus on resolving the FER task by analyzing the contribution of
diferent face areas to diferent emotions, including nose, mouth, eyes, nose to mouth, nose
to eyes, and mouth to eyes areas, together with the whole faces. The paper [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] addresses the
problem of the class imbalance in wild FER datasets. To such an aim, the authors propose a
novel Discriminant Distribution-Agnostic loss (DDA loss) to optimize the embedding space for
extreme class imbalance scenarios. Specifically, DDA loss enforces inter-class separation of
deep features for both majority and minority classes. In [9] the authors propose a multi-task
learning framework to extract local-global and spatio-temporal information for a discriminative
and robust representation of facial expressions. Their experiments achieved competitive results
on the CK+ [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and Oulu-CASIA [10] datasets. To improve the performance on the FER
1https://github.com/fvmassoli/afwild2-challenge.git
task, [11] proposes a novel “Masking Idea" that is implemented in a Residual Masking Network
that contains several masking blocks applied across residual layers to improve the network’s
attention ability on relevant information. Experiments showed competitive results on the
FER2013 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] dataset.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Approach</title>
      <p>Usually, face images come from heterogeneous sources [12], e.g., cameras with diferent
resolutions or diferent distances from the scene. Such characteristics directly impact DL models’
performance on tasks such as Face Recognition (FR) by dramatically lowering their
performance [13]. Based on such an observation, we propose our approach grounded on the hypothesis
that the images’ resolution has a non-negligible impact on DL models’ behavior when tested
against the FER task. Precisely, we move our steps from [13] in which the authors explicitly
take care of the multi-resolution nature of face images by designing a training technique to
accommodate for such an issue adequately.</p>
      <p>In our work, we take inspiration from the author’s training procedure, and we adapted it to
our case. Specifically, we experimentally notice that we do not need any Teacher-supervised
signal nor curriculum learning. Thus, we simplify the training procedure by only exploiting the
double random extraction to set the final image resolution. To train the models and perform
model selection, we employ the Af-Wild2 [ 14] dataset. We refer the reader to Section 4 for a
brief description of the dataset.</p>
      <p>Our base model is a ResNet-50 architecture [15], equipped with Squeeze-and-Excitation
blocks [16], that has been pre-trained on the VGGFace2 dataset [17]. To train our models, we
use the Adam [18] optimizer. We set the weight decay of 1.− 4 and the learning at 1.− 3 for
the last fully connected layer and 1.− 4 for all the others. Moreover, we set the batch size to
128, and we use data augmentation techniques to avoid overfitting. Specifically, we first resize
the images to have the shortest side of 256 pixels (while keeping the original aspect ratio),
then we random crop a square of 224x224 pixels, and finally, we normalize the input channels.
Moreover, we apply a random grayscale conversion with a probability of 0.2. We substitute the
random crop with the center one, and we remove the grayscale operation to test the model on
the validation set.</p>
      <p>Concerning the random resolution extractions to train the models, we perform several
experiments considering diferent ranges for the final image size concerning the multi-resolution
training, with the minimum and maximum considered values being 8 and 256 pixels, respectively.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Dataset: Afect-in-the-Wild 2</title>
      <p>The Af-Wild2 [ 14] dataset is the first-ever database annotated for all three main behavior tasks:
Valence Arousal (VA), Action Units (AU), and Expression (EX) classification. Concerning the
last one, the dataset consists of 547 videos (collected from YouTube) that account for ∼ 2.6M
of frames labeled considering seven basic expressions: neutral, anger, disgust, fear, happiness,
sadness, and surprise. The annotation is made frame-by-frame by a team of seven experts. The
dataset is shipped with a protocol that divides it into three non-overlapping subsets for training,
validation, and test purposes. Specifically, the three partitions consist of 253, 71, and 223 videos,
respectively. The cropped-aligned version of the dataset is made of images preprocessed to have
a fixed resolution of 112x112 pixels. Among the ∼ 2.6M available images, ∼ 1.2M are available
for training and validation on the FER task. We report in Figure 1 an example of training images
in the Af-Wild2 [14] dataset.</p>
      <p>Happiness</p>
      <p>As we mentioned previously, the dataset comprises seven diferent types of expressions with
a very diferent cardinality. In Table 1, we report the number of images for each class, both for
the training and validation sets, while in Table 2, we report the classes’ weight concerning the
training images only.</p>
      <p>Training
(%)
Validation
(%)</p>
      <p>Neutral</p>
      <p>As one can notice from Table 1, the classes are not balanced. For that reason, we leveraged
a balanced cross-entropy loss to account for the class unbalance. To such an aim we use the
weights reported in Table 2.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Experimental Results</title>
      <p>In this section, we report the experimental results we obtained on the Af-Wild2 [ 14] dataset.
Since the dataset is currently employed in the Afect-in-the-Wild Challenge [ 19], the test set’s
ground truth labels are not available. For such a reason, we quote the performance of our model
on the validation set. Before the training, we took a small subsample of the validation set and
used it for model selection purposes to avoid bias. Subsequently, we tested the best model on
the entire validation set. To quote our results, we use diferent metrics. First, we evaluate the
F1-score on each class, then we summarize the overall performance of our best model across all
the seven expressions by quoting the F1-score (macro-average) and the overall accuracy. Finally,
we evaluate the same score as required by the Afect-in-the-Wild Challenge [ 19], which is equal
to:
 = 0.33 · accuracy + 0.67 · f1 score;
(1)
where the accuracy and the f1 score are relative to the whole dataset.</p>
      <p>We report the results in Table 3 and Table 4 concerning single classes and the whole dataset,
respectively.</p>
      <p>F1 Score</p>
      <p>Neutral
0.978</p>
      <p>Anger
0.960</p>
      <p>Disgust</p>
      <p>0.965</p>
      <p>From the previous tables, we can notice that our model shows promising performance on the
FER task. Moreover, we acknowledge the stability of the scores among diferent classes even
though the dataset is highly unbalanced as reported in Table 1</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conculsions abd Future Works</title>
      <p>
        In this work, we report our first experimental campaign focused FER task. We tackle such a
problem by giving more representational power to our models, assuming a multi-resolution
context, and we observe promising results. As a next step, we will extend our experimental
campaign to test our approach on diferent publicly available datasets such as FER2013 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
RAF-DB [20], and Oulu-CASIA [10].
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan
V GPU used for this research. This work was partially supported by WAC@Lucca funded by
Fondazione Cassa di Risparmio di Lucca, AI4EU - an EC H2020 project (Contract n. 825619),
and upon work from COST Action 16101 “Action MULTI-modal Imaging of FOREnsic SciEnce
Evidence (MULTI-FORESEE)”, supported by COST (European Cooperation in Science and
Technology).
[9] M. Yu, H. Zheng, Z. Peng, J. Dong, H. Du, Facial expression recognition based on a
multi-task global-local network, Pattern Recognition Letters 131 (2020) 166–171.
[10] G. Zhao, X. Huang, M. Taini, S. Z. Li, M. PietikäInen, Facial expression recognition from
near-infrared videos, Image and Vision Computing 29 (2011) 607–619.
[11] P. Luan, V. Huynh, T. Tuan Anh, Facial expression recognition using residual masking
network, in: IEEE 25th International Conference on Pattern Recognition, 2020, pp. 4513–
4519.
[12] F. V. Massoli, F. Falchi, C. Gennaro, G. Amato, Cross-resolution deep features based image
search, in: International Conference on Similarity Search and Applications, Springer, 2020,
pp. 352–360.
[13] F. V. Massoli, G. Amato, F. Falchi, Cross-resolution learning for face recognition, Image
and Vision Computing 99 (2020) 103927.
[14] D. Kollias, S. Zafeiriou, Af-wild2: Extending the af-wild database for afect recognition,
arXiv:1811.07770 (2018).
[15] K. He, X. Zhang, S. Ren, J. Sun, Deep residual learning for image recognition. corr
abs/1512.03385 (2015), 2015.
[16] J. Hu, L. Shen, G. Sun, Squeeze-and-excitation networks, in: Proceedings of the IEEE</p>
      <p>CVPR, 2018, pp. 7132–7141.
[17] Q. Cao, L. Shen, W. Xie, O. M. Parkhi, A. Zisserman, Vggface2: A dataset for recognising
faces across pose and age. corr abs/1710.08092 (2017), arXiv:1710.08092 (2017).
[18] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv:1412.6980 (2014).
[19] D. Kollias, S. Zafeiriou, First Afect-in-the-Wild Challenge, https://ibug.doc.ic.ac.uk/
resources/first-afect-wild-challenge/, 2020.
[20] S. Li, W. Deng, J. Du, Reliable crowdsourcing and deep locality-preserving learning for
expression recognition in the wild, in: Proceedings of the IEEE CVPR, 2017, pp. 2852–2861.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>V.</given-names>
            <surname>Bettadapura</surname>
          </string-name>
          ,
          <article-title>Face expression recognition and analysis: The state of the art</article-title>
          ,
          <source>CoRR abs/1203</source>
          .6722 (
          <year>2012</year>
          ). URL: http://arxiv.org/abs/1203.6722. arXiv:
          <volume>1203</volume>
          .
          <fpage>6722</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>K.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. W.</given-names>
            <surname>Akram</surname>
          </string-name>
          , R. Han,
          <string-name>
            <surname>J</surname>
          </string-name>
          . Chen,
          <article-title>Facial expression recognition with convolutional neural networks via a new face cropping and rotation strategy</article-title>
          ,
          <source>The Visual Computer</source>
          <volume>36</volume>
          (
          <year>2020</year>
          )
          <fpage>391</fpage>
          -
          <lpage>404</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>P.</given-names>
            <surname>Lucey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Cohn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kanade</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Saragih</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Ambadar</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Matthews</surname>
          </string-name>
          ,
          <article-title>The extended cohnkanade dataset (ck+): A complete dataset for action unit and emotion-specified expression</article-title>
          , in: 2010 ieee computer society CVPR-workshops, IEEE,
          <year>2010</year>
          , pp.
          <fpage>94</fpage>
          -
          <lpage>101</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Lyons</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Akamatsu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kamachi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gyoba</surname>
          </string-name>
          ,
          <article-title>Coding facial expressions with gabor wavelets</article-title>
          ,
          <source>in: Proceedings Third IEEE international conference on automatic face and gesture recognition, IEEE</source>
          ,
          <year>1998</year>
          , pp.
          <fpage>200</fpage>
          -
          <lpage>205</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Rong</surname>
          </string-name>
          ,
          <article-title>The influence of the activation function in a convolution neural network model of facial expression recognition</article-title>
          ,
          <source>Applied Sciences</source>
          <volume>10</volume>
          (
          <year>2020</year>
          )
          <year>1897</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>I. J.</given-names>
            <surname>Goodfellow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Erhan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. L.</given-names>
            <surname>Carrier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Courville</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mirza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Hamner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Cukierski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Tang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Thaler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.-H.</given-names>
            <surname>Lee</surname>
          </string-name>
          , et al.,
          <article-title>Challenges in representation learning: A report on three machine learning contests</article-title>
          ,
          <source>in: International conference on neural information processing</source>
          , Springer,
          <year>2013</year>
          , pp.
          <fpage>117</fpage>
          -
          <lpage>124</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Lian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-H.</given-names>
            <surname>Tao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Huang</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>Y.</given-names>
            <surname>Niu</surname>
          </string-name>
          ,
          <article-title>Expression analysis based on face regions in real-world conditions</article-title>
          ,
          <source>International Journal of Automation and Computing</source>
          <volume>17</volume>
          (
          <year>2020</year>
          )
          <fpage>96</fpage>
          -
          <lpage>107</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A. H.</given-names>
            <surname>Farzaneh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Qi</surname>
          </string-name>
          ,
          <article-title>Facial expression recognition in the wild via deep attentive center loss</article-title>
          ,
          <source>in: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>2402</fpage>
          -
          <lpage>2411</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>