In order to monitor whether workers wear helmets correctly on the distribution network construction, and to address the problems of low detection accuracy of existing helmet detection, a new method based on YOLOv5s-Btri model was proposed in this paper. Firstly, the C3 module is improved by replacing the general convolution with improved Ghost convolution, to reduce the parameters. Secondly, the algorithm introduces the Triplet Attention to improve the C3 module, so as to improve the ability of feature extraction. At last, the PANet of the original network is improved by using BiFPN, thus obtaining richer location and semantic information. Fourthly, chooses CIOU as the loss function of the frame regression. The experimental results show that compared with YOLOv5s, the average detection accuracy of YOLOv5s-Btri network reaches 93.9%, which is improved by 2.9%.