湖北农业科学 ›› 2024, Vol. 63 ›› Issue (8): 17-22.doi: 10.14088/j.cnki.issn0439-8114.2024.08.004

• 图像图形识别 • 上一篇    下一篇

基于改进YOLOv8卷积神经网络的稻田苗期杂草检测方法

林宗缪1, 马超2,3, 胡冬2,3   

  1. 1.上海市质量监督检验技术研究院,上海 201114;
    2.上海市农业科学院农业科技信息研究所,上海 201403;
    3.农业农村部长三角智慧农业技术重点实验室,上海 201403
  • 收稿日期:2023-08-24 出版日期:2024-08-25 发布日期:2024-09-05
  • 通讯作者: 胡 冬(1996-),男,江苏溧阳人,主要从事图像处理与模式识别研究,(电话)13585437932(电子信箱)952412165@qq.com。
  • 作者简介:林宗缪(1982-),男,上海人,高级工程师,硕士,主要从事大数据技术、人工智能、分布式计算研究,(电话)15221917881(电子信箱)lzr311@163.com。
  • 基金资助:
    上海市市场监督管理局科研计划项目(2022-52)

Detection of weeds in paddy field at the seedling stage based on improved YOLOv8 convolutional neural network

LIN Zong-miao1, MA Chao2,3, HU Dong2,3   

  1. 1. Shanghai Institute of Quality Inspection and Technical Research, Shanghai 201114, China;
    2. Agricultural Information Institute of Science and Technology, Shanghai Academy of Agricultural Sciences, Shanghai 201403, China;
    3. Key Laboratory of Intelligent Agricultural Technology (Yangtze River Delta), Ministry of Agriculture and Rural Affairs, P. R. China, Shanghai 201403, China
  • Received:2023-08-24 Published:2024-08-25 Online:2024-09-05

摘要: 针对田间自然环境拍摄下稻田背景复杂,苗期杂草图像尺寸过小、识别定位不准确等问题,提出了一种改进YOLOv8卷积神经网络的苗期杂草检测方法。参照PASCAL VOC数据集格式,构建了一套专用的数据集。首先,在网络卷积过程中加入DenseNet(密集连接网络)更好地对杂草特征进行提取,优化梯度消失问题。然后,添加CBAM(Convolutional block attention module)注意力机制改善模型对小尺寸的敏感度。最后,使用WIOU(Weighted intersection over union)损失函数来优化原网络中的损失函数,提升模型对检测目标的定位能力。在试验中,将改进的算法与Faster R-CNN、SSD(Single shot multiBox detector)以及原始YOLOv8等算法进行了性能对比。结果显示,改进算法明显优于其他算法,在测试集上的平均精度均值和检测速度分别达97.0%和100.3帧/s。这种高精度和快速的检测能力满足了精准农业中对快速、精准检测的需求。该算法为机械设备快速识别苗期杂草、精准喷洒农药提供了重要的理论和技术支持。

关键词: YOLOv8, 卷积神经网络, 苗期杂草, 目标检测

Abstract: Aiming at the problems of complex background of paddy field, small size of weed image at the seedling stage, inaccurate identification and positioning under field natural environment photography, an improved YOLOv8 convolutional neural network method for weed detection at the seedling stage was proposed. A dedicated dataset based on the PASCAL VOC dataset format was constructed. First, DenseNet in the network convolution process was added to better extract weed features and optimize the vanishing gradient problem. Then, CBAM(Convolutional block attention module)attention mechanism was added to improve the model’s sensitivity to small sizes. Finally, the WIOU(Weighted intersection over union) loss function was used to optimize the loss function in the original network and improve the positioning ability of the model to the detection target. In the experiment, the performance of the improved algorithm was compared with algorithms such as Faster R-CNN, SSD (Single shot multiBox detector) and the original YOLOv8. The results showed that the improved algorithm was significantly superior to other algorithms, achieving an average precision of 97% and a detection speed of 100.3 frames/s on the test set, respectively. This high-precision and rapid detection capability met the demand for rapid and accurate detection in precision agriculture. This algorithm provided important theoretical and technical support for mechanical equipment to quickly identify weeds during the seedling stage and accurately spray pesticides.

Key words: YOLOv8, convolutional neural network, seedling weeds, target detection

中图分类号: