首页|基于YOLOv5的安全帽检测方法研究

基于YOLOv5的安全帽检测方法研究

扫码查看
目的 针对工业场所背景复杂导致安全帽的检测精度低、效果不佳等问题,提出了一种基于YOLOv5的智能检测安全帽的方法。方法 首先在原模型YOLOv5的骨干网络中增加注意力机制,增强对不同尺寸目标特征的提取,使得网络将注意力聚焦在含有安全帽的区域,增强了网络对安全帽信息的提取,以此有效提取安全帽的特征信息;在预测层使用EIoU损失函数,考虑宽和置信度的差异、高和置信度的差异,把纵横比拆开,以此改善样本不平衡问题,提升收敛速度的同时提高了回归精度。结果 根据实验结果,改进的算法平均精度达到了 94。7%。相比于YOLOv5算法平均检测精度提高了 2。2%,相比于YOLOv3算法平均检测精度提高了 12。6%,可以有效地检测安全帽。结论 在同样的背景环境下,改进的算法可以有效地检测出远距离的小目标,对于复杂背景信息的图片,也可以准确地检测出目标。改进的算法有效地改善了原算法中小目标漏检和误检情况,也提高了检测精度。
Research on Safety Helmet Detection Method Based on YOLOv5
Objective In response to the issues of low detection accuracy and poor performance of safety helmet detection in complex industrial environments,a method for intelligent detection of safety helmets based on YOLOv5 was proposed.Methods First,an attention mechanism was incorporated into the backbone network of the original YOLOv5 model,which enhanced the extraction of features for targets of different sizes.This modification directed the network's attention toward regions containing safety helmets,thereby improving the network's ability to capture safety helmet information and effectively extract the corresponding features.In the prediction layer,the EIoU loss function was employed,which considered the differences in width and confidence,as well as height and confidence,while splitting the aspect ratio.This approach addressed the issue of sample imbalance,accelerated convergence,and enhanced regression accuracy.Results According to experimental results,the improved algorithm achieved an average precision of 94.7%.The improved algorithm improved the average detection accuracy by 2.2%compared with the YOLOv5 algorithm and 12.6%compared with the YOLOv3 algorithm,effectively detecting safety helmets.Conclusion Under the same background environment,the improved algorithm can effectively detect small targets at long distances and accurately detect targets in images with complex background information.The improved algorithm effectively addresses the issues of missed detection and false detection of small targets in the original algorithm and also improves detection accuracy.

safety helmetattention mechanismdeep learningloss function

张帅帅

展开 >

安徽理工大学计算机科学与工程学院,安徽淮南 232001

安全帽 注意力机制 深度学习 损失函数

2025

重庆工商大学学报(自然科学版)
重庆工商大学

重庆工商大学学报(自然科学版)

影响因子:0.548
ISSN:1672-058X
年,卷(期):2025.42(1)