摘要
针对现有安全帽检测算法小目标检测效果差,以及检测覆盖、重叠目标时存在错检和漏检的问题,提出了一种基于改进的YOLOv7安全帽检测算法。首先,使用归一化的Wasserstein距离(NWD)来改进损失函数,解决IoU对小目标的位置偏差敏感性,提高检测精度;其次,在YOLOv7主干网络的MPConv模块中添加Si-mAM注意力机制构成MP-SAM,并把头部连接主干网络的卷积层替换为全维动态卷积(ODConv),从多个维度更好地捕获上下文信息,提升卷积的特征提取能力;最后,用ELU激活函数替换卷积模块原有的SiLU激活函数,加快网络训练收敛速度,提升算法鲁棒性。实验表明在训练条件不变的情况下,改进后的算法精确度和mAP@0.5分别达到了85.7%和82.6%,相比于YOLOv7原模型提高了7.2%与11.4%。改进后算法有效地提升了安全帽的检测精度,降低了漏检及误检的概率。
Addressing challenges such as difficulty in detecting small objects,false detection,and missed detection of overlapping targets in existing helmet detection algorithms,an improved helmet detection algorithm based on YOLOv7 is proposed.Firstly,the Normalized Wasserstein Distance(NWD)is used to improve the loss function,addressing the sensitivity of IoU to positional deviations in small objects,thereby enhancing detection accuracy.Secondly,the SimAM attention mechanism is integrated into the MPConv module of the YOLOv7 backbone network,creating MP-SAM.Additional-ly,the convolutional layers of the head-connected backbone network are replaced with Omni-direc-tional Dynamic Convolution(ODConv)to better capture contextual information from multiple dimen-sions,improving the feature extraction capability of the convolution.Finally,the original SiLU activa-tion function of the convolution module is replaced with the ELU activation function to accelerate net-work training convergence and enhance algorithm robustness.Experimental results demonstrate that,without changing the training conditions,the improved algorithm achieves an accuracy of 85.7%and mAP@0.5 of 82.6%,representing a 7.2%and 11.4%improvement compared to the original YOLOv7 model.The improved algorithm effectively boosts the detection accuracy of helmets,reducing the probabilities of missed and false detection.
作者
张珂
马宇晴
朱礼龙
谢进
ZHANG Ke;MA Yuqing;ZHU Lilong;XIE Jin(School of Artificial Intelligence and Big Data,Hefei University,Hefei 230601,China)
出处
《合肥学院学报(综合版)》
2024年第2期91-99,共9页
Journal of Hefei University:Comprehensive ED
基金
安徽省自然科学基金项目“面向智能视频监控的基于协同半监督深度学习的人体行为识别方法研究”(2008085MF202)。
关键词
安全帽检测
YOLOv7
NWD
全维动态卷积
注意力机制
激活函数
safety helmet detection
YOLOv7
NWD
full-dimensional dynamic convolution
attention mechanism
activation function