高级检索

基于改进YOLOv5s的矿井下安全帽佩戴检测算法

Detection algorithm for wearing safety helmet under mine based on improved YOLOv5s

  • 摘要: 针对矿井下复杂环境所导致的人员安全帽检测算法精确度低、漏检率高等问题,本文提出一种基于YOLOv5s改进的矿井下安全帽检测算法。卷积神经网络在提取特征时由于计算机制容易导致图像全局上下文信息丢失,造成井下小目标安全帽的检测效果欠佳。为此,本文采用注意力机制CBAM与YOLOv5s进行融合,增强目标区域的特征图,弱化背景信息,从而帮助算法更好地定位小目标安全帽。同时,在YOLOv5s原有三个输出层的基础上新增了一个P2小目标检测层,增加了模型的多尺度感受野,可以同时捕获全局和局部上下文信息,提升了算法在复杂场景中针对小目标的检测能力。此外,本文采用EIoU损失替换原有的CIoU损失函数,解决预测框宽高比模糊的问题,保证回归框的精度,同时加快网络的收敛速度。通过将YOLOv5s主干网络中的普通卷积Conv替换为ShuffleNetV2,大幅减少模型参数量,提高了模型的识别速度。最后,使用本文算法与YOLOv5s、SSD、Faster-RCNN以及YOLOv7算法进行对比分析,实验结果表明:将改进后的算法应用于矿井下人员安全帽检测中,相比于原YOLOv5s,本文算法的准确率提升了2.9%,召回率提升了2.42%,参数量减少了7.6%。最终本文算法在矿井下安全帽检测的平均精度mAP@.5达到了87.5%。

     

    Abstract: Aiming at the problems of low accuracy and high missed detection rate of personnel safety helmet detection algorithm caused by complex environment under mine, this paper proposes an improved mine safety helmet detection algorithm based on YOLOv5 s. Due to the computer system, the global context information of the image is easily lost when the convolutional neural network extracts the features, resulting in poor detection effect of the downhole small target safety helmet. To this end, this paper uses the attention mechanism CBAM and YOLOv5s to fuse, enhance the feature map of the target area, and weaken the background information, so as to help the algorithm better locate the small target helmet. At the same time, a P2 small target detection layer is added on the basis of the original three output layers of YOLOv5 s, which increases the multi-scale receptive field of the model and can capture global and local context information at the same time, which improves the detection ability of the algorithm for small targets in complex scenes. In addition, this paper uses EIoU loss to replace the original CIoU loss function to solve the problem of fuzzy width-to-height ratio of the prediction frame, ensure the accuracy of the regression frame, and accelerate the convergence speed of the network. By replacing the ordinary convolutional Conv in the YOLOv5s backbone network with ShuffleNetV2, the number of model parameters is greatly reduced and the recognition speed of the model is improved. Finally, the proposed algorithm is compared with YOLOv5 s, SSD, Faster-RCNN and YOLOv7 algorithms. The experimental results show that the improved algorithm is applied to the safety helmet detection of mine personnel. Compared with the original YOLOv5 s, the accuracy of the proposed algorithm is increased by 2.9%, the recall rate is increased by 2.42%, and the parameter quantity is reduced by 7.6%. Finally, the average accuracy mAP@.5 of the algorithm in the mine safety helmet detection reaches 87.5%.

     

/

返回文章
返回