摘要: |
目的 针对工业场所背景复杂导致安全帽的检测精度低、效果不佳等问题,提出了一种基于 YOLOv5 的智能
检测安全帽的方法。 方法 首先在原模型 YOLOv5 的骨干网络中增加注意力机制,增强对不同尺寸目标特征的提
取,使得网络将注意力聚焦在含有安全帽的区域,增强了网络对安全帽信息的提取,以此有效提取安全帽的特征信
息;在预测层使用 EIoU 损失函数,考虑宽和置信度的差异、高和置信度的差异,把纵横比拆开,以此改善样本不平
衡问题,提升收敛速度的同时提高了回归精度。 结果 根据实验结果,改进的算法平均精度达到了 94. 7%。 相比于
YOLOv5 算法平均检测精度提高了 2. 2%,相比于 YOLOv3 算法平均检测精度提高了 12. 6%,可以有效地检测安全
帽。 结论 在同样的背景环境下,改进的算法可以有效地检测出远距离的小目标,对于复杂背景信息的图片,也可以
准确地检测出目标。 改进的算法有效地改善了原算法中小目标漏检和误检情况,也提高了检测精度。 |
关键词: 安全帽 注意力机制 深度学习 损失函数 |
DOI: |
分类号: |
基金项目: |
|
Research on Safety Helmet Detection Method Based on YOLOv5 |
ZHANG Shuaishuai
|
School of Computer Science and Engineering Anhui University of Science and Technology Anhui Huainan 232001
China
|
Abstract: |
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. |
Key words: safety helmet attention mechanism deep learning loss function |