高级检索+

基于改进YOLO11n的自然环境下玉米幼苗与杂草轻量化检测方法

Lightweight Detection Method for Corn Seedlings and Weeds under Natural Environment Based on Improved YOLO11n

  • 摘要: 针对传统作物与杂草检测方法效率低、现有深度学习目标检测模型在复杂农田环境下适应性不足的问题,该研究提出基于改进YOLO11n的轻量化玉米幼苗与杂草检测模型—YOLO11-SAW。首先,在主干网络末端引入由Swin-Transformer和C3单元构成的C3STR模块,以增强模型对复杂图像中长距离依赖信息的建模能力;其次,在Neck结构中采用可变核卷积(alterable kernel convolution, AKConv)模块,以提高模型对苗草目标形态多样性和空间结构变化的适应能力;最后,使用具有动态聚焦机制的WIoUv3损失函数提升目标定位精度与训练收敛效率。在自建玉米幼苗与杂草数据集上的对比试验表明,YOLO11-SAW在综合性能方面表现优异。相比基线模型YOLO11n,其精确率和召回率分别提升1.71和2.18个百分点,平均精度均值mAP0.5达到96.40%,mAP0.5-0.95达到76.17%。同时,模型的参数量仅为1.97 M,浮点计算数为8.0 G,模型大小4.3 MB,推理速度达到202.77帧/S,相比于其他主流目标检测模型,YOLO11-SAW模型在精度、速度和算力开销之间取得良好平衡。该模型既满足复杂农田环境下玉米幼苗与杂草的实时精准检测需求,可为硬件资源受限的农业除草机器人视觉检测模型的部署提供参考。

     

    Abstract: Corn, as one of the most important food and feed crops in China, plays a vital role in ensuring national food security. Weeds are a major biological stress factor affecting corn growth. They not only compete with corn seedlings for water, nutrients, and light, but may also serve as hosts for pests and pathogens, thereby causing declines in both crop yield and quality. Traditional weed control strategies typically rely on manual identification or extensive herbicide application, both of which are associated with low efficiency, resource waste, and environmental pollution. Existing detection models for corn seedlings and weeds often suffer from large parameter counts, high computational costs, and insufficient accuracy in complex agricultural environments, where false positives and missed detections are common. To address these limitations, this study proposes a lightweight detection framework named YOLO11-SAW, which is developed based on YOLO11n. The proposed model is designed to achieve improved detection accuracy and inference efficiency, while being well-suited for deployment on edge devices. Specifically, this study improves YOLO11n from three aspects: backbone feature extraction, neck feature fusion, and the bounding box regression loss function. First, the C3STR module, which is constructed by combining the C3 module with the Swin Transformer, is introduced at the end of the backbone network. This improvement enables the model to better capture global contextual dependencies and enhances its ability to distinguish corn seedlings from weeds in scenarios involving overlapping leaves, target occlusion, dense target distribution, and complex soil backgrounds. Second, the Neck structure is augmented with the Alterable Kernel Convolution (AKConv) module, which introduces learnable offsets to replace conventional convolution operations. This modification enhances the model's adaptability to multi-scale and deformed weed targets, while simultaneously reducing both floating-point operations (FLOPs) and model parameters. Finally, a refined bounding box regression strategy is implemented through the introduction of the WIoUv3 loss function. This adjustment alleviates training instability caused by fixed gradient magnitudes, enhances the suppression of low-quality samples, improves the utilization of high-quality samples, and consequently promotes convergence stability and localization accuracy. To comprehensively evaluate the effectiveness of the proposed method, a series of comparative experiments were conducted on a self-constructed corn seedling and weed dataset. Under unified experimental settings, YOLO11-SAW was compared with several representative detection models, including Faster R-CNN, Swin Transformer, RT-DETR-L, and multiple YOLO-series models. The experimental results demonstrate that YOLO11-SAW outperforms existing methods in both detection accuracy and computational efficiency. Compared with the baseline model YOLO11n, YOLO11-SAW improves precision by 1.71% and recall by 2.18%, with mAP0.5 reaching 96.40% and mAP0.5:0.95 reaching 76.17%, indicating strong detection and localization capability. In terms of model complexity, YOLO11-SAW contains only 1.97 million parameters and 8.0 GFLOPs, with a model size of 4.3 MB, showing a clear advantage in lightweight design. In addition, the model achieves a real-time inference speed of 202.77 FPS, meeting the real-time requirements of intelligent agricultural applications. In summary, the proposed YOLO11-SAW model enables real-time and accurate detection of corn seedlings and weeds in complex agricultural environments, and can provide practical technical support for the deployment of agricultural mobile robots and intelligent variable-rate spraying systems on edge devices.

     

/

返回文章
返回