<!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 neural networks to identify individual animals from photographs ?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Emmanuel Kabuga</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>Ian Durbach</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>Bubacarr Bah</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Allan Clark</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>AIMS South Africa, https://aims.ac.za/</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Stellenbosch University (</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Cape Town (https://</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Wildlife conservation relies on sound knowledge of population information. This information is crucial for addressing questions related to community, ecosystem function, population dynamics, and behavioural ecology. It is obtained via studies that recognise individuals. A commonly used technique to achieve individual species recognition is the use of invasive methods that apply a tag to the animal's body. These methods have been applied to both marine and terrestrial species to assess both theoretical and applied questions [5, 6]. However, invasive procedures are expensive to implement and potentially reduce the animal's natural behaviour and performance, disturb its activities and relationship to others. In addition to being impracticable with large populations, invasive methods cause ethical and welfare con icts due to temporary or permanent application of tags. Alternatively, many species have body marks such as spots and ns that are individual-speci c and hence can be utilised for individual recognition. These methods are cost-e ective and not harmful to the animal's life. These approaches have evolved as a reliable alternative to invasive methods and have been applied to a range of animals including mammals, amphibians, reptiles and shes [8, 9]. This paper aims at developing a machine learning algorithm which exploits individual-speci c marks to automate the individual identi cation task and compares the model results with some of the existing computer-aided software used by the ecology community. The developed model is tested on two case studies, a humpback whale (HBW) dataset and a western leopard toad (WLT) dataset. The HBW dataset consists of 25 631 images from 14 668 individuals. They are originally collected by various institutions across the globe and uploaded to the Happywhale platform [4]. HBWs can be identi ed by their ns and special marks. The WLT dataset consists of 1 770 images collected by citizen scientists in South Africa. They were either uploaded to iSpot [7], a citizen science project which collects images or sent to the WLT project, a conservation project sta ed by volunteers. WLTs can be identi ed by their unique spots. One part of this dataset consists of 164 labelled individuals comprising 430 images and an unlabelled proportion comprising 1 340 images. The model developed in this paper consists of two main components, an object detection model and a matching classi er model. In some images, the ? Acknowledgement to AIMS South Africa for the Research Masters scholarship, CHPC for computational resources, Dr. John Measey and Mr. Alex Rebelo for collecting and providing the toad photographs.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        E. Kabuga et al.
animal only occupies a small region of the image. This makes the
individualspeci c marks { spots for WLTs, and tail ns for HBWs to not be clearly visible
while they are the key feature of this study. As a result, the goal of the object
detection model is to { detect the region of the image containing the animal,
localise it using a bounding box, and extract the animal, which is then taken
to the next level of photo-matching. The object detection model is a custom
convolutional neural network (CNN) originally inspired from VGG16 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] which
takes an image as input and outputs the coordinates of the region containing
the animal within the image. The matching classi er model is a special kind of
CNN called a Siamese network. The Siamese network is a custom ResNet [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
model which uses a pair of CNNs that share weights to summarise the images,
followed by some dense layers which combine the summaries into measures of
similarity which can be used to predict a match. This model takes a pair of
two regions containing animals extracted by the detection model and outputs
their matching probability. A threshold probability set by the user is used to
decide if a pair of two animal images originates from the same individual or
not. The individual IDs are extracted from the obtained matches. One of the
computer-aided photo-matching algorithms used by the ecology community is
WildID [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. It utilises the scaled invariant feature transform (SIFT) to extract
distinctive features from the images. It compares SIFT features of a new image
with ones of the existing images in the catalogue and ranks the top 20 potential
matches. The true match can appear anywhere between 1 and 20 or not. For
a fair comparison with the developed Siamese network, we checked if WildID
ranked the true match in the rst position or not (top-1 accuracy).
      </p>
      <p>The detection model achieved reliable results on both datasets for the task
of localising the region of the image containing the animal on both datasets.
The model achieved the intersection over union (IoU) of 0.90 and the coe cient
of determination R2 of 0.91 for HBWs and the IoU of 0.86 and R2 of 0.85 for
WLTs. The Siamese network model results are good for both HBWs and WLTs.
The model correctly identi ed if a pair of images is from the same individual
or not respectively in 95% of cases for HBWs and 87% of cases for WLTs. The
main di erence in the performance is due to the di erent amount of data used
to train the model. In this study, the semi-supervised approach on WLT
unlabelled dataset has been partially successful. The model was able to identify 47
new matches from 26 individuals comprising 63 images. These identi ed matches
seem to be relatively few in numbers. Without an exhaustive check of the data,
it is not clear whether this is due to the failure of the semi-supervised approach,
or because there are not many matches in the data. After adding the newly
identi ed and labelled individuals to the WLT labelled dataset, the model slightly
improved its performance and correctly identi ed 89% of WLT pairs. WildID
achieved good results on WLTs compared to HBWs. It ranked the true match
in the rst position in 64% of cases for WLTs and 36% of the cases for HBWs.</p>
      <p>The Siamese network model achieved good results on the individual
identication task for species dotted with individual-speci c marks. Its performance
was very competitive compared with WildID.</p>
      <p>Using neural networks to identify individual animals from photographs</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>K.</given-names>
            <surname>Simonyan</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Zisserman</surname>
          </string-name>
          .
          <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="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>K.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , S. Ren, and
          <string-name>
            <given-names>J.</given-names>
            <surname>Sun</surname>
          </string-name>
          .
          <article-title>Deep residual learning for image recognition</article-title>
          .
          <source>In Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          , pp.
          <fpage>770</fpage>
          -
          <lpage>778</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>D. T.</given-names>
            <surname>Bolger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Morrison</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Vance</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lee</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Farid</surname>
          </string-name>
          .
          <article-title>A computer-assisted system for photo- graphic markrecapture analysis</article-title>
          .
          <source>Methods in Ecology and Evolution</source>
          ,
          <volume>3</volume>
          (
          <issue>5</issue>
          ):
          <fpage>813822</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>4. https://happywhale.com/home</mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J. N.</given-names>
            <surname>Auckland</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Debinski</surname>
          </string-name>
          , and
          <string-name>
            <given-names>W. R.</given-names>
            <surname>Clark</surname>
          </string-name>
          . Survival, movement, and
          <article-title>resource use of the butter y parnassius clodius</article-title>
          .
          <source>Ecological Entomology</source>
          ,
          <volume>29</volume>
          (
          <issue>2</issue>
          ):
          <fpage>139149</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Booth</surname>
          </string-name>
          .
          <article-title>Synergistic e ects of conspeci cs and food on growth and energy allocation of a damsel sh</article-title>
          .
          <source>Ecology</source>
          ,
          <volume>85</volume>
          (
          <issue>10</issue>
          ):
          <fpage>28812887</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7. https://www.ispotnature.org/node/137767</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>L.</given-names>
            <surname>Gamble</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ravela</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>McGarigal</surname>
          </string-name>
          <article-title>. Multi-scale features for identifying individuals in large biological databases: an application of pattern recognition technology to the marbled salamander ambystoma opacum</article-title>
          .
          <source>Journal of Applied Ecology</source>
          ,
          <volume>45</volume>
          (
          <issue>1</issue>
          ):
          <fpage>170180</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>C. W.</given-names>
            <surname>Speed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. G.</given-names>
            <surname>Meekan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C. J.</given-names>
            <surname>Bradshaw</surname>
          </string-name>
          .
          <article-title>Spot the matchwildlife photoidenti cation using information theory</article-title>
          . Frontiers in zoology,
          <volume>4</volume>
          (
          <issue>1</issue>
          ):
          <fpage>2</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>