Abstract:【Objective】Aiming at the potential risk caused by overhead contact wire defects during railway operation, an improved YOLOv7x method for overhead contact wire defect identification is proposed.【Method】Firstly, Swin Transformer network is introduced at the end of the backbone feature extraction layer to replace the original extended and efficient layer aggregation network module, so as to improve the ability of the network to grasp global information. Then the SIoU(SCYLLA-IoU) loss function is used to replace the original network loss function, and the direction penalty mechanism is added to the convergence process of the prediction frame. Finally, CA is integrated with the extended and efficient layer aggregation network module to enhance the global receptive field of the neck network module.【Result】Experimental simulation results show that the accuracy of the model trained with the improved algorithm reaches 95.9%, which is 4.7% higher than that of the original YOLOv7x algorithm, and the detection speed reaches 52 frames per second.【Conclusion】The improved algorithm solves the problem of low detection efficiency in hanging strings defect identification, which may improve the efficiency of detection of hanging strings defect in practice.