<!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>A Real-time Approach System for Vineyards Intra-row Weed Detection</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vasileios Moysiadis</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>Dimitrios Kateris</string-name>
          <email>d.kateris@certh.gr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dimitrios Katikaridis</string-name>
          <email>d.katikaridis@certh.gr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgos Vasileiadis</string-name>
          <email>g.vasileiadis@certh.gr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vasileios Kolorizos</string-name>
          <email>v.kolorizos@certh.gr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Aristotelis C. Tagarakis</string-name>
          <email>a.tagarakis@certh.gr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dionysis Bochtis</string-name>
          <email>d.bochtis@certh.gr</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science &amp; Telecommunications, University of Thessaly</institution>
          ,
          <addr-line>35131 Lamia</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Energy Systems, University of Thessaly</institution>
          ,
          <addr-line>Gaiopolis Campus, 41500, Larisa</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Institute for Bio-Economy and Agri-Technology (iBO), Centre for Research and Technology-Hellas (CERTH)</institution>
          ,
          <addr-line>6</addr-line>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Laboratory of Agricultural Engineering, School of Agriculture, Aristotle University of Thessaloniki</institution>
          ,
          <addr-line>54124 Thessaloniki</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <fpage>39</fpage>
      <lpage>44</lpage>
      <abstract>
        <p>With the incorporation of autonomous robotic platforms in various areas (industry, agriculture, etc.), numerous mundane operations have become fully automated. The highly demanding working environment of Agriculture let the development of techniques and machineries that could cope with each case. New technologies (from high performance motors to optimization algorithms) have been implemented and tested in this field. Every cultivation season, there are several operations that contribute to crop development and have to take place at least once. One of these operations is the weeding. In every crop, there are plants that are not part of it. These plants, in most cases have a negative impact on the crop and had to be removed. In the past the weeding was taken place either by hand (smaller fields) or by the use of herbicides (larger fields). In the second case, the dosage and the time are pre-defined, and they are not taking into consideration the growth percentage and the weed allocation within the field. In this work, a novel approach for intra-row weed detection in vineyards is developed and presented. All the experiments both for data collection and algorithm testing took place in a high value vineyard which produce numerous wine varieties. The aim of this work is to implement an accurate real-time robotic system for weed detection and segmentation using a deep learning algorithm in order to optimize the weeding procedure. This approach consists of two essential sub-systems. The first one is the robotic platform that embeds all the necessary sensors and the required computational power for the detection algorithm. The second one is the developed algorithm. From all the developed models, the selected one performed accurately in the training procedure and in the unknown datasets. In order to properly validate the algorithm, the unknown datasets were acquired in different time periods with variations in both camera angle and wine varieties.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Weed detection</kwd>
        <kwd>RGB camera</kwd>
        <kwd>vineyard</kwd>
        <kwd>UGV</kwd>
        <kwd>deep learning</kwd>
        <kwd>masked RCNN</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Object detection and localization are essential procedures in state-of-the-art robotic operations. As
the available computational power increases, the implementation of numerous algorithms related to the
robots’ environmental awareness is documented. In this direction were developed two main types of
algorithms could be developed in order to identify and localize side weeds. Gonzalez-de-Santos, P. et
al in their work, propose a method incorporating a fleet of UAVs and UGV both RGB (with high spatial
resolution) and multi-spectral cameras for weed detection [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Along with the aggregated images,
various orthomasaics were produced to facilitate the weed detection process. A similar methodology
with the use of an OBIA algorithm was proposed by Peña et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In the work of de Castro et al., a
custom OBIA algorithm to classify four distinct classes (vine, cover crop, cynodon dactylon and bare
soil) is implemented [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. With the use of a UAV several orthomοsaics, both 2D and 3D were generated
for the validation of the proposed methodology. Furthermore, to accomplish better results a color index
of the vegetation was used to filter the available data.
      </p>
      <p>
        On the other hand, in the last few years, numerous implementations of machine learning and deep
learning algorithms in various scientific fields have been documented. The main prerequisite to training
and embedding an algorithm in any system is the available training and validation datasets. To that end,
in the work of Olsen et al., an open multiclass weed species image dataset for machine learning
applications is proposed [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. It contains more than 17,000 labeled images while the authors also propose
a deep learning model based on Inception-v3 and ResNet-50. Based on the above-mentioned paper, in
the work of dos Santos Ferreira et al., two unsupervised deep clustering algorithms based on two weed
datasets are evaluated [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The first algorithm is the Joint Unsupervised Learning of Deep
Representations and Image Clusters (JULE) which was proposed by Yang et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The second
algorithm is Deep Clustering for Unsupervised Learning of Visual Features (DeepCluster) which jointly
learns the parameters of a neural network and clusters the assignments of the resulting features, as it
was proposed by Caron et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The datasets that were used to train the algorithms were the
GrassBroadleaf from a previous work of the same authors [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and the DeepWeeds dataset. For further
exploration, Hu et al. developed a novel graph-based deep learning architecture to recognize multiple
types of weeds from RGB images [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. They also used the DeepWeeds dataset to train the algorithm.
Each of the input images were set as a multi-scale graph, of which the vertex patterns are associated
with the image sub-patches, of multiple scales from local to global scopes. Finally, based on the review
paper of Wu et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] some of the most common deep learning architectures were implemented in
different weed datasets.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Material and Methods</title>
      <p>Considering all the above, several methods were tested based on this work requirements. The
disadvantages of the OBIA method are related to the constantly changing operational environment of
the vineyards, in tandem with the available computational power. Especially the one related to the
available CUDA cores led to the selection of the Deep Learning methods. Furthermore, the second
essential decision that was made was based on the type of Deep Learning algorithm. There were three
essential options: 1. “learn from scratch”, 2. use a pre-trained model utilizing transfer learning, and 3.
fine tuning. In the “learn from scratch” method, it was necessary to start the learning process with
random weights. This method is associated with the possession of many images for the training
procedure. In fine tuning method, the weights which were initialized using a pre-trained model from
the same domain were unfrozen, and the re-training of the model on the new data with a very low
learning rate was attempted. Transfer learning is similar to the fine-tuning method with the noticeable
difference that the weights from the pre-trained model were not necessarily from the same domain. The
last two methods are commonly used when the available datasets consist of a small number of images.
The advantages of the transfer learning and fine-tuning method led to the selection of a combination of
the two methods.</p>
      <p>The proposed system consists of two essential sub-systems. The first one is the autonomous robotic
platform (Thorvald, SAGA Robotics) that embeds all the necessary sensors along with the required
computational power (Figure 1a). The second one is the developed weed detection algorithm. The
robotic platform that was used in this work was a Thorvald by SAGA Robotics. Four sensors were
mounted on the robotic platform. A laser scanner (Lidar), an RTK GPS, two IMU sensors and an RGB
camera. The first three sensors are used to facilitate autonomous navigation and the fourth one is for
weed detection. All the sensors were placed on the robotic platform in order to minimize the input data
error as depicted in the figure below (Figure 1b). The communication between the robotic platform and
the sensors became via the ROS framework.
a) b)
Figure 1: a) The weed detection system mounted on Thorvald robotic platform and b) Location of
the sensors n the relative coordinate system using the IMU.</p>
      <p>
        Also, two algorithms were developed and tested for weed detection at the intra-row path. The first
algorithm was a Single Shot Detector (SSD) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] with a ResNet 101 [12] as a backbone while the second
algorithm was the Mask RCNN [13]. Python3.7, OpenCV and TensorFlow1.5 were used for both
algorithms. The final implementation of the intra-row path weeds detection took place with the
development of the Mask RCNN, based on the results of early stopping.
      </p>
      <p>All the measurements were taken place at Ktima Gerovassiliou vineyard, via an autonomous robotic
platform. Ktima Gerovassiliou is one of the largest wine producers in the country cultivating several
varieties of both white and red wine via an autonomous robotic platform.</p>
      <p>All the RGB images were aggregated from a ZED2 RGBD camera by Stereolabs which was
embedded in the Thorvald robotic platform. The resolution of the images was 2208x1242 with f/1.8
and field of view 110° (H) x 70° (V). The camera was placed sideways of the robotic platform in a 45°
angle. As described before the Mask RCNN algorithm is based on a Feature pyramid network and a
RESNET 101 architecture. The dataset consists of 1326 RGB images from four vineyard varieties in
three stages of the cultivation season. The selection of the days that the experiments were held was
based on the weeds’ growth and more specifically early spring, early and late summer.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>The proposed model was trained on a NVIDIA 1080 Ti with 64 Gb of RAM. The separation of the
dataset was defined as 1066 images for training and 260 images for testing. The training procedure of
the algorithm took place with three distinct stages, In stage one, a region proposal network was used
known as RPN. In stage two, a proposal classification takes the region proposals from the RPN and
classifies them and in stage three the Masks were generated. This stage takes the detections from the
previous layer and runs the mask head to generate segmentation masks for every instance. Furthermore,
images from a standalone RGB camera were acquired in order to validate the model in unknown images.
In the following figure (Figure 2) six images are presented with different angles captured in different
cultivation periods. Also, in the following five tables the results for each variety along with the summary
of the results are presented (Table 1-5).</p>
      <p>Recall
0.8393186755</p>
      <p>F1
0.8695288045</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>In conclusion, this work intends to provide a solution to weed management, one of the major
challenges in viticulture, as long as weeds can cause significant yield losses and severe competition to
the cultivation. According to this, the development of a totally automated procedure for weed
monitoring will provide useful data for understanding weed management practices. Also, this work
aims to present a new image-based technique that was developed in order to detect weeds at the
intrarow path in vineyards. The developed model was tested in different field vineyard conditions with
different levels of weed growth and it performed accurately in cases where the weeds had distinct
borders. On the other hand, the results show that the proposed model gives promising results in various
field conditions and in conditions where there are no distinct boundaries between the weeds.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Acknowledgements</title>
      <p>This work was supported by the HORIZON 2020 Project “BACCHUS: Mobile Robotic Platforms
for Active Inspection and Harvesting in Agricultural Areas” (project code: 871704)
financed by the European Union, under the call H2020-ICT-2018-2020.</p>
    </sec>
    <sec id="sec-6">
      <title>6. References</title>
      <p>[12] K. He, X. Zhang, S. Ren, J. Sun. Deep residual learning for image recognition. Proceedings of the
IEEE Computer Society Conference on Computer Vision and Pattern Recognition (2016) 770–
778.
[13] K. He, G. Gkioxari, P. Dollár, R. Girshick. Mask R-CNN, IEEE Transactions on Pattern Analysis
and Machine Intelligence, 42(2) (2017) 386–397.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Gonzalez-de-Santos</surname>
          </string-name>
          et al.,
          <article-title>Fleets of robots for environmentally-safe pest control in agriculture</article-title>
          ,
          <source>Precision Agriculture</source>
          ,
          <volume>18</volume>
          (
          <issue>4</issue>
          ) (
          <year>2017</year>
          )
          <fpage>574</fpage>
          -
          <lpage>614</lpage>
          . doi:
          <volume>10</volume>
          .1007/S11119-016-9476-3/FIGURES/16.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Peña</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Torres-Sánchez</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. I.</surname>
          </string-name>
          de Castro,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kelly</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>López-Granados</surname>
          </string-name>
          ,
          <article-title>Weed Mapping in Early-Season Maize Fields Using Object-Based Analysis of Unmanned Aerial Vehicle (UAV) Images</article-title>
          ,
          <source>PLOS ONE</source>
          ,
          <volume>8</volume>
          (
          <issue>10</issue>
          ) (
          <year>2013</year>
          ). doi:
          <volume>10</volume>
          .1371/JOURNAL.PONE.
          <volume>0077151</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>A. I.</surname>
          </string-name>
          de Castro,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Peña</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Torres-Sánchez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Jiménez-Brenes</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>López-Granados</surname>
          </string-name>
          ,
          <article-title>Mapping Cynodon dactylon in vineyards using UAV images for site-specific weed control</article-title>
          ,
          <source>Advances in Animal Biosciences</source>
          ,
          <volume>8</volume>
          (
          <issue>2</issue>
          ) (
          <year>2017</year>
          )
          <fpage>267</fpage>
          -
          <lpage>271</lpage>
          . doi:
          <volume>10</volume>
          .1017/S2040470017000826.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Olsen</surname>
          </string-name>
          et al.,
          <article-title>DeepWeeds: A Multiclass Weed Species Image Dataset for Deep Learning</article-title>
          ,
          <source>Scientific Reports</source>
          <volume>9</volume>
          (
          <issue>1</issue>
          ) (
          <year>2019</year>
          )
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          . doi:
          <volume>10</volume>
          .1038/s41598-018-38343-3.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A. dos Santos</given-names>
            <surname>Ferreira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Freitas</surname>
          </string-name>
          , G. G. da Silva,
          <string-name>
            <given-names>H.</given-names>
            <surname>Pistori</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Folhes</surname>
          </string-name>
          ,
          <article-title>Unsupervised deep learning and semi-automatic data labeling in weed discrimination, Computers and</article-title>
          Electronics in Agriculture,
          <volume>165</volume>
          (
          <year>2019</year>
          )
          <article-title>104963</article-title>
          . doi:
          <volume>10</volume>
          .1016/J.COMPAG.
          <year>2019</year>
          .
          <volume>104963</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Parikh</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Batra</surname>
          </string-name>
          ,
          <article-title>Joint unsupervised learning of deep representations and image clusters</article-title>
          ,
          <source>” Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition</source>
          , (
          <year>2016</year>
          )
          <fpage>5147</fpage>
          -
          <lpage>5156</lpage>
          . doi:
          <volume>10</volume>
          .1109/CVPR.
          <year>2016</year>
          .
          <volume>556</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Caron</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Bojanowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Joulin</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Douze</surname>
          </string-name>
          ,
          <source>Deep Clustering for Unsupervised Learning of Visual Features, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)</source>
          ,
          <volume>11218</volume>
          (
          <year>2018</year>
          )
          <fpage>139</fpage>
          -
          <lpage>156</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -01264-
          <issue>9</issue>
          _
          <fpage>9</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A. dos Santos</given-names>
            <surname>Ferreira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. Matte</given-names>
            <surname>Freitas</surname>
          </string-name>
          , G. Gonçalves da Silva,
          <string-name>
            <given-names>H.</given-names>
            <surname>Pistori</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Theophilo Folhes</surname>
          </string-name>
          ,
          <article-title>Weed detection in soybean crops using ConvNets, Computers</article-title>
          and Electronics in Agriculture,
          <volume>143</volume>
          (
          <year>2017</year>
          )
          <fpage>314</fpage>
          -
          <lpage>324</lpage>
          . doi:
          <volume>10</volume>
          .1016/J.COMPAG.
          <year>2017</year>
          .
          <volume>10</volume>
          .027.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>K.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Coleman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zeng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Walsh</surname>
          </string-name>
          ,
          <article-title>Graph weeds net: A graph-based deep learning method for weed recognition,” Computers and</article-title>
          Electronics in Agriculture,
          <volume>174</volume>
          (
          <year>2020</year>
          )
          <article-title>105520</article-title>
          . doi:
          <volume>10</volume>
          .1016/J.COMPAG.
          <year>2020</year>
          .
          <volume>105520</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Kang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Ding</surname>
          </string-name>
          ,
          <source>Review of Weed Detection Methods Based on Computer Vision</source>
          , Sensors
          <volume>21</volume>
          (
          <issue>11</issue>
          ) (
          <year>2021</year>
          )
          <article-title>3647</article-title>
          . doi:
          <volume>10</volume>
          .3390/S21113647.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>X.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Kang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nishide</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ren</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          <article-title>Object detection based on SSD-ResNet</article-title>
          .
          <source>Proceedings of 6th IEEE International Conference on Cloud Computing and Intelligence Systems CCIS</source>
          (
          <year>2019</year>
          )
          <fpage>89</fpage>
          -
          <lpage>92</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>