首页|基于改进YOLOv7的安全帽检测算法

基于改进YOLOv7的安全帽检测算法

扫码查看
针对现有安全帽检测算法小目标检测效果差,以及检测覆盖、重叠目标时存在错检和漏检的问题,提出了一种基于改进的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%.改进后算法有效地提升了安全帽的检测精度,降低了漏检及误检的概率.
Algorithm of Safety Helmet Detection Based on Improved YOLOv7
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.

safety helmet detectionYOLOv7NWDfull-dimensional dynamic convolutionattention mechanismactivation function

张珂、马宇晴、朱礼龙、谢进

展开 >

合肥学院人工智能与大数据学院,合肥 230601

安全帽检测 YOLOv7 NWD 全维动态卷积 注意力机制 激活函数

安徽省自然科学基金项目

2008085MF202

2024

合肥学院学报(综合版)
合肥学院

合肥学院学报(综合版)

影响因子:0.426
ISSN:2096-2371
年,卷(期):2024.41(2)
  • 20