Deep-CNN based Robotic Multi-Class Under-Canopy Weed Control in Precision Farming

Yayun Du, Guofeng Zhang, Darren Tsang, Mohammad Khalid Jawed

This paper, recently published by researchers at UCLA, presents a significant step toward making precision agriculture accessible and effective in "messy" real-world conditions. By combining a new, realistic dataset with a low-cost robotic platform, the authors demonstrate that high-accuracy, species-specific weeding is possible even under the crop canopy.

TL;DR

The researchers introduced AIWeeds, a dataset of 10,000 realistic field images, and SAMBot, a $500 autonomous robot designed for under-canopy weeding. Using a TensorRT-optimized MobileNetV2 model, they achieved 90% weed detection accuracy in real-time field tests, providing a blueprint for reducing herbicide use in narrow-row crops.

What Problem Does This Paper Address?

Conventional weeding is a "spray-all" affair, leading to environmental damage, herbicide-resistant weeds, and high costs. While "See and Spray" technology exists, it faces two major hurdles:

  1. The "Under-Canopy" Gap: Most robots are too large for narrow-row crops (like flax or canola) or rely on GPS, which fails once a crop canopy closes over the robot.
  2. The Data Gap: Existing weed image libraries often feature "perfect" photos—centered plants with no background noise. In reality, a robot sees motion blur, harsh shadows, and overlapping leaves, which causes standard models to fail.

Methods

The authors developed a full pipeline from data collection to edge deployment:

  • Hardware: They built SAMBot, a compact, low-cost (~$500) robot. It features a Jetson Nano for onboard AI processing and a 3-degree-of-freedom gimbal that allows cameras to scan the ground from various angles.
  • The Model: They evaluated five CNN architectures (VGG19, ResNet50, InceptionV3, Xception, and MobileNetV2). They modified the architectures by replacing the final layers with a global average pooling layer and a 16-neuron fully connected layer using a Sigmoid activation function.
  • Optimization: To run deep learning on a low-power single-board computer, they used NVIDIA TensorRT. This optimizes the model's graph and quantizes weights to maximize inference speed without significant accuracy loss.
  • Augmentation: To handle field variability, they used aggressive data augmentation, including random rotations ($360^\circ$), scaling, and simulated motion blur.

Datasets

The core of the study is the new AIWeeds dataset:

  • Scope: 10,000 annotated images.
  • Classes: 16 total classes, including flax (the crop), 14 common weed species (e.g., Canada thistle, Venus mallow, Lambsquarters), and a "Negative" class for background/soil.
  • Realism: Images were collected from 20 locations across North Dakota, California, and China. Unlike previous datasets, these include "noisy" data like distortion, shadows, and various growth stages, specifically captured from the perspective of a ground-level robot.

Key Insights and Ideas

  • Efficiency is King: While DenseNet121 provided the highest raw accuracy (96.77%), it was too slow for real-time use on a robot. MobileNetV2 emerged as the "sweet spot," offering 96.15% validation accuracy with the lowest memory footprint and fastest inference time.
  • The Importance of "Negatives": The authors found that including a dedicated "Negative" class (images of just soil or non-target plants) was essential. Without it, the model would struggle to distinguish between a noisy background and an actual weed.
  • Sigmoid vs. Softmax: By using a Sigmoid activation, the model treats each class probability independently. This is crucial for agricultural scenes where multiple different weed species might appear in a single frame.

Key Results

  • Inference Speed: On the Jetson Nano, the optimized MobileNetV2 achieved an inference time of 47.78ms (roughly 20 FPS), which is more than sufficient for a robot moving through a field.
  • Field Accuracy: In real-world tests in previously unseen flax fields, the system maintained a 90% accuracy rate.
  • Chemical Savings: The robot's precision spraying system used significantly less herbicide than commercial broadcast sprayers, with a flux rate of 78ml/min compared to the 95.6ml/min typical of standard systems.

Limitations and Future Work

  • Visual Similarity: The 10% error rate in the field was primarily due to "look-alike" species. For example, Venus mallow and Canada thistle can look nearly identical under strong light or at specific growth stages.
  • Point Spraying vs. Dense Weeds: The current system is optimized for "point spraying" (targeting individual plants). In extremely dense weed scenarios, the logic for which weed to prioritize or how to spray efficiently needs further refinement.
  • Navigation: While the paper focuses on classification, the authors note that autonomous navigation in varied terrain remains a complex, ongoing challenge for small-scale robotics.

Check out the code and dataset: The authors have made their work open-source at https://github.com/StructuresComp/Multi-class-Weed-Classification.

Summary updated

BibTeX
@inproceedings{du2022deep,
  author = {Yayun Du and Guofeng Zhang and Darren Tsang and Mohammad Khalid Jawed},
  title = {{Deep-CNN based Robotic Multi-Class Under-Canopy Weed Control in Precision Farming}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2022},
  url = {https://openreview.net/forum?id=EDNGgE5KVd},
}
Figure