APP下载

基于改进YOLOv4的安全帽佩戴检测算法

2021-05-16王雨晨徐明昆

现代信息科技 2021年22期

王雨晨 徐明昆

摘  要:针对目前智慧安监领域对于安全帽佩戴的检测存在尺度多样化、检测难度大、中小目标漏检率高的问题,提出了一种基于改进的YOLOv4的安全帽佩戴检测算法。首先,改进K-means算法重新选择锚框,然后在网络中引入CBAM注意力模块来增强安全帽佩戴信息的特征表达,最后对模型进行加速剪枝。实验结果表明,提出的算法在检测中mAP@0.5值提升了6.7%,检测速度提升了35%,模型参数量减少了48%,改进后的模型更适用于实际场景中对安全帽佩戴行为的识别。

关键词:安全帽佩戴检测;YOLOv4网络;改进K-means;CBAM;剪枝

中图分类号:TP391.4      文献标识码:A文章编号:2096-4706(2021)22-0156-06

Abstract: Aiming at the current problems in the detection of safety helmet wearing in the field of intelligent safety supervision of diversified scales, difficult detection and high missed detection rate of small and medium-sized targets, a safety helmet wearing detection algorithm based on improved YOLOv4 is proposed. Firstly, the improved k-means algorithm reselects the anchor box, then introduces the CBAM attention module into the network to enhance the feature expression of safety helmet wearing information, and finally speeds up the pruning of the model. The experimental results show that the proposed algorithm improves the mAP@0.5 value by 6.7%, improves the detection speed by 35%, the amount of model parameters is reduced by 48%. The improved model is more suitable for the identification of safety helmet wearing behavior in the actual scene.

Keywords: safety helmet wearing detection; YOLOv4 network; improved K-means; CBAM; pruning

0  引  言

随着当前城市化的加速发展,我国的建筑业规模日益扩大[1],但是对于施工人员的安全防护措施仍然落后,安全事故时有发生。安全帽作为有效保护头部的安全防护工具,其正确佩戴非常重要,相关企业规定相关人员进入施工场所必须正确佩戴。近年来,计算机视觉领域的迅速发展促进了图像采集设备和图像处理技术的结合使用,使得安全帽佩戴自动检测成为可能[2]。目前大多数工厂已经安装了智能监控设备,通过对于相关人员的行为分析进而检测是否正确佩戴安全帽。然而在实际监控场景中,由于监控设备安装的角度和场景复杂性,画面易出现佩戴安全帽人员所占比例小、尺度变化大等问题,容易产生漏检。因此结合实际复杂工业环境,设计一个适用于小目标安全帽佩戴检测的算法对于安全生产有着重要意义。……

登录APP查看全文