摘要
为预防在禁烟场所因吸烟引发的火灾事故,提出了一种基于YOLOv5s的改进算法,利用改进算法对摄像头获取的图像进行逐帧检测,实现吸烟行为的实时检测。首先,将转换器(Transformer)引入网络颈部中,增强网络对多尺度目标的检测能力;其次,加入坐标注意力(Coordinate Attention,CA)模块,丰富网络提取的特征图信息,增强特征图信息表达能力;最后,增加一个小目标检测层,提高网络对香烟小目标的检测能力,降低网络对小目标的漏检率。此外,构建了一个多场景下的吸烟行为数据集,并对马赛克(Mosaic)数据增强策略进行改进,改善原有数据增强方式丢失目标的问题。试验结果表明,改进后的算法在精确率、召回率和平均精确率上相比原模型均有所提升,在多目标和小目标场景下的实际检测效果对比原模型有明显改善,同时检测速度满足实时性要求,改进后的模型能够更好地应用于吸烟行为实时检测任务。
This paper is aimed at presenting an effective method to prevent fire accidents caused by smoking in no-smoking places.For this purpose,an improved algorithm based on YOLOv5s for real-time smoking behavior detection was proposed in this paper.First of all,to enhance the network's ability to detect multi-scale targets,the Vision Transformer was imported into the neck of the network by fusing with C3 modules;Secondly,the Coordinate Attention module was also added into the neck of the network to enrich the information of the feature maps that extracted by the network and also enhance the network's ability to express feature map's information;Finally,as for the original algorithm's problem of missing the small cigarette targets during the detection task,an extra small target detection layer was added into the head of the network to improve the network's ability to detect small cigarette targets and reduce the probability of missing small targets.In addition,this paper made a multi-scenario dataset that contains various scales of photos about smoking behavior and improved the Mosaic data enhancement strategy to solve the problem of losing targets in the original enhancement method.The training experimental results show that the precision rate,recall rate,and average precision rate of the improved YOLOv5s algorithm reach 93.6%,88%,and 93.7%,increasing by 3.4%,3.9%,and 3.1%compared with the original algorithm,respectively.According to the experimental result of the actual detection test,the improved algorithm's detection effect in multi-target and small-target scenarios is significantly improved,and the detection speed meets the real-time requirement.The conclusion of our work can demonstrate that the improved algorithm can be better applied to the real-time smoking behavior detection task,and it can thus be said that the improved method can assist the safety management in no-smoking places practically.
作者
杨国亮
龚志鹏
黄聪
黄经纬
YANG Guoliang;GONG Zhipeng;HUANG Cong;HUANG Jingwei(School of Electrical Engineering and Automation,Jiangxi University of Science and Technology,Ganzhou 341000,Jiangxi,China)
出处
《安全与环境学报》
CAS
CSCD
北大核心
2023年第10期3696-3705,共10页
Journal of Safety and Environment
基金
国家自然科学基金项目(51365017)
江西省教育厅科技项目(GJJ190450,GJJ180484)。