Abstract:The use of unmanned aerial vehicles for intelligent inspection of transmission lines has become the mainstream of the industry. Insulator defect detection is a key link in intelligent inspection operations. Aiming at the problem of low accuracy of insulator defect detection in complex environment, this paper proposes an improved YOLOv5s insulator defect detection algorithm. Firstly, the existing data sets are enhanced by random rectangle occlusion, horizontal flip, random pixel zeroing and adding random pixels, and the K-means algorithm is used to cluster the data sets to obtain the optimal anchor frame size, which effectively improves the generalization ability and positioning accuracy of the model. Secondly, GAM attention module is added to the end of the main network of YOLOv5s and the last three convolution networks of different scales, so that the model can be noticed on a larger network to solve the influence of invalid features on the recognition accuracy. Finally, based on the feature pyramid structure FPN, the adaptive feature fusion ASFF module is introduced to enhance the feature extraction ability of the network. The experimental results show that the accuracy and mAP0.5 of the improved YOLOv5s model are 2.4% and 2.2% higher than those of the original YOLOv5s network, respectively.