Abstract:In order to solve the problems of low recognition accuracy and easy missed detection of insulators and self-explosion defects in the existing target detection methods in foggy scenes, a YOLOv7 insulator and self-explosion defect detection method in foggy scenes is proposed, which combines coordinate attention mechanism (CA) and bidirectional weighted feature pyramid (BiFPN). Firstly, the light fog data set, the dense fog data set and the mixed fog concentration data set are generated by using the center point synthesis fog method through the atmospheric scattering model. Secondly, the coordinate attention mechanism is integrated into the end of the backbone feature extraction network and the front end of the prediction end to improve the attention of the network to important features. Thirdly, in the feature fusion network, the idea of BiFPN is used to add cross-layer weight connection to improve the feature fusion ability of the model and improve the missed detection of occluded targets and small targets. Finally, considering the direction matching problem between the real box and the prediction box, the SIoU loss function is used to replace the CIoU loss function to further improve the detection performance of the model. The results show that the average accuracy of the improved YOLOv7 in light fog, dense fog and mixed fog is 96.95 %, 95.58 % and 96.65 %, respectively, which is 6.65 %, 5.55 % and 6.54 % higher than that of the original YOLOv7. It is proved that the improved YOLOv7 has better detection performance for insulators and self-explosion defects in foggy environment.