Hostname: page-component-89b8bd64d-4ws75 Total loading time: 0 Render date: 2026-05-12T08:14:01.089Z Has data issue: false hasContentIssue false

A comparative evaluation of convolutional neural networks, training image sizes, and deep learning optimizers for weed detection in alfalfa

Published online by Cambridge University Press:  15 June 2022

Jie Yang
Affiliation:
Ph.D Candidate, College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing, China; also Visiting Student, Peking University Institute of Advanced Agricultural Sciences, Weifang, Shandong, China
Muthukumar Bagavathiannan
Affiliation:
Associate Professor, Department of Soil and Crop Sciences, Texas A&M University, College Station, Texas, USA
Yundi Wang
Affiliation:
Graduate Student, Department of Computer Science, Stevens Institute of Technology, Hoboken, New Jersey, USA
Yong Chen*
Affiliation:
Professor, College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing, China
Jialin Yu*
Affiliation:
Research Professor, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences at Weifang, Weifang, Shandong, China
*
Authors for correspondence: Yong Chen, College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing, 210037, China. Email: chenyongjsnj@163.com. Jialin Yu, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences at Weifang, Weifang, Shandong, 261325, China. Email: jialin.yu@pku-iaas.edu.cn
Authors for correspondence: Yong Chen, College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing, 210037, China. Email: chenyongjsnj@163.com. Jialin Yu, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences at Weifang, Weifang, Shandong, 261325, China. Email: jialin.yu@pku-iaas.edu.cn
Rights & Permissions [Opens in a new window]

Abstract

In this research, the deep-learning optimizers Adagrad, AdaDelta, Adaptive Moment Estimation (Adam), and Stochastic Gradient Descent (SGD) were applied to the deep convolutional neural networks AlexNet, GoogLeNet, VGGNet, and ResNet that were trained to recognize weeds among alfalfa using photographic images taken at 200×200, 400×400, 600×600, and 800×800 pixels. An increase in the image sizes reduced the classification accuracy of all neural networks. The neural networks that were trained with images of 200×200 pixels resulted in better classification accuracy than the other image sizes investigated here. The optimizers AlexNet and GoogLeNet trained with AdaDelta and SGD outperformed the Adagrad and Adam optimizers; VGGNet trained with AdaDelta outperformed Adagrad, Adam, and SGD; and ResNet trained with AdaDelta and Adagrad outperformed the Adam and SGD optimizers. When the neural networks were trained with the best-performing input image size (200×200 pixels) and the best-performing deep learning optimizer, VGGNet was the most effective neural network, with high precision and recall values (≥0.99) when validation and testing datasets were used. Alternatively, ResNet was the least effective neural network in its ability to classify images containing weeds. However, there was no difference among the different neural networks in their ability to differentiate between broadleaf and grass weeds. The neural networks discussed herein may be used for scouting weed infestations in alfalfa and further integrated into the machine vision subsystem of smart sprayers for site-specific weed control.

Information

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

Figure 1. Image classification using deep neural networks in training and testing images. (A) Images were cropped into four different sizes of input images, including 200×200, 400×400, 600×600, and 800×800 pixels; (B) input images were classified into true positive images (including the target weeds) and true negative images (excluding the target weeds); (C) for true positive images, the major broadleaf weeds were annual fleabane, common sage, Canada thistle, and heistepta, while the major grass weeds were crabgrass, goosegrass, barnyardgrass, and green foxtail.

Figure 1

Table 1. Hyper parameters used for training the neural networks.a

Figure 2

Table 2. Image classification using deep convolutional neural network architectures under different image sizes in validation and testing datasets for detection of weeds in alfalfa crops.a,b

Figure 3

Figure 2. Loss curve of convolutional neural network training.

Figure 4

Table 3. Image classification using deep convolutional neural network architectures under different deep learning optimizers in validation and testing datasets for detection of weeds in alfalfa.a,b

Figure 5

Table 4. Image classification using deep convolutional neural network architectures in validation and testing datasets to detect broadleaf vs. grass weeds in alfalfa.a,b

Figure 6

Figure 3. Classification results of the VGGNet in the testing dataset.