APP下载

针对小目标的YOLOv5安全帽检测算法

2023-06-21李达刘辉

现代信息科技 2023年9期

李达 刘辉

摘  要:针对当前YOLOv5难以检测小目标、目标识别效果差等问题,提出了一种基于YOLOv5的改进模型。针对开源数据集小目标样本数量不足的问题,重新构建安全帽数据集,扩充小目标数量。引入轻量化的通道注意力ECA模块,提高模型对安全帽的识别能力。将边界框损失函数替换为SIoU加速模型收敛。最后改进Neck部分的特征融合方式,并增加一个小目标检测层。改进算法在自建安全帽数据集上mAP@0.5、mAP@0.5:0.95相较于YOLOv5s分别提高2.6%、1.7%。

关键词:安全帽佩戴检测;YOLOv5;ECA注意力;边界框损失函数;小目标检测

中图分类号:TP391.4;TP18 文献标识码:A 文章编号:2096-4706(2023)09-0009-05

Abstract: Aiming at the problems of small target detection difficulty and poor target recognition effect of YOLOv5 at present, an improved model based on YOLOv5 is proposed. In view of the problem of shortage of small target samples in open source data set, the safety helmet data set is rebuilt to expand the number of small targets. A lightweight ECA module is introduced to improve the identification ability of the model to the helmet. The bounding box loss function is replaced by SIoU to accelerate the convergence of the model. Finally, the feature fusion mode of Neck part is improved, and a small target detection layer is added. Compared with YOLOv5s, the improved algorithm on the self-built safety helmet data set mAP@0.5 and mAP@0.5:0.95 respectively increases 2.6% and 1.7%.

Keywords: safety helmet wearing detection; YOLOv5; ECA attention; bounding box loss function; small object detection

0  引  言

随着我国基础设施的快速发展,在建筑工地工作的工人数也逐渐上升。在安全生產规范中,明确指出在施工场地必须佩戴安全帽。佩戴安全帽可以在工程作业中有效保护施工人员头部,保障工人的生命安全。但在众多施工场地中,安全帽的佩戴很容易被施工人忽略,从而引发人身伤害的事故。我国大多数施工场所中采用人工进行安全帽的佩戴检测,这种原始的检测方法不仅耗时耗力,而且容易产生误差。为了解决现有施工场地存在的这一安全问题,对施工场地进行智能化的管理,对施工人员进行安全帽佩戴状态的精确检测是很有必要的,具有重大的研究意义。

近年来,基于深度学习的目标检测技术飞速发展,目标检测算法也越来越广泛的应用于各个方面。小目标检测一直以来是目标检测技术中的重难点,针对安全帽的目标检测通常应用于施工现场采集到的远距离照片,目标密集易出现阻挡,且像素点小,属于小目标的范畴。……

登录APP查看全文