Aiming at the problem of low detection accuracy of small targets in UAV inspection images of transmis-sion lines,an improved YOLOv7 variable-scale multi-target detection scheme for transmission lines is proposed.This solution applies the YOLOv7-based target detection model to transmission line target detection for the first time,intro-ducing the Transformer attention mechanism,usinggn Conv to replace the convolution layer in the efficient aggregation network to extract inspection image features,and fusing features of different resolutions through RFPN network to pre-dict targets of different scales.The detection accuracy of small targets is improved,reaching an average detection ac-curacy of 93.68% .It can also detect occluded targets and has a certain generalization ability.The results show that the model can effectively detect the anti-vibration hammer and insulator in the inspection image,which provides a theoretical basis for subsequent fault diagnosis.