Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (15): 180-188.DOI: 10.3778/j.issn.1002-8331.2305-0087

• Graphics and Image Processing • Previous Articles     Next Articles

Improved YOLOX Night Helmet Detection Algorithm

HAN Guijin, WANG Ruixuan, XU Wuyan, LI Jun   

  1. 1.Xi’an University of Posts & Telecommunications, Xi’an 710061, China
    2.Southwest Branch, China Construction Eight Engineering Division Co. Ltd., Chengdu 610094, China
  • Online:2024-08-01 Published:2024-07-30

改进YOLOX的夜间安全帽检测算法

韩贵金,王瑞萱,徐午言,李君   

  1. 1.西安邮电大学,西安 710061
    2.中国建筑第八工程局有限公司 西南分公司,成都 610094

Abstract: Helmet detection is an effective means to ensure the safety of construction sites. In order to ensure the image resolution under dark light conditions, the tower crane hook camera often needs to collect grayscale images at night. Additionally, helmet target areas are often blurred due to camera shake and people moving around. In order to solve the problem of detection accuracy drop caused by the loss of target features in fuzzy grayscale images, using YOLOX as the baseline model, a feature enhancement and regression weight adaptive YOLOX (FERWA-YOLOX) algorithm for night helmet detection is proposed. The algorithm adds a multi-scale residual (MSR) module that fuses different sizes of receptive fields to the input layer, integrate more local features in the same layer network to reduce the impact of local blurring of the target. The algorithm  also adds a parallel pooling channel attention (PPCA) module to the classification branch of the decoupling head, makes up for the decline in network classification ability caused by the loss of target color features. A loss function with double penalty items (DPI-Siou) is designed to adaptively reduce the shape loss of fixed-shape objects and the weight of fuzzy objects in regression, and improve the detection accuracy of the network. The experimental results show that, compared with the original YOLOX algorithm, the mAP of FERWA-YOLOX has increased by 4. 88 percentage points, and the parameter volume has only increased by 0.5 MB, which meets the needs of real-time detection at night.

Key words: target detection at night, safety helmet testing, receptive field, channel attention, loss function

摘要: 安全帽检测是保障建筑施工现场安全的一个有效手段。为保证暗光条件下图像分辨度,塔机吊钩摄像头夜间经常需采集灰度图像。由于摄像头晃动和人员走动,安全帽目标区域还经常会出现模糊现象。为解决模糊灰度图像中目标特征丢失所导致的检测精度下降问题,以YOLOX为基准模型,提出一种用于夜间安全帽检测的特征增强和回归权重自适应YOLOX(feature enhancement and regression weight adaptive,FERWA-YOLOX)算法。算法在输入层增加了融合不同大小感受野的多尺度残差(multi-scale residuals,MSR)模块,在同层网络中融合更多局部特征,降低目标局部模糊带来的影响;在解耦头的分类分支增加并行池化通道注意力(parallel pooling channel attention,PPCA)模块,弥补因目标颜色特征丢失所导致的网络分类能力的下降;设计了一种带双惩罚项的损失函数(double penalty items-Siou,DPI-Siou),自适应地降低形状固定目标的形状损失和模糊目标在回归时的权重,提高网络的检测精度。实验结果表明,FERWA-YOLOX较原YOLOX算法,mAP提升了4.88个百分点,参数量仅提升0.5?MB,且满足夜间实时检测需求。

关键词: 夜间目标检测, 安全帽检测, 感受野, 通道注意力, 损失函数