首页|基于注意力机制与YOLOv5s的轻量化农作物害虫检测方法

基于注意力机制与YOLOv5s的轻量化农作物害虫检测方法

扫码查看
为解决在自然环境中人工检测害虫精度低、速度慢的问题,提出了一种基于注意力机制与YOLOv5s的轻量化目标检测算法.首先,使用Ghost卷积替换YOLOv5s中的普通卷积,得到轻量化的主干特征提取网络.其次,在YOLOv5s中加入加权双向特征融合机制,从而实现高效的双向交叉连接和多尺度特征融合.最后,在主干网络中加入坐标注意力机制,从而增强网络模型对位置信息的关注.与原YOLOv5s算法相比,新算法在IP102农作物害虫检测数据集上的平均精度均值提升了 2.1%,模型参数量和计算量分别减少了 44.6%和 44.3%,检测速度为64.8 FPs.实验结果表明,基于注意力机制与YOLOv5s的轻量化目标检测算法不仅提升了农作物害虫检测精度,而且显著降低了模型参数量和计算量,能够满足农作物害虫检测的应用需求.
Lightweight crop pest detection method based on attention mechanism and YOLOv5s
To address the low accuracy and slow speed of manual pest detection in natural environments,a lightweight object detection algorithm based on attention mechanism and YOLOv5s is proposed.Firstly,the Ghost convolution is used to replace the vanilla convolution in YOLOv5s,obtain a lightweight backbone feature extraction network.Secondly,a weighted bi-directional feature fusion mechanism is integrated into YOLOv5s to efficiently perform bidirectional cross-connections and multi-scale feature fusion.Finally,the coordinate attention mechanism is added to the backbone network to enhance the model's focus on spatial information.Compared with YOLOv5s,the proposed algorithm achieves a 2.1%improvement in the mean average accuracy on the IP102 crop pest detection dataset,with a reduction of 44.6%in the number of model parameters and 44.3%in the amount of computation,and a detection speed of 64.8 FPs.The experimental results show that the lightweight object detection algorithm based on attention mechanism and YOLOv5s not only improves the accuracy of crop pest detection,but also significantly reduces model parameters and computational complexity,which can meet the application requirements of crop pest detection.

deep learningpest detectionattention mechanism

张剑飞、张圣贤

展开 >

齐齐哈尔大学 计算机与控制工程学院,黑龙江 齐齐哈尔 161006

深度学习 害虫检测 注意力机制

齐齐哈尔市科技计划重点项目黑龙江省教育厅基本科研业务费项目

ZDGG-202203145209806

2024

高师理科学刊
齐齐哈尔大学

高师理科学刊

影响因子:0.351
ISSN:1007-9831
年,卷(期):2024.44(3)
  • 16