# A New Defect Diagnosis Method for Wire Rope Based on CNN-Transformer and Transfer Learning
## 1 Introduction  
Wire rope is widely used in many fields, such as coal mine hoists, bridge construction, escalators, cranes, and ocean platforms for natural gas extraction [1]. Due to the harsh working conditions in these fields, various defects inevitably occur during its whole life cycle [2]. Furthermore, the condition of wire rope is of great importance for the stable operation of machines and the safety of human lives [3]. Magnetic flux leakage (MFL) [4] is one of the most prevalent non-destructive electromagnetic testing methods used in practical applications, where the loss of metallic cross-sectional area (LMA) defects can be detected both effectively and rapidly. However, the analysis of this method is difficult when LMA signals are combined with different noises that are generated by electromagnetic interference, detection speeds, the pole tip effect, or movement friction [5]. Hence, the accurate defect diagnosis of wire rope is necessary and meaningful for machines to present greater reliability. In addition, reducing maintenance costs is another benefit that arises from wire rope defect diagnosis research. In recent years, breakthroughs in image processing methods have provided increased directions for wire rope signal processing and feature extraction techniques. Based on the matrix reconstruction method and the fact that two-dimensional (2D) imaging provides a better platform for feature extraction in comparison to standard one-dimensional (1D) signals, numerous detection algorithms have been proposed and demonstrated in theliterature [6; 7; 8]. To improve the robustness and accuracy outcomes of wire rope defect inspections, [PERSON] et al. proposed some novel methods to complete quantitative defect recognition practices, including a reshaped sine function, wavelet function, and grid entropy. Finally, the feasibility of the presented methods is verified through case studies that are conducted under different working conditions [9]. In a recent study, [PERSON] et al. presented the establishment of MFL gray images and combined a kernel extreme learning machine with a compressed sensing wavelet to inhibit noise interference and improve the accuracy of wire rope defect recognition results [10]. From the perspective of solving noise interference issues, [PERSON] et al. designed a new signal processing method based on notch filtering and wavelet denoising for successfully detecting defect signals in the MFL data, which was demonstrated by a series of experiments and processing results [11]. It is well known that deep learning and neural networks have achieved great success in numerous fields, such as image classification [12; 13], object detection [14; 15], and natural language processing [16]. These new approaches can automatically extract features instead of depending on prior knowledge. Furthermore, the advantage of deep learning networks is their better generalization and robustness. Based on machine learning techniques, some methods were proposed in the literature and demonstrated to be effective for various defect diagnosis tasks in mechanical industries, such as drag machines, gearbox diagnosis, motor fault detection, and rotor-bearing systems [17]. [PERSON] et al. used raw sensor signal as an input to establish a compact, adaptive, 1D convolution neural network (CNN) classifier for bearing fault diagnosis without any pre-determined feature extraction or feature selection methods, and the effectiveness and feasibility of the proposed method were validated by comparing the results with other competing intelligent fault diagnosis algorithms [18]. Based on an artificial neural network, [PERSON] et al. applied a multilayer perceptron in a drag system to improve the sensitivity of their fault symptom identification and demonstrated the effectiveness of minimizing the failure frequency and maintenance costs [19]. To address the difficulties of acquiring labeled samples, [PERSON] et al.