English

中国农机化学报

中国农机化学报 ›› 2024, Vol. 45 ›› Issue (9): 250-257.DOI: 10.13733/j.jcam.issn.2095-5553.2024.09.038

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

基于改进 YOLOv5s的自然环境下油桃成熟度检测方法

宋立航,张屹,时寅豪   

  1. (常州大学机械与轨道交通学院,江苏常州,213164)
  • 出版日期:2024-09-15 发布日期:2024-09-04
  • 基金资助:
    国家自然科学基金项目(51275274)

Maturity detection method of nectarine in natural environment based on improved YOLOv5s

Song Lihang,Zhang Yi,Shi Yinhao   

  1. (School of Mechanical Engineering and Rail Transit,Changzhou University,Changzhou,213164,China)
  • Online:2024-09-15 Published:2024-09-04

摘要:

成熟度是影响水果产量和品质的关键因素,为实现对自然环境下油桃成熟度的高效检测,提出一种改进 YOLOv5s模型的检测方法。首先,将原始模型颈部的特征金字塔结构替换成 BiS特征金字塔结构,从而提高模型对成熟度特征的融合和提取能力;然后,利用 QFocal Loss损失函数将目标边界框估计与分类评分整合在一起,从而解决训练样本中正负样本比例失衡的问题;最后,将 CIoU-NMS作为模型的非极大值抑制方法,提升模型对遮挡和重叠果实的检测效果。在自制的油桃果实数据集上试验结果表明,改进后的 YOLOv5s-BQC模型 mAP值达到 91. 7%,比原模型提升 2. 3%,精确度和召回率分别也提升 0. 9%和 0. 7%。相较其他主流模型,具有更好的检测性能,能够在复杂背景中准确定位油桃果实,进行成熟度分类,满足油桃成熟度实时检测的要求,为农业监测和智能采摘提供技术支持。

关键词: 油桃, 成熟度检测, YOLOv5s, 特征金字塔结构, 损失函数, 非极大值抑制

Abstract:

Maturity is a key factor affecting fruit yield and quality. In order to realize the efficient detection of nectarine maturity in natural environment,an improved detection method of YOLOv5s model is proposed. Firstly,the feature pyramid structure of the original model neck is replaced by the BiS feature pyramid structure,so as to improve the fusion and extraction ability of maturity feature of the model. Then,the QFocal Loss loss function is used to integrate the target bounding box estimation and classification score together,so as to solve the problem of imbalance in the proportion of positive and negative samples in the training samples. Finally,CIoU-NMS is used as the non-maximum suppression method of the model to improve the detection effect of the model on occlusion and overlapping fruits. The experimental results on the self.made nectarine fruit data set show that the mAP value of the improved YOLOv5s-BQC model reaches 91. 7%,which is 2. 3% higher than the original model,and the precision value and recall value are also increased by 0. 9% and 0. 7%,respectively. Compared with other mainstream models,it has better detection performance,can accurately locate nectarine fruits in complex backgrounds,and perform maturity classification,which can meet the requirements for real-time detection of nectarine maturity,and provide technical support for agricultural monitoring and intelligent picking. 

Key words:

中图分类号: