Weed Detection Using Convolutional Neural Network
Weed Detection Using Convolutional Neural Network
Abstract. Precision agriculture relies heavily on information technology, which also aids agronomists in their work.
Weeds usually grow alongside crops, reducing the production of that crop. They are controlled by herbicides. The
pesticide may harm the crop as well if the type of weed is not identified. To control weeds on farms, it is required
to identify and classify them. A convolutional network or CNN, a deep learning-based computer vision technology,
is used to evaluate images. A methodology is proposed to detect weeds using convolutional neural networks. There
were two primary phases in this proposed methodology. The first phase is image collection and labeling, in which
the features for images to be labeled for the base images are extracted. In the second phase, the convolutional
neural network model is constructed by 20 layers to detect the weed. CNN architecture has three layers, namely,
the convolutional layer, the pooling layer, and the dense layer. The input image is given to a convolutional layer
to extract the features from the image. The features are given to the pooling layer to compress the image to reduce
the computational complexity. The dense layer is used for final classification. The performance of the proposed
methodology is assessed using agricultural dataset images taken from the Kaggle database.
Keywords: CNN, weed, precision agriculture, segmentation.
36
Weed Detection Using Convolutional Neural Network 37
on yield prediction, disease detection, weed detection crop the growth of crops. By combining image processing and
quality, and species recognition; (b) livestock management, CNN in drones, they get different accuracies depending
including applications on animal welfare and livestock on the processing, which is from 98.8% with CNN to 85%
production; (c) water management; and (d) soil manage- using Histograms of Oriented Gradients (HOG) [21]. The
ment [6]. ML and DL techniques have been used for weed authors combined Hough transform with simple linear
detection and recognition and thus for weed management. iterative clustering (SLIC). This method focuses on the
In 2018, Kamilaris and Prenafeta-Bold’u (2018) published detection of crop lines [22]. A threshold based on the
a survey of 40 research papers that applied DL techniques classification values of the area for a crop or a weed is
to address various agricultural problems, including weed proposed [23].
detection. The study reported that DL techniques out-
performed more than traditional image processing meth- PROPOSED METHODOLOGY
ods [7]. It discussed ten components that are essential and
possible obstructions to developing a fully autonomous The main objective of the proposed methodology is to
mechanical weed management system [8]. The authors detect weeds. The convolutional neural network is pro-
focused on different machine vision and image process- posed for weed detection. The architecture of the proposed
ing techniques used for ground-based weed detection [9]. methodology is shown in Figure 1.
Fernández-Quintanilla et al. (2018) reviewed technologies The convolution layer is used to extract the features
that can be used to monitor weeds in crops. They explored from the image. The rectified linear unit (ReLU) activation
different remotely sensed and ground-based weed mon- function is used in the convolutional layer. The ReLU
itoring systems in agricultural fields. They reported that helps to break up the linearity even further, compensat-
weed monitoring is essential for weed management. They ing for any linearity that may be imposed on an image
foresaw that the data collected using different sensors during the convolution process. As a result, ReLU aids
could be stored in cloud systems for timely use in relevant in avoiding the exponential growth of the computation
contexts [10]. They used the VGG-16 model for classifying required to run the neural network. As the size of the
crop plants and weeds. They also trained the model with CNN rises, the computational cost of adding more ReLUs
one dataset containing sunflower crops and evaluated it grows linearly. Another nonlinear activation function that
with two different datasets with carrot and sugar beet has gained prominence in the deep learning sector is the
crops [11]. The author describes in “Weed detection using ReLU function. The key benefit of employing the ReLU
image processing” how they can detect and separate weed- function over other activation functions is that it does not
affected areas from the crop plants using image process- simultaneously stimulate all of the neurons.
ing [12]. A methodology is proposed to detect weeds using The feature maps’ dimensions are reduced by using
image processing techniques. The properties are extracted pooling layers. As a result, the number of parameters to
from the image and weed is detected from the extracted
features [13]. Machine vision uses unique image processing
techniques. Weeds in agricultural fields have been detected
by their properties such as size, shape, spectral reflectance,
and texture features [14]. Two methods are proposed for
weed detection: crop row detection in images from agri-
culture fields with high weed difficulty and to further
differentiate between weed and crop [15]. The author
proposed in “Crop and weed detection based on texture
and size features and automatic spraying of herbicides”
how they developed the image processing algorithm for
yield finding and management of weeds [16]. A computer
vision application to detect unwanted weeds in early-
stage crops is proposed [17]. A novel approach for weed
classification using curvelet transform and Tamura texture
feature (CTTTF) with RVM classification methodology is
proposed [18]. Robots are working collaboratively with
humans and learning from them how to realize basic agri-
culture tasks such as weed detection, watering, or seeding
(Marinoudi, et al., 2019) [19]. Weed detection using deep
learning has been proposed [20]. It is proposed that the
implementation of image processing in drones instead of
robots so that they not only detect weeds but also monitor Figure 1. Weed detection architecture.
38 M. S. Hema et al.
[15] A Satish kumar, et al., “Detection of weeds in a crop row using image [21] Daman, M., Aravind, R. and Kariyappa, B., 2015. Design and Devel-
processing” Imperial Journal of Interdisciplinary Research (2016). opment of Automatic Weed Detection and Smart Herbicide Sprayer
[16] Amruta A. Aware, “Crop and weed detection based on texture and Robot. IEEE Recent Advances in Intelligent Computational Systems
size features and automatic spraying of herbicides” International (RAICS), pp. 257–261.
Journal of Advanced Research (2016). [22] Liang, W.-C., Yang, Y.-J. and Chao, C.-M., 2019. Low-Cost Weed
[17] Batriz Nathlia, et al., “A computer vision application to detect Identification System Using Drones. Candarw, Volume 1, pp. 260–
unwanted weed in early stage crops” WSEAS (2016). 263.
[18] P. Prema, “A Novel approach for weed classification using curvelet [23] Bah, M. D., Hafiane, A. and Canals, R., 2017. Weeds detection in
transform and tamura texture feature (CTTTF) with RVM classifica- UAV imagery using SLIC and the hough transform. 2017 Seventh
tion” International Journal of Applied Engineering Research (2016). International Conference on Image Processing Theory, Tools and
[19] Marinoudi, V., Sorensen, C., Pearson, S. and Bochtis, D., 2019. Applications (IPTA), pp. 1–6.
Robotics and labour in agriculture. A context consideration. Biosys-
tems Engineering, pp. 111–121.
[20] Dankhara, F., Patel, K. and Doshi, N., 2019. Analysis of robust weed
detection techniques based on the Internet of Things (IoT). Coimbra,
Portugal, Elsevier B.V, pp. 696–701.