[关键词]
[摘要]
针对火焰检测模型小目标检测能力差、模型体积大、计算复杂、难以部署到移动端设备的问题,提出了一种轻量化的DGC_YOLOv5 (you only look once v5)算法。本文首先调用k-means计算函数,计算出适合本文数据集的锚框尺寸;其次引入卷积块注意力机制(convolutional block attention module,CBAM),提高算法对小目标的检测能力;然后利用轻量型的Ghost模块对主干网络中的C3模块进行改进;最后利用深度可分离卷积(depthwise separable convolution,DS_Conv) ,用简单的线性计算代替复杂计算,降低模型复杂度,减小模型体积。实验表明,相比原始的 YOLOv5算法,本文算法在测试集上的平均精度均值(mean average precision,mAP)可达到94.4%,比原始算法提高1.7个百分点,在视频测试集上平均检测速度可达到71 FPS,可以满足实时检测的要求,参数量和计算量分别减少为原来的41.2%和34.8%,模型大小减少8.4 M,便于后续移动设备端的部署。
[Key word]
[Abstract]
A lightweight DGC_YOLOv5 (you only look once v5) algorithm is proposed to solve the problems of poor detection capability of small targets,large size of the model,complex calculation,and difficult deployment on mobile devices for flame detection model.Firstly,the k-means calculation function is used to calculate the anchor size for this data set.Secondly,the convolutional block attention module (CBAM) is introduced to improve the detection ability of this algorithm to small target.Then the lightweight Ghost module is adopted to improve the C3 modules in backbone network.Finally,the depthwise separable convolution (DS_Conv) which uses simple linear calculation instead of complicated calculation is used to reduce model complexity and size.Experiments show that compared with the original YOLOv5 algorithm,the mean average precision (mAP) of the proposed algorithm can reach 94.4% on the test set,1.7% higher than the original algorithm.The average detection speed of the proposed algorithm can reach 71 FPS on the video test set,which can meet the requirements of real-time detection.Parameters and the floating-point operations (FLOPs) calculating amount are respectively reduced to 41.2% and 34.8% of the original algorithm,and the model size is reduced by 8.4 M,which facilitates the subsequent deployment on mobile devices.
[中图分类号]
[基金项目]
国家自然科学基金(61961037)资助项目