计算机工程与应用 ›› 2022, Vol. 58 ›› Issue (19): 326-332.DOI: 10.3778/j.issn.1002-8331.2103-0030

• 工程与应用 • 上一篇    

使用场景增强的安全帽佩戴检测方法研究

徐传运,袁含香,李刚,郑宇,刘欢   

  1. 重庆理工大学 计算机科学与工程学院,重庆 400054
  • 出版日期:2022-10-01 发布日期:2022-10-01

Research on Safety Helmet Wearing Detection Method Based on Scene Augment

XU Chuanyun, YUAN Hanxiang, LI Gang, ZHENG Yu, LIU Huan   

  1. School of Computer Science & Engineering, Chongqing University of Technology, Chongqing 400054, China
  • Online:2022-10-01 Published:2022-10-01

摘要: 为了解决现有安全帽佩戴数据集样本数量有限导致模型检测精度较低的问题,提出一种基于场景增强的样本扩充算法。该算法将训练集中随机抽取的图像中的检测目标随机缩放后,粘贴到另一随机场景图像上的任意位置,基于现有场景构建出拥有新的检测目标的增强场景,通过场景增强扩充安全帽佩戴训练数据集,增加训练数据集的多样性。为了验证该算法在安全帽佩戴检测中的有效性,使用场景增强算法扩充HelmetWear数据集,并用其训练基于YOLO v4的安全帽佩戴检测模型,通过检测精度评估场景增强算法。在HelmetWear数据集上检测精度达到93.81%,检测精度提升了6.39个百分点。实验结果表明该算法能有效提升安全帽佩戴检测的精度,特别是在样本最为欠缺的小目标上表现更为显著;场景增强算法对解决其他领域目标检测训练数据不足的问题有重要的借鉴意义。

关键词: 安全帽检测, 场景增强, HelmetWear数据集, YOLO v4

Abstract: In order to solve the problem of low model detection accuracy caused by the limited number of samples in the existing helmet dataset, a sample expansion algorithm based on scene augment is proposed. This algorithm randomly scales the small and medium targets in the foreground image randomly extracted from the training set, and pastes it to any position on another random scene image to construct a new real training image with border labels to improve the combination of background and foreground in the dataset diversity. In order to evaluate the effectiveness of the algorithm in the helmet wearing detection, the HelmetWear dataset is expanded using the scene augment algorithm and the scene augment algorithm is evaluated by detection accuracy using its training hard hat wearing detection model based on YOLO v4. Detection accuracy reaches 93.81% on the HelmetWear dataset and improves detection accuracy by 6.39 percentage points. The experimental results show that the algorithm can effectively improve the accuracy of hard hat wearing detection, especially on the small targets where the sample is most lacking. The scene augment algorithm is of great significance to solve the problem of insufficient target detection training data in other fields.

Key words: safety helmet detection, scene-augment, HelmetWear dataset, YOLO v4