With the development of construction industry, the traditional manual inspection has been gradually eliminated due to many shortcomings, such as low efficiency, time-consuming and labor-intensive. Meanwhile, the current helmet detection model on the market does not consider the interference of complex weather, which greatly affects the detection performance. A low-cost helmet detection scheme is proposed in this paper, which can be used in various complex weather environments such as heavy rain, fog and snow. Firstly, the monitoring video of the construction site is sliced as the helmet wearing detection data set, and improved on the basis of Yolo v5s model to make it meet the requirements of helmet detection. Secondly, data augmentation and oversampling are adopted to improve the accuracy for small targets. Finally, K-means++ clustering algorithm is utilized to change the dimension of anchor box for better detection performance, and MSRCR algorithm is used to filter complex weather conditions. Compared to the original Yolo v5s, the mean average precision of the proposed scheme achieves 94.27% under complex weather conditions. For images with a size of 300*300, the detection speed can reach 63 frames per second. Therefore, the scheme can realize a high-precision, real-time and low-cost helmet detection system which can be used in a complex weather environments effectively.