# The Bearing Surface Defect Detection Method Combining Magnetic Particle Testing and Deep Learning
## 3 Machine Vision  
Machine vision is the automatic acceptance and processing of images of a real object through optical devices and non-contact sensors. It involves analyzing the images to obtain the required information or control machine movements. Currently, it is widely used in various non-destructive testing applications. In the context of bearing magnetic particle inspection, machine-vision methods are employed to detect defects, enabling automated inspection operations and defect recognition. This automation improves the working environment, reduces labor intensity, and lowers the rate of missed detections, showing promising applications. In machine vision, the process of converting actual magnetic traces into magnetic trace images involves two main steps. The first step is optical imaging, where the three-dimensional magnetic traces on the surface of the object are projected onto the imaging target surface of the camera through the optical system, resulting in a two-dimensional light signal. The second step is image digitization, where the camera converts the light signals on the target surface into discrete digital signals for computer processing. These two steps together represent the transformation of the geometric features of magnetic traces into discrete brightness-distribution information on a two-dimensional plane in the image, as illustrated in Figure 5.  
Image recognition refers to the technique of processing, analyzing, and understanding images using software programs. It transforms image data described in pixels into non-graphical image information, matching or classifying to identify the various patterns of targets and objects. When using machine-vision technology for detecting cracks in magnetic traces during bearing magnetic particle inspection, it is necessary to employ image recognition algorithms tailored for crack detection. These algorithms analyze the collected magnetic trace images to detect cracks and extract information about their shape, size, and position. Thus, image recognition technology is crucial for automated crack detection in the full-process magnetic particle inspection of bearings. \begin{table}
\begin{tabular}{c c} \hline \hline
**Technical Properties** & **Value** \\ \hline Particle size dm & approx. 3 \(\upmu\)m \\ Density/15 \({}^{\circ}\)C & 1140 \(\pm\) 15 kg/m\({}^{3}\) \\ weight percent & 2.5\% \\ pH value & 8.75 \(\pm\) 0.25 \\ permeability & approx. 10\({}^{-3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Magnetic particle technical properties. Figure 4: Images of different types of magnetic marks. Current image recognition technologies mainly include traditional image processing methods and deep learning-based object detection methods, each with their own characteristics in defect detection. Traditional image processing methods rely on algorithm engineers manually extracting defect features and setting thresholds, which may lead to issues such as insufficient robustness and high false-positive rates in practical applications. In contrast, deep learning object detection methods autonomously learn defect features through neural networks, requiring no human intervention and offering greater flexibility to adapt to various complex defect scenarios. This approach enhances algorithm robustness while effectively controlling false-positive rates. Deep learning methods possess powerful learning capabilities, handling large-scale data and alleviating the burden of manually designing features in traditional methods. In bearing defect detection, deep learning object detection methods can automatically learn the features of magnetic traces, resulting in more accurate defect identification and improved detection accuracy and efficiency. Considering these factors, deep learning object detection methods demonstrate more advantages in bearing defect detection compared to traditional image processing methods, especially in handling complex scenes and large-scale data.