<!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>Leveraging CLIP for Image Emotion Recognition</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alessandro Bondielli</string-name>
          <email>alessandro.bondielli@ing.unipi.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lucia C. Passaro</string-name>
          <email>lucia.passaro@unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Pisa</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Information Engineering, University of Pisa</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Multi-modal neural models that are able to encode and process both visual and textual data are becoming more and more common in the last few years. Such models enable new ways to learn the interaction between vision and text, and thus can be successfully applied to tasks of varying complexity in the domain of image and text classification. However, such models are traditionally oriented to learn grounded properties of images and of the objects they depict and less suited to solve tasks involving subjective characteristics, such as the emotions they can convey in viewers. In this paper, we provide some insights in the performances of the recently released OpenAI CLIP model for an emotion classification task. We evaluate the model both under zero-shot settings and via fine tuning on an image-emotion dataset. We compare the performances of CLIP both in a zero-shot and fine-tuning setting on (i) a standard benchmark dataset for object recognition (ii) an image-emotion dataset. Moreover, we evaluate to which extent a CLIP model adapted to emotions is able to retain general knowledge and generalization capabilities.</p>
      </abstract>
      <kwd-group>
        <kwd>Afect</kwd>
        <kwd>Emotion Classification</kwd>
        <kwd>Computer Vision</kwd>
        <kwd>Natural Language Processing</kwd>
        <kwd>CLIP</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The ever-increasing production and spread of multi-modal content over the
internet requires new analytical tools to deal with them. Although many issues
related to the multi-modal analysis of text and images have already been addressed
in the literature, it is still unclear whether and to what extent state-of-the-art
multi-modal systems can be exploited to explore the afective characteristics of
the visual contents.</p>
      <p>
        Several multi-modal resources, systems and architectures have been proposed
in the literature to approach a wide range of natively multi-modal tasks, such
as Image Captioning [
        <xref ref-type="bibr" rid="ref12 ref5">5, 12</xref>
        ], Visual Question Answering [
        <xref ref-type="bibr" rid="ref20 ref21">20, 21</xref>
        ] and Image
Generation [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. However, traditional literature in the field of Computer Vision and
Copyright © 2021 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
specifically of Image Classification typically focuses on the recognition of objects
and concrete entities depicted in the images. In this context, several large-scale
resources useful to train neural models have been released [
        <xref ref-type="bibr" rid="ref10 ref13 ref8">8, 10, 13</xref>
        ]. On these
benchmarks, the literature is plentiful of systems that have been proven efective
in solving tasks of various levels of complexity [
        <xref ref-type="bibr" rid="ref16 ref19 ref2 ref20 ref7">2, 7, 19, 20, 16</xref>
        ].
      </p>
      <p>
        On the contrary, the field of Natural Language processing has addressed
problems related to the afective properties of texts for many years. The literature
is filled with approaches dealing with sentiment, opinion and afect. For example,
several studies have been proposed to analyze the sentiment and the emotions
expressed and evoked by texts from several perspectives [
        <xref ref-type="bibr" rid="ref14 ref15 ref4 ref6">4, 6, 14, 15</xref>
        ].
      </p>
      <p>
        The sentiment encoded in images has attracted a lot of interest due to its
various applications [
        <xref ref-type="bibr" rid="ref3 ref9">3, 9</xref>
        ], ranging from human-robot interaction to social media
analysis, but the results are not on par neither with systems working only on text
nor with computer vision systems focused on concrete aspects of visual contents.
This may be due to the fact that images convey rich semantic properties and
can induce, as textual inputs can and possibly even more, emotional reactions to
users who are exposed to them. Thus, it is important to develop new benchmarks
to assess the ability of systems to classify images from an afective point of view.
      </p>
      <p>This aspect is also very relevant in the field of Industry 4.0. Companies are
in fact expected to constantly communicate with their customers using new and
efective forms of communication, such as the visual ones. On the one hand, it is
important to study the emotional content conveyed by an image. On the other
hand, especially for web marketing purposes, it is crucial to analyse the emotions
“elicited” by images in viewers.</p>
      <p>
        To the best of our knowledge, a fully multi-modal dataset that includes
realworld image samples addressing this issue is still lacking. However, a large scale
visual dataset labelled for the emotions evoked by images has been proposed
in [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]. This dataset is suitable to challenge state-of-the-art multi-modal neural
models in predicting subjective, abstract labels for a given image like emotions.
Thus, the analysis of the performances on this dataset may be seen as an early
attempt to exploit pre-trained multi-modal systems to bridge the gap between
computer vision and afect.
      </p>
      <p>
        To study aspects related to the emotions evoked by images, we decided to
base our experiments on the recently released and well-known OpenAI CLIP
model [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], a multi-modal Neural Network learned on text-image pairs. CLIP
adopts an architecture that includes an image encoder and a text encoder. The
peculiarity of CLIP resides in its contrastive training strategy. CLIP is trained
on a dataset of 32,000 image-caption pairs. Its training objective is to predict,
given an image, which of the captions was actually paired with it in the training
dataset. The goal of this pre-training is to provide the network with a wide
array of visual concepts found in images and enable it to learn how to identify
proper associations between these visual content and their textual descriptions
or presentations [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>
        In this context, the motivation of our choice to adopt CLIP is twofold. On
the one hand, the model has been trained to eficiently learn visual concepts
by exploiting natural language supervision. We can argue that it may directly
encode latent emotive concepts. On the other hand, CLIP authors claim that
it can be used to nearly arbitrary visual classification tasks [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] under
zeroshot setting. Moreover, from an implementation perspective CLIP and CLIP-like
models have a very interesting property that stems from their training approach:
representations of images and texts (e.g. captions) can be easily compared in
terms of cosine similarity between their vectors. For example, classification on a
10-class dataset can be faced with CLIP by simply encoding labels in the form
of captions, and then by identifying the closest caption (i.e. label) in terms of
cosine similarity for each image. Representations of images could be stored in
memory and queried at inference time for their similarity with either another
image or a piece of text, thus drastically reducing the computational cost at
inference time.
      </p>
      <p>
        We are conscious that analyzing afect elicited by images is a very
challenging task because people with diverse social and cultural backgrounds may have
diferent emotional reactions to the same image [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. Moreover, we know that
labelled datasets addressing this issue are scarce. However, for our preliminary
studies we consider the Image-Emotion dataset [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] as suitable to draw the first
insights to approach emotion classification of images.
      </p>
      <p>
        In this work, we propose to exploit and analyze the performances of CLIP
for the task of image emotion recognition. CLIP can be leveraged either as a
pre-trained model for zero-shot classification, as intended by the authors [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ],
or by further fine-tuning it on specific downstream tasks. Our goal is to explore
how CLIP models perform on highly subjective tasks out-of-the-box and how
they can be adapted to them via fine-tuning. Moreover, as the task of image
emotion recognition is rather challenging, we aim to compare it also with a more
standard classification task on a computer vision benchmark, namely the popular
CIFAR100 benchmark dataset [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>The contributions of this paper are the following:
– We evaluate the zero-shot performances of CLIP on two diferent
benchmark datasets, namely (i) a dataset for image emotion recognition and (ii)
a dataset for a more standard image classification problem;
– We evaluate CLIP in a fine-tuning setting on two diferent tasks, namely
(i) image emotion recognition and (ii) image classification, and compare the
obtained results;
– We evaluate to which extent CLIP is able to retain general knowledge and
generalization capabilities to other tasks after being fine-tuned.</p>
      <p>The rest of this paper is organized as follows. Section 2 thoroughly describes
the performed experiments. In Section 3 the results of the experiments are
presented and discussed in order to shed some light into the capabilities of CLIP
for image emotion recognition. Finally, Section 4 draws some conclusions and
discusses future work.</p>
    </sec>
    <sec id="sec-2">
      <title>Experiments</title>
      <p>In order to provide some insights into the capabilities of CLIP for emotion
recognition we perform several diferent experiments. The experiments are devised in
order to fulfil two goals: first, we want to assess the performances of CLIP
under zero shot settings; second, we want to evaluate the impact of fine-tuning in
the performances of the model, both for the specific task and in its
generalization capabilities. In addition to this, we try to address the diferences between
the performances of the CLIP model on more abstract and more concrete tasks
across all of the performed experiments.</p>
      <p>
        For the image emotion recognition task we employ the dataset described in
[
        <xref ref-type="bibr" rid="ref23">23</xref>
        ], that we refer to as the Image-Emotion dataset. The dataset includes 23,308
images labelled with an emotion among Amusement, Anger, Awe,
Contentment, Disgust, Excitement, Fear, and Sadness. The images are collected
and weakly labelled by searching for the emotion keywords on Instagram and
Flickr. The weak labelling is then verified with a crowdsourcing experiments.
Concerning the more concrete image classification task, we employ the popular
CIFAR100 dataset [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. It includes 60,000 images labelled with one of 100 classes
of objects such as for example Dolphin, Road, and Boy.
      </p>
      <p>Our experiments are organized as follows. First we perform zero-shot classi-fi
cation on the two dataset using the pre-trained ViT-B/32 CLIP model. Second,
we fine-tune the CLIP model on the two datasets, and evaluate its performances
in a cross-validation experiment. Third, we again perform zero-shot
classification on each of the two datasets using the model fine-tuned on the other one.
This means that the model fine-tuned on the Image-Emotion dataset is applied
to CIFAR100 and vice versa. This aims to understand how fine-tuning afects
zero-shot performances on other tasks.</p>
      <p>All the experiments are performed by exploiting the CLIP python library3
and the oficial pre-trained available models. In the following, we thoroughly
describe the experiments and show the obtained results.
2.1</p>
      <sec id="sec-2-1">
        <title>Zero-shot classification</title>
        <p>
          In the first set of experiments, we simply employ a pre-trained CLIP model to
classify images under zero shot settings. Following the original CLIP paper [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ],
we perform classification by means of cosine similarity between image
representations and captions. Notably, since we have labels and not captions for both of the
employed datasets, we first generate a caption for each label in the dataset. For
CIFAR100, the employed caption is “a photo of a &lt; label &gt;”, where &lt; label &gt; is
one of the 100 labels of the dataset. For the Image-Emotion dataset, the caption
is “an image that evokes the emotion of &lt; emotion &gt;”, where &lt; emotion &gt; is
one of the eight emotion labels. We use a diferent wording for the two datasets
(i.e., image and photo) due to the fact that all the data in CIFAR100 consists
of photos, while the Image-Emotion dataset includes also more abstract images.
3 https://github.com/openai/CLIP
        </p>
        <p>For both experiments, we encode all the images and all the captions with
the CLIP model. Specifically, we use the ViT-B/32 pre-trained model. Then, we
compute cosine similarity between the representations of each image and each
caption. To obtain the final label, we simply assign to each image the caption
(label) with the highest cosine similarity to it.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Fine-Tuning CLIP</title>
        <p>For the second set of experiments, our goal is to evaluate how much
improvement could be obtained on downstream tasks by fine-tuning a base CLIP model.
More specifically, we focus on the two downstream tasks of (i) image emotion
classification on the Image-Emotion dataset and (ii) image classification on the
CIFAR100 benchmark.</p>
        <p>In order to obtain reliable and comparable estimations of the performances,
we use 10-fold cross validation during training. However, since the two datasets
are diferent in terms of size, number of classes, and distribution of classes, we also
perform some hyperparameter tuning to obtain the best possible results on both
datasets. For the sake of brevity we leave out the details of parameter tuning.
However, in this regard it is very interesting to notice how the process of
finetuning CLIP is extremely sensitive to diferent hyperparameters. For example,
a slight change in learning rate or number of training epochs may lead to a
decrease in performances of up to 0.20 in weighted and macro average F1-Score.</p>
        <p>First, we experiment with the Image-Emotion dataset. We refer to the
resulting model as Emotion-CLIP. As previously mentioned, we perform 10-fold
cross validation on the whole dataset. Each fold is composed of 20,000 training
examples and 3,500 test examples. The model is evaluated by predicting the
most likely label for each image by means of cosine similarity with respect to the
generated captions, as under zero-shot setting described in Section 2.1. As for
the hyperparameters, we train each fold for 3 epochs with a batch size of 256.
We use an Adam optimizer with a learning rate of 2e-5 and a 0.2 weight decay.
Training each epoch took roughly 3 minutes on a Nvidia Titan RTX GPU. To
obtain the final results for the classification, we average performances on each
fold.</p>
        <p>In order to further evaluate how the process of fine-tuning can be helpful also
for zero-shot capable models, we propose to exploit a simpler and more grounded
task of image classification on the CIFAR100 dataset. We refer to the trained
model as CIFAR100-CLIP. As for the previous experiment, we perform 10-fold
cross validation on the entire dataset (i.e. the concatenation of train and test
set), with the predictions obtained by means of cosine similarity between images
and captions. Each fold is composed by 54,000 training samples and 6,000 test
samples. Note that the distribution of classes on the whole dataset is perfectly
balanced (i.e. each label is associated with exactly 6,000 images). After tuning
the parameters, we chose to train the model on each fold for 1 epoch with a
batch size of 256. The same learning rate and optimizer used for Emotion-CLIP
are employed also in this case.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Evaluation of fine-tuning on generalization capabilities of CLIP</title>
        <p>
          While fine-tuning is a viable strategy for applying CLIP to downstream
classiifcation task, the original goal of CLIP is to take advantage of the interaction
between natural language and images to perform image classification tasks
without the need of direct optimization for the dataset at hand [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. With the last
set of experiments, our goal is twofold. On the one hand, we want to
straightforward understand how and how much fine tuning on a benchmark task actually
afect the zero-shot capabilities of CLIP. On the other hand, the experiments also
serve to assess the extent to which a specific kind of benchmark data may afect
zero-shot performances. In the original paper, authors clearly state that while
zero-shot performances on simpler image classification tasks are very promising,
the model encounters more dificulties when the task becomes more complex
(e.g. counting specific objects in the image) or more abstract. In this context,
we want to shed some light into how fine-tuning on a more challenging task
such as emotion recognition would afect performances on simpler tasks, and
vice versa.
        </p>
        <p>In order to pursue this goal, we propose the following experiments. We first
ifne-tune the Emotion-CLIP model on the whole Image-Emotion dataset, and
test it under zero-shot settings on the CIFAR100 dataset for image classification.
Then, we do the opposite, i.e. we train CIFAR100-CLIP on the CIFAR100 dataset
and test it for image emotion recognition on the Image-Emotion Dataset.</p>
        <p>Both Emotion-CLIP and CIFAR100-CLIP are trained on their respective
datasets with the same parameters employed for the cross-validation experiments
described in Section 2.2. The only diference is that, in this case, the model is
trained on the whole dataset. As for testing, the models are deployed in
zeroshot setting and labels for both the CIFAR100 and Image-Emotion Dataset are
obtained by means of cosine similarity between images and generated captions.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results and Discussion</title>
      <p>In this Section, we provide the results obtained for each of the performed
experiments and discuss them to shed some light on the performances of CLIP with
the diferent settings and datasets.
3.1</p>
      <sec id="sec-3-1">
        <title>Zero-shot classification</title>
        <p>First, we evaluate the performances of the CLIP model under zero-shot settings
both for the Image-Emotion dataset and for the CIFAR100 benchmark. As
described in Section 2.1, for both the experiments the original CLIP ViT-B/32
pre-trained model was asked to compare the cosine similarity between the
generated captions and the images. As for the Image-Emotion dataset, we used the
following captions: “an image that evokes the emotion of &lt; emotion &gt;”, where
&lt; emotion &gt; stands for one of the eight emotion classes in the dataset. As for the
CIFAR100 benchmark, the captions were of the form “a photo of a &lt; label &gt;”,
where &lt; label &gt; is one of the 100 labels in CIFAR100.</p>
        <p>CIFAR100</p>
        <p>Image-Emotion
Accuracy
Precision</p>
        <p>Recall
F1-Score</p>
        <p>Results for the two datasets are shown in Table 1. We report accuracy,
weighted-average and macro-average precision, recall, and F1-score for each
dataset. We can see that, as expected, despite the much higher number of classes
in the CIFAR100 dataset, the CLIP model under zero-shot settings is better
able to predict its labels with respect to the emotion elicited by the image in
the Image-Emotion dataset. We can argue that this is due to the fact that the
training data for CLIP is much more akin to the CIFAR100 classification task.
However, it is interesting to notice how the baseline model is nevertheless fairly
able to face also a more complex and more abstract task such as emotion
recognition out-of-the-box.</p>
        <p>For the sake of completeness, we also report on class-level performances for
the Image-Emotion dataset in Table 2.</p>
        <p>We notice that there is a high variance in performances among classes, that
is however not directly related to the sample size on each class. In fact, it seems
that some emotions such as Disgust and Sadness are harder to model for the
CLIP base model.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Fine-Tuning CLIP</title>
        <p>In the second set of experiments, we evaluated the performances of fine-tuning
the CLIP model for specific downstream tasks on the Image-Emotion dataset and
on the CIFAR100 benchmark. The implementation details for the experiments
are described in Section 2.2.</p>
        <p>Table 3 reports on the results of the Emotion-CLIP model. For completeness,
we also report the performances for each class.</p>
        <p>It is interesting to notice how performances drastically improve by means of
leveraging a fine-tuned model trained on images and small captions that describe
and mention the emotion that is likely to be elicited when watching that image.
Interestingly, the model and nfie-tuning process is also rather sensitive to the
input captions that describe the labels. During the experiments we noticed in
fact that captions that use more complex words, such as for example “an image
that elicit &lt; emotion &gt;”, or that are more direct in describing the image (e.g.
“this image is about &lt; emotion &gt;”) are consistently outperformed by models
trained on a more simple yet specific and clear caption. While diferences in
performances are in the order of a few percentage points, i.e. 3-5%, it is nonetheless
an interesting issue that could be explored further and more in-depth. Another
interesting aspect that can be taken into account is the fact that performance
vary rather widely across the diferent emotions. This may be due to the fact
that describing (and thus recognizing) images eliciting certain emotions, such as
Fear and Sadness, may be harder than with emotions such as Amusement
and Disgust that may have more prominent visual features in the images. In
addition to this, the size of the dataset and distribution of the labels must be
taken into account as well. Interestingly, Disgust was the class for which
performances were the worst in the zero-shot setting. Thus, in this case, it appears
that the fine-tuning was rather helpful in pinpointing visual features of the
emotion. Figure 1 shows some examples that highlight the diferences between the
zero-shot and the fine-tuned model. Specifically, we considered each caption (i.e.
emotion) and show the top-8 images associated with that caption in the dataset
extracted using zero-shot CLIP (top) and Emotion-CLIP (bottom). From the
images, it is first and foremost clear that fine-tuning is very efective in learning
better representations for the captions, and thus it is closer to images that
actually represent the emotional content. Second, it is also interesting to notice that
while the performances for classes such as Fear and Sadness are sub-par with
respect to other emotions, the top-8 images actually represent them quite well.
This may serve as an indication that fine-tuned CLIP models may be extremely
helpful also for retrieval purposes.</p>
        <p>Table 4 reports instead on the results of the CIFAR100-CLIP model. In this
case, due to space concerns we report only the overall average performances of
the model.</p>
        <p>It is clear from the results that, even after only 1 epoch of fine-tuning, the
model is closer to solve the CIFAR100 dataset with respect to the baseline CLIP
model, with performances above 0.80 on all the considered metrics.
(a) Amusement
(b) Anger</p>
        <p>(c) Awe
(d) Contentment</p>
        <p>(e) Disgust
(f) Excitement
(g) Fear
(h) Sadness</p>
        <p>It is also very interesting to notice that if we compare the results of
Emotion-CLIP with those of CIFAR100-CLIP, we see that the diferences in
performances before and after the fine-tuning are similar for both experiments, with
an improvement of around 0.20 across all metrics. This is interesting
considering that the original model is much better suited to perform image classification
tasks similar to the one of CIFAR100. We could speculate that, given a zero-shot
capable model such as CLIP, the improvements in performances on downstream
tasks and benchmark data may be limited by the architecture of the model itself.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Evaluation of fine-tuning on generalization capabilities of CLIP</title>
        <p>In the final experiments, we evaluated the zero-shot capabilities of CLIP after
ifne-tuning on a diferent dataset, i.e. the extent to which fine-tuning on specific
data may afect the zero-shot performances on diferent dataset. Recall that
in order to do so, we first trained Emotion-CLIP and CIFAR100-CLIP on their
respective dataset, with the same settings described in Section 2.2. Then, we
exploited the fine-tuned models to perform classification on the other considered
dataset. The details of the experiments are described in Section 2.3.</p>
        <p>Results of the experiments are shown in Table 5.</p>
        <p>If we analyze the results of leveraging fine-tuned CLIP for diferent tasks, we
can identify an interesting trend. We saw in Section 2.2 that fine-tuning for a
specific task is efective in improving performances. In this case, both fine-tuned
models perform worse than the ViT-B/32 CLIP pre-trained model on a task
they are not fine-tuned on. This is clearly expected as the models’ weights are
shifted towards the end goal of the downstream tasks. However, it is interesting
to notice that both the experiments show rather similar degradation of the
performances. In fact, both the models lose between 15 and 20% of F1-Score when
tested on a diferent benchmark. This is interesting if we consider the nature of
the training set of CLIP and its performances on simpler tasks with respect to
more complex and/or abstract ones. The CIFAR100 dataset is definitely more
akin to the original training set with respect to the Image-Emotion dataset,
thus the resulting model should be more similar to the original one in terms of
weights, i.e. it has to learn less about the classes. On the other hand, addressing
image emotion classification starting from a pre-trained model requires a deeper
adaptation of the model. This is also proven by the fact that CIFAR100-CLIP
needed only a training epoch to learn the dataset, while Emotion-CLIP needed
three. However, the relative closeness between CIFAR100-CLIP and the original
CLIP model does not avoid the performance degradation in zero-shot settings on
the image emotion classification. Notably, such a degradation is similar to the
one detected by performing zero-shot classification on the CIFAR100 dataset
starting from a model specialized on detecting emotions.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions and Future Works</title>
      <p>In this paper, we have provided an evaluation of CLIP for the detection of
emotions elicited by images. We experimented with the model both under zero-shot
settings and by leveraging a fine-tuning strategy, and evaluate the advantages
and drawbacks of both also in comparison with a more straightforward
computer vision task. Exploiting CLIP as a zero-shot classifier provides good and
rather inexpensive out-of-the-box performances on image classification, while for
image emotion recognition the obtained results still show a wide margin of
improvement. By leveraging fine tuning, we saw a significant improvement, similar
in both considered tasks, but at the cost of generalization. A fine-tuned model
on a specific downstream task performs worse than the base CLIP model on a
benchmark it is not trained on.</p>
      <p>
        The obtained results provide an early insight into exploiting state-of-the-art
multi-modal models to characterize the emotions elicited by images, and thus
on more abstract and subjective tasks. In the future, we plan to extend this
line of research by leveraging diverse models and datasets. To this extent, we
plan to create a new dataset in which the emotive labels associated with images
are provided with textual information describing the choice of the labelling,
according to the annotation schema adopted in the ArtEmis [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] dataset, which
is focused on art. Moreover, we plan to face the emotion recognition task as
multilabel problem, in order to better learn how emotional texts can be associated
to images and vice versa. Finally, we plan to perform a more in-depth and
systematic study on the impact of the generated captions on the final model
quality.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Achlioptas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ovsjanikov</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Haydarov</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elhoseiny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guibas</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Artemis: Afective language for visual art</article-title>
          .
          <source>CoRR abs/2101</source>
          .07396 (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>He</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buehler</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teney</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Johnson,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Gould</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Zhang</surname>
          </string-name>
          , L.:
          <article-title>Bottom-up and top-down attention for image captioning and visual question answering</article-title>
          .
          <source>In: Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          . pp.
          <fpage>6077</fpage>
          -
          <lpage>6086</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Borth</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ji</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Breuel</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chang</surname>
            ,
            <given-names>S.F.</given-names>
          </string-name>
          :
          <article-title>Large-scale visual sentiment ontology and detectors using adjective noun pairs</article-title>
          .
          <source>In: Proceedings of the 21st ACM international conference on Multimedia</source>
          . pp.
          <fpage>223</fpage>
          -
          <lpage>232</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Chatterjee</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Narahari</surname>
            ,
            <given-names>K.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joshi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agrawal</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          : SemEval
          <article-title>-2019 task 3: EmoContext contextual emotion detection in text</article-title>
          .
          <source>In: Proceedings of the 13th International Workshop on Semantic Evaluation</source>
          . pp.
          <fpage>39</fpage>
          -
          <lpage>48</lpage>
          . Association for Computational Linguistics, Minneapolis, Minnesota, USA (Jun
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Cornia</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stefanini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baraldi</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cucchiara</surname>
          </string-name>
          , R.:
          <article-title>Meshed-memory transformer for image captioning</article-title>
          .
          <source>In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition</source>
          . pp.
          <fpage>10578</fpage>
          -
          <lpage>10587</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Cortis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Freitas</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daudert</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huerlimann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zarrouk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Handschuh</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Davis</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>SemEval-2017 task 5: Fine-grained sentiment analysis on financial microblogs and news</article-title>
          .
          <source>In: Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017)</source>
          . pp.
          <fpage>519</fpage>
          -
          <lpage>535</lpage>
          . Association for Computational Linguistics, Vancouver, Canada (Aug
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Hossain</surname>
            ,
            <given-names>M.Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sohel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shiratuddin</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Laga</surname>
          </string-name>
          , H.:
          <article-title>A comprehensive survey of deep learning for image captioning</article-title>
          .
          <source>ACM Computing Surveys (CsUR) 51(6)</source>
          ,
          <fpage>1</fpage>
          -
          <lpage>36</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Hudson</surname>
            ,
            <given-names>D.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manning</surname>
          </string-name>
          , C.D.:
          <article-title>Gqa: A new dataset for real-world visual reasoning and compositional question answering</article-title>
          .
          <source>In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition</source>
          . pp.
          <fpage>6700</fpage>
          -
          <lpage>6709</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Jia</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cai</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tang</surname>
          </string-name>
          , J.:
          <article-title>Can we understand van gogh's mood? learning to infer afects from images in social networks</article-title>
          .
          <source>In: Proceedings of the 20th ACM international conference on Multimedia</source>
          . pp.
          <fpage>857</fpage>
          -
          <lpage>860</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Krishna</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Groth</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Johnson</surname>
          </string-name>
          , J.,
          <string-name>
            <surname>Hata</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kravitz</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kalantidis</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>L.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shamma</surname>
            ,
            <given-names>D.A.</given-names>
          </string-name>
          , et al.:
          <article-title>Visual genome: Connecting language and vision using crowdsourced dense image annotations</article-title>
          .
          <source>International journal of computer vision 123(1)</source>
          ,
          <fpage>32</fpage>
          -
          <lpage>73</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Krizhevsky</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Learning multiple layers of features from tiny images pp</article-title>
          .
          <fpage>32</fpage>
          -
          <lpage>33</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yin</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dong</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wei</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , et al.:
          <article-title>Oscar: Object-semantics aligned pre-training for vision-language tasks</article-title>
          .
          <source>In: European Conference on Computer Vision</source>
          . pp.
          <fpage>121</fpage>
          -
          <lpage>137</lpage>
          . Springer (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>T.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maire</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Belongie</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hays</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perona</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramanan</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Dolalr´,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Zitnick</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.L.</surname>
          </string-name>
          :
          <article-title>Microsoft coco: Common objects in context</article-title>
          .
          <source>In: European conference on computer vision</source>
          . pp.
          <fpage>740</fpage>
          -
          <lpage>755</lpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Mohammad</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bravo-Marquez</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Salameh</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kiritchenko</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>SemEval-2018 task 1: Afect in tweets</article-title>
          .
          <source>In: Proceedings of The 12th International Workshop on Semantic Evaluation</source>
          . pp.
          <fpage>1</fpage>
          -
          <lpage>17</lpage>
          . Association for Computational Linguistics, New Orleans,
          <source>Louisiana (Jun</source>
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Passaro</surname>
            ,
            <given-names>L.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenci</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Evaluating context selection strategies to build emotive vector space models</article-title>
          .
          <source>In: Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC</source>
          <year>2016</year>
          ).
          <source>Portorzoˇ (Slovenia) (May</source>
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Passaro</surname>
            ,
            <given-names>L.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenci</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Less is more: a multimodal system for tag refinement</article-title>
          .
          <source>In: Proceedings of the 4th Workshop on Natural Language for Artificial Intelligence (NL4AI</source>
          <year>2020</year>
          ). pp.
          <fpage>44</fpage>
          -
          <lpage>58</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Radford</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hallacy</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramesh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goh</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agarwal</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sastry</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Askell</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mishkin</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clark</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , et al.:
          <article-title>Learning transferable visual models from natural language supervision</article-title>
          .
          <source>arXiv preprint arXiv:2103.00020</source>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Ramesh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pavlov</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goh</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gray</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Voss</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Radford</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sutskever</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Zero-shot text-to-image generation</article-title>
          . In: Meila,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Zhang</surname>
          </string-name>
          , T. (eds.)
          <source>Proceedings of the 38th International Conference on Machine Learning. Proceedings of Machine Learning Research</source>
          , vol.
          <volume>139</volume>
          , pp.
          <fpage>8821</fpage>
          -
          <lpage>8831</lpage>
          . PMLR (
          <volume>18</volume>
          -
          <fpage>24</fpage>
          Jul
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Simonyan</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zisserman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Very deep convolutional networks for large-scale image recognition</article-title>
          .
          <source>arXiv preprint arXiv:1409.1556</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Tan</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bansal</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>LXMERT: Learning cross-modality encoder representations from transformers</article-title>
          .
          <source>In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)</source>
          . pp.
          <fpage>5100</fpage>
          -
          <lpage>5111</lpage>
          . Association for Computational Linguistics, Hong Kong,
          <source>China (Nov</source>
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Teney</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>He</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          , Van Den Hengel, A.:
          <article-title>Tips and tricks for visual question answering: Learnings from the 2017 challenge</article-title>
          .
          <source>In: Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          . pp.
          <fpage>4223</fpage>
          -
          <lpage>4232</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>She</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Joint image emotion classification and distribution learning via deep convolutional neural network</article-title>
          .
          <source>In: IJCAI</source>
          . pp.
          <fpage>3266</fpage>
          -
          <lpage>3272</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>You</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Building a large scale dataset for image emotion recognition: The fine print and the benchmark</article-title>
          .
          <source>Proceedings of the AAAI Conference on Artificial Intelligence</source>
          <volume>30</volume>
          (
          <issue>1</issue>
          ) (
          <year>Feb 2016</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>