Dissimilarity-based active learning for embedded weed identification

Yana Yang, Yang Li, Jiachen Yang, Jiabao WenTURKISH 2022

Abstract

Precision agriculture relies on efficient weed identification to optimize crop yields. However, deep learning models typically require massive annotated datasets and significant computational resources, hindering deployment on embedded systems. This paper presents a framework combining Dissimilarity-Based Active Learning (DBAL) to reduce data labeling requirements and Network Slimming for model compression. Our approach achieves 90.75% accuracy on the DeepWeeds dataset using only 32% of the training data and reduces model size by 92.7% (from 117.9 MB to 8.6 MB). The compressed model runs at 192 fps on an NVIDIA Jetson AGX Xavier, demonstrating its suitability for real-time field applications.

Introduction

The integration of AI into agriculture promises a shift toward sustainable, precision-based practices. Identifying weeds in real-time allows for targeted herbicide application, reducing chemical waste and protecting crop health. Despite these benefits, two primary obstacles remain: the "data hunger" of deep learning models and the "hardware gap" between high-end training servers and low-power field robots. Manually labeling tens of thousands of images is prohibitively expensive, and standard convolutional neural networks (CNNs) are often too large for embedded edge devices. This research addresses these bottlenecks by optimizing both the data acquisition and the model architecture.

Methodology

Dissimilarity-Based Active Learning (DBAL)

To minimize the labeling effort, we propose an active learning strategy that prioritizes the most informative samples. Unlike random sampling, DBAL identifies images that are most "dissimilar" to the existing labeled set.

  1. Pool Split: Data is divided into a small labeled pool ($L$) and a large unlabeled pool ($U$).
  2. Dissimilarity Metric: A secondary classifier distinguishes between $L$ and $U$. By calculating the Euclidean distance between the cluster centroids of these pools in the feature space, the system identifies samples in $U$ that the current model finds most confusing.
  3. Iterative Labeling: These high-uncertainty, high-diversity samples are prioritized for manual labeling, allowing the model to learn complex class boundaries with significantly fewer examples.

Network Slimming and Compression

To bridge the hardware gap, we employ "Network Slimming" on a VGG-based architecture. This technique leverages the scale factors ($\gamma$) in Batch Normalization (BN) layers.

  • Sparsity Training: During training, L1 regularization is applied to the scale factors, forcing unimportant channels toward zero.
  • Pruning: Channels with near-zero scale factors are removed, drastically reducing the number of parameters.
  • Fine-tuning: The pruned model is fine-tuned to recover any minor loss in accuracy.

Experimental Results

Dataset Performance

The framework was evaluated on two benchmarks: the complex DeepWeeds dataset (9 classes) and the Grass-Broadleaf dataset (4 classes).

Example of a broadleaf weed from the Grass-Broadleaf dataset.
Example of a soybean crop from the Grass-Broadleaf dataset.

On the DeepWeeds dataset, the DBAL method reached 90.75% accuracy using only 32% of the total data, which is 99.18% of the baseline performance achieved with the full dataset. For the Grass-Broadleaf dataset, the approach achieved 98.97% accuracy with just 27.8% of the data.

Model Efficiency and Deployment

The compression results were equally significant. The model size was reduced from 117.9 MB to 8.6 MB, representing a 92.7% compression ratio. This reduction resulted in only a 1% degradation in accuracy. When deployed on the NVIDIA Jetson AGX Xavier, the optimized model achieved a throughput of 192 fps, ensuring real-time performance for autonomous weeding robots.

Discussion and Conclusion

This work demonstrates that "better data" is more valuable than "more data." By focusing on sample diversity through dissimilarity metrics, we can drastically reduce the cost of AI development in agriculture. Furthermore, model pruning proves that high-performance weed identification does not require massive hardware, making it accessible for edge deployment.

Future research will focus on moving from image classification to object detection in unconstrained field environments and exploring few-shot learning techniques to further minimize data requirements.

Summary updated

BibTeX
@inproceedings{yang2022dissimilarity,
  author = {YANA YANG and Yang Li and JIACHEN YANG and Jiabao Wen},
  title = {{Dissimilarity-based active learning for embedded weed identification}},
  booktitle = {TURKISH},
  year = {2022},
  doi = {10.55730/1300-011x.3011},
}
Figure