# The Bearing Surface Defect Detection Method Combining Magnetic Particle Testing and Deep Learning
###### Abstract  
As a critical foundational component, bearings find widespread application in various mechanical equipment. In order to achieve automated defect detection in the bearing-manufacturing process, a defect detection algorithm combining magnetic particle inspection with deep learning is proposed. Dynamic thresholding and generative adversarial network (GAN) methods are employed to extract defect samples from bearing images and augment the dataset, thereby enhancing data diversity. To mitigate the impact of irrelevant displays in bearing images, a coordinated attention (CA) mechanism is introduced into the backbone network of the deep learning model to focus on key information. Additionally, an adaptive spatial feature fusion module (ASFF) is incorporated during the multiscale fusion stage to maintain consistency in features across different hierarchical levels. The weighted intersection over union (WIoU) bounding box loss function is utilized to replace the original generalized intersection over union (GIoU) in the network, directing the model's attention towards common-quality anchor boxes to reduce the adverse effects of inconsistent annotations. The experimental results demonstrate that the improved network achieves a mean average precision (mAP) of 98.4% on the bearing dataset, representing a 4.2% improvement over the original network.  
bearings; defect detection; magnetic particle testing; deep learning; data augmentation +
Footnote †: journal: Applied  
0000-0001-9993-3227][PERSON], [PERSON], [PERSON], [PERSON], [PERSON] false detections of bearing defects, thereby reducing the accuracy and efficiency of the detection process.  
With the development of machine vision, some enterprises are opting to use industrial cameras instead of human eyes, employing defect detection algorithms to replace manual decision making [8]. Existing defect detection algorithms can be broadly categorized into traditional image processing methods [9] and deep learning-based object detection algorithms [10]. Traditional image processing methods require algorithm engineers to manually extract defect features and set different thresholds, exhibiting poor robustness and high false-detection rates. In contrast, deep learning-based object detection algorithms autonomously learn defect features through neural networks, requiring no human intervention and demonstrating superior robustness and controllable false detection rates, especially in recognizing complex defect images. However, deep learning methods require substantial data support to avoid overfitting. The characteristics of the deep learning method and traditional image processing method are shown in Table 1.  
This paper innovatively combines magnetic particle inspection with deep learning for bearing defect detection. The magnetic traces at defect locations during the magnetic particle inspection process exhibit distinctive image features, providing excellent learning samples for deep learning models. This approach allows for deep learning to comprehensively learn bearing defect features, resulting in a trained model with precise defect detection capabilities.