Abstract:Aiming at the problem of missing detection and false detection when YOLOv7 algorithm detects insulators and grading rings in transmission lines under complex background interference, an improved YOLOv7 method for detecting defects of insulators and grading rings in transmission lines is proposed. Firstly, GSConv module is introduced into the backbone network to realize the exchange of characteristic information between different channels, which improves the accuracy of model detection and reduces the amount of parameters; Secondly, combining the Normalization-based Attention(NAM) with the C2f(CSPlayer_2Conv) structure, the NAM-C2f module is constructed to reconstruct the head network of the original model, enhance the quality of the fused features, and improve the detection accuracy of the model; Thirdly, the Global Attention Mechanism,GAM(GAM) is introduced in front of the detection layer to improve the recognition ability of defect targets and reduce the occurrence of missed detection and false detection; Finally, MPDIoU Loss is used as the frame regression loss function of the model to improve the convergence speed and regression accuracy of the model. The experimental results show that the average accuracy of the improved algorithm is 95.13%, which is 6.57% higher than the original algorithm, and the parameter quantity is reduced by 5.59MB, which effectively improves the detection accuracy of insulator and grading ring defects in transmission lines, and improves the problems of missed detection and false detection in the detection task.