作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (6): 250-256. doi: 10.19678/j.issn.1000-3428.0064509

• 开发研究与工程应用 • 上一篇    下一篇

基于改进YOLOv5的火焰烟雾检测

宋华伟1, 屈晓娟1, 杨欣2, 万方杰1   

  1. 1. 郑州大学 网络空间安全学院, 郑州 450000;
    2. 郑州大学 计算机与人工智能学院, 郑州 450000
  • 收稿日期:2022-04-19 修回日期:2022-06-16 发布日期:2022-08-19
  • 作者简介:宋华伟(1978-),男,副研究员、博士,主研方向为数据安全、图像处理;屈晓娟,硕士研究生;杨欣(通信作者),副教授、博士;万方杰,副研究员、硕士。
  • 基金资助:
    国家重点研发计划项目(2018YFC0824402)。

Flame and Smoke Detection Based on Improved YOLOv5

SONG Huawei1, QU Xiaojuan1, YANG Xin2, WAN Fangjie1   

  1. 1. School of Cyber Science and Engineering, Zhengzhou University, Zhengzhou 450000, China;
    2. School of Computer and Artificial Intelligence, Zhengzhou University, Zhengzhou 450000, China
  • Received:2022-04-19 Revised:2022-06-16 Published:2022-08-19

摘要: 为更好地实现基于图像的实时火灾预警,结合YOLOv5s提出一种改进的火焰烟雾检测算法。将YOLOv5s颈部原有的路径聚合网络模块替换为双向交叉尺度融合模块,使深层网络可以直接提取浅层特征,增强信息流并提升网络特征融合能力。在YOLOv5s头部添加引入协调注意力的推理层,在不过多增加计算量的前提下加强检测头对网络信息的提取和定位能力,并提高检测精度。采用HSV色域增强、随机旋转、Mosaic等多种数据增强技术调整并扩充训练数据,使用k-means聚类算法获取数据集先验锚框,增强检测模型鲁棒性。实验结果表明,与基于YOLOv5s的火焰烟雾检测算法相比,改进算法的平均精度均值提升了3.2个百分点,检测速度达到243帧/s,并且保持了YOLOv5s的轻量化优势,在遮挡、夜晚、小目标等复杂场景下均具有较好的火焰烟雾检测效果。

关键词: YOLOv5网络, 火焰烟雾检测, 双向交叉尺度融合, 协调注意力, 推理层

Abstract: To provide real-time fire warning based on images,an improved flame and smoke detection algorithm based on YOLOv5s is proposed in this study.The original path aggregation network module is replaced in the Neck of YOLOv5s with a bidirectional cross-scale fusion module,so that the deeper network can directly extract superficial features,enhance information flow,and improve network feature fusion capabilities.The reasoning layer for Coordinate Attention(CA) is added to the Head of YOLOv5s to enhance the ability of extracting and locating network information and improve detection accuracy without increasing the computational burden extensively.A variety of data enhancement technologies,such as Hue,Saturation,Value(HSV) color gamut enhancement,random rotation,and Mosaic,are used to adjust and expand the training data.The k-means clustering algorithm is used to obtain the prior anchor of the dataset to enhance the model robustness.The experimental results demonstrate that compared with the flame and smoke detection algorithm based on YOLOv5s,the mean Average Precision(mAP) of the improved algorithm has increased by 3.2 percentage points,while the detection speed has reached 243 frame/s.The lightweight advantage of YOLOv5s has also been maintained.This is significant for flame and smoke detection in sheltered,dark,small,and multiple targets.

Key words: YOLOv5 network, flame and smoke detection, bidirectional cross-scale fusion, Coordinate Attention(CA), reasoning layer

中图分类号: