高师理科学刊2024,Vol.44Issue(3):36-42,50,8.DOI:10.3969/j.issn.1007-9831.2024.03.006
基于注意力机制与YOLOv5s的轻量化农作物害虫检测方法
Lightweight crop pest detection method based on attention mechanism and YOLOv5s
摘要
Abstract
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.关键词
深度学习/害虫检测/注意力机制Key words
deep learning/pest detection/attention mechanism分类
信息技术与安全科学引用本文复制引用
张剑飞,张圣贤..基于注意力机制与YOLOv5s的轻量化农作物害虫检测方法[J].高师理科学刊,2024,44(3):36-42,50,8.基金项目
齐齐哈尔市科技计划重点项目(ZDGG-202203) (ZDGG-202203)
黑龙江省教育厅基本科研业务费项目(145209806) (145209806)