计算机工程与应用 ›› 2023, Vol. 59 ›› Issue (1): 72-81.DOI: 10.3778/j.issn.1002-8331.2207-0087

• YOLO的改进及应用专题 • 上一篇    下一篇

改进YOLOv5s的小目标烟雾火焰检测算法

王一旭,肖小玲,王鹏飞,向家富   

  1. 长江大学 计算机科学学院,湖北 荆州 434023
  • 出版日期:2023-01-01 发布日期:2023-01-01

Improved YOLOv5s Small Target Smoke and Fire Detection Algorithm

WANG Yixu, XIAO Xiaoling, WANG Pengfei, XIANG Jiafu   

  1. School of Computer Science, Yangtze University, Jingzhou, Hubei 434023, China
  • Online:2023-01-01 Published:2023-01-01

摘要: 针对复杂环境中,烟雾火焰检测存在精度低,小目标检测困难等问题,提出一种改进的基于YOLOv5s的小目标烟雾火焰检测算法。基于公开数据集自建了9?981张不相似的烟雾火焰图像数据集,解决现有数据集的限制,提高了模型的训练效率与泛化能力;在网络中添加3-D注意力机制SimAM,增加算法的特征提取能力,而且没有增加额外的参数;修改网络中的Neck结构,将三尺度检测改为四尺度检测,并结合了加权双向特征金字塔网络(BiFPN)结构,对特征融合过程进行修改,提高小目标的检测能力与特征融合能力;通过遗传算法来优化网络中的部分超参数,进一步模型的检测能力。实验结果表明,改进后的算法比原始YOLOv5s算法平均检测精度提高了7.2%,同时对小目标检测精度更高,误检漏检等情况减少。

关键词: 烟雾检测, 火焰检测, YOLOv5s, 小目标检测, 3-D注意力机制

Abstract: Aiming at the problems of low accuracy in smoke and fire detection and difficulty in small target detection in complex environments, an improved small target smoke, and fire detection algorithm based on YOLOv5s is proposed. Firstly, based on the public datasets, the paper builds 9 981 dissimilar smoke and flame image datasets to solve the limitations of existing datasets and improve the training efficiency and generalization ability of the model. Secondly, it adds a 3-D attention mechanism SimAM to the network, increases the feature extraction ability of the algorithm, and no additional parameters are added. It modifies the Neck structure in the network, changes the three-scale detection to the four-scale detection, and combines the weighted bidirectional feature pyramid network(BiFPN) structure to alter the feature fusion process to improve the detection ability of small targets and feature fusion ability. Finally, some hyperparameters in the network are optimized by genetic algorithm, and the detection ability of the model is further improved. The experimental results show that the average detection accuracy of the improved algorithm is improved by 7.2% compared with the original YOLOv5s algorithm, the detection accuracy of small targets is higher, and the false detection and missed detection are reduced.

Key words: smoke detection, fire detection, YOLOv5s, small object detection, 3-D attention mechanism