<!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>Using preprocessing as a tool in medical image detection</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Mathias Kirkerød</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Oslo Metropolitan University</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Simula Research Laboratory</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>University of Oslo</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>29</fpage>
      <lpage>31</lpage>
      <abstract>
        <p>In this paper we describe our approach to gastrointestinal disease classification for the medico task at MediaEval 2018. We propose multiple ways to inpaint problematic areas in the test and training set to help with classification. We discuss the efect that preprocessing does to the input data with respect to removing regions with sparse information. We also discuss how preprocessing afects the training and evaluation of a dataset that is limited in size. We will also compare the diferent inpainting methods with transfer learning using a convolutional neural network.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Medical image diagnosis is a challenging task in the industry of
computer vision. In the last couple of years, as computing power
has increased, machine learning has become a tool in the task of
image detection, segmentation and classification. In this paper we
are looking in depth how to use machine learning to help solve
classification tasks on the data-set from the Medico task [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The
Medico task focuses on image classification in the gastrointestinal
(GI) tract. The data is divided in to 16 diferent classes.
      </p>
      <p>
        Similar to other parts of image detection, the Medico dataset
encounter the challenges that the amount of data is too small, or
that the training data does not cover the full distribution of the data
in the test case. The main goal of this task is to classify medical
images. Our proposal is to use unsupervised machine learning for
removal of the green corners that are in the Medico dataset. The
details of the task are described in [
        <xref ref-type="bibr" rid="ref5 ref7">5, 7</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>APPROACH</title>
      <p>Our approach is divided in to two steps: first preprocessing, then
classifying. Our focus is mainly on the preprocessing of the data to
remove the green corners in the medical images.</p>
      <p>After the preprocessing the dataset we run it through a
Convolutional Neural Network (CNN) based on transfer learning. We
chose the CNN model based on the top 5 and top 1 accuracy of the
pre-trained networks on the Keras documentation pages.</p>
      <p>
        In our approach we use the InceptionResNetV2 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] network.
We also remove the top layer and replace it with a global average
pooling layer and a dense 16 layer output, to match the number of
classes wanted. In addition, we do not freeze any layers of the model.
The five submissions that we run is with the same hyperparameters
in the transferlearning model. This means that the diference in
(a) Image before inpainting
(b) Image after inpainting
results should only come from the diferent training datasets we
use.
      </p>
      <p>The medical data has 1 main feature that we focus on during the
preprocessing, namely the green square in the bottom left corner.
A neural network often struggle with areas with really sparse
information. Our hypothesis is that just replacing the green area with a
similar black area will not yield a better result.</p>
      <p>We have a dataset that we use as a base case. This dataset was
not augmented, other than shrinking the size of every image to a
ifxed resolution. The other datasets were augmented in a way that
would cover up the green square in one way or another.</p>
      <p>
        Our hypothesis it that if we recreate the areas as they would
look like without any sparse areas, the classifier can focus on the
right features for classifications. We propose 4 diferent methods
on how to inpaint the corner area of the medical images.
An autoencoder [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], a context conditional generative adversarial
network[
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ], a context encoder [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], and a simple crop of the image.
2.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Autoencoder</title>
      <p>
        For the autoencoder approach, we created and trained a custom
autoencoder from scratch. Our autoencoder consist of a
encoderdecoder network, with 2D convolutions as well as rectified linear
units as activation functions. In the layer between the encoder and
the decoder we included a 25% dropout. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]
      </p>
      <p>To preprocess the medical data we feed the whole image through
the encoder-decoder network. We take the loss of the whole
reconstructed image, but only keep the inpainted part. Under training,
the goal is to minimize the loss: L(x, д(f (x˜))) Where x is an image
without a green corner, and x˜ is the same image with an artificial
green corner. In theory we can replace any part of the image with
this method.</p>
    </sec>
    <sec id="sec-4">
      <title>2.2 Context encoder</title>
      <p>
        For the context encoder approach, we created a new
encoderdecoder network. Here the encoder has a similar structure to the
autoencoder, but our decoder is only making outputs at the size of
the desired area to inpaint. In addition to the loss generated from
taking a MSE loss[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]:
L(xˆ, д(f (x ))) Where xˆ is an image with an artificial green corner,
and x is the part that was replaced by the corner, we include an
adversarial loss, as described in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>With the context encoder we feed images without a green corner
in to the encoder-decoder network. The output of the network is
the same size as the area we want to fill.</p>
    </sec>
    <sec id="sec-5">
      <title>2.3 Context conditional generative adversarial network</title>
      <p>For the generative adversarial approach, we create a similar
structure as the autoencoder. We have a constant 10% dropout at each
layer in the discriminator. As with the autoencoder we have the
same size input as output, but we only decide to keep the parts we
want to inpaint.</p>
      <p>We use the same type of loss as the context encoder, with 15%
of the loss coming from a MSE loss, and the remaining 85% coming
from the adversarial loss.</p>
    </sec>
    <sec id="sec-6">
      <title>2.4 Clipping instead of inpainting</title>
      <p>The last method was just to crop the images in a way that excluded
the green corner. Since every image is scaled down to 256x256 px
during preprocessing, the same is done with the clipped version
(after the clip the size was reduced to 256x256).</p>
      <p>The clipping was done in a way so that we had the most amount
of center frame, and minimal amount of the bottom left corner,
without sacrificing to much of the image.</p>
    </sec>
    <sec id="sec-7">
      <title>3 RESULTS AND ANALYSIS</title>
      <p>We made the augmented datasets before we trained the
preprocessing model. This means that the transferlearning model did not
augment the images at runtime. We split the data into a 70% train
set, and a 30% validation set.</p>
      <p>Our results on the test set are tabulated in Table 1. The oficial
Results on the test set are tabulated in Table 2. Table 3 shows the
confusion matrix from the CC-GAN from the oficial test set.</p>
      <p>The results show that the CC-GAN got the highest MCC score
with 0.926, and also the most realistic inpaintings. The context
encoder had the lowest MCC score with 0.920, and also the worst
inpainted areas. The ocfiial result did have the same pattern in
Method
Autoencoder</p>
      <p>CC-GAN
Contextencoder</p>
      <p>Clipping
Non-augmenteted</p>
      <p>REC
MCC score, though the base case got the best result. In both cases
the clipping gave significantly worse result.</p>
      <p>As expected, most of the images was classified correctly, but
we had some problems distinguishing between esophagitis and
normal-z-line. We also had a few cases of instruments where there
were none.</p>
    </sec>
    <sec id="sec-8">
      <title>4 CONCLUSION</title>
      <p>In general, when training on a dataset that is homogeneous, the
preprocessing is less valuable. We want to remove areas with
sparseness, and areas that has nothing to do with the classification.
In our example we used 3 diferent methods to do this, and we had
no improvements in the results. As we can see from the validation
set, we saved under a percent on the best method, and we got a
worse score on the oficial results.</p>
      <p>We conclude that preprocessing the Medico dataset is not worth
the hassle. The efort put in to preprocess the images yields little to
no improvement to the result. We recommend that the time is used
to find the right network, with the right hyper-parameters instead.
A reason to lackluster results might be caused that the training
and the test set have the same green squares in the same classes.
We suspect that the similarity in the test and train set makes the
squares an essential part of the image. We believe that the result
would be much better if the test set would be completely without
the squares, as they would if they were ”real time” images.</p>
      <p>In a future test we would also recommend removing the four
black edges too. With the images being round, this might be a
challenge, since there are no full-resolution images (without zoom)
that captures the edges. With the medico dataset, this method will
probably not give a better score, on the basis that every image in
the dataset has the same four black corners.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Aaron</given-names>
            <surname>Courville Yoshua Bengio David</surname>
          </string-name>
          Warde-Farley,
          <string-name>
            <given-names>Ian J.</given-names>
            <surname>Goodfellow</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>An empirical analysis of dropout in piecewise linear networks</article-title>
          .
          <source>abs/1609</source>
          .05158 (
          <year>2013</year>
          ). arXiv:
          <volume>1312</volume>
          .6197v2 https://arxiv.org/pdf/1312. 6197v2
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Emily</surname>
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Denton</surname>
            , Sam Gross, and
            <given-names>Rob</given-names>
          </string-name>
          <string-name>
            <surname>Fergus</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks</article-title>
          .
          <source>CoRR abs/1611</source>
          .06430 (
          <year>2016</year>
          ). arXiv:
          <volume>1611</volume>
          .06430 http://arxiv.org/abs/ 1611.06430
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Ian</given-names>
            <surname>Goodfellow</surname>
          </string-name>
          , Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and
          <string-name>
            <given-names>Yoshua</given-names>
            <surname>Bengio</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Generative adversarial nets</article-title>
          .
          <source>In Advances in neural information processing systems</source>
          .
          <volume>2672</volume>
          -
          <fpage>2680</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y. Kamp H.</given-names>
            <surname>Bourlard</surname>
          </string-name>
          .
          <year>1988</year>
          .
          <article-title>Auto-Association by Multilayer Perceptrons and Singular Value Decomposition</article-title>
          . (
          <year>1988</year>
          ). http://ace.cs.ohio. edu/~razvan/courses/dl6890/papers/bourlard-kamp88.pdf
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Pål</given-names>
            <surname>Halvorsen Thomas de Lange Kristin Ranheim Randel Duc-Tien Dang-Nguyen Mathias Lux Konstantin Pogorelov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Riegler</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Mediaeval information</article-title>
          . http://multimediaeval.org/ mediaeval2018/medico/. (
          <year>2018</year>
          ). Accessed:
          <fpage>2018</fpage>
          -10-16.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Deepak</given-names>
            <surname>Pathak</surname>
          </string-name>
          , Philipp Krähenbühl, Jef Donahue, Trevor Darrell, and
          <string-name>
            <surname>Alexei</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Efros</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Context Encoders: Feature Learning by Inpainting</article-title>
          .
          <source>CoRR abs/1604</source>
          .07379 (
          <year>2016</year>
          ). arXiv:
          <volume>1604</volume>
          .07379 http://arxiv. org/abs/1604.07379
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Konstantin</given-names>
            <surname>Pogorelov</surname>
          </string-name>
          , Kristin Ranheim Randel, Carsten Griwodz, Sigrun Losada Eskeland, Thomas de Lange, Dag Johansen, Concetto Spampinato,
          <string-name>
            <surname>Duc-Tien</surname>
            Dang-Nguyen, Mathias Lux, Peter Thelin Schmidt,
            <given-names>Michael</given-names>
          </string-name>
          <string-name>
            <surname>Riegler</surname>
            , and
            <given-names>Pål</given-names>
          </string-name>
          <string-name>
            <surname>Halvorsen</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>KVASIR: A Multi-Class Image Dataset for Computer Aided Gastrointestinal Disease Detection</article-title>
          .
          <source>In Proceedings of the 8th ACM on Multimedia Systems Conference (MMSys'17)</source>
          . ACM, New York, NY, USA,
          <fpage>164</fpage>
          -
          <lpage>169</lpage>
          . https://doi.org/10.1145/3083187.3083212
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Konstantin</given-names>
            <surname>Pogorelov</surname>
          </string-name>
          , Michael Riegler, Pål Halvorsen, Thomas De Lange, Kristin Ranheim Randel,
          <string-name>
            <surname>Duc-Tien</surname>
            Dang-Nguyen,
            <given-names>Mathias</given-names>
          </string-name>
          <string-name>
            <surname>Lux</surname>
            , and
            <given-names>Olga</given-names>
          </string-name>
          <string-name>
            <surname>Ostroukhova</surname>
          </string-name>
          .
          <year>2018</year>
          . Medico Multimedia Task at MediaEval
          <year>2018</year>
          . (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Christian</given-names>
            <surname>Szegedy</surname>
          </string-name>
          , Sergey Iofe, and
          <string-name>
            <given-names>Vincent</given-names>
            <surname>Vanhoucke</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning</article-title>
          .
          <source>CoRR abs/1602</source>
          .07261 (
          <year>2016</year>
          ). arXiv:
          <volume>1602</volume>
          .07261 http://arxiv.org/abs/1602.07261
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>