Hostname: page-component-74656f9884-8rzl6 Total loading time: 0 Render date: 2026-11-05T13:40:27.897Z Has data issue: false hasContentIssue false

Spectral discrimination of crops and weeds using deep learning assisted by wavelet transform and statistical preprocessing

Published online by Cambridge University Press:  12 November 2024

Vahid Mohammadi
Affiliation:
Doctoral Student, Biosystems Engineering Department, Faculty of Agriculture, Tarbiat Modares University, Tehran, Iran, and ImViA, UFR Sciences et Techniques, Université de Bourgogne, Franche-Comté, Dijon, France
Saeid Minaei*
Affiliation:
Professor, Biosystems Engineering Department, Faculty of Agriculture, Tarbiat Modares University, Tehran, Iran
Pierre Gouton
Affiliation:
Professor, ImViA, UFR Sciences et Techniques, Université de Bourgogne, Franche-Comté, Dijon, France
Ali Reza Mahdavian
Affiliation:
Assistant Professor, Biosystems Engineering Department, Faculty of Agriculture, Tarbiat Modares University, Tehran, Iran
Mohammad Hadi Khoshtaghaza
Affiliation:
Professor, Biosystems Engineering Department, Faculty of Agriculture, Tarbiat Modares University, Tehran, Iran
*
Corresponding author: Saeid Minaei; Email: minaee@modares.ac.ir
Rights & Permissions [Opens in a new window]

Abstract

Automatic detection and removal of weeds is a challenging task that requires precise sensors. While crops and weeds possess similar features in terms of appearance, they can be discriminated based on spectral information. This can be done because any object has its own specific spectral signature based on its physical structure and chemical contents. This study examined the use of wavelet transform and deep learning for discrimination of weeds from crops. A total of 626 spectral reflectances in the range of 380 to 1,000 nm were obtained for three crops (cucumber [Cucumis sativus L.], tomato [Solanum lycopersicum L.], and bell pepper [Capsicum annuum L.]) and five different weeds (bindweed [Convolvulus spp.], purple nutsedge [Cyperus rotundus L.], narrowleaf plantain [Plantago lanceolata L.], common cinquefoil [Potentilla simplex Michx.], and garden sorrel [Rumex acetosa L.]). Morse wavelet was employed to decompose the spectra and extract the scalograms, which are the RGB representations of the spectral data. Two deep convolutional neural networks (i.e., GoogLeNet and SqueezNet) were employed for the recognition of crops and weeds. In addition, six common classifiers, including linear discriminant analysis, quadratic discriminant analysis, linear support vector machine, quadratic support vector machine, artificial neural networks, and k-nearest neighbors classifier (KNN), were used for the task of crop/weed discrimination to build the comparison with the proposed method. The error of prediction gradually decreased, and a 100% correct classification was achieved after 258 iterations. Analysis showed that SqueezNet provided classification of 100% accuracy, while GoogLeNet’s accuracy was 97.8% for the test set. Among the common classifiers, KNN provided the highest accuracy (i.e., 100%). This study showed that the proposed method can be successfully utilized for classification of crops and weeds.

Information

Type
Research Article
Copyright
© The Author(s), 2024. Published by Cambridge University Press on behalf of Weed Science Society of America
Figure 0

Figure 1. The measurement system and illumination setup: 1, light source; 2, spectroradiometer; 3, sample; 4, laptop computer.

Figure 1

Figure 2. A spectral reflectance of a bell pepper plant leaf (A) and its scalogram of continuous wavelet transform (CWT) colored as an RGB image (B).

Figure 2

Table 1. Technical details of the common classifiers used for discrimination of plants/weeds

Figure 3

Figure 3. Block diagram of the proposed algorithm for the separation of crops and weeds.

Figure 4

Figure 4. The spectral reflectance of plant leaves: (A) bell pepper, (B) Convolvulus spp., (C) Cyperus rotundus, (D) Plantago lanceolata, (E) Potentilla simplex, and (F) Rumex acetosa.

Figure 5

Figure 5. The average of preprocessed spectra of crops and weeds. The spectra were smoothed, normalized, and mean-centered.

Figure 6

Table 2. Comparison of validation and test accuracies for different classifiers

Figure 7

Figure 6. Diagram showing the SqueezNet training process and accuracy per iteration.

Figure 8

Table 3. The details of the training process of the network for each learning epoch

Figure 9

Figure 7. Diagram of loss function values per iteration during the SqueezNet training process.

Figure 10

Figure 8. Confusion matrix of the networks representing true and false classifications: (A) GoogLeNet and (B) SqueezNet.