计算机工程与应用 ›› 2022, Vol. 58 ›› Issue (9): 161-167.DOI: 10.3778/j.issn.1002-8331.2011-0038

• 模式识别与人工智能 • 上一篇    下一篇

面向嵌入式平台的安全帽实时检测方法

农元君,王俊杰,徐晓东,赵雪冰   

  1. 中国海洋大学 工程学院,山东 青岛 266100
  • 出版日期:2022-05-01 发布日期:2022-05-01

Real-Time Hardhats Detection Method for Embedded Platform

NONG Yuanjun, WANG Junjie, XU Xiaodong, ZHAO Xuebing   

  1. School of Engineering, Ocean University of China, Qingdao, Shandong 266100, China
  • Online:2022-05-01 Published:2022-05-01

摘要: 针对当前基于深度学习的安全帽检测方法因结构复杂和计算量大,难以在嵌入端实现实时检测的问题,提出一种适用于嵌入式平台的轻量化安全帽实时检测方法。该方法以Tiny-YOLOv3检测网络为基础,通过改进特征提取网络和多尺度预测优化网络结构,引入空间金字塔池化模块丰富特征图的多尺度信息,采用[K]-means聚类算法确定适合安全帽检测的锚框,引入CIoU边界框回归损失函数以提高检测精度。实验结果表明:在608×608的输入尺寸下,所提方法的平均准确率、召回率、F1值分别达到87.50%、84%、83%,较Tiny-YOLOv3检测方法分别提升了11.27、11和7个百分点;且在嵌入式平台NVIDIA Jetson Nano上实现了20.58 frame/s的实时检测速度,可满足在嵌入端实现安全帽实时检测的需求。该方法在光线不佳、小目标、密集目标等复杂施工环境下具有良好的适应性和泛化性。

关键词: 安全帽检测, Tiny-YOLOv3, 嵌入式平台, 多尺度预测, 空间金字塔池化

Abstract: Aiming at the problem that current deep learning based hardhat detection methods are difficult to achieve real-time detection at the embedded devices due to complex structure and large amount of calculation, a light-weight hardhat detection method is proposed for embedded platform. Based on Tiny-YOLOv3, the network structure is optimized by improving the feature extraction network and multi-scale prediction. The spatial pyramid pooling module is introduced to enrich the multi-scale information of feature map. K-means clustering algorithm is used to determine the anchor frame suitable for hardhats detection. The bounding box regression loss function CIoU is introduced to improve detection accuracy. Experimental results show that, with the input size of 608×608, the average accuracy, recall rate and F1 value of the proposed method are 87.50%, 84% and 83%, which is 11.27, 11 and 7 percentage points higher than that of Tiny-YOLOv3 detection method. Meanwhile, the proposed method can achieve a real-time detection speed of 20.58 frames per second on the embedded platform NVIDIA Jetson Nano, which can meet the requirement of real-time detection when running on the embedded platform. In addition, the proposed method has good adaptability and generalization in complex construction environment such as poor light, small targets and dense targets.

Key words: hardhat detection, Tiny-YOLOv3, embedded platform, multi-scale prediction, spatial pyramid pooling