Hostname: page-component-89b8bd64d-ktprf Total loading time: 0 Render date: 2026-05-07T01:35:17.111Z Has data issue: false hasContentIssue false

Use of open-source object detection algorithms to detect Palmer amaranth (Amaranthus palmeri) in soybean

Published online by Cambridge University Press:  19 September 2022

Isaac H. Barnhart
Affiliation:
Graduate Research Assistant, Department of Agronomy, Kansas State University, Manhattan, KS, USA
Sarah Lancaster
Affiliation:
Assistant Professor, Extension Weed Specialist, Department of Agronomy, Kansas State University, Manhattan, KS, USA
Douglas Goodin
Affiliation:
Professor, Department of Geography and Geospatial Sciences, Kansas State University, Manhattan, KS, USA
Jess Spotanski
Affiliation:
Owner/Manager, Midwest Research Incorporated, York, NE, USA
J. Anita Dille*
Affiliation:
Professor, Department of Agronomy, Kansas State University, Manhattan, KS, USA
*
Author for correspondence: J. Anita Dille, Kansas State University, Agronomy Department, 1712 Claflin Road, Manhattan, KS 66506-5501. Email: dieleman@ksu.edu
Rights & Permissions [Opens in a new window]

Abstract

Site-specific weed management using open-source object detection algorithms could accurately detect weeds in cropping systems. We investigated the use of object detection algorithms to detect Palmer amaranth (Amaranthus palmeri S. Watson) in soybean [Glycine max (L.) Merr.]. The objectives were to (1) develop an annotated image database of A. palmeri and soybean to fine-tune object detection algorithms, (2) compare effectiveness of multiple open-source algorithms in detecting A. palmeri, and (3) evaluate the relationship between A. palmeri growth features and A. palmeri detection ability. Soybean field sites were established in Manhattan, KS, and Gypsum, KS, with natural populations of A. palmeri. A total of 1,108 and 392 images were taken aerially and at ground level, respectively, between May 27 and July 27, 2021. After image annotation, a total of 4,492 images were selected. Annotated images were used to fine-tune open-source faster regional convolutional (Faster R-CNN) and single-shot detector (SSD) algorithms using a Resnet backbone, as well as the “You Only Look Once” (YOLO) series algorithms. Results demonstrated that YOLO v. 5 achieved the highest mean average precision score of 0.77. For both A. palmeri and soybean detections within this algorithm, the highest F1 score was 0.72 when using a confidence threshold of 0.298. A lower confidence threshold of 0.15 increased the likelihood of species detection, but also increased the likelihood of false-positive detections. The trained YOLOv5 data set was used to identify A. palmeri in a data set paired with measured growth features. Linear regression models predicted that as A. palmeri densities increased and as A. palmeri height increased, precision, recall, and F1 scores of algorithms would decrease. We conclude that open-source algorithms such as YOLOv5 show great potential in detecting A. palmeri in soybean-cropping systems.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press on behalf of the Weed Science Society of America
Figure 0

Table 1. Dates, number of images, platform used, and height above ground for image collection at Manhattan and Gypsum, KS, field locations in 2021.

Figure 1

Figure 1. Examples of images collected for soybean in the VE-VC (A) and R2 (B) growth stages.

Figure 2

Figure 2. Illustration of the annotation process. Amaranthus palmeri and soybean plants are labeled in this figure with orange and white boxes, respectively. Bounding boxes overlap with neighboring bounding boxes when plant features are irregular. In cases where a single bounding box could not encompass a plant without including a plant of another species, multiple irregular bounding boxes were drawn on a single specimen.

Figure 3

Table 2. Training information and hyperparameters used in this study.

Figure 4

Figure 3. Intersection over union (IoU) equation, defined as the overlap between the ground truth annotation and the computer prediction bounding box, divided by the total area of the two bounding boxes. IoU overlaps greater than 0.5 were considered true-positive predictions, whereas overlaps less than 0.5 were considered false-positive predictions.

Figure 5

Figure 4. Mean average precision (mAP) results of each model after training. YOLOv5 was considered the best-performing algorithm of each tested model with a mAP of 0.77.

Figure 6

Figure 5. Change in mean average precision (mAP) @ 0.5 over each epoch during training. mAP was reported after the completion of each epoch. Training was terminated after visual inspection of curve and when mAP @ 0.5 curve was seen to “plateau.”

Figure 7

Figure 6. Precision–recall curve for YOLOv5. Amaranthus palmeri achieved a slightly higher average precision (AP) (0.788) than soybean. Solid blue line represents mean average precision (mAP) computed on the test data set. The AP for each class and the mAP for the overall algorithm were representative of the area of the graph under each respective curve.

Figure 8

Figure 7. Image annotation of soybean at the R2 growth stage. As soybean populations were much higher than Amaranthus palmeri populations, there was a high level of soybean overlap. Therefore, it was necessary to include multiple soybean plants in each image. However, A. palmeri plants typically did not have as much overlap, and in most cases, it was much easier to identify and label individual plants.

Figure 9

Figure 8. F1 scores for YOLOv5 indicating the harmonic mean between precision and recall scores. Data indicated that detection results for both species would be best at a confidence threshold of 0.298.

Figure 10

Figure 9. YOLOv5 detection results for Amaranthus palmeri and soybean using confidence thresholds of 0.15 (A) and 0.70 (B). The likelihood of false-negative (FN) detections increases as confidence thresholds increase, as can be seen in B. Objects assigned a confidence interval of less than 0.70 are not detected in B. FN A. palmeri and soybean detections in B are indicated by the orange and white arrows, respectively.

Figure 11

Figure 10. Detection results for YOLOv5 with a confidence interval of 0.15. False-positive detections of Mollugo verticillata and Abutilon theophrasti as Amaranthus palmeri are denoted by arrows pointing from “A” and “B,” respectively.

Figure 12

Table 3. Regression models used to evaluate the effect of Amaranthus palmeri morphological parameters on model evaluation metrics and Akaike information criterion (AIC) used for model selection to detect A. palmeri. Bold type indicates that model 5 best fit the data.

Figure 13

Table 4. Linear regression results (model 5) for Amaranthus palmeri density (plants m−2) and height (cm) regressed against model evaluation metrics.

Figure 14

Figure 11. YOLOv5 precision (A), recall (B), and F1 score (C) changes as a function of Amaranthus palmeri density (plants m−2).