中国农业科学 ›› 2025, Vol. 58 ›› Issue (18): 3598-3615.doi: 10.3864/j.issn.0578-1752.2025.18.003

• 耕作栽培·生理生化·农业信息技术 • 上一篇    下一篇

基于改进YOLOv8s的小麦苗期叶尖检测方法

何豪旭2,3(), 高祥1,3(), 饶元2,3, 张子睿3,4, 吴巩5, 侯依廷2,3, 何烨1, 厉心怡1   

  1. 1 安徽农业大学资源与环境学院,合肥 230036
    2 安徽农业大学信息与人工智能学院,合肥 230036
    3 农业农村部农业传感器重点实验室,合肥 230036
    4 安徽农业大学工学院,合肥 230036
    5 安徽农业大学农学院,合肥 230036
  • 收稿日期:2025-02-27 接受日期:2025-07-15 出版日期:2025-09-18 发布日期:2025-09-18
  • 通信作者:
    高祥,E-mail:
  • 联系方式: 何豪旭,E-mail:390609506@qq.com。
  • 基金资助:
    国家自然科学基金(32371993); 安徽省重点研究与开发计划(202204c06020026&2023n06020057); 安徽省高校自然科学研究重大项目(2022AH040125&2023AH040135)

Detection Method of Leaf Tip in Wheat Seedling Stage Based on Improved YOLOv8s

HE HaoXu2,3(), GAO Xiang1,3(), RAO Yuan2,3, ZHANG ZiRui3,4, WU Gong5, HOU YiTing2,3, HE Ye1, LI XinYi1   

  1. 1 College of Resources and Environment, Anhui Agricultural University, Hefei 230036
    2 College of Information and Artificial Intelligence, Anhui Agricultural University, Hefei 230036
    3 Key Laboratory of Agricultural Sensors, Ministry of Agriculture and Rural Affairs, Hefei 230036
    4 College of Engineering, Anhui Agricultural University, Hefei 230036
    5 College of Agronomy, Anhui Agricultural University, Hefei 230036
  • Received:2025-02-27 Accepted:2025-07-15 Published:2025-09-18 Online:2025-09-18

摘要:

【目的】在精细农业中,作物幼苗检测会受土壤杂草、幼苗叶片间遮挡及多尺度数据集等因素干扰。本研究基于目标检测算法,改进YOLOv8s算法,设计小麦叶尖检测模型YOLO-Wheat,解决田间麦苗叶片遮挡、土壤杂草干扰与多视角数据多尺度等问题,提升麦苗叶片检测的准确性,为精细农业中作物幼苗阶段的麦苗检测提供理论依据。【方法】通过手机摄像头与机载RGB相机在小麦出苗期分别采集小麦苗近景与远景图像,构建作物图像数据集。在网络模型中采用一种多尺度特征融合的金字塔结构(high-level screening-feature fusion pyramid,HS-FPN),该结构使用高层特征作为权重,通过频道关注模块过滤低层特征信息,将筛选后的特征与高层合并,增强模型的特征表达能力,可有效解决数据多尺度问题。在网络模型中集成局部注意力(efficient local attention,ELA)机制,使模型聚焦于小麦叶尖信息,抑制杂草土壤背景因素的干扰。同时对YOLOv8s的损失函数(complete IoU Loss,CIoULoss)进行优化,引入Inner-IoULoss辅助边界框损失函数,增强网络对小目标的注意力,提高小麦叶尖的定位精度。在训练策略上,运用迁移学习,利用小麦叶尖近景图像对模型进行预训练,再使用远景图像对该模型进行参数更新和优化训练。【结果】将YOLO-Wheat模型与Faster-RCNN、YOLOv5s、YOLOv7、YOLOv8s和YOLOv9s 5种目标检测模型对比,YOLO-Wheat模型在小麦叶尖检测方面最优,识别准确率达92.7%,召回率为85.1%,平均精度均值(mean Average Precision,mAP)为82.9%。相较于Faster-RCNN、YOLOv5s、YOLOv7、YOLOv8s和YOLOv9s模型,YOLO-Wheat的识别准确率分别提升了17.1%、13.6%、11.0%、8.7%和3.8%,召回率分别提升了13.1%、6.7%、4.5%、1.8%和1.3%;相较于Faster-RCNN、YOLOv5s、YOLOv7、YOLOv8s和YOLOv9s模型,YOLO-Wheat的mAP值分别提升了16.2%、9.8%、5.0%、5.9%和0.7%。【结论】该方法可有效解决数据多尺度问题,实现复杂大田环境下利用无人机图像进行小麦苗期叶尖小目标精准检测,可为复杂田间小麦苗叶片智能计数提供技术支持和理论参考。

关键词: 小麦, YOLOv8s, 损失函数, 迁移学习, 无人机

Abstract:

【Objective】In precision agriculture, the detection of crop seedlings can be interfered with by factors such as soil weeds, occlusion between seedling leaves, and multi-scale datasets. Based on the object detection algorithm, this paper improved the YOLOv8s algorithm and designed the wheat leaf tip detection model YOLO-Wheat to solve problems, such as leaf occlusion of wheat seedlings in the field, interference from soil weeds, and multi-view data with multiple scales, thereby enhancing the accuracy of wheat seedling leaf detection and providing a theoretical basis for wheat seedling detection at the seedling stage in precision agriculture. 【Method】Close-up and distant images of wheat seedlings were collected respectively through mobile phone cameras and on-board RGB cameras during the emergence period to construct a crop image dataset. In the network model, a pyramid structure of multi-scale feature fusion (high-level screening-feature fusion pyramid, HS-FPN) was adopted. This structure used high-level features as weights, filters low-level feature information through the channel attention module, and combined the screened features with the high-level features. Enhancing the feature expression ability of the model could effectively solve the problem of multi-scale data. Integrate the efficient local attention (ELA) local attention mechanism in the network model was used to enable the model to focus on the leaf tip information of wheat and to suppress the interference of soil background factors of weeds. Meanwhile, the loss function of YOLOv8s (complete IoULoss, CIoULoss) was optimized, and the inner-Iou Loss auxiliary bounding box loss function was introduced to enhance the network's attention to small targets and to improve the positioning accuracy of wheat leaf tips. In terms of training strategies, transfer learning was employed. The model was pre-trained using close-up images of wheat leaf tips, and then the parameters of the model were updated and optimized using distant images. 【Result】The YOLO-Wheat model was compared with five object detection models, namely Faster-RCNN, YOLOv5s, YOLOv7, YOLOv8s, and YOLOv9s. The YOLO-Wheat model was the best in wheat leaf tip detection, with a recognition accuracy rate of 92.7% and a recall rate of 85.1%, respectively. The mean Average Precision (mAP) values were 82.9%. Compared with the Faster-RCNN, YOLOv5s, YOLOv7, YOLOv8s and YOLOv9s models, the recognition accuracy mAP values of YOLO-Wheat have increased by 17.1%, 13.6%, 11.0%, 8.7% and 3.8% respectively; the recall rates increased by 13.1%, 6.7%, 4.5%, 1.8% and 1.3%, respectively. Compared with the Faw-RCNN, YOLOv5s, YOLOv7, YOLOv8s and YOLOv9s models, the mAP values of YOLO-Wheat have increased by 16.2%, 9.8%, 5.0%, 5.9% and 0.7%, respectively. 【Conclusion】This method could effectively solve the problem of multi-scale data, achieve precise detection of small targets at the leaf tips of wheat seedlings in complex field environments using unmanned aerial vehicle (UAV) images, and provide technical support and theoretical reference for intelligent leaf counting of wheat seedlings in complex fields.

Key words: wheat, YOLOv8s, loss function, transfer learning, drone