中国农业科技导报2024,Vol.26Issue(7):111-120,10.DOI:10.13304/j.nykjdb.2022.0994
改进YOLOv5模型在自然环境下柑橘识别的应用
Application of Improved YOLOv5 Model in Citrus Recognition in Natural Environment
摘要
Abstract
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.关键词
目标检测/YOLOv5/注意力机制/损失函数/绿色柑橘Key words
object detection/YOLOv5/attention mechanism/loss function/green citrus分类
农业科技引用本文复制引用
帖军,赵捷,郑禄,吴立锋,洪博文..改进YOLOv5模型在自然环境下柑橘识别的应用[J].中国农业科技导报,2024,26(7):111-120,10.基金项目
国家民委中青年英才培养计划项目(MZR20007) (MZR20007)
湖北省科技重大专项(2020AEA011) (2020AEA011)
武汉市科技计划应用基础前沿项目(2020020601012267) (2020020601012267)
中南民族大学研究生学术创新基金项目(3212022sycxjj333). (3212022sycxjj333)