<!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>Extracting Temporal Features into a Spatial Domain Using Autoencoders for Sperm Video Analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vajira Thambawita</string-name>
          <email>vajira@simula.no</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pål Halvorsen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hugo Hammer</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michael Riegler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Trine B. Haugen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kristiania University College</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Oslo Metropolitan University</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>SimulaMet</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <fpage>27</fpage>
      <lpage>29</lpage>
      <abstract>
        <p>In this paper, we present a two-step deep learning method that is used to predict sperm motility and morphology based on video recordings of human spermatozoa. First, we use an autoencoder to extract temporal features from a given semen video and plot these into image-space, which we call feature-images. Second, these feature-images are used to perform transfer learning to predict the motility and morphology values of human sperm. The presented method shows it's capability to extract temporal information into spatial domain feature-images which can be used with traditional convolutional neural networks. Furthermore, the accuracy of the predicted motility of a given semen sample shows that a deep learning-based model can capture the temporal information of microscopic recordings of human semen.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        The 2019 Medico task [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] focuses on automatically predicting
semen quality based on video recordings of human spermatozoa.
This is change from previous years which have mainly focused
on image classification of images taken from the gastrointestinal
tract [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ]. For this year’s task, we look at predicting the
morphology and motility of a given semen sample. Motility is defined
by three variables, namely, the percentage of progressive,
nonprogressive, and immotile sperm. Morphology is determined by the
percentage of sperm with tail defects, midpiece defects, and head
defects. The organizers have provided a dataset consisting of 85
videos of diferent semen samples and a preliminary analysis of
each, which is used as the ground truth. For this competition, the
organizers have provided a predefined three-fold split of the VISEM
dataset [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], which contains 85 videos from diferent participants
and a preliminary analysis of each semen sample. In the dataset
paper, the authors presented baseline mean absolute error (MAE)
values for motility and morphology. Furthermore, the importance of
computer-aided sperm analysis can be identified from the previous
works which have been done over the last few decades [
        <xref ref-type="bibr" rid="ref12 ref3 ref9">3, 9, 12</xref>
        ].
      </p>
      <p>
        To solve this year’s task, we propose a deep learning-based
method consisting of two steps - (i) unsupervised feature extraction
using an autoencoder [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and (ii) video regression using a standard
convolutional neural networks (CNN) and transfer learning. The
autoencoder we use is diferent from the state-of-the-art autoencoders
used to extract video features [
        <xref ref-type="bibr" rid="ref13 ref2">2, 13</xref>
        ] as they use autoencoders to
extract feature vectors which are used with long-short memory
models or multi-layer perceptron (MLP)s. In contrast, we use
autoencoders to extract feature-images for use in CNNs.
      </p>
    </sec>
    <sec id="sec-2">
      <title>APPROACH</title>
      <p>Our method can primarily be split into two distinct steps. First,
we use an autoencoder to extract temporal features from
multiple frames of a video into a feature-image. Second, we pass the
extracted feature-image into a standard pre-trained CNN to
predict the motility and morphology of the spermatozoa in a given
video. In this paper, we present the preliminary results for four
experiments based on four diferent input types. The first input
type (I1) uses a single raw frame. Input type two (I2) is a stack of
identical frames copied across the channel-dimension. The third
(I3) and fourth (I4) input type stack 9 and 18 consecutive frames
from a video respectively.</p>
      <p>The first two experiments (using I1 and I2) were performed as
baseline experiments. The two other experiments (using I3 and
I4) were performed to see how the temporal information afects
the prediction performance of the approach. For all input types,
we split the extracted datasets into three folds based on the folds
provided by the organizers. Then, three-fold cross-validation was
conducted to evaluate our four experiments. An overview of all
experiments is shown in Figure 1.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>Step 1 - Unsupervised temporal feature extraction</title>
      <p>In step 1, we trained an autoencoder that takes an input frame or
frames (I1, I2, I3 or I4) from the sperm videos as depicted in Figure 1.
Then, the encoder of the autoencoder extracted feature-images and
passed them through the decoder architecture to reconstruct the
input frame or frames back (R1, R2, R3, and R4). These extracted
feature-images are diferent from traditional feature extractions of
autoencoders because the traditional autoencoders extract feature
vectors instead of feature-images. In this autoencoder, the mean
square error (MSE) loss function is used to calculate the diference
between input data and reconstructed data. Then, this error value
is backpropagated to train the autoencoder. After training 2,000
epochs, we use the encoder architecture of the autoencoder model
to step 2.
2.2</p>
    </sec>
    <sec id="sec-4">
      <title>Step 2 - CNN regression model</title>
      <p>
        We have selected the pre-trained ResNet-34 [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] as our basic CNN to
predict the values of motility and morphology of the sperm videos.
However, any pre-trained CNN could be chosen for this step and
in future work we will test and compare diferent ones in more
detail. Firstly, we take an input frame or frames (I1, I2, I3 or I4)
and pass through the pre-trained encoder model (only the encoder
section of the autoencoder model) which was trained also from the
same data inputs in an unsupervised way. Then, the outputs of the
encoder model were passed through the CNN model which has a
modified last layer to output three prediction values for motility or
morphology.
Thambawita et al.
      </p>
    </sec>
    <sec id="sec-5">
      <title>RESULTS AND ANALYSIS</title>
      <p>According to the average MAE values shown in Table 1, the average
motility values of input I3 and I4 shows the best results among other
motility values of input I1 and I2. These performance improvements
imply that our model is able to learn temporal features into a spatial
feature image representation. Furthermore, input I4 which uses 18
stacked frames shows the best motility average values compared
to input I3. This performance gain shows that to predict the sperm
motility in sperm videos, it is better to analyze more frames at
the same time. This might be due to the fact that the behaviour of
sperm is something that needs to be observed over time and not in
single frames. Moreover, the predictions for our base case inputs I1
and I2 show the same average values. This shows that our model
learns temporal information from diferent sperm video frames.
Otherwise, it would be shown diferent average values for our two
base case inputs I1 and I2.</p>
      <p>When we consider the predicted morphology average in Table 1,
it shows values that are almost equal to each other. This is
expected because the morphology of a sperm is something that can
be observed using a single frame. In contrast to predicting accurate
morphology, the predicted morphology values support the prove
that our model has the capability to learn temporal data from
multiple frames because motility predictions show an improvement
when we increase the number of frames analyzed simultaneously.
4</p>
    </sec>
    <sec id="sec-6">
      <title>CONCLUSION AND FUTURE WORKS</title>
      <p>In this paper, we proposed a novel method to extract temporal
features from videos to create feature-images, which can be used
to train traditional CNN models. Furthermore, we show that the
feature-images capture temporal present in a sequence of frames,
which can be used to predict the motility of the sperm videos.</p>
      <p>
        This method can be improved by using diferent error functions
to force the model to learn more temporal data. For example,
researchers can experiment with variational autoencoders [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and
generative adversarial learning methods [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] to improve this
technique. Additionally, it may be beneficial to embed long short-term
memory units to investigate how our feature-images compare to
actual extracted temporal features.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Pierre</given-names>
            <surname>Baldi</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>Autoencoders, unsupervised learning, and deep architectures</article-title>
          .
          <source>In Proceedings of ICML workshop on unsupervised and transfer learning</source>
          .
          <fpage>37</fpage>
          -
          <lpage>49</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Yong</given-names>
            <surname>Shean</surname>
          </string-name>
          Chong and Yong Haur Tay.
          <year>2017</year>
          .
          <article-title>Abnormal event detection in videos using spatiotemporal autoencoder</article-title>
          .
          <source>In Proceedings of the International Symposium on Neural Networks</source>
          . Springer,
          <fpage>189</fpage>
          -
          <lpage>196</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Karan</given-names>
            <surname>Dewan</surname>
          </string-name>
          , Tathagato Rai Dastidar, and
          <string-name>
            <given-names>Maroof</given-names>
            <surname>Ahmad</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Estimation of Sperm Concentration and Total Motility From Microscopic Videos of Human Semen Samples</article-title>
          .
          <source>In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR).</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <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 Proceedings of the Advances in neural information processing systems (NIPS)</source>
          .
          <volume>2672</volume>
          -
          <fpage>2680</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Trine</surname>
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Haugen</surname>
          </string-name>
          , Steven A.
          <string-name>
            <surname>Hicks</surname>
          </string-name>
          ,
          <string-name>
            <surname>Jorunn M. Andersen</surname>
            , Oliwia Witczak, Hugo L. Hammer, Rune Borgli, Pål Halvorsen, and
            <given-names>Michael A.</given-names>
          </string-name>
          <string-name>
            <surname>Riegler</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>VISEM: A Multimodal Video Dataset of Human Spermatozoa</article-title>
          .
          <source>In Proceedings of the 10th ACM on Multimedia Systems Conference (MMSys) (MMSys'19)</source>
          . ACM, New York, NY, USA. https: //doi.org/10.1145/3304109.3325814
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <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 (CVPR)</source>
          .
          <volume>770</volume>
          -
          <fpage>778</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Steven</given-names>
            <surname>Hicks</surname>
          </string-name>
          , Pål Halvorsen, Trine B Haugen,
          <string-name>
            <surname>Jorunn M Andersen</surname>
            ,
            <given-names>Oliwia</given-names>
          </string-name>
          <string-name>
            <surname>Witczak</surname>
          </string-name>
          , Konstantin Pogorelov, Hugo L Hammer,
          <string-name>
            <surname>Duc-Tien</surname>
            Dang-Nguyen,
            <given-names>Mathias</given-names>
          </string-name>
          <string-name>
            <surname>Lux</surname>
            , and
            <given-names>Michael</given-names>
          </string-name>
          <string-name>
            <surname>Riegler</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Medico Multimedia Task at MediaEval 2019</article-title>
          .
          <source>In Proceedings of the CEUR Workshop on Multimedia Benchmark Workshop (MediaEval).</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Diederik</surname>
            <given-names>P</given-names>
          </string-name>
          <string-name>
            <surname>Kingma and Max Welling</surname>
          </string-name>
          .
          <year>2013</year>
          .
          <article-title>Auto-encoding variational bayes</article-title>
          .
          <source>arXiv preprint arXiv:1312.6114</source>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Sharon</surname>
            <given-names>T Mortimer</given-names>
          </string-name>
          , Gerhard van der Horst, and
          <string-name>
            <given-names>David</given-names>
            <surname>Mortimer</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>The future of computer-aided sperm analysis</article-title>
          .
          <source>Asian journal of andrology 17</source>
          ,
          <issue>4</issue>
          (
          <year>2015</year>
          ),
          <fpage>545</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Konstantin</surname>
            <given-names>Pogorelov</given-names>
          </string-name>
          , Michael Riegler, Pål Halvorsen, Steven Alexander Hicks, Kristin Ranheim Randel,
          <string-name>
            <surname>Duc-Tien</surname>
          </string-name>
          Dang-Nguyen, Mathias Lux, Olga Ostroukhova, and Thomas de Lange.
          <year>2018</year>
          . Medico Multimedia Task at MediaEval
          <year>2018</year>
          ..
          <source>In Proceedings of the CEUR Workshop on Multimedia Benchmark Workshop (MediaEval).</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Riegler</surname>
          </string-name>
          , Konstantin Pogorelov, Pål Halvorsen, Carsten Griwodz, Thomas Lange, Kristin Randel, Sigrun Eskeland, Dang Nguyen, Duc Tien, Mathias Lux, and others.
          <source>2017</source>
          .
          <article-title>Multimedia for medicine: the medico task at MediaEval 2017</article-title>
          . (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>L. F.</given-names>
            <surname>Urbano</surname>
          </string-name>
          , P. Masson, M. VerMilyea, and
          <string-name>
            <given-names>M.</given-names>
            <surname>Kam</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Automatic Tracking and Motility Analysis of Human Sperm in Time-Lapse Images</article-title>
          .
          <source>IEEE Transactions on Medical Imaging (T-MI) 36, 3 (March</source>
          <year>2017</year>
          ),
          <fpage>792</fpage>
          -
          <lpage>801</lpage>
          . https://doi.org/10.1109/TMI.
          <year>2016</year>
          .2630720
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Huan</surname>
            <given-names>Yang</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baoyuan</surname>
            <given-names>Wang</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stephen Lin</surname>
            , David Wipf,
            <given-names>Minyi</given-names>
          </string-name>
          <string-name>
            <surname>Guo</surname>
            , and
            <given-names>Baining</given-names>
          </string-name>
          <string-name>
            <surname>Guo</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Unsupervised extraction of video highlights via robust recurrent auto-encoders</article-title>
          .
          <source>In Proceedings of the IEEE international conference on computer vision (ICCV)</source>
          .
          <volume>4633</volume>
          -
          <fpage>4641</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>