Abstract:Wearing helmets can protect the head of production workers from injuries caused by falling objects. There are problems such as large span of space, many operating equipment, cluttered environment, big difference of day and night light, dazzling light, and large range of scale change of monitoring target in rolling mill, which increase the difficulty of helmet wearing detection. In response to the above problems, a helmet wearing detection scheme based on the improved YOLOv7 model is designed for the steel rolling shop. The algorithm improves the loss function based on the NWD method to improve the target detection accuracy, and adds the BiFormer on the SPPCSPC module to make the model have better detection accuracy for small targets without increasing the computational burden, which is better than other attention mechanisms. The improved YOLOv7 model is trained on the self-constructed helmet dataset, and the experiments show that the improved YOLOv7 model has a mean average accuracy of 99.3%, and the detection speed reaches 82 FPS. comparing with the other mainstream algorithms and the improved algorithms, the improved YOLOv7 has the highest mAP index, which is much more than the index of other models. At the same time, the detection speed is basically not much different from that before the improvement of the model, and does not significantly reduce the detection speed because of the improvement of accuracy, which has a better effect.