|国家科技期刊平台
首页|期刊导航|中国农业科技导报|改进YOLOv5模型在自然环境下柑橘识别的应用

改进YOLOv5模型在自然环境下柑橘识别的应用OA北大核心CSTPCD

Application of Improved YOLOv5 Model in Citrus Recognition in Natural Environment

中文摘要英文摘要

在复杂的自然环境中绿色柑橘生长形态各异,颜色与背景色相近,为有效识别绿色柑橘,提出一种基于混合注意力机制并改进YOLOv5模型的柑橘识别方法.首先,改进YOLOv5的网络结构,在主干网络中添加混合注意力机制,即在主干网络中的第2层嵌入SE(squeeze and excitation)注意力,第11层嵌入CA(coordinate attention)注意力;其次,改进网络模型特征融合结构,将YOLOv5模型Concat特征融合操作的下层分支放在模型C3模块之前,再与另一条上层分支进行特征融合;最后,改进模型分类损失函数,将YOLOv5模型的分类损失函数改成Varifocal Loss函数,加强绿色柑橘特征信息的提取,提高绿色柑橘检测精度.根据自然环境和柑橘自身的特点,对自建数据集进行分类,设计3组不同分类场景下柑橘的对比试验以验证其有效性.试验结果表明,改进后的YOLOv5-SC模型准确率为91.74%,平均精度为95.09%,F1为89.56%,在自然环境下对绿色柑橘的识别具有更高的准确率和更好的鲁棒性,为绿色水果智能采摘提供技术支持.

Green citrus in complex natural environment had different growth forms and similar color to the background color,so a detection method based on hybrid attention mechanism and improved YOLOv5 model was proposed to effectively identify green citrus.Firstly,the method improved the network structure of YOLOv5 by adding a hybrid attention mechanism in the backbone network etc.,embedding SE(squeeze and excitation)attention in layer 2 and CA(coordinate attention)attention in layer 11 of the backbone network;secondly,it improved the feature fusion structure of the network model,the lower branch was placed before the model C3 module,by combining the YOLOv5 model and concat feature fusion operation,and then the features were fused with another upper branch;finally,the classification loss function of the model was improved,and the classification loss function of the YOLOv5 model was changed to Varifocal Loss function to enhance the extraction of green citrus feature information and improve the accuracy of green citrus detection.According to the natural environment and the characteristics of the citrus itself,the self-built dataset was classified and 3 sets of comparison tests of citrus under different classification scenarios were designed to verify its effectiveness.The test results showed that the improved YOLOv5-SC model had higher precision and better robustness for the recognition of green citrus in natural environment,which accuracy was 91.74%,average accuracy was 95.09%,and F1 was 89.56%,and it provided technical support for smart picking of green fruits.

帖军;赵捷;郑禄;吴立锋;洪博文

中南民族大学计算机科学学院,武汉 430074||农业区块链与智能管理湖北省工程研究中心,武汉 430074中南民族大学计算机科学学院,武汉 430074||湖北省制造企业智能管理工程技术研究中心,武汉 430074

农业科学

目标检测YOLOv5注意力机制损失函数绿色柑橘

object detectionYOLOv5attention mechanismloss functiongreen citrus

《中国农业科技导报》 2024 (007)

111-120 / 10

国家民委中青年英才培养计划项目(MZR20007);湖北省科技重大专项(2020AEA011);武汉市科技计划应用基础前沿项目(2020020601012267);中南民族大学研究生学术创新基金项目(3212022sycxjj333).

10.13304/j.nykjdb.2022.0994

评论