<!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>Large-Scale Plant Classi cation using Deep Convolutional Neural Networks</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Josef Haupt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefan Kahl</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Danny Kowerko</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maximilian Eibl</string-name>
          <email>maximilian.eiblg@informatik.tu-chemnitz.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Chair Media Informatics, Chemnitz University of Technology</institution>
          ,
          <addr-line>D-09107 Chemnitz</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Junior Professorship Media Computing, Chemnitz University of Technology</institution>
          ,
          <addr-line>D-09107 Chemnitz</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Deep learning techniques have signi cantly improved plant species classi cation in recent years. The goal of the 2018 ExpertLifeCLEF challenge was to compare the performance of human experts to machines trained on the PlantCLEF 2017 dataset containing 10.000 classes. We used the Inception, ResNet and DenseNet architectures to solve this complex task. In our experiments, complex neural net layouts yield strong results, comparable to human performance. We further push the overall accuracy through iterative adjustment of class weights. An ensemble consisting of a ResNet50 and two DenseNet201 with ne-tuned class weights reached a top1-accuracy of 77% on the test set.</p>
      </abstract>
      <kwd-group>
        <kwd>Deep Learning</kwd>
        <kwd>Plant Classi cation</kwd>
        <kwd>Convolutional Neural</kwd>
        <kwd>Networks</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The ExpertLifeCLEF 2018 challenge [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is the continuation of last year's
PlantCLEF 2017 task and part of LifeCLEF 2018 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The main goal was to compare
the performance of human experts and machines. In this paper we are going to
describe our approach, the model architectures we used and our training process.
The dataset provided by CLEF is split into two parts. One part consists only
of trusted images from the Encyclopedia Of Life (EoL), which implies that the
object shown is a plant and is also labelled correctly. The second dataset has
been built using Bing and Google search engines with no further validation in
place [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. This means, the number of samples per class is much higher, but images
might not be labeled correctly or do not contain any plants at all.
      </p>
      <p>This year's training set is exactly the same as for the PlantCLEF 2017 task.
The clean dataset holds 256.288 samples and the noisy set 1.432.162. These
samples are for 10.000 di erent plants. Both datasets show massive class imbalance.
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Dataset Preparation</title>
      <p>No changes have been made regarding the clean set. Some images from the
noisy set had to be removed since they were either not compatible with image
processing tools or/and had corrupt EXIF data, which led to complications. This
a ected 4.398 total images which is a very small part of the whole dataset and
therefore neglectable. No further ltering has been done to either of the datasets.
3</p>
      <sec id="sec-2-1">
        <title>Experiments</title>
        <p>
          We tested and used three network architectures, namely Inception v3[
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], ResNet50[
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]
and DenseNet201[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. We performed most of our experiments using the DenseNet
model which seemed to perform much better than the Inception v3 architecture
and slightly better than the ResNet50 model. Additionally, DenseNet is a
relatively recent architecture which was not used in the previous years (see e.g.
[
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]).
3.1
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Fine-tuning</title>
      <p>The mentioned three CNNs have been tested with various learning rates, batch
sizes and optimizers to nd the best hyperparameter setup. All experiments
described have been done using the clean dataset.</p>
      <p>Batch Size We used a NVIDIA P6000 graphics card for training. Since it was not
possible to utilize all of the 24GB of VRAM for the training of a single model,
the GPU memory was split into parts of 8GB. This way, we were able to train
multiple models at the same time and nish more experiments. The restriction
of VRAM per model led to a maximum batch size of 64 for the Inception v3
which outperformed models trained with a lower batch size. The ResNet50 had
similar results, but with a maximum batch size of 32. The DenseNet201 used
even more of the GPU memory and could only be used with a batch size of 16.
Optimizer Inception, ResNet and DenseNet were each tested with Stochastic
Gradient Descent (SGD) and Adam. A static learning rate of 0.01 was used for
the SGD. All architectures performed much better with the SGD than with then
the adaptive optimizer.</p>
      <p>The experiments showed that the decay schedule was best for the Inception
v3 and the ResNet50. The DenseNet201 did not bene t from this schedule and
performed better with a static learning rate and Nesterov momentum.
3.2</p>
    </sec>
    <sec id="sec-4">
      <title>Data Augmentation</title>
      <p>We used a variety of augmentation operations to further increase the dataset
diversity. Selected experiments showed that the validation error can be greatly
(a) Original.</p>
      <p>(b) Zoomed in.
reduced by the augmentations. Finally, we decided to implement following
augmentation methods: Horizontal and vertical ip, zooming, rotating, shearing and
shifting.</p>
      <p>The range of every augmentation method was determined by empirical
testing. Augmentation artifacts, for example as result of rotation, were lled in with
a re ection of the original image content.
4</p>
      <sec id="sec-4-1">
        <title>Training</title>
        <p>We trained the ResNet and Inception models according to best practices.
However, we tried to ne-tune the DenseNet201 with adjusted class weights over
multiple iterations and we will describe this speci c process in more detail. For
all experiments, ten percent of the trusted image set were used for validation.
4.1</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Fine-Tuning Class Weights</title>
      <p>In an attempt to balance the classes, the initial weights were generated from
the initial distribution of the samples. Therefore, the weight of each class was
initially calculated using the average samples per class divided by the number
of samples of that particular class. This redistribution of class weights already
improved the accuracy by 9% over our local test set. Over the course of six
iterations, the class weights were further modi ed. With each iteration a small
test set was predicted and the error rates per class were calculated. The error
rate is the percentage of samples which were classi ed correctly.</p>
      <p>We modi ed each class weight using the following equation:
weight = weight (1:85
error rate)
(2)
We reduced weights for classes with an accuracy of 85% or higher by a small
percentage; classes with a lower accuracy got higher weights in the next iteration.
4.2</p>
    </sec>
    <sec id="sec-6">
      <title>Training Process</title>
      <p>Each model was trained with 10.000 samples per epoch, for up to 1.000 epochs.
Even with a very powerful GPU, the training of one model took three to ve
days. After the training, new class weights were generated using the error rates
of the model on the test set and another model was trained with the modi ed
class weights. We repeated this process six times until we submitted our runs.
5</p>
      <sec id="sec-6-1">
        <title>Results</title>
        <p>This year's ExpertLifeCLEF challenge was themed as human experts vs
machines. The results show that some of the experts did have a remarkably high
accuracy, which was rather surprising - but not all experts did beat the machine
performance. Our system was able to beat one expert and scores were within a
small margin with other experts.</p>
        <p>
          Most of our models were trained on the noisy data set, because the last year's
PlantCLEF results showed that the highest scores were achieved when training
mostly on the noisy data [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. We submitted ve runs, but run 1 and 2 are only
marginally di erent. Therefore, run 2 will not be discussed here.
        </p>
        <p>TUC MI run1 The rst submission was based on a weighted voting between ve
models which were all trained on the noisy dataset. These ve models consisted
of one ResNet50, an Inception v3 and three DenseNet201. The weight of the vote
was calculated using the validation accuracy of each model. We trained each of
the DenseNets with a di erent class weight con guration.</p>
        <p>TUC MI run3 This submission consisted of the predictions of one DenseNet201.
This model had the best single net validation accuracy of all our trained models.
It was only trained on the noisy set and is the last iteration of the ne-tuning
process described in 4.1.</p>
        <p>TUC MI run4 Another single DenseNet201 was used for the fourth run, taken
from the last iteration of the class weight ne-tuning. Unlike run3, this model
was mainly trained on the clean data set.</p>
        <p>
          TUC MI run5 Weighted voting of three models -two DenseNet201 and a single
ResNet50 - resulted in our best scores. The two DenseNets were taken from run3
and run4. The ResNet50 model was trained on the noisy set, but with no further
weight con gurations.
In our experiments, the DenseNet outperformed Inception v3 and the ResNet50
architectures. The adjustment of the class weights used during training did
improve the performance of the DenseNet gradually. A single ne-tuned DenseNet
already scored a Top1-accuracy of 71.8% which should increase further with more
training time. Considering the strong results of our experiments and the
submissions of other participants, we can conclude that machine plant classi cation is
within reach of human-like performance. Some experts are able to identify plants
based on images with very high accuracy. Most likely, further improvements of
deep learning techniques will close this gap in the next few years.
Our system was implemented with Keras [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] and the source code is publicly
available at: https://github.com/Josef-Haupt/ExpertCLEF2018.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Goeau, H.,
          <string-name>
            <surname>Bonnet</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Overview of ExpertLifeCLEF 2018: how far automated identi cation systems are from the best experts?</article-title>
          .
          <source>In: CLEF working notes 2018</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Goeau, H.,
          <string-name>
            <surname>Botelle</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glotin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonnet</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Planque</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vallinga</surname>
            ,
            <given-names>W.P.</given-names>
          </string-name>
          , Muller, H.:
          <article-title>Overview of LifeCLEF 2018: a large-scale evaluation of species identi - cation and recommendation algorithms in the era of AI</article-title>
          .
          <source>In: Proceedings of CLEF</source>
          <year>2018</year>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Goeau, H.,
          <string-name>
            <surname>Bonnet</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Plant identi cation based on noisy web data: the amazing performance of deep learning (LifeCLEF</article-title>
          <year>2017</year>
          ) (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Szegedy</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vanhoucke</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , Io e, S.,
          <string-name>
            <surname>Shlens</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wojna</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Rethinking the Incpetion Archtecture of Computer Vision</article-title>
          . In
          <source>: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source>
          , pp.
          <fpage>2818</fpage>
          -
          <lpage>2826</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>He</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ren</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
            <given-names>J</given-names>
          </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>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>van der Maaten</surname>
          </string-name>
          , L.,
          <string-name>
            <surname>Weinberger</surname>
            ,
            <given-names>K. Q.</given-names>
          </string-name>
          :
          <article-title>Densely Connected Convolutional Networks</article-title>
          .
          <source>In: Proceedings of the IEEE conference on computer vision and pattern recognition</source>
          , Vol.
          <volume>1</volume>
          , No.
          <volume>2</volume>
          , p.
          <volume>3</volume>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lasseck</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Image-based Plant Species Identi cation with Deep Convolutional Neural Networks</article-title>
          .
          <source>In: CLEF working notes 2017</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Chollet</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          , et al., https://keras.io (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>