Hostname: page-component-74656f9884-6grmk Total loading time: 0 Render date: 2026-11-05T12:05:36.988Z Has data issue: false hasContentIssue false

Knowledge distillation and student–teacher learning for weed detection in turf

Published online by Cambridge University Press:  29 October 2024

Danlan Zhai
Affiliation:
Intern, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences in Weifang, Shandong, China
Teng Liu
Affiliation:
Research Assistant, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences in Weifang, Shandong, China
Feiyu He
Affiliation:
Student, Department of Computer Science, Duke University, Durham, NC, USA
Jinxu Wang
Affiliation:
Research Assistant, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences in Weifang, Shandong, China
Xiaojun Jin*
Affiliation:
Associate Professor, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences in Weifang, Shandong, China
Jialin Yu*
Affiliation:
Professor and Principal Investigator, Peking University Institute of Advanced Agricultural Sciences, Shandong Laboratory of Advanced Agricultural Sciences in Weifang, Shandong, China
*
Corresponding authors: Xiaojun Jin; Email: xiaojun.jin@pku-iaas.edu.cn; Jialin Yu; Email: jialin.yu@pku-iaas.edu.cn
Corresponding authors: Xiaojun Jin; Email: xiaojun.jin@pku-iaas.edu.cn; Jialin Yu; Email: jialin.yu@pku-iaas.edu.cn
Rights & Permissions [Opens in a new window]

Abstract

Machine vision–based herbicide applications relying on object detection or image classification deep convolutional neural networks (DCNNs) demand high memory and computational resources, resulting in lengthy inference times. To tackle these challenges, this study assessed the effectiveness of three teacher models, each trained on datasets of varying sizes, including D-20k (comprising 10,000 true-positive and true-negative images) and D-10k (comprising 5,000 true-positive and true-negative images). Additionally, knowledge distillation was performed on their corresponding student models across a range of temperature settings. After the process of student–teacher learning, the parameters of all student models were reduced. ResNet18 not only achieved higher accuracy (ACC ≥ 0.989) but also maintained higher frames per second (FPS ≥ 742.9) under its optimal temperature condition (T = 1). Overall, the results suggest that employing knowledge distillation in the machine vision models enabled accurate and reliable weed detection in turf while reducing the need for extensive computational resources, thereby facilitating real-time weed detection and contributing to the development of smart, machine vision–based sprayers.

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. Representation of the two classes in the training, validation, and testing datasets. “Turf” refers to sub-images that exclusively contain bermudagrass (Cynodon dactylon). “Weed” refers to sub-images that contain one of the following species: Paspalum dilatatum, Taraxacum officinale, Murdannia nudiflora, Richardia scabra, Hydrocotyle sibthorpioides, Oldenlandia corymbosa, Cyperus rotundus, Digitaria ischaemum, or Trifolium repens. Only sub-images containing a single weed species were used for training, validation, and testing.

Figure 1

Table 1. Training, validation, and testing dataset specifications.a

Figure 2

Figure 2. Flowchart of the knowledge distillation training process.

Figure 3

Table 2. Hyperparameter values used for training the teacher models.

Figure 4

Table 3. Validation results of teacher models for weed detection in bermudagrass turf.

Figure 5

Table 4. Testing results of teacher models for weed detection in turf.

Figure 6

Figure 3. Confusion matrices of teacher models on the testing dataset. Training of teacher models on (A) the D-20k dataset and (B) the D-10k dataset. D-20k indicates the training dataset with 10,000 “Turf” class images and 10,000 “Weed” class images. D-10k indicates the training dataset with 5,000 “Turf” class images and 5,000 “Weed” class images.

Figure 7

Figure 4. Fluctuations in accuracy (ACC) values during the training of teacher models on datasets of different sizes. Training of teacher models on (A) the D-20k dataset and (B) the D-10k dataset. D-20k indicates the training dataset with 10,000 “Turf” class images and 10,000 “Weed” class images. D-10k indicates the training dataset with 5,000 “Turf” class images and 5,000 “Weed” class images.

Figure 8

Table 5. Validation results of student models across different temperature settings.

Figure 9

Figure 5. Fluctuations in accuracy (ACC) values during the training of student models across different T settings and sizes of datasets. Student–teacher learning with (A) the ResNet model on the D-20k dataset; (B) ResNet model on the D-10k dataset; (C) the EfficientNet model on the D-20k dataset; (D) the EfficientNet model on the D-10k dataset; (E) the DenseNet model on the D-20k dataset; and (F) the DenseNet model on the D-10k dataset. D-20k indicates the training dataset with 10,000 “Turf” class images and 10,000 “Weed” class images. D-10k indicates the training dataset with 5,000 “Turf” class images and 5,000 “Weed” class images.

Figure 10

Table 6. Testing results of student models at their optimal temperature for weed detection in turf.

Figure 11

Figure 6. Confusion matrices of student models at their optimal temperature on the testing dataset. Training of student models on (A) the D-20k dataset and (B) the D-10k dataset. D-20k indicates the training dataset with 10,000 “Turf” class images and 10,000 “Weed” class images. D-10k indicates the training dataset with 5,000 “Turf” class images and 5,000 “Weed” class images.