Bearing outer raceway defect visual detection device and method based on deep learning

By designing stable bearing clamping and rotating mechanism, accurate camera adjustment and light source lighting, combined with the data enhancement method of YOLOv5 network, the stability and accuracy problems of the existing bearing outer raceway detection device are solved, and efficient and lossless bearing defect detection is achieved.

CN120446137APending Publication Date: 2025-08-08HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510636162.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing bearing outer raceway defect detection device is not stable enough in mechanical structure design and cannot meet the requirements of high-precision detection, the camera shooting system is not accurate, the light source design is unreasonable, and the YOLOv5 model lacks adaptability in detecting small-size defects and complex backgrounds, resulting in low detection accuracy and efficiency.

Method used

A visual detection device for external raceway defects based on deep learning is designed, including bearing clamping and rotating mechanism, dome light source, camera adjustment mechanism and defect detection method based on YOLOv5 network. By adjusting camera position and light source illumination, combined with data enhancement and feature extraction module, the detection accuracy and adaptability are improved.

Benefits of technology

It realizes loss-free and efficient outer raceway inspection of bearings, and is suitable for different types of bearings, which improves detection accuracy and sensitivity, enhances the detection ability of small defects, and reduces detection costs and wear risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120446137A_ABST
    Figure CN120446137A_ABST
Patent Text Reader

Abstract

The invention discloses a bearing outer raceway defect visual detection device and method based on deep learning, and belongs to the technical field of automatic mechanical detection.The device is mainly composed of a base table, a bearing clamping and rotating mechanism, a to-be-detected bearing, a camera adjusting mechanism, a dome light source and a light source supporting frame, the bearing clamping and rotating mechanism adjusts the position of a friction wheel through an adjusting groove in an adjusting frame and can adapt to installation of bearings of different models, rotation of a bearing to be measured can be achieved through rotation of a driving friction wheel and a driven friction wheel, and adjustment of a camera in the X-axis direction, the Z-axis direction and the pitch angle can be achieved through the camera adjusting mechanism. The device can realize lossless detection, is good in adjustability, can detect bearings of different models, and is high in detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bearing detection equipment, and in particular to a deep learning-based visual detection device and method for bearing outer raceway defects. Background Art

[0002] In industrial production, bearing quality directly impacts the performance and service life of mechanical equipment. The outer raceway of a bearing is a crucial component. Surface defects such as grinding wheel marks, unfinished grinding, and scratches can lead to bearing failure and, in turn, equipment malfunction. Therefore, defect detection of the outer raceway of a bearing is crucial.

[0003] Traditional bearing defect detection methods primarily rely on manual visual inspection or contact measurement tools. These methods suffer from low efficiency, limited accuracy, and susceptibility to human influence. With technological advancements, physical testing techniques such as ultrasonic testing and magnetic particle testing have begun to be applied. Ultrasonic testing identifies defects by analyzing reflected ultrasonic echoes. However, the complex shape of the bearing's outer raceway complicates ultrasonic propagation and reflection, affecting detection accuracy. Magnetic particle testing is only suitable for detecting surface defects in ferromagnetic materials and is less effective for detecting non-ferromagnetic materials or internal defects. Furthermore, the testing process is cumbersome and requires a demanding testing environment.

[0004] In recent years, deep learning-based detection technology has garnered widespread attention in the field of bearing outer raceway defect detection due to its non-contact, fast speed, and high accuracy. This technology uses a camera to capture images of the bearing outer raceway and then uses image processing algorithms to identify defects. The YOLOv5 model, as an advanced object detection model, demonstrates promising application in bearing outer raceway defect detection due to its fast detection speed and high accuracy.

[0005] However, existing deep learning-based bearing defect detection devices still have some shortcomings in their mechanical design. For example, the bearing's clamping and rotation systems may not be stable enough to meet the requirements of high-precision inspection; the camera system's positioning and adjustment are not precise enough to accommodate bearings of varying sizes and shapes; and inappropriate light source design can lead to image processing difficulties, affecting defect detection accuracy. Furthermore, the YOLOv5 model has shown numerous shortcomings when applied to bearing outer raceway defect detection. Regarding the model's structure, its original detection layer design struggles to effectively detect minute defects. Small defect features are easily lost during network transmission, leading to missed detections. Furthermore, the model lacks adaptability to bearing outer raceway images against complex backgrounds and is susceptible to interference from background noise, misidentifying texture or impurities as defects.

[0006] Therefore, developing a universal, stable and accurate bearing outer raceway defect detection device and method based on deep learning is an important direction of current research. Summary of the Invention

[0007] In order to address the shortcomings of the above-mentioned prior art, the present invention proposes a bearing outer raceway defect visual detection device and method based on deep learning, so as to use non-contact semi-automatic measurement to avoid damage to the bearing, while improving the efficiency and accuracy of bearing defect measurement.

[0008] In order to achieve the above-mentioned object, the present invention adopts the following technical solutions:

[0009] The present invention provides a deep learning-based visual inspection device for bearing outer raceway defects, comprising: a base, a bearing clamping and rotating mechanism placed at the center of the base, a bearing to be tested mounted on the bearing clamping and rotating mechanism, a right camera adjustment mechanism and a left camera adjustment mechanism symmetrically located on both sides of the bearing to be tested, a right camera and a left camera respectively located on the right camera adjustment mechanism and the left camera adjustment mechanism, a dome light source located above the bearing to be tested, a light source support frame for fixing the dome light source, and a guide rail for achieving translation of the right camera adjustment mechanism and the left camera adjustment mechanism;

[0010] The bearing outer raceway defect visual detection device clamps and rotates the bearing to be tested through a bearing clamping and rotation mechanism, and provides lighting for the right camera and the left camera through a dome light source. The positions and pitch angles of the right camera and the left camera in the X-axis and Z-axis directions are adjusted respectively through the right camera adjustment mechanism and the left camera adjustment mechanism, so as to obtain the outer raceway image of the bearing to be tested using the right camera and the left camera.

[0011] The device for visually detecting defects of outer raceways of bearings based on deep learning described in the present invention is also characterized in that the bearing clamping and rotating mechanism comprises: a stepper motor fixed on a base, the stepper motor is connected to an active friction wheel through a synchronous belt, one end of the active friction wheel is connected to a left adjusting frame through a left bearing of the active friction wheel, and the other end is connected to a right adjusting frame through a right bearing of the active friction wheel, the left adjusting frame and the right adjusting frame have the same structure, and both are provided with a semicircular adjustment groove inside, the left bearing of the active friction wheel and the right bearing of the active friction wheel are both connected with their own adjustment grooves with clearance fit, the installation of the driven friction wheel is symmetrical with the structure of the active friction wheel, a rectangular groove is provided in the left adjusting frame, the bottom of the rectangular groove is fixedly connected to one end of a spring, the other end of the spring is fixedly connected to a pressing tongue, a small roller is installed on the top of the pressing tongue, and the bottom of the small roller is tangent to the bearing to be tested;

[0012] The bearing clamping and rotation mechanism is to install and adjust different types of bearings to be tested by adjusting the positions of the active friction wheel and the driven friction wheel in the adjustment groove, and use the spring to apply downward pulling force to the pressing tongue to fix the bearing to be tested. The stepper motor drives the active friction wheel to rotate and thus drives the rotation of the bearing to be tested.

[0013] Furthermore, the right camera adjustment mechanism includes: a slider platform, a Z-axis linear guide rail is fixedly connected to the slider platform, a camera support platform is fixedly connected to the Z-axis linear guide rail, a pitch adjustment device is fixedly connected to the camera support platform, and the pitch adjustment device is fixedly connected to the right camera;

[0014] The right camera adjustment mechanism realizes position adjustment of the right camera in the X-axis and Y-axis directions by moving the slider platform on the guide rail and the camera support platform on the Z-axis linear guide rail.

[0015] Furthermore, the pitch adjustment device includes: a lower platform, a small guide rail is installed on the top of the lower platform, a translation plate is slidably connected to the small guide rail, the translation plate is connected to a screw through a screw nut, the top of the screw is fixedly connected to a handwheel, the screw is installed on the top of the lower platform through a screw fixing seat, sliding rods are installed on the left and right ends of the translation plate, the sliding rods movably pass through the inclined slot in the wedge block, the wedge block is fixedly connected to one end of the bottom of the upper platform, the other end of the bottom of the upper platform is fixedly connected to a shaft seat, the shaft seat is connected to the support seat through a pin shaft, and the support seat is installed on the top of the lower platform;

[0016] The pitch adjustment device realizes the forward and backward movement of the translation plate by rotating the hand wheel, and drives the upper platform to rotate along the pin relative to the lower platform, thereby realizing the pitch angle adjustment of the upper platform relative to the lower platform, and further realizing the pitch angle adjustment of the right camera.

[0017] The deep learning-based visual detection method for bearing outer raceway defects of the present invention is characterized in that it includes the following steps:

[0018] S1. Install the bearing to be tested between the active friction wheel and the driven friction wheel on the bearing clamping and rotating mechanism, and adjust the pressing tongue so that the small roller presses the inner ring of the bearing;

[0019] S2. Turn on the dome light source and the left and right cameras, and adjust the positions of the left and right cameras respectively through the right and left camera adjustment mechanisms to ensure clear imaging.

[0020] S3, when the stepper motor drives the bearing to be tested to rotate one circle, the cameras on both sides collect images of the outer raceway surface of the bearing to be tested for calibration, and form a bearing image dataset, which is recorded as , represents the i-th bearing image, and n represents the total number of bearing images;

[0021] S4, yes Perform Gaussian filtering and histogram equalization to obtain the i-th bearing image after preprocessing; then use the letterbox method to fill the defect blank space in the i-th bearing image after preprocessing to obtain the i-th bearing image after filling;

[0022] The i-th bearing image after filling is flipped, translated, mis-cut, and injected with noise to obtain a series of enhanced bearing images, thereby obtaining an enhanced bearing image dataset ;in, represents the jth enhanced bearing image, and m represents the total number of enhanced bearing images;

[0023] right Mark the defects in Defect calibration frame ,in, express The x-axis coordinate of the defect calibration frame, express The y-axis coordinate of the defect calibration frame, express The width of the defect calibration box, express The height of the defect calibration frame, express The area of the defect calibration box, express The angle of the defect calibration frame;

[0024] S6. Build a defect detection network based on the YOLOv5 network, including: feature extraction module, feature fusion module, detection module, and use it to Perform feature extraction and obtain Defect prediction results ;in, express The classification results, express The defect prediction box, express Confidence in predictions;

[0025] S7. Constructing the total loss function ;

[0026] S8. Iteratively train the defect detection network using the gradient descent method and minimize the total loss function The network parameters are updated until the set total number of iterations is reached, thereby obtaining a defect detection model under the optimal parameters, which is used to perform defect detection on the bearing image to be inspected and output the defect location in the bearing image and its corresponding defect type.

[0027] A feature of the deep learning-based visual detection method for bearing outer raceway defects of the present invention is that S6 includes the following steps:

[0028] S6-1. Build the feature extraction module, which includes: initial Conv module, S extraction blocks, attention mechanism module and SPPF module, and Processing is performed to obtain the j-th multidimensional bearing feature sequence { },in, express The s-th multidimensional bearing feature map in;

[0029] S6-2, the feature fusion module performs the j-th multidimensional bearing feature sequence The feature maps in are processed in sequence, and the jth fused bearing feature sequence is obtained accordingly. ,in, express The sth fused bearing feature map in;

[0030] S6-3, build the detection module, including: activation layer, bounding box regression layer, target confidence prediction layer and detection frame merging layer, and perform the fusion of the j-th bearing feature sequence Conduct testing and obtain Defect prediction results .

[0031] Furthermore, S6-1 includes the following steps:

[0032] S6-1-1, will Input into the feature extraction module and after processing by the initial Conv module, the jth initial bearing feature map is obtained. ;

[0033] S6-1-2. Each extraction block includes: a Conv module and a C3 module; the C3 module is composed of several Conv modules; each Conv module is composed of a convolution layer, a normalization layer and an activation function;

[0034] When s=1, Input into the sth extraction block and processed by the sth Conv module to obtain The sth convolution bearing feature map , and then processed by the sth C3 module, we get The sth multidimensional bearing feature map ;

[0035] When s=2,3,…,S, The s-1th multidimensional bearing characteristic map Input the sth extraction block for processing and get The sth multidimensional bearing feature map , which is output by the Sth extraction block The Sth multidimensional bearing feature map ;

[0036] S6-1-3, the attention mechanism module includes: a global average pooling layer, a multi-layer perceptron and a channel weighted layer, and Processing is performed to obtain the j-th weighted feature map, and used as The S+1th multidimensional bearing feature map ;

[0037] S6-1-4, the SPPF module consists of three pooling layers and one fully connected layer, and Processing is performed to obtain the jth pyramid pooled bearing feature map, which is used as the S+2th multidimensional bearing feature map .

[0038] Further: S6-2 includes the following steps:

[0039] When s=1, After upsampling, the sth upsampled bearing feature map is obtained , so that The spatial size and j-th initial bearing characteristics The same, and using formula (4) to get The sth fused bearing feature map ;

[0040] (4)

[0041] In formula (4), represents the sth fusion learning weight;

[0042] When s=2,3,…,S+2, After upsampling, the sth upsampled bearing feature map is obtained , so that The spatial size and the s-1th fused bearing feature map The same, and use formula (5) to get the sth fused bearing feature map , and finally get the S+2th fused bearing feature map ;

[0043] (5).

[0044] 9. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 8, characterized in that S6-1-3 comprises the following steps:

[0045] S6-1-3-1, the global average pooling layer uses formula (1) to obtain the j-th one-dimensional vector :

[0046] (1)

[0047] In formula (1), express In the middle The gray value at the position, Indicates the image height, Indicates the image width;

[0048] S6-1-3-2, the multilayer perceptron uses formula (2) to obtain the j-th weight vector ;

[0049] (2)

[0050] In formula (2), and are the weight matrix and bias vector of the first fully connected layer in the multilayer perceptron, and are the weight matrix and bias vector of the second fully connected layer in the multilayer perceptron respectively; represents the activation function, represents another activation function;

[0051] S6-1-3-3, the channel weighted layer uses formula (3) to obtain the jth weighted feature map, and uses it as the S+1th multidimensional bearing feature map :

[0052] (3)

[0053] In formula (3), express in Grayscale value at position.

[0054] Furthermore, S6-3 includes the following steps:

[0055] S6-3-1, the activation layer Process and obtain The sth activated bearing feature map , and thus using formula (5) we can get The sth primary classification result :

[0056] (5)

[0057] In formula (5), represents the sth convolution kernel weight of the activation layer, represents the s-th bias of the activation layer;

[0058] S6-3-2, the bounding box regression layer Process and obtain The sth primary prediction box in ;

[0059] S6-3-3, the target confidence prediction layer Processing is performed to obtain the sth primary prediction confidence , thus obtaining The sth primary prediction result , and then get the jth primary prediction result sequence ;

[0060] S6-3-4, the detection frame merge layer pair The S+2 primary classification results are integrated to obtain Classification results ;

[0061] The detection frame merging layer fuses S+2 primary prediction frames to obtain Defect prediction box ,and ,in, express The x-axis coordinate of the defect prediction box, express The y-axis coordinate of the defect prediction box, express The width of the defect prediction box, express The height of the defect prediction box, The area of the defect prediction box in express The angle of the defect prediction box;

[0062] The detection frame merging layer fuses S+2 primary prediction confidences to obtain The prediction confidence , thus obtaining Defect prediction results ,Right now .

[0063] Furthermore, S7 includes the following steps:

[0064] S7-1. Use formula (6) to obtain the j-th scale factor :

[0065] (6)

[0066] In formula (6), is a positive number;

[0067] S7-2. Use formula (7) to get the j-th angle difference loss :

[0068] (7)

[0069] S7-3, use formula (8) to get the j-th IoU loss function :

[0070] (8)

[0071] S7-4, use formula (9) to get the j-th center point distance loss :

[0072] (9)

[0073] In formula (9), represents the square of the Euclidean distance, Represents the diagonal length of the jth minimum bounding rectangle containing the defect prediction box and the calibration box; Indicates the minimum range of the width of the j-th defect prediction box and the calibration box; Indicates the minimum range of the height of the j-th defect prediction box and the calibration box;

[0074] S7-5, using formula (10) to construct The total loss function :

[0075] (10)

[0076] In formula (10), Represents the weight coefficient of the j-th angle difference loss.

[0077] Compared with the prior art, the present invention has the following beneficial effects:

[0078] 1. The present invention can detect the outer raceway surface of the bearing without loss. It can detect one circle of the outer raceway in a short time without wearing the bearing surface. It can cover all positions of the outer raceway and is suitable for the special curved surface structure of the outer raceway, thereby avoiding the wear on the outer raceway surface of the bearing caused by traditional detection methods, ensuring the original performance and service life of the bearing, and reducing product loss and replacement costs caused by detection.

[0079] 2. The present invention has good adjustability and a large adjustment range. It can adjust the camera's X-axis, Z-axis and pitch angle. By rotating the bearing and collecting images multiple times, most of the bearing's characteristics can be effectively obtained, and the detection sensitivity and accuracy are guaranteed.

[0080] 3. The present invention features an adjustable bearing clamping and rotation mechanism, enabling testing of bearings of varying sizes. Designed to accommodate the unique shape of the bearing, the clamping and rotation mechanism ensures both rotation and stability, resulting in clear images and minimal wear on the bearing, ensuring the bearing is not damaged during the measurement process.

[0081] 4. The present invention utilizes a telecentric lens to effectively avoid the problem of image distortion caused by lens distortion, and can fully display most of the details of the bearing, thereby improving the system detection accuracy.

[0082] 5. The present invention sequentially performs Gaussian filtering, histogram equalization, and letterbox filling on the captured images, effectively removing noise, enhancing image contrast, and preventing distortion, providing a high-quality data foundation for subsequent model training. The data enhancement method combines Mosaic technology, random transformation, and Beta distribution to adjust the sample ratio, greatly expanding the diversity of the dataset and improving the generalization ability of the defect detection model, making it more stable when facing bearing inspection tasks in different scenarios.

[0083] 6. The present invention builds a defect detection network based on the YOLOv5 network, including: a feature extraction module, a feature fusion module, and a detection module; the feature extraction module is composed of a Conv module, an extraction block, an attention mechanism module, and an SPPF module, which can effectively capture small-size defects and improve the detection capability of minor defects; the feature fusion module effectively fuses features of different scales, provides more comprehensive information for the model, and enhances the detection accuracy of defects of different sizes; the detection module is composed of an activation layer, a bounding box regression layer, a target confidence prediction layer, and a detection box merging layer, which can detect the fused bearing features; the constructed total loss function comprehensively considers factors such as target scale and angle difference. Compared with the traditional loss function, it is more accurate in bounding box regression, which makes the model more accurate in locating the defect position, thereby improving the overall detection performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 Schematic diagram of the overall structure of an embodiment of the present invention;

[0085] Figure 2 Schematic diagram of the bearing clamping and rotating mechanism structure in an embodiment of the present invention Figure 1 ;

[0086] Figure 3 Schematic diagram of the bearing clamping and rotating mechanism structure in an embodiment of the present invention Figure 2 ;

[0087] Figure 4 This is a schematic diagram of the camera adjustment mechanism structure in an embodiment of the present invention;

[0088] Figure 5 This is a structural diagram of a pitch adjustment device according to an embodiment of the present invention;

[0089] Figure 6 A diagram of the network model structure constructed for the present invention;

[0090] Figure 7 Flowchart of the detection method of the present invention.

[0091] Figure numerals: 1, base; 2, bearing clamping and rotating mechanism; 3, bearing to be tested; 4, camera adjustment mechanism; 5, camera adjustment mechanism; 6, dome light source; 7, light source support frame; 8, guide rail; 201, left adjustment frame; 202, adjustment slot; 203, spring; 204, small roller; 205, driven friction wheel; 206, driving friction wheel; 207, tongue; 208, adjustment slot port; 209, synchronous belt; 210, left bearing of driving wheel friction wheel; 211, stepping motor; 212, left synchronous pulley; 213, right synchronous pulley; 214, fixing bracket; 215, right adjustment frame; 216, right bearing of driving wheel friction wheel; 217, rectangular slot; 401, slider platform; 402, Z-axis linear guide; 403, camera support platform; 404, Z-axis slider; 405, handwheel; 406, pitch adjustment device; 407, camera; 40601, lower platform; 40602, upper platform; 40603, handwheel; 40604, screw nut; 40605, screw; 40606, small guide rail; 40607, wedge; 40608, shaft seat; 40609, translation plate; 40610, screw fixing seat; 40611, support seat; 40612, sliding rod; 40613, pin. DETAILED DESCRIPTION

[0092] In this embodiment, refer to Figure 1As shown, a deep learning-based visual inspection device for bearing outer raceway defects includes: a base 1, a bearing clamping and rotating mechanism 2 placed at the center of the base 1, a bearing to be tested 3 mounted on the bearing clamping and rotating mechanism 2, a right camera adjustment mechanism 4 and a left camera adjustment mechanism 5 symmetrically located on both sides of the bearing to be tested 3, a right camera 407 and a left camera located on the right camera adjustment mechanism 4 and the left camera adjustment mechanism 5, respectively, a dome light source 6 located above the bearing to be tested 3, a light source support frame 7 for fixing the dome light source 6, and a guide rail 8 for achieving translation of the right camera adjustment mechanism 4 and the left camera adjustment mechanism 5;

[0093] The visual detection device for defects in the outer raceway of a bearing is a device that clamps and rotates the bearing 3 to be tested through a bearing clamping and rotating mechanism 2, and provides lighting for the right camera 407 and the left camera through a dome light source 6. The positions of the right camera 407 and the left camera in the X-axis and Z-axis directions and the pitch angle are adjusted respectively through the right camera adjustment mechanism 4 and the left camera adjustment mechanism 5, so that the outer raceway image of the bearing 3 to be tested is obtained using the right camera 407 and the left camera; since the outer surface of the bearing has a certain curvature and a high reflectivity, the structure installed in this way can obtain complete information about the outer surface of the bearing, thereby improving the accuracy of defect detection.

[0094] Reference Figure 2 As shown, in this embodiment, the bearing clamping and rotating mechanism 2 includes: a stepper motor 211 fixed on the base 1, the stepper motor 211 is connected to the active friction wheel 206 through a synchronous belt 209, one end of the active friction wheel 206 is connected to the left adjustment frame 201 through the active friction wheel left bearing 210, and the other end is connected to the right adjustment frame 215 through the active friction wheel right bearing 216. The left adjustment frame 201 and the right adjustment frame 215 have the same structure, and a semicircular adjustment groove 202 is provided inside. Four pairs of branch structures are regularly distributed on both sides of the semicircular arc body, and each branch is connected to the semicircular arc body. The end of each branch is an adjustment groove port 208 with a circular structure. The active friction wheel left bearing 210 and the active friction wheel right bearing 216 are both connected with their own adjustment grooves 202 with clearance fit, and the installation of the driven friction wheel 205 is symmetrical with the structure of the active friction wheel 206.

[0095] Reference Figure 3As shown, a rectangular groove 217 is opened in the left adjustment frame 201, and the bottom of the rectangular groove 217 is fixedly connected to one end of the spring 203, and the other end of the spring 203 is fixedly connected to the pressing tongue 207. A small roller 204 is installed on the top of the pressing tongue 207, and the bottom of the small roller 204 is tangent to the bearing 3 to be tested. In this way, the spring 203 can always provide a downward pulling force to the pressing tongue 207. When working, the small roller 204 on the top of the pressing tongue 207 directly contacts the inner ring of the bearing 3 to be tested, so that the outer ring of the bearing 3 to be tested is closely tangent to the active friction wheel 206 and the driven friction wheel 205. This can ensure the stability of the bearing 3 to be tested. At the same time, the existence of the small roller 204 makes it possible to press the bearing 3 to be tested without affecting the rotation of the bearing 3 to be tested.

[0096] The bearing clamping and rotation mechanism 2 realizes the installation and adjustment of different types of bearings 3 to be tested by adjusting the positions of the active friction wheel 206 and the driven friction wheel 205 in the adjustment groove 202, and uses the spring 203 to give the pressing tongue 207 a downward pulling force to fix the bearing 3 to be tested. The stepping motor 211 drives the active friction wheel 206 to rotate and then drives the rotation of the bearing 3 to be tested; such a structure can realize the movement of the active friction wheel 206 and the driven friction wheel 205 in the fixed position in the adjustment groove 202, which can meet the installation requirements of different types of bearings.

[0097] Reference Figure 4 As shown, the right camera adjustment mechanism 4 includes: a slider platform 401, a Z-axis linear guide 402 is fixedly connected to the slider platform 401, a camera support platform 403 is fixedly connected to the Z-axis linear guide 402, a pitch adjustment device 406 is fixedly connected to the camera support platform 403, and a right camera 407 is fixedly connected to the pitch adjustment device 406;

[0098] The right camera adjustment mechanism 4 adjusts the position of the right camera 407 in the X-axis and Y-axis directions by moving the slider platform 401 on the guide rail 8 and by shaking the handwheel 405 to move the camera support platform 403 on the Z-axis linear guide rail 402.

[0099] Reference Figure 5As shown, the pitch adjustment device 406 includes: a lower platform 40601, a small guide rail 40606 is installed on the top of the lower platform 40601, a translation plate 40609 is slidably connected to the small guide rail 40606, the translation plate 40609 is connected to the screw 40605 through the screw nut 40604, the top of the screw 40605 is fixedly connected to the handwheel 40603, the screw 40605 is installed on the top of the lower platform 40601 through the screw fixing seat 40610, and the left and right sides of the translation plate 40609 are fixed. A sliding rod 40612 is mounted on the side end, and slides through the inclined slot in the wedge block 40607. The wedge block 40607 is fixedly connected to one end of the bottom of the upper platform 40602. The other end of the bottom of the upper platform 40602 is fixedly connected to a rotating shaft seat 40608. The rotating shaft seat 40608 is connected to the support seat 40611 via a pin 40613, allowing the upper and lower platforms to rotate within a certain range along the pin 40613. The support seat 40611 is mounted on the top of the lower platform 40601.

[0100] The pitch adjustment device 406 realizes the forward and backward movement of the translation plate 40609 by rotating the hand wheel 40603, and drives the upper platform 40602 to rotate relative to the lower platform 40601 along the pin shaft 40613, thereby realizing the pitch angle adjustment of the upper platform 40602 relative to the lower platform 40601, and then realizing the pitch angle adjustment of the right camera 407.

[0101] In this embodiment, a method for visually detecting bearing outer raceway defects based on deep learning includes the following steps:

[0102] S1. Install the bearing 3 to be tested between the active friction wheel 206 and the driven friction wheel 205 on the bearing clamping and rotating mechanism 2, and adjust the pressing tongue 207 so that the small roller 204 presses the inner ring of the bearing; adjust the positions of the left and right bearings of the active friction wheel and the left and right bearings of the driven friction wheel on the adjustment grooves so that the active and driven friction wheels are in good contact with the outer edges of the bearings and the bearings can rotate with the friction wheels;

[0103] S2. Turn on the dome light source 6 and the left and right cameras 407. Rotate the handwheel 40603 to adjust the pitch angle of the left and right cameras 407. Rotate the handwheel 405 to adjust the Z-axis displacement of the left and right cameras 407. Move the slider platform 401 to adjust the X-axis displacement of the left and right cameras 407 to ensure clear imaging.

[0104] S3: When the stepper motor 211 drives the bearing 3 to rotate one circle, the cameras on both sides collect images of the outer raceway surface of the bearing 3 to be tested for calibration, and form a bearing image dataset, which is recorded as , represents the i-th bearing image, and n represents the total number of bearing images.

[0105] S4, yes Perform Gaussian filtering and histogram equalization to obtain the i-th bearing image after preprocessing; then use the letterbox method to fill the defect blank space in the i-th bearing image after preprocessing to obtain the i-th bearing image after filling;

[0106] The i-th bearing image after filling is flipped, translated, mis-cut, and injected with noise to obtain a series of enhanced bearing images, thereby obtaining an enhanced bearing image dataset ;in, represents the jth enhanced bearing image, and m represents the total number of enhanced bearing images;

[0107] S5, yes Mark the defects in Defect calibration frame ,in, express The x-axis coordinate of the defect calibration frame, express The y-axis coordinate of the defect calibration frame, express The width of the defect calibration box, express The height of the defect calibration frame, express The area of the defect calibration box, express The angle of the defect calibration box.

[0108] S6, reference Figure 6 As shown in the figure, a defect detection network based on the YOLOv5 network is built, including: feature extraction module, feature fusion module, detection module, and used to Perform feature extraction and obtain Defect prediction results ;in, express The classification results, express The defect prediction box, express prediction confidence; in the defect detection network based on the YOLOv5 network, the feature extraction part introduces an attention mechanism module and adds multiple detection heads to effectively capture small-sized defects and improve the detection ability of minor defects; the feature fusion module uses a progressive approach to directly fuse low-level features with high-level features. From the beginning, it fuses two low-level features of different resolutions and gradually adds more high-level features until the top-level features output by the fusion feature extraction module are obtained. This design avoids the large semantic gap between non-adjacent layers caused by indirect interactions in traditional methods, ensuring that the features of the detected object contain both rich details and sufficient semantic understanding, which helps to improve detection accuracy.

[0109] S6-1. Build the feature extraction module, which includes: initial Conv module, S extraction blocks, attention mechanism module and SPPF module, and Processing is performed to obtain the j-th multidimensional bearing feature sequence { },in, express The s-th multidimensional bearing feature map in;

[0110] S6-1-1, will Input into the feature extraction module and after processing by the initial Conv module, the jth initial bearing feature map is obtained. ;

[0111] S6-1-2. Each extraction block includes: a Conv module and a C3 module; the C3 module is composed of several Conv modules; each Conv module is composed of a convolution layer, a normalization layer and an activation function;

[0112] When s=1, Input into the sth extraction block and processed by the sth Conv module to obtain The sth convolution bearing feature map , and then processed by the sth C3 module, we get The sth multidimensional bearing feature map ;

[0113] When s=2,3,…,S, The s-1th multidimensional bearing characteristic map in Input the sth extraction block for processing and get The sth multidimensional bearing feature map , which is output by the S-th extraction block The Sth multidimensional bearing feature map ;

[0114] S6-1-3, attention mechanism module, including: a global average pooling layer, a multi-layer perceptron and a channel weighted layer, and Processing is performed to obtain the j-th weighted feature map, and used as The S+1th multidimensional bearing feature map By learning the importance distribution of input features, the feature map strengthens the bearing defect characteristics and suppresses noise and redundant information. The activation value of the key area of the output feature map is improved, and the semantic information is more prominent, which helps the model to capture the essential characteristics of bearing defects more accurately.

[0115] S6-1-3-1, the global average pooling layer uses formula (1) to obtain the j-th one-dimensional vector :

[0116] (1)

[0117] In formula (1), express In the middle The grayscale value at the position, Indicates the image height, Indicates the image width;

[0118] S6-1-3-2, Multilayer Perceptron uses formula (2) to obtain the jth weight vector ;

[0119] (2)

[0120] In formula (2), and are the weight matrix and bias vector of the first fully connected layer in the multilayer perceptron, and are the weight matrix and bias vector of the second fully connected layer in the multilayer perceptron respectively; represents the activation function, Represents another activation function.

[0121] S6-1-3-3, the channel weighted layer uses formula (3) to obtain the j-th weighted feature map, and uses it as the S+1-th multidimensional bearing feature map :

[0122] (3)

[0123] In formula (3), express in Gray value at position;

[0124] S6-1-4, SPPF module consists of three pooling layers and one fully connected layer, and Process and perform multi-scale fusion to obtain the jth pyramid pooled bearing feature map, which is used as the S+2th multi-dimensional bearing feature map , so that the output feature map contains both local details and global semantics, enhancing the model's ability to detect bearing defects of different sizes.

[0125] S6-2, feature fusion module for the j-th multidimensional bearing feature sequence The feature maps in are processed in sequence, and the jth fused bearing feature sequence is obtained accordingly. ,in, express The sth fused bearing feature map in;

[0126] When s=1, After upsampling, the sth upsampled bearing feature map is obtained , so that The spatial size and j-th initial bearing characteristics The same, and using formula (4) to get The sth fused bearing feature map ;

[0127] (4)

[0128] In formula (4), represents the sth fusion learning weight.

[0129] When s=2,3,…,S+2, After upsampling, the sth upsampled bearing feature map is obtained , so that The spatial size and the s-1th fused bearing feature map The same, and use formula (5) to get the sth fused bearing feature map , and finally get the S+2th fused bearing feature map ;

[0130] (5)

[0131] S6-3, build the detection module, including: activation layer, bounding box regression layer, target confidence prediction layer and detection frame merging layer, and perform the fusion of the j-th bearing feature sequence Conduct testing and obtain Defect prediction results .

[0132] S6-3-1. Activate layer pairs Process and obtain The sth activated bearing feature map , and thus using formula (5) we can get The sth primary classification result :

[0133] (5)

[0134] In formula (5), represents the weight of the sth convolution kernel of the activation layer, represents the sth bias of the activation layer;

[0135] S6-3-2, Bounding Box Regression Layer Process and obtain The sth primary prediction box in ;

[0136] S6-3-3, target confidence prediction layer pair Processing is performed to obtain the sth primary prediction confidence , thus obtaining The sth primary prediction result , and then get the jth primary prediction result sequence .

[0137] S6-3-4, Detection frame merge layer pair The S+2 primary classification results are integrated to obtain Classification results ;

[0138] The detection frame merging layer fuses S+2 primary prediction frames to obtain Defect prediction box ,and ,in, express The x-axis coordinate of the defect prediction box, express The y-axis coordinate of the defect prediction box, express The width of the defect prediction box, express The height of the defect prediction box, The area of the defect prediction box in express The angle of the defect prediction box;

[0139] The detection frame merging layer fuses S+2 primary prediction confidences to obtain The prediction confidence , thus obtaining Defect prediction results ,Right now .

[0140] S7. Constructing the total loss function :

[0141] S7-1. Use formula (6) to obtain the j-th scale factor :

[0142] (6)

[0143] In formula (6), Is a positive number.

[0144] S7-2. Use formula (7) to get the j-th angle difference loss :

[0145] (7)

[0146] S7-3. Use formula (8) to obtain the IoU loss function , is the ratio of the intersection and union of the predicted box and the calibration box:

[0147] (8)

[0148] S7-4, use formula (9) to get the j-th center point distance loss :

[0149] (9)

[0150] In formula (9), represents the square of the Euclidean distance, Represents the diagonal length of the jth minimum bounding rectangle containing the defect prediction box and the calibration box; Indicates the minimum range of the width of the j-th defect prediction box and the calibration box; Indicates the minimum range of the height of the j-th defect prediction box and the calibration box.

[0151] S7-5, using formula (10) to construct The total loss function :

[0152] (10)

[0153] In formula (10), Represents the weight coefficient of the j-th angle difference loss.

[0154] S8. Use the gradient descent method to iteratively train the defect detection network and minimize the total loss function The network parameters are updated until the set total number of iterations is reached, thereby obtaining a defect detection model under the optimal parameters, which is used to perform defect detection on the bearing image to be inspected and output the defect location in the bearing image and its corresponding defect type.

[0155] Reference Figure 7 As shown in the figure, the detection process of the bearing outer raceway defect visual detection method based on deep learning in the application scenario is as follows:

[0156] First, according to the bearing model to be tested, select the appropriate position of the adjustment slot port 208, fix the active friction wheel left bearing 210 to the left adjustment frame 201, and fix the active friction wheel right bearing 216 to the right adjustment frame 215. Then, match the left and right ends of the active friction wheel 206 with the active friction wheel left bearing 210 and the active friction wheel right bearing 216 respectively to achieve the installation of the active friction wheel 206. The driven wheel friction wheel 205 is installed symmetrically with the active friction wheel 206. For installation methods, refer to The above steps; the left synchronous pulley 212 is fixedly connected to the left end of the active friction wheel 206 by bolts, and then the main left synchronous pulley 212 is connected to the rotating shaft of the stepper motor 211 through the synchronous belt 209, thereby realizing the cooperation between the active friction wheel 206 and the stepper motor 211; then pull up the pressing tongue 207, and when the bearing to be tested 3 is stably placed on the two friction wheels, put down the pressing tongue 207, so that the small roller 204 at the end of the pressing tongue 207 is in close contact with the bearing to be tested 3, and the installation of the bearing to be tested 3 can be realized.

[0157] Then turn on the dome light source 6 and the camera 407, and adjust the position of the camera 407 through the camera adjustment mechanism 4 to make the image clear. The same method is used for the other camera;

[0158] Then drive the stepper motor 211 to drive the bearing to be tested 3 to rotate a fixed angle, and the cameras on both sides collect images of the outer raceway surface of the bearing, and input the image into the trained defect detection network to obtain the detection result. If a defect is detected, the detection is stopped and the detection result is output. If no defect is detected, the stepper motor 211 is driven again to drive the bearing to be tested 3 to rotate a fixed angle and continue to obtain the bearing image and detect it. If no defect is still detected, the above process is repeated until the detection is completed after the bearing to be tested rotates one circle.

[0159] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A deep learning-based visual detection device for bearing outer raceway defects, characterized in that: include: A base (1), a bearing clamping and rotating mechanism (2) placed at the center of the base (1), a bearing to be tested (3) mounted on the bearing clamping and rotating mechanism (2), a right camera adjustment mechanism (4) and a left camera adjustment mechanism (5) symmetrically located on both sides of the bearing to be tested (3), a right camera (407) and a left camera located on the right camera adjustment mechanism (4) and the left camera adjustment mechanism (5), respectively, a dome light source (6) located above the bearing to be tested (3), a light source support frame (7) for fixing the dome light source (6), and a guide rail (8) for realizing translation of the right camera adjustment mechanism (4) and the left camera adjustment mechanism (5); The bearing outer raceway defect visual detection device is a device that achieves clamping and rotation of the bearing to be tested (3) through a bearing clamping and rotation mechanism (2), and provides lighting for a right camera (407) and a left camera through a dome light source (6). The positions of the right camera (407) and the left camera in the X-axis and Z-axis directions and the pitch angle are adjusted respectively through a right camera adjustment mechanism (4) and a left camera adjustment mechanism (5), thereby obtaining an image of the outer raceway of the bearing to be tested (3) using the right camera (407) and the left camera.

2. The deep learning-based visual detection device for bearing outer raceway defects according to claim 1, characterized in that: The bearing clamping and rotating mechanism (2) comprises: a stepper motor (211) fixed on a base (1); the stepper motor (211) is connected to an active friction wheel (206) via a synchronous belt (209); one end of the active friction wheel (206) is connected to a left adjustment frame (201) via an active friction wheel left bearing (210); and the other end is connected to a right adjustment frame (215) via an active friction wheel right bearing (216); the left adjustment frame (201) and the right adjustment frame (215) have the same structure, and are both provided with a semicircular adjustment groove (202) inside. The left bearing (210) and the right bearing (216) of the active friction wheel are both connected with their own adjustment grooves (202) in a clearance fit. The installation of the driven friction wheel (205) is symmetrical with the structure of the active friction wheel (206). A rectangular groove (217) is provided in the left adjustment frame (201). The bottom of the rectangular groove (217) is fixedly connected to one end of the spring (203). The other end of the spring (203) is fixedly connected to the pressing tongue (207). A small roller (204) is installed at the top of the pressing tongue (207), and the bottom of the small roller (204) is tangent to the bearing (3) to be tested. The bearing clamping and rotating mechanism (2) is configured to achieve installation and adjustment of different types of bearings to be tested (3) by adjusting the positions of the active friction wheel (206) and the driven friction wheel (205) in the adjustment groove (202), and to fix the bearing to be tested (3) by applying a downward pulling force to the pressing tongue (207) using a spring (203). The stepping motor (211) drives the active friction wheel (206) to rotate, thereby driving the rotation of the bearing to be tested (3).

3. The deep learning-based visual detection device for bearing outer raceway defects according to claim 2, characterized in that: The right camera adjustment mechanism (4) comprises: a slider platform (401), a Z-axis linear guide rail (402) fixedly connected to the slider platform (401), a camera support platform (403) fixedly connected to the Z-axis linear guide rail (402), a pitch adjustment device (406) fixedly connected to the camera support platform (403), and a right camera (407) fixedly connected to the pitch adjustment device (406); The right camera adjustment mechanism (4) realizes position adjustment of the right camera (407) in the X-axis and Y-axis directions by moving the slider platform (401) on the guide rail (8) and the camera support platform (403) on the Z-axis linear guide rail (402).

4. The deep learning-based visual detection device for bearing outer raceway defects according to claim 3 is characterized in that: The pitch adjustment device (406) comprises: a lower platform (40601), a small guide rail (40606) is installed on the top of the lower platform (40601), a translation plate (40609) is slidably connected to the small guide rail (40606), the translation plate (40609) is connected to a lead screw (40605) via a lead screw nut (40604), the top of the lead screw (40605) is fixedly connected to a hand wheel (40603), the lead screw (40605) is installed on the top of the lower platform (40601) via a lead screw fixing seat (40610), Sliding rods (40612) are installed on the left and right ends of the translation plate (40609). The sliding rods (40612) are movable through the inclined slots in the wedge block (40607). The wedge block (40607) is fixedly connected to one end of the bottom of the upper platform (40602). The other end of the bottom of the upper platform (40602) is fixedly connected to a rotating shaft seat (40608). The rotating shaft seat (40608) is connected to a support seat (40611) via a pin (40613). The support seat (40611) is installed on the top of the lower platform (40601). The pitch adjustment device (406) realizes the forward and backward movement of the translation plate (40609) by rotating the hand wheel (40603), and drives the upper platform (40602) to rotate relative to the lower platform (40601) along the pin shaft (40613), thereby realizing the pitch angle adjustment of the upper platform (40602) relative to the lower platform (40601), and further realizing the pitch angle adjustment of the right camera (407).

5. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 2, characterized in that: The steps include: S1. Install the bearing to be tested (3) between the active friction wheel (206) and the driven friction wheel (205) on the bearing clamping and rotating mechanism (2), and adjust the pressing tongue (207) so that the small roller (204) presses the inner ring of the bearing; S2, turning on the dome light source (6) and the left camera and the right camera (407), and adjusting the positions of the left camera and the right camera (407) respectively through the right camera adjustment mechanism (4) and the left camera adjustment mechanism (5) to make the image clear; S3, when the stepping motor (211) drives the bearing (3) to be tested to rotate one circle, the cameras on both sides collect images of the outer raceway surface of the bearing (3) to be tested for calibration, and form a bearing image data set, which is recorded as , represents the i-th bearing image, and n represents the total number of bearing images; S4, yes Perform Gaussian filtering and histogram equalization to obtain the i-th bearing image after preprocessing; then use the letterbox method to fill the defect blank space in the i-th bearing image after preprocessing to obtain the i-th bearing image after filling; The i-th bearing image after filling is flipped, translated, mis-cut, and injected with noise to obtain a series of enhanced bearing images, thereby obtaining an enhanced bearing image dataset ;in, represents the jth enhanced bearing image, and m represents the total number of enhanced bearing images; right Mark the defects in Defect calibration frame ,in, express The x-axis coordinate of the defect calibration frame, express The y-axis coordinate of the defect calibration frame, express The width of the defect calibration box, express The height of the defect calibration frame, express The area of the defect calibration box, express The angle of the defect calibration frame; S6. Build a defect detection network based on the YOLOv5 network, including: feature extraction module, feature fusion module, detection module, and use it to Perform feature extraction and obtain Defect prediction results ;in, express The classification results, express The defect prediction box, express Confidence in predictions; S7. Constructing the total loss function ; S8. Iteratively train the defect detection network using the gradient descent method and minimize the total loss function The network parameters are updated until the set total number of iterations is reached, thereby obtaining a defect detection model under the optimal parameters, which is used to perform defect detection on the bearing image to be inspected and output the defect location in the bearing image and its corresponding defect type.

6. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 5, characterized in that: S6 includes the following steps: S6-1. Build the feature extraction module, which includes: initial Conv module, S extraction blocks, attention mechanism module and SPPF module, and Processing is performed to obtain the j-th multidimensional bearing feature sequence { },in, express The s-th multidimensional bearing feature map in; S6-2, the feature fusion module performs the j-th multidimensional bearing feature sequence The feature maps in are processed in sequence, and the jth fused bearing feature sequence is obtained accordingly. ,in, express The sth fused bearing feature map in; S6-3, build the detection module, including: activation layer, bounding box regression layer, target confidence prediction layer and detection frame merging layer, and perform the fusion of the j-th bearing feature sequence Conduct testing and obtain Defect prediction results .

7. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 6, characterized in that: S6-1 includes the following steps: S6-1-1, will Input into the feature extraction module and after processing by the initial Conv module, the jth initial bearing feature map is obtained. ; S6-1-2. Each extraction block includes: a Conv module and a C3 module; the C3 module is composed of several Conv modules; each Conv module is composed of a convolution layer, a normalization layer and an activation function; When s=1, Input into the sth extraction block and processed by the sth Conv module to obtain The sth convolution bearing feature map in , and then processed by the sth C3 module, we get The sth multidimensional bearing feature map ; When s=2,3,…,S, The s-1th multidimensional bearing characteristic map in Input the sth extraction block for processing and obtain The sth multidimensional bearing feature map , which is output by the S-th extraction block The Sth multidimensional bearing feature map ; S6-1-3, the attention mechanism module includes: a global average pooling layer, a multi-layer perceptron and a channel weighted layer, and Processing is performed to obtain the j-th weighted feature map, and used as The S+1th multidimensional bearing feature map ; S6-1-4, the SPPF module consists of three pooling layers and one fully connected layer, and Processing is performed to obtain the jth pyramid pooled bearing feature map, which is used as the S+2th multidimensional bearing feature map .

8. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 7, characterized in that: S6-2 includes the following steps: When s=1, After upsampling, the sth upsampled bearing feature map is obtained , so that The spatial size and j-th initial bearing characteristics The same, and using formula (4) to get The sth fused bearing feature map ; (4) In formula (4), represents the sth fusion learning weight; When s=2,3,…,S+2, After upsampling, the sth upsampled bearing feature map is obtained , so that The spatial size and the bearing feature map after s-1 fusion The same, and use formula (5) to get the sth fused bearing feature map , and finally get the S+2th fused bearing feature map ; (5)。 9. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 8, characterized in that: S6-1-3 includes the following steps: S6-1-3-1, the global average pooling layer uses formula (1) to obtain the j-th one-dimensional vector : (1) In formula (1), express In the middle The grayscale value at the position, Indicates the image height, Indicates the image width; S6-1-3-2, the multilayer perceptron uses formula (2) to obtain the j-th weight vector ; (2) In formula (2), and are the weight matrix and bias vector of the first fully connected layer in the multilayer perceptron, and are the weight matrix and bias vector of the second fully connected layer in the multilayer perceptron respectively; represents the activation function, represents another activation function; S6-1-3-3, the channel weighted layer uses formula (3) to obtain the jth weighted feature map, and uses it as the S+1th multidimensional bearing feature map : (3) In formula (3), express in Grayscale value at position.

10. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 9, characterized in that: S6-3 includes the following steps: S6-3-1, the activation layer Process and obtain The sth activated bearing feature map , and thus using formula (5) we can get The sth primary classification result : (5) In formula (5), represents the sth convolution kernel weight of the activation layer, represents the s-th bias of the activation layer; S6-3-2, the bounding box regression layer Process and obtain The sth primary prediction box in ; S6-3-3, the target confidence prediction layer Processing is performed to obtain the sth primary prediction confidence , thus obtaining The sth primary prediction result , and then get the jth primary prediction result sequence ; S6-3-4, the detection frame merge layer pair The S+2 primary classification results are integrated to obtain Classification results ; The detection frame merging layer fuses S+2 primary prediction frames to obtain Defect prediction box ,and ,in, express The x-axis coordinate of the defect prediction box, express The y-axis coordinate of the defect prediction box, express The width of the defect prediction box, express The height of the defect prediction box, The area of the defect prediction box in express The angle of the defect prediction box; The detection frame merging layer fuses S+2 primary prediction confidences to obtain The prediction confidence , thus obtaining Defect prediction results ,Right now .

11. A method for visually detecting bearing outer raceway defects based on deep learning according to claim 10, characterized in that: S7 includes the following steps: S7-1. Use formula (6) to obtain the j-th scale factor : (6) In formula (6), is a positive number; S7-2. Use formula (7) to get the j-th angle difference loss : (7) S7-3, use formula (8) to get the j-th IoU loss function : (8) S7-4, use formula (9) to get the j-th center point distance loss : (9) In formula (9), represents the square of the Euclidean distance, Represents the diagonal length of the jth minimum bounding rectangle containing the defect prediction box and the calibration box; Indicates the minimum range of the width of the j-th defect prediction box and the calibration box; Indicates the minimum range of the height of the j-th defect prediction box and the calibration box; S7-5, using formula (10) to construct The total loss function : (10) In formula (10), Represents the weight coefficient of the j-th angle difference loss.