|国家科技期刊平台
首页|期刊导航|河南农业科学|基于注意力机制的轻量化YOLO v5s蓝莓检测算法

基于注意力机制的轻量化YOLO v5s蓝莓检测算法OACSTPCD

Lightweight YOLO v5s Blueberry Detection Algorithm Based on Attention Mechanism

中文摘要英文摘要

为实现自然环境下蓝莓的精确快速检测,在YOLO v5s的基础上提出了一种结合轻量级网络和注意力机制的改进算法.首先,在主干网络和检测头的位置去除了最大目标检测层的结构,因而降低模型的参数量,增强模型对小目标的检测能力.其次,将MHSA(Multi-head self-attention,多头自注意力)替换了SPPF(Spatial pyramid pooling-fast,快速空间金字塔池化)前面的C3模块,使模型学习到更全面的特征表示,增强模型对蓝莓图像中复杂空间关系和上下文信息的理解能力.最后,在C3模块中加入了S-PSA(Sequential polarized self-attention,顺序极化自注意力),以便模型能够更好地捕捉特征图中相邻区域之间的上下文依赖关系.结果表明,改进后的YOLO v5s算法对成熟、半成熟和未成熟蓝莓的检测精度分别提升1.2、4.4、2.6百分点,平均精度提升2.7百分点,模型参数量减少76.0%.与当前主流轻量化目标检测模型相比,改进后的模型性能更加优越,能为自然环境下蓝莓采摘机器人视觉系统提供一种有效的方案.

To achieve precise and rapid detection of blueberries in natural environments,an improved algorithm combining lightweight networks and attention mechanisms was proposed based on YOLO v5s.Firstly,the structure of the maximum object detection layer was removed at the positions of the backbone network and detection heads,thereby reducing the number of model parameters and enhancing the model's ability to detect small targets.Secondly,MHSA(Multi-head self-attention)was used to replace the C3 module before SPPF(Spatial pyramid pooling-fast),enabling the model to learn more comprehensive feature representations and enhancing its understanding of complex spatial relationships and contextual information in blueberry images.Finally,S-PSA(Sequential polarized self-attention)was added to the C3 module to better capture the contextual dependencies between adjacent regions in the feature map.The experimental results showed that the improved YOLO v5s algorithm improved the detection accuracy of mature blueberries,semi mature blueberries,and immature blueberries by 1.2,4.4,2.6 percentage points,respectively,with average accuracy increase of 2.7 percentage points and 76%reduction in model parameter count.Compared with the current mainstream lightweight object detection models,the improved model has superior performance and can provide an effective solution for the visual system of blueberry picking robots in natural environments.

刘拥民;张炜;麻海志;刘原;张毅

中南林业科技大学 计算机与信息工程学院,湖南 长沙 410004||中南林业科技大学 智慧林业云研究中心,湖南 长沙 410004中南林业科技大学 计算机与信息工程学院,湖南 长沙 410004

农业科学

蓝莓检测YOLO v5s轻量级网络注意力机制多头自注意力

Blueberry detectionYOLO v5sLightweight networkAttention mechanismMHSA

《河南农业科学》 2024 (003)

基于多模式集成混合云的区域林业云信息共享与协同服务平台体系结构研究

151-157 / 7

国家自然科学基金资助项目(31870532);湖南省自然科学基金资助项目(2021JJ31163);湖南省教育科学"十三五"规划基金资助项目(XJK20BGD048)

10.15933/j.cnki.1004-3268.2024.03.016

评论