Abstract:At present, manual supervision is generally used on railways to detect whether workers wear safety helmets, but the scope of supervision is too large, and in practice it is impossible to track and manage all workers in a timely manner. Therefore, in response to this problem, the method of deep learning target detection is adopted, and the YOLOv5s target detection algorithm is improved to realize whether railway workers wear hard hats and vests. Specifically, based on the YOLOv5s algorithm, the GhostNet module is used to replace the convolution Conv in the original network to improve the real-time detection speed of the model; the more efficient and simple multi-scale feature fusion BiFPN is used to make the feature fusion method simpler and more efficient to improve Detection speed and reduce model complexity; replace the original CIOU loss function with SIOU loss function to improve model accuracy. The research results show that the accuracy and recognition efficiency of the improved YOLOv5s-GBS algorithm can reach 95.7% and 45 frames per second, and the model size is reduced by half, and the accuracy rate is increased by 4.5%.