<!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 Deep Learning to Predict Motility and Morphology of Human Sperm</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Steven Hicks</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>Trine B. Haugen</string-name>
          <xref ref-type="aff" rid="aff1">1</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>Michael Riegler</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</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 the Medico Task 2019, the main focus is to predict sperm quality based on videos and other related data. In this paper, we present the approach of team LesCats which is based on deep convolution neural networks, where we experiment with diferent data preprocessing methods to predict the morphology and motility of human sperm. The achieved results show that deep learning is a promising method for human sperm analysis. Out best method achieves a mean absolute error of 8.962 for the motility task and a mean absolute error of 5.303 for the morphology task.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        In an efort to explore how medical multimedia can be used to create
high performing and eficient prediction algorithms, the Multimedia
for Medicine (Medico) Task presents diferent use-cases [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] which
challenge computer science researchers to explore a field which
has much potential for real-world impact. This year’s task difers
from previous years as it focuses on the analysis of microscopic
videos of human semen to assess the quality of sperm. The videos
are taken from the open-source VISEM dataset [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The challenge
presents three diferent tasks, of which we decided to focus on the
tasks which are required in order to participate this years challenge,
i.e., the prediction of motility task and the prediction of morphology
task. The tasks themselves are further described in the overview
paper [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>APPROACH</title>
      <p>Our approach is based on deep learning using deep convolutional
neural networks (CNNs) to predict sperm motility and sperm
morphology. All experiments aim to utilize the information in the videos
to their fullest, yet still keeping the computational complexity low.
The experiments can primarily be split into four distinct groups.
Firstly (i), we combine multiple frames channel-wise using
diferent stride values (distance between selected frames) and feed this
directly into the deep neural network. Secondly (ii), we vary the
number of frames used in each sample to see how this may efect
the algorithms prediction performance. Thirdly (iii), we threshold
the colors of each frame in an attempt to separate the spermatozoa
bright color from the darker background, and use this information
for prediction. Lastly (iv), we add the patient data to the video
analysis to see how this may help in the prediction. Because morphology
focuses more on the visual appearance of sperm than the movement,
we opted to perform the threshold experiments only on the motility
experiments. Internally, we experimented with a wide variety of
configurations, but only submitted the best results as the oficial
runs. In the following few sections, we will give a brief explanation
of our experimental setup (common training configuration between
each model and data preparation), and a more detailed description
of each approach.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>Experimental Setup</title>
      <p>
        For each experiment, we use the Inception V3 [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] architecture
for our deep learning model, which were trained for as long as
it improved on the validation loss. This means that the models
trained indefinitely until the mean absolute error did not improve
over the last 100 epochs. Each model was trained with batch size of
16 using Nadam [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to optimize the weights with a learning rate
of 0.001. The models were implemented using the Keras [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] deep
learning library with a TensorFlow [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] back-end. Each experiment
was performed on what would be considered "consumer-grade"
hardware, specifically, a desktop computer running Arch Linux
with an Intel core i7 processor, 16 gigabytes of RAM, and an Nvidia
GTX 1080Ti graphics card. As the videos in the provided dataset
vary in length (ranging from 2 to 7 minutes), we extracted a number
of clips (one clip is contains a sequence of frames) from each video
before training. The clips were extracted from evenly spaced out
intervals throughout the entire video, meaning we get a set of clips
which accurately represent any given semen recording. For both
the prediction of motility and the prediction of morphology task,
we use ZeroR as a baseline to measure our results.
2.2
      </p>
    </sec>
    <sec id="sec-4">
      <title>Frame Stride Experiments</title>
      <p>For the methods which used diferent stride lengths to perform
prediction on sperm quality, we performed a total of 10 diferent
experiments. Stride in this context refers to the distance between
two extracted frames within a clip. For example, using a stride
length of 5 would select every fifth frame within a given frame
sequence. The purpose of this experiment is to exaggerate the
change between two frames by increasing the distance of where
the two frames were sampled. Each experiment used a clip length
of three frames which are greyscaled, resized to 224 × 224 pixels
and combined channel-wise. The result is that each clip has a shape
of 224 × 3, making it possible to use pre-trained networks. We take
advantage of this attribute and train two models for each stride
value tested, i.e., one transferring the weights of an
ImageNetbased model and one trained from scratch. As previously stated,
we performed a total of ten diferent experiments, of which five
diferent stride values were used; 1, 5, 10, 30, and 50.
2.3</p>
    </sec>
    <sec id="sec-5">
      <title>Clip Length Experiments</title>
      <p>For the methods which used diferent clip lengths to predict sperm
quality, we performed a total of 5 experiments. Each experiment
increases the number of frames in a clip by 10, starting at 10 and
ending at 50. Each video is captured at 50 frames-per-second, which
means that the clips which contain 50 frames represent a whole
second of a given video. In contrast to the previous method, each
clip included in these experiments have a stride of 1, meaning each
frame in a sequence is used for prediction. Similar to the previous
method, each frame resized to 224 × 224 and greyscaled before being
combined channel-wise. The shape of each clip is then 224 × 224 ×C,
where C is the length of the clip.</p>
    </sec>
    <sec id="sec-6">
      <title>2.4 Threshold Experiments</title>
      <p>For the threshold approach, we greyscale each extracted frame
and threshold the color at 220, meaning all color values below
220 are set to 0. The spermatozoa in the provided videos have
a strong bright coloring which diferentiates it from the darker
background. By thresholding the color values, we aim to separate
the spermatozoa from the background in order to better emphasize
the movement across frames. However, by doing this, we lose some
of the visual information present in each sperm, that is why we
chose not to apply this method to predict morphology. We organize
these experiments in a similar manner as those done for the stride
experiments, meaning we stack three frames channel-wise using
ifve diferent stride values; 1, 5, 10, 25, and 50.</p>
    </sec>
    <sec id="sec-7">
      <title>3 RESULTS AND DISCUSSION</title>
      <p>Each method was evaluated using three-fold cross-validation (as
required by the task), and we report the mean absolute error (MAE)
and mean absolute error (RMSE) for each experiment. The results
for the motility experiments are shown in Table 1, and the results
for the morphology experiments are shown in Table 2.</p>
      <p>As we can see the prediction of motility results (Table 1), using
larger strides between the selected frames in combination with
transfer learning works best. The experiments which used a lot of
frames per clip seem to have an issue handling the amount if
information per sample. Thresholding the color-space seems to preform
marginally better than the extended clip length experiments, but
are still not as as the experiments using longer strides. Despite the
poor results of the threholding approach, all methods beat the
ZeroR baseline method. Although the results may not be good enough
to be deployed into a clinical setting, it shows that deep neural
networks are a promising tool within the field of automatic semen
analysis.</p>
      <p>Looking at the table for the prediction of morphology results
(Table 2), we see that pretty much all experiments lie around the
ZeroR baseline. Most, however, beat the baseline by a small margin.
It hard to make any strong conclusions about which methods work
best, but it seems like using transfer learning for the stride
experiments achieves better results than those trained from scratch. As for
using diferent clip lengths, all methods seem to achieve a similar
results. Overall, the results show that a more specific approach to
predicting sperm morphology is needed, for example, analyzing
individual spermatozoon using higher image resolutions.</p>
    </sec>
    <sec id="sec-8">
      <title>4 CONCLUSION</title>
      <p>In this paper, we presented the work done as part of the Medico
Multimedia Task where we participated in two of the three available
tasks. Overall, the results are promising and shows that neural
Method Fold 1 Fold 2 Fold 3</p>
      <p>MAE RMSE MAE RMSE MAE RMSE</p>
      <p>Stride Experiments
Stride 1 10.436 14.769 11.079 15.155 11.581 14.404 11.032 14.776
Stride 5 8.563 11.856 9.843 13.754 12.172 15.510 10.192 13.707
Stride 10 9.358 12.711 9.477 15.524 11.892 15.065 10.242 14.433
Stride 25 9.490 13.530 7.149 9.579 10.871 14.532 9.170 12.547
Stride 50 10.005 13.961 9.804 14.468 10.691 13.593 10.167 14.007
TF Stride 1 9.874 13.408 8.450 11.638 10.257 13.972 9.527 13.006
TF Stride 5 10.937 14.699 7.903 10.544 10.322 13.217 9.721 12.820
TF Stride 10 8.714 11.955 8.256 11.153 9.917 13.029 8.962 12.046
TF Stride 25 8.505 11.211 8.818 11.889 10.480 13.919 9.268 12.340
TF Stride 50 9.021 11.505 9.604 11.943 11.338 14.818 9.988 12.755</p>
      <p>Clip Length Experiments
Clip Length 10 12.400 17.822 11.045 14.110 12.635 16.066 12.027 15.999
Clip Length 20 11.605 16.674 12.867 16.361 11.712 14.778 12.061 15.938
Clip Length 30 10.757 14.871 12.116 21.117 16.435 22.337 13.102 19.442
Clip Length 40 11.225 14.897 9.725 12.866 11.736 15.135 10.895 14.299
Clip Length 50 10.763 14.640 9.843 14.154 11.051 13.728 10.552 14.174</p>
      <p>Threshold Experiments
Stride 1 9.846 14.397 9.575 13.183 11.371 14.784 10.264 14.121
Stride 5 10.424 14.452 9.991 13.368 9.912 12.942 10.109 13.587
Stride 10 9.544 13.549 11.381 15.570 10.113 13.176 10.346 14.098
Stride 25 9.378 13.536 10.055 13.480 11.062 14.481 10.165 13.832
Stride 50 9.621 13.270 9.331 12.240 11.917 15.083 10.290 13.531</p>
      <p>Baseline</p>
      <p>ZeroR 13.880 18.680 13.590 16.980 12.090 14.680 13.190 16.860</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Martín</given-names>
            <surname>Abadi</surname>
          </string-name>
          , Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis,
          <string-name>
            <given-names>Jefrey</given-names>
            <surname>Dean</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Matthieu</given-names>
            <surname>Devin</surname>
          </string-name>
          , Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geofrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mané, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke,
          <string-name>
            <given-names>Yuan</given-names>
            <surname>Yu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Xiaoqiang</given-names>
            <surname>Zheng</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <source>TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems</source>
          . (
          <year>2015</year>
          ). https://www.tensorflow.org/ Software available from tensorflow.
          <source>org.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>François</given-names>
            <surname>Chollet</surname>
          </string-name>
          and others.
          <source>2015</source>
          . Keras. https://keras.io. (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Timothy</given-names>
            <surname>Dozat</surname>
          </string-name>
          .
          <year>2015</year>
          .
          <article-title>Incorporating Nesterov Momentum into adam</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <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 ACM on Multimedia Systems Conference (MMSYS)</source>
          . https://doi.org/10.1145/3304109.3325814
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <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>
          . In CEUR Workshop Proceedings - Multimedia Benchmark Workshop (MediaEval).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <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>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Christian</given-names>
            <surname>Szegedy</surname>
          </string-name>
          , Vincent Vanhoucke, Sergey Iofe, Jon Shlens, and
          <string-name>
            <given-names>Zbigniew</given-names>
            <surname>Wojna</surname>
          </string-name>
          .
          <year>2016</year>
          .
          <article-title>Rethinking the inception architecture for computer vision</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          .
          <volume>2818</volume>
          -
          <fpage>2826</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>