English

中国农机化学报

中国农机化学报 ›› 2025, Vol. 46 ›› Issue (6): 136-141.DOI: 10.13733/j.jcam.issn.2095-5553.2025.06.020

• 农业智能化研究 • 上一篇    下一篇

基于改进YOLOv5的玉米植株检测与识别研究

崔岩,庄卫东,秦韬,王楠   

  1. (黑龙江八一农垦大学工程学院,黑龙江大庆,163319)
  • 出版日期:2025-06-15 发布日期:2025-05-22
  • 基金资助:
    黑龙江省“揭榜挂帅”科技攻关项目(2023ZXJ07B02)

Detection and identification of maize plants based on improved YOLOv5

Cui Yan, Zhuang Weidong, Qin Tao, Wang Nan   

  1. (College of Engineering, Heilongjiang Bayi Agricultural University, Daqing, 163319, China)
  • Online:2025-06-15 Published:2025-05-22

摘要:

为解决机械除草伤苗的问题,提出一种改进YOLOv5的玉米植株检测方法。建立复杂田间环境下的玉米植株数据集,在原有模型的基础上在Backbone和Head层增加坐标注意力(CA)机制,通过动态加权的方式提升对于玉米植株位置信息的关注度,强化位置信息,提升检测准确度,在Neck层采用加权双向特征金字塔网络(BiFPN),加强特征融合,提高检测速度和检测精确度。试验结果表明,与原始模型相比,所改进方法的平均精度均值mAP@0.5、mAP@0.5:0.95分别提升4.31、3.66个百分点,检测速度和模型大小分别为46.77帧/s和15.56 M,与SSD、YOLOv5、Fast R—CNN和YOLOv7相比也有一定的优势。改进模型能有效实现玉米植株的检测,实时性好,内存占用量小,可为智能除草机器人的护苗工作提供借鉴。

关键词: 玉米植株检测, YOLOv5模型, 加权双向特征金字塔, 坐标注意力机制

Abstract:

To address the challenge of mechanical weeding, a YOLOv5‑based method was developed for detecting corn plants. A complex field environment dataset was established to train the model. The original YOLOv5 architecture was modified by introducing a Coordinates Attention (CA) mechanism in both the backbone and head layers. This mechanism dynamically enhanced the weighting of corn plant location information, thereby improving detection accuracy. Additionally, a weighted Bidirectional Feature Pyramid Network (BiFPN) was incorporated in the neck layer to strengthen feature fusion, which further enhanced both detection speed and accuracy. The test results showed that compared with the original model, the mAP@0.5 and mAP@0.5:0.95 of this method had increased by 4.31 and 3.66 percentage points respectively. The detection speed and model size were 46.77 frames/s and 15.56 M respectively. It also has certain advantages when compared with SSD, YOLOv5, Fast R—CNN and YOLOv7. From this, it can be concluded that the designed model can effectively achieve the detection of corn plants, with good real‑time performance and small memory usage, which can provide a reference for the seedling protection work of intelligent weeding robots.

Key words: detection of maize plants, YOLOv5, weighted bidirectional feature pyramid, coordinate attention module

中图分类号: