<!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>Disaster based Visual Sentiment Analysis using Deep Learning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mohsin Ali</string-name>
          <email>mohsin.ali@nu.edu.pk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Hanif</string-name>
          <email>hanif.soomro@nu.edu.pk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Atif Tahir</string-name>
          <email>atif.tahir@nu.edu.pk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Nouman Durrani</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Muhammad Rafi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National University of Computer and Emerging Sciences, Karachi Campus</institution>
          ,
          <country country="PK">Pakistan</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>13</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>In case of a disaster, a large number of relevant and irrelevant images are propagated through social networks. In this case, the sentiment identification of such disasters is important to speed up relief work in the afected region. This paper describes the contribution of FASTNU-DS team for the Visual Sentiment Analysis: A Natural Disaster MediaEval Use-case [4] held at MediaEval 2021. Various pre-trained deep learning-based models for the single-label classification and multi-label classification tasks have been used for feature extraction and classification. Data augmentation techniques to over-sample minority classes were used to deal with the inherent imbalance nature of the dataset. For a single-label and multi-label classification of tasks, VGG16 proved to be more useful than ResNet50. In this work, we achieved a 0.65 weighted F1 score for the first single label classification subtask and 0.54 and 0.41 weighted-F1 scores for the second and third multi-label subtasks, respectively. Visual Sentiment Analysis: A Natural Disaster Use-case task of MediaEval, 2021, involves multi-class and multi-label classification tasks. Various similar studies have been performed which has focused on visual sentiment analysis.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Disaster creates a dificult situation to handle, which may harm
valuable resources and loss of human lives. Government, NGOs and
the public use diferent social networks to propagate relevant and
irrelevant information about the natural calamity in the form of
images, videos, and posts to aware others. In literature, researchers
have more focused on text-based sentiment analysis using NLP.
However, images and videos sentiment analysis using ML models
is an open research problem and need attention to identify
sentiments communicated through images. These images may reveal
emotional responses. Hence, careful identification of disaster the
sentiment is important to stop, aware and control any miss lead.
For example, this image-based sentiment analysis may be used for
rapid identification of situational awareness during disaster and
assistance in restoration activities. In addition, the categorization of
such images may further be used to understand the adversity of the
situation. In this work, we have worked on the "Visual Sentiment
Analysis: A Natural Disaster Use-case at MediaEval 2021". The
research has performed single-label and multi-label classification to
identify visual sentiments that occurred during disasters [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>RELATED WORK</title>
      <p>
        The research efort has focused on disaster-related images from
social media and also implemented various deep learning-based
methods [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Researchers have used crowd-sourcing to annotate
images in multi-label classes, where one image may be a part of one
or more classes based on visual sentiments. Moreover, researchers
have also implemented various deep learning based models, which
were pre-trained on datasets of ImageNet and Places [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Another research efort has proposed a framework that considers
both text and image-based visual sentiment analysis [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The
framework has analyzed geo-tagged data objects from disaster-related
social media images. The framework is partitioned into sentiment
analysis, geo-sentiment modelling, and spatial-temporal
partitioning. Moreover, the research has extracted data from Twitter and
Flicker, which is related to Napa Earthquake and Hurricane Sandy
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Similarly, a class-specific residual attention module (CSRA) has
been proposed, which has an extremely simple and eficient model,
It requires fewer resources for training and achieved the state of
the art results for various datasets of multi-label classification of
images[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Recently, ensemble-based approaches, such as bagging,
boosting and stacking have been discussed by the researchers in
image classification [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>PROPOSED APPROACH</title>
      <p>
        The dataset for the task of "Visual Sentiment Analysis A Natural
Disaster Use-case" at MediaEval, 2021, contains 2432 images[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
The dataset has been used for three diferent tasks. In the first
task, single-label classification is performed among three classes:
positive, negative, and neutral. While second and third subtasks
involve multi-label classicfiation, which contains 7 and 10 classes,
respectively.
3.1
      </p>
    </sec>
    <sec id="sec-4">
      <title>Proposed approach for Subtask 1</title>
      <p>The proposed method for the first subtask of single label
classification has been designed by performing diferent experiments to
select image augmentation technique and appropriate deep learning
model.</p>
      <p>As the dataset used for the first subtask is imbalanced. The
negative class contains 1695 images, and the positive class includes
648 images. However, the neutral class includes 89 images, which
is significantly less than the positive and negative classes. Three
diferent methods are utilized to manage the challenge of class
imbalance, including weight assignment to classes, oversampling,
and image augmentation. In the first attempt, diferent weights are
allocated to all three classes, so that they can be balanced.
Another class balancing efort has been performed by increasing
the number of images by simply using oversampling. The
oversampling technique increases copies of instances of minority class
and makes them equal to majority class. The method has proved
better in comparison to the weight balancing technique. In last, the
class imbalance has been reduced by using the data augmentation
technique, in which variants of a single image are created by
using diferent augmentation techniques. Moreover, augmentation
techniques including random shift, random flip, random brightness,
and random zoom are applied to increase the number of images in
minority classes and make them equal in quantity. The data
augmentation technique has provided the best results in tackling class
imbalance problems compared to oversampling and class weight
assignment techniques.</p>
      <p>
        There are two deep learning based pre-trained models are
selected for the experiments, including Visual Geometry Group (VGG)
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and ResNet50 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Both of the networks are used by pre-training
on the ImageNet [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] dataset. The experiments on the training set
revealed that VGG16 had produced a higher F1-score than ResNet50.
Hence VGG16 has been selected to be implemented to predict
unseen test instances. Moreover, the ImageNet dataset carries weights,
which focuses on objects, while the visual sentiment analyzer
requires scenario-based information. Due to this, the last six layers of
the model are unfrozen so that retraining can be performed using
the visual sentiment analysis dataset. Also, remaining of the layers
are frozen to avoid their retraining. During training, various
hyperparameters have been experimented, and the best combination
is applied for the training of the model. The learning rate for the
model is set as 10−4, and the softmax activation function has been
used for the processing. The quantity of epochs is set automatically
by applying early-stopping based on the best F1 score.
      </p>
      <p>To improve the eficiency of experiments, all the experiments
are initially performed by converting images into grayscale, which
has reduced the processing time for the method. After selecting
optimal values for hyperparameters, coloured images are used to
further improve the method’s performance. The trained model is
then applied for the prediction of test set instances, which are 1199
images.
3.2</p>
    </sec>
    <sec id="sec-5">
      <title>Proposed approach for Subtask 2 and 3</title>
      <p>Subtask 2 and Subtask 3 are aimed to classify images based on
multi-label image classification, where one image can be assigned
to various classes, according to its depicted emotions. According to
subtask 2, the image may belong to one or more classes, including
anger, disgust, joy, fear, neutral, surprise, and sadness. However, for
subtask 3, the image may acquire one or more classes, and it is also
a multi-label classification task. The diference between subtask 2
and subtask 3 is the number of classes containing 7 and 10 classes,
respectively.</p>
      <p>The dataset is imbalanced for subtask 2 and subtask 3, and few
classes contain more images than other classes. The oversampling
technique is utilized to increase the number of images in minority
classes to reduce the class imbalance.</p>
      <p>After balancing the classes, the VGG16 pre-trained on ImageNet
is fine-tuned on the dataset for subtask 2 and subtask 3.
Moreover, the sigmoid activation function is used to predict multi-label
classification.
4</p>
    </sec>
    <sec id="sec-6">
      <title>RESULTS AND ANALYSIS</title>
      <p>At the initial stage, VGG16 and ResNet50 have been experimented
for subtask 1. The implementation has been performed on three
different data balancing techniques: weight balancing, oversampling,
and image augmentation. The weighted F1 scores on training data
for the first subtask are shown in Table 1.</p>
      <p>
        The training experiments have proved VGG16 as a better
pretrained model and image augmentation as the best class balancing
technique. By considering better performance, the VGG16 has been
trained on the whole dataset and used to predict test data. The image
augmentation technique is used for class balancing in subtask 1.
However, for subtask 2 and subtask 3, the oversampling technique
increases the number of minor classes. The results for test-set are
visualized in Table 2.
The research has proposed a deep learning-based model for
singlelabel and multi-label classification tasks to analyze visual
sentiments during disastrous conditions. The approach has tried various
class balancing techniques and pre-trained models. Furthermore,
the research can be extended by using weights from the Places
dataset [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], which involves scene-level information and may
produce better performance. Moreover, for multi-label classification,
the image augmentation technique may be used to over-sample the
minority classes.
      </p>
    </sec>
    <sec id="sec-7">
      <title>ACKNOWLEDGMENTS</title>
      <p>This work was supported in part by the Smart Video Surveillance
Lab, an afiliated Laboratory of (NCBC), FAST-National University
of Computer Emerging Science.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Abdullah</given-names>
            <surname>Alfarrarjeh</surname>
          </string-name>
          , Sumeet Agrawal, Seon Ho Kim, and
          <string-name>
            <given-names>Cyrus</given-names>
            <surname>Shahabi</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Geo-spatial multimedia sentiment analysis in disasters</article-title>
          .
          <source>In 2017 IEEE International Conference on Data Science and Advanced Analytics (DSAA)</source>
          . IEEE,
          <fpage>193</fpage>
          -
          <lpage>202</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Jia</given-names>
            <surname>Deng</surname>
          </string-name>
          , Wei Dong, Richard Socher,
          <string-name>
            <surname>Li-Jia</surname>
            <given-names>Li</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Kai</given-names>
            <surname>Li</surname>
          </string-name>
          , and
          <string-name>
            <surname>Li</surname>
          </string-name>
          Fei-Fei.
          <year>2009</year>
          .
          <article-title>Imagenet: A large-scale hierarchical image database</article-title>
          .
          <source>In 2009 IEEE conference on computer vision and pattern recognition. Ieee</source>
          ,
          <volume>248</volume>
          -
          <fpage>255</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Syed</given-names>
            <surname>Zohaib</surname>
          </string-name>
          <string-name>
            <surname>Hassan</surname>
          </string-name>
          , Kashif Ahmad, Steven Hicks, Pål Halvorsen, Ala Al-Fuqaha,
          <string-name>
            <given-names>Nicola</given-names>
            <surname>Conci</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Michael</given-names>
            <surname>Riegler</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Visual sentiment analysis from disaster images in social media</article-title>
          . arXiv preprint arXiv:
          <year>2009</year>
          .
          <volume>03051</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Syed</given-names>
            <surname>Zohaib</surname>
          </string-name>
          <string-name>
            <given-names>Hassan</given-names>
            , Kashif Ahmad, Michael Riegler, Steven Hicks, Nicola Conci, Pål Halvorsen, and
            <surname>Ala</surname>
          </string-name>
          Al-Fuqaha.
          <year>2021</year>
          .
          <article-title>Visual Sentiment Analysis: A Natural Disaster Use-case Task at MediaEval 2021</article-title>
          .
          <source>In Proceedings of the MediaEval 2021 Workshop</source>
          , Online.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Kaiming</given-names>
            <surname>He</surname>
          </string-name>
          , Xiangyu Zhang, Shaoqing Ren, and
          <string-name>
            <given-names>Jian</given-names>
            <surname>Sun</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Deep residual learning for image recognition</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          .
          <volume>770</volume>
          -
          <fpage>778</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Karen</given-names>
            <surname>Simonyan</surname>
          </string-name>
          and
          <string-name>
            <given-names>Andrew</given-names>
            <surname>Zisserman</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <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="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Muhammd</given-names>
            <surname>Waqas</surname>
          </string-name>
          , Muhammad Atif Tahir, and
          <string-name>
            <given-names>Rizwan</given-names>
            <surname>Qureshi</surname>
          </string-name>
          .
          <year>2021</year>
          .
          <article-title>Ensemble-Based Instance Relevance Estimation in Multiple-Instance Learning</article-title>
          .
          <source>In 2021 9th European Workshop on Visual Information Processing (EUVIP)</source>
          .
          <source>IEEE</source>
          , 1-
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Bolei</given-names>
            <surname>Zhou</surname>
          </string-name>
          , Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba.
          <year>2017</year>
          .
          <article-title>Places: A 10 million image database for scene recognition</article-title>
          .
          <source>IEEE transactions on pattern analysis and machine intelligence 40</source>
          ,
          <issue>6</issue>
          (
          <year>2017</year>
          ),
          <fpage>1452</fpage>
          -
          <lpage>1464</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Ke</given-names>
            <surname>Zhu</surname>
          </string-name>
          and
          <string-name>
            <given-names>Jianxin</given-names>
            <surname>Wu</surname>
          </string-name>
          .
          <year>2021</year>
          .
          <article-title>Residual Attention: A Simple but Efective Method for Multi-Label Recognition</article-title>
          .
          <source>In Proceedings of the IEEE/CVF International Conference on Computer Vision</source>
          . 184-
          <fpage>193</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>