<!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>Predictive Uncertainty Masks from Deep Ensembles in Automated Polyp Segmentation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Felicia Ly Jacobsen</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>SimulaMet</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Norway f.l.jacobsen@fys.uio.no</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>13</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>This paper presents the submission of team F-HOST for the Medico: Transparency in Medical Image Segmentation task held at MediaEval 2021. We propose a U-Net-based ensemble model for solving the automatic polyp segmentation task and interpret the predictions using a specific method for obtaining uncertainty. Our predicted segmentation masks show a mean Dice score of 45.01% based on the test data. The corresponding uncertainties show systematic errors towards the training data, which indicates overfitting.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>I</p>
    </sec>
    <sec id="sec-2">
      <title>INTRODUCTION</title>
      <p>
        Polyps are abnormal growths inside the lining of the colon or
rectum. They can potentially develop into being malignant, leading to
colorectal cancer, and thereby act as a precursor for cancer.
Detecting and removing polyps with colonoscopic polypectomy during or
before further development, will allow for more treatment options
and overall improved prognosis [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Currently, the gold standard of finding and removing polyps
is through a procedure called colonoscopy. This procedure is
dependent upon diferences in skill, experience, and technique of
the endoscopists. However, studies show that up to 28% remain
undetected [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Automated semantic segmentation based on deep
learning frameworks can be used as a tool to detect polyps based
on images from colonoscopy examinations. Deep Ensembles can
provide an uncertainty quality of the predicted segmentation, even
for ensembles with five trained models [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This method is known
as being easy to implement and being scalable to diferent deep
learning (DL) frameworks and can additionally improve
classification error and robustness in terms of dataset shift. In this paper, the
results based on the challenge test data are presented and discussed,
including their corresponding uncertainty mask estimated from a
Deep Ensemble model consisting of five U-Net networks.
II
      </p>
    </sec>
    <sec id="sec-3">
      <title>APPROACH</title>
      <p>
        In this section, the approach to the Medico task "Transparency
in Medical Image Segmentation" of the MediaEval 2021 challenge
is presented. All models were trained using the PyTorch
framework [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] on an Nvidia Tesla V100 32GB General-Purpose Graphics
Processing Unit (GPGPU).
      </p>
      <p>II.1</p>
    </sec>
    <sec id="sec-4">
      <title>Datasets</title>
      <p>
        There is a total of 1, 362 images in the development dataset [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. We
randomly select 272 for validation and the rest for training. The
test data only consist of a total of 200 images, excluding the ground
truth masks. The dataset is based on the HyperKvasir dataset [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
but includes additional images and masks.
      </p>
      <p>II.2</p>
    </sec>
    <sec id="sec-5">
      <title>Experimental Setup</title>
      <p>
        We used the U-Net architecture as the base model for the Deep
Ensemble, with a total of five U-Nets. The development data was
resized into 256 × 256 pixels before training, due to memory
constraints and to reduce training time. The training data was split into
batches of 32 images in order to obtain greater training eficiency
as opposed to a larger batch size of, e.g., 64. Data augmentation was
performed on the fly for each training iteration in order to obtain
improved generalization. We use techniques such as blurring, color
jitter, horizontal flip, random rotate 90◦ , and vertical flip. Instead
of using transposed convolution in the decoder part of the network
as proposed in the original U-Net paper [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], two-dimensional
bilinear upsampling is used in order to avoid potential checkerboard
artifacts. All models in the ensemble were trained using an initial
learning rate of 1 · 10−4, with a learning rate scheduler with a
minimum learning rate of 1 · 10−7. Each model had a total of 150 training
iterations, using the Adam optimizer [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the Dice coeficient
loss. After the last training iteration, the model weights for each
model in the deep ensemble was saved in a .pt format.
Hyperparameter tuning was done manually by observing the dice loss on the
validation data as a function of training iterations, and evaluating
the Dice Coeficient (DE), Jaccard Index (JI) and Accuracy.
      </p>
      <p>When performing prediction with the deep ensemble, each
individual model is loaded, and each predict on the input image from
the test dataset. The element-wise mean is calculated from the
output from each of the models in the ensemble. They are later
pushed through a Sigmoid activation and thresholded into binary
pixel values. The variance provided by the ensemble is used as an
approximation for the uncertainty of each prediction mask. This
is calculated by taking the squared sum of each probability
prediction (Sigmoid output) minus the mean probability prediction from
the ensemble. This squared sum is later divided by the number of
models in the ensemble, five in this case.</p>
      <p>For subtask 2: "Algorithm Eficiency", the time in seconds was
calculated for the ensemble to make its overall mean prediction for
each of the test images in order to measure the model eficiency
of the ensemble. A Docker image is made, and using this image
will make a .csv file with the image name and its corresponding
prediction time in seconds. The Deep Ensemble will be run on
the challenge organizers’ hardware, and they provide us with the
frames per second (FPS), which is the average number of masks
from the test dataset the ensemble is able to make per second.</p>
      <p>For subtask 3: "Transparent Machine Learning Systems", all
source code is made publicly available on GitHub1, which also
includes the uncertainty images for the prediction masks.
III</p>
    </sec>
    <sec id="sec-6">
      <title>RESULTS AND ANALYSIS</title>
      <p>
        Table 1 summarizes the results for the Medico subtask 1,
including the mean DC, mean JI and mean Accuracy for the prediction
masks on the validation data and the oficial task test data. These
results show that the Deep Ensemble generalize poorly onto the
test data, with a decrease of approximately 55% in the DC score
and 46% decrease in the mean JI when comparing the results from
the validation data on the test data. There is a high variance of DC
score in the individual images from the test images, some get a DC
as high as 0.8935, whereas some images get as low as 0.0000. Higher
performance can be increased by performing more hyperparameter
tuning, training the Deep Ensemble on more training examples
including similar datasets such as for example the CVC-ClinicDB
dataset [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and the CVC-ColonDB dataset [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Additionally,
decreasing the number of training iterations can also contribute to a more
generalized ensemble model. Also, as proposed in the original
paper [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], adding adversarial training and increasing the number of
models in the ensemble from 5 to 15, may potentially decrease the
prediction error significantly.
      </p>
      <p>For the eficiency subtask, a FPS of 82.9496 was obtained. This
means that the time of approximately 2.4111 seconds in total was
used to generate the masks on the entire test dataset. This result
indicates satisfactory model eficiency, but in return the deep
ensemble is both memory- and time consuming to train.</p>
      <p>A set of three randomly chosen images from the test data and
their corresponding prediction masks and uncertainty heatmaps are
shown in Figure 1. The brighter areas in the heatmaps illustrate the
pixels where the models in the ensemble disagree the most. These
results show that the borders of the detected polyps are where
they disagree the most. Furthermore, the two uncertainty heatmaps
(from the left) shows an outlining of a rectangle in the bottom
left corner. Many of the input images in the HyperKvasir dataset
show green rectangles located in the same area, this is information
important to the medical experts. Thus, it is common to observe
several images with green rectangles in the development dataset.
However, note that the input images do not contain these green
rectangles. These results indicate that the ensemble expected these
rectangles, thus showing systematic bias towards the training data.
Increasing the number of training examples, as well as performing
1https://github.com/feliciajacobsen/MediaEval2021
corrections to training images where these rectangles appear by,
e.g., cropping them out may boost model performance.</p>
    </sec>
    <sec id="sec-7">
      <title>CONCLUSION AND FUTURE WORK</title>
      <p>In this paper, we presented a method of obtaining the approximate
uncertainty values for a set of predicted segmentation masks. The
uncertainty masks provide an uncertainty measure of the
performance of a U-Net based DL model trained on medical colonoscopy
images of polyps.</p>
      <p>
        A mean Dice score of 0.4501 was obtained on the test data, and
compared to the Dice score of 0.8226 from the validation data, this
indicated that the Deep Ensemble model was being overfitted to
the training data, and thus generalizing poorly onto unseen data.
Increasing the number of training examples by including similar
datasets, decreasing the number of training iterations, increasing
the number of models in the ensemble, as well as including
adversarial training may improve generalization. A total average FPS of
82.9496 was obtained on the test data, but came at a high
computational cost when training the Deep Ensemble. In future work, we
will add the aforementioned proposed extensions, as well as
experiment and compare to alternative methods such as Masksembles [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
in order to decrease computational cost of obtaining an ensemble
model.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Sánchez</surname>
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Vilarino-F Bernal</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2012</year>
          .
          <article-title>Towards automatic polyp detection with a polyp appearance model</article-title>
          .
          <source>Endoscopy</source>
          (
          <year>2012</year>
          ),
          <fpage>3166</fpage>
          -
          <lpage>3182</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Hanna</given-names>
            <surname>Borgli</surname>
          </string-name>
          , Vajira Thambawita, Pia H Smedsrud, Steven Hicks, Debesh Jha, Sigrun L Eskeland, Kristin Ranheim Randel, Konstantin Pogorelov, Mathias Lux, Duc Tien Dang Nguyen, Dag Johansen, Carsten Griwodz, Håkon K Stensland,
          <string-name>
            <surname>Enrique</surname>
          </string-name>
          Garcia-Ceja, Peter T Schmidt, Hugo L Hammer,
          <article-title>Michael A Riegler, Pål Halvorsen</article-title>
          , and Thomas de Lange.
          <year>2020</year>
          .
          <article-title>HyperKvasir, a comprehensive multi-class image and video dataset for gastrointestinal endoscopy</article-title>
          .
          <source>Scientific Data</source>
          <volume>7</volume>
          ,
          <issue>1</issue>
          (
          <year>2020</year>
          ),
          <volume>283</volume>
          . https://doi.org/10.1038/s41597-020-00622-y
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Nikita</given-names>
            <surname>Durasov</surname>
          </string-name>
          ,
          <string-name>
            <surname>Timur M. Bagautdinov</surname>
            , Pierre Baqué, and
            <given-names>Pascal</given-names>
          </string-name>
          <string-name>
            <surname>Fua</surname>
          </string-name>
          .
          <year>2020</year>
          .
          <article-title>Masksembles for Uncertainty Estimation</article-title>
          . CoRR abs/
          <year>2012</year>
          .08334 (
          <year>2020</year>
          ). https://arxiv.org/abs/
          <year>2012</year>
          .08334
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Bernal</surname>
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>López-Cerón M. Córdova H. Sánchez-Montes C. Rodríguez de Miguel C. Sánchez F. J. Fernández-Esparrach</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>Exploring the clinical potential of an automatic colonic polyp detection method based on the creation of energy maps</article-title>
          .
          <source>Endoscopy (6</source>
          <year>2016</year>
          ),
          <fpage>837</fpage>
          -
          <lpage>842</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Steven</given-names>
            <surname>Hicks</surname>
          </string-name>
          , Debesh Jha, Vajira Thambawita, Hugo Hammer, Thomas de Lange, Sravanthi Parasa,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Riegler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Pål</given-names>
            <surname>Halvorsen</surname>
          </string-name>
          .
          <year>2021</year>
          . Medico Multimedia Task at MediaEval 2021:
          <article-title>Transparency in Medical Image Segmentation</article-title>
          .
          <source>In Proceedings of MediaEval 2021 CEUR Workshop.</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Diederik</given-names>
            <surname>Kingma</surname>
          </string-name>
          and
          <string-name>
            <given-names>Jimmy</given-names>
            <surname>Ba</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Adam: A Method for Stochastic Optimization</article-title>
          .
          <source>International Conference on Learning Representations (12</source>
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Balaji</given-names>
            <surname>Lakshminarayanan</surname>
          </string-name>
          , Alexander Pritzel, and
          <string-name>
            <given-names>Charles</given-names>
            <surname>Blundell</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles</article-title>
          . (12
          <year>2017</year>
          ),
          <fpage>6405</fpage>
          -
          <lpage>6416</lpage>
          pages.
          <source>arXiv:stat.ML/1612.01474</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Kim</surname>
            <given-names>NH</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jung</surname>
            <given-names>YS</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jeong</surname>
            <given-names>WS</given-names>
          </string-name>
          ,
          <article-title>and</article-title>
          et al.
          <year>2017</year>
          .
          <article-title>Miss rate of colorectal neoplastic polyps and risk factors for missed polyps in consecutive colonoscopies</article-title>
          .
          <source>Intestinal research 15</source>
          ,
          <issue>3</issue>
          (6
          <year>2017</year>
          ),
          <fpage>411</fpage>
          -
          <lpage>418</lpage>
          . https://doi.org/10.5217/ir.
          <year>2017</year>
          .
          <volume>15</volume>
          .3.411.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Adam</given-names>
            <surname>Paszke</surname>
          </string-name>
          , Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang,
          <string-name>
            <surname>Zachary</surname>
            <given-names>DeVito</given-names>
          </string-name>
          , Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and
          <string-name>
            <given-names>Soumith</given-names>
            <surname>Chintala</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>PyTorch: An Imperative Style, High-Performance Deep Learning Library</article-title>
          .
          <source>In Advances in Neural Information Processing Systems</source>
          <volume>32</volume>
          . Curran Associates, Inc.,
          <fpage>8024</fpage>
          -
          <lpage>8035</lpage>
          . http://papers.neurips.cc/paper/ 9015-pytorch
          <article-title>-an-imperative-style-high-performance-deep-learning-library</article-title>
          . pdf
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Olaf</surname>
            <given-names>Ronneberger</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Philipp</given-names>
            <surname>Fischer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Brox</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>U-Net: Convolutional Networks for Biomedical Image Segmentation</article-title>
          . In Medical Image Computing and
          <string-name>
            <surname>Computer-Assisted</surname>
            <given-names>Intervention - MICCAI</given-names>
          </string-name>
          <year>2015</year>
          . Springer International Publishing,
          <volume>234</volume>
          -
          <fpage>241</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Winawer</surname>
            <given-names>SJ</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zauber</surname>
            <given-names>AG</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ho</surname>
            <given-names>MN</given-names>
          </string-name>
          ,
          <article-title>and</article-title>
          et al.
          <year>1993</year>
          .
          <article-title>Prevention of colorectal cancer by colonoscopic polypectomy</article-title>
          .
          <source>The New England Journal of Medicine</source>
          <volume>329</volume>
          ,
          <volume>27</volume>
          (12
          <year>1993</year>
          ),
          <fpage>1977</fpage>
          -
          <lpage>1981</lpage>
          . https://doi.org/10.1056/ NEJM199312303292701
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>