本文已被:浏览 611次 下载 1417次
Received:November 29, 2022 Revised:December 23, 2022
Received:November 29, 2022 Revised:December 23, 2022
中文摘要: 在施工现场中, 发生过许多高空坠落事故, 因此在施工现场佩戴安全帽是十分有必要的. 针对安全帽佩戴状况检测中遇到的小目标样本缺检、漏检的情况, 提出一种基于YOLOX-s的改进算法. 首先, 在Neck层引入主干特征提取网络中的160×160特征层进行特征融合, 并且增加了一个针对小目标的检测头; 其次, 采用SIoU损失函数计算损失值, 使得网络在训练过程中考虑的损失项更加全面; 并且采用varifocal loss函数来计算置信度损失值, 进一步改善训练过程中存在的正样本与困难样本不均衡的问题, 最后, 采用CA (coordinate attention)注意力机制来增强模型的特征表达能力. 实验结果表明, 通过对Neck层与检测层、损失函数的优化以及引入CA注意力机制, 使得网络在训练过程中收敛与回归性能更佳. 改进后的算法的mAP值为95.57%, 相较于YOLOv3及原YOLOX-s算法在mAP值上分别提高了17.11%、3.59%. 改进后的算法检测速度为54.73帧/s, 符合实时检测速度要求.
Abstract:In construction sites, many high fall accidents have occurred, so it is necessary to wear helmets. An improved algorithm based on YOLOX-s is proposed to deal with missing and omitted detection of small target samples encountered in helmet-wearing condition detection. First, the 160×160 feature layer in the Neck layer is introduced in the backbone feature extraction network for feature fusion, and a detection head for small targets is added; second, the SIoU loss function is used to calculate the loss value, which makes the loss term considered in the training process of the network more comprehensive, and the varifocal loss function is used to calculate the loss value of the confidence level to further reduce the imbalance of the positive and difficult samples in the training process; finally, coordinate attention (CA) mechanism is used to enhance the feature representation of the model. The experimental results show that the optimization of the Neck layer, detection layer, and loss function and the introduction of the CA mechanism lead to better convergence and regression performance of the network during the training process. The mAP value of the improved algorithm is 95.57%, which is 17.11% and 3.59% higher than that of YOLOv3 and the original YOLOX-s algorithm, respectively. The detection speed of the improved algorithm is 54.73 frames/s, which meets the real-time detection speed requirement.
keywords: safety helmet detection YOLOX-s small target detection SIoU loss function varifocal loss function attention mechanism
文章编号: 中图分类号: 文献标志码:
基金项目:国家自然科学基金(62073091); 广东省普通高校重点领域(新一代信息技术)专项(2020ZDZX3042)
引用文本:
苏鹏,刘美,马思群.基于改进YOLOX-s的安全帽检测.计算机系统应用,2023,32(7):145-154
SU Peng,LIU Mei,MA Si-Qun.Safety Helmet Detection Based on Improved YOLOX-s.COMPUTER SYSTEMS APPLICATIONS,2023,32(7):145-154
苏鹏,刘美,马思群.基于改进YOLOX-s的安全帽检测.计算机系统应用,2023,32(7):145-154
SU Peng,LIU Mei,MA Si-Qun.Safety Helmet Detection Based on Improved YOLOX-s.COMPUTER SYSTEMS APPLICATIONS,2023,32(7):145-154