# The Bearing Surface Defect Detection Method Combining Magnetic Particle Testing and Deep Learning
## 2 Magnetic Particle Testing  
Presently, non-destructive testing methods commonly used for surface defect detection in bearings include ultrasonic testing and magnetic particle testing. Ultrasonic testing primarily aims to identify internal defects within the bearing, while magnetic particle testing is specifically employed for detecting defects on the bearing's surface and in the near-surface region. The primary steps involved in magnetic particle testing generally encompass the six procedures illustrated in Figure 1[11]. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Deep Learning** & **Traditional Image Processing** \\ \hline accuracy & high & low \\ durability & high & low \\ cost & high & low \\ test time & long & short \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Contrast between deep learning and traditional image processing. Figure 1: The main procedures of magnetic particle testing. 1. Preprocessing: Improving the surface condition of the workpiece before magnetization is essential to ensure an even distribution of magnetic particles on the workpiece's surface. 2. Magnetization: The application of a magnetic field to the workpiece is known as magnetization, inducing a leakage magnetic field at defect locations. 3. Applying Magnetic Powder: Spraying magnetic powder onto the workpiece's surface is the process of applying magnetic powder, attracting the powder to defect-induced leakage magnetic fields, resulting in the formation of magnetic traces. This application can be performed using either a dry method, employing solid magnetic powder, or a wet method, utilizing a magnetic suspension containing magnetic powder. 4. Magnetic Trace Assessment: Inspection personnel observe and assess the position, shape, and size of magnetic traces, determining the nature and dimensions of defects. 5. Demagnetization: Demagnetization involves subjecting the workpiece to an alternating magnetic field, utilizing the magnetic hysteresis loop's decreasing effect to reduce residual magnetism within the workpiece, ensuring that residual magnetic fields do not affect the workpiece's subsequent use. 6. Post-processing: Post-processing includes tasks such as cleaning the workpiece's surface and rust prevention, aiming to eliminate any impact on the workpiece's subsequent use from the applied magnetic powder, water-based magnetic suspension, contrast enhancement agents, etc. In the current operation of magnetic particle testing for bearings, most of the procedural steps can be automated by inspection equipment. For instance, a bearing magnetic particle-testing machine can automatically handle tasks such as bearing loading, magnetization, spray application, rotation, and demagnetization. However, the observation, evaluation, and corresponding record-keeping of magnetic traces still require manual intervention. During the magnetic trace observation and evaluation process in bearing magnetic particle testing, inspection personnel must control the rotation of the bearing and carefully examine the magnetic traces on the surface. This process involves numerous observation points, considerable observation distances, and high work intensity. Particularly when using fluorescent magnetic powder for inspection (as shown in Figure 2), inspection personnel need to be exposed to ultraviolet light for an extended period, working in challenging conditions. Additionally, the fluorescence of the magnetic powder and the reflection from the ultraviolet lamp can be somewhat stimulating to the eyes, leading to eye fatigue. This may cause inspection personnel to lose concentration, resulting in potential defects being overlooked or misjudged. Magnetic particle testing is a method for detecting defects by identifying the accumulation of magnetic particles forming magnetic traces at defect locations [12]. The principle is illustrated in Figure 3: after magnetization, a magnetic field is generated inside the ferromagnetic material of the workpiece.