A bearing surface defect detection and classification method, apparatus, medium

CN122199564BActive Publication Date: 2026-09-1510TH RES INST OF CETC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610677881.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-09-15
Estimated Expiration
2046-05-18

AI Technical Summary

Technical Problem

[0006]本发明的目的在于:针对目前轴承表面缺陷检测严重依赖人工目检导致的主观性强、效率低下、漏检误检率高,以及传统单一通用深度学习模型在应对背景复杂、形态差异巨大的复合缺陷时特征提取能力不足、鲁棒性差且对高端GPU硬件算力依赖度高等技术问题,本发明提供了一种轴承表面缺陷检测与分类方法、设备、介质,采用“分而治之”的模块化多模型并行架构,通过部署四个针对不同缺陷物理特性(磕伤、压伤、脏污/生锈、线性缺陷)定制的专用检测模型进行特异性特征提取与增强,并基于预设差异化权重因子的加权置信度协同决策机制,实现了在常规CPU环境下对多种微弱及复杂表面缺陷的实时、高精度检测与分类,有效解决了特征混淆问题,显著降低了智能质检系统的硬件成本与部署门槛,提升了工业生产环境下的检测鲁棒性与自动化水平

Benefits of technology

1、本发明通过模块化多模型架构替代单一通用模型,解决了形态差异巨大的多种缺陷共存时特征混淆的问题。实验表明,本发明在轴承缺陷有无识别率上达到了99.7%,具体缺陷类别识别率达82%,有效弥补了人工检测的不确定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199564B_ABST
    Figure CN122199564B_ABST
Patent Text Reader

Abstract

The application discloses a bearing surface defect detection and classification method, equipment and medium, and relates to the technical field of part defect detection and machine vision, which is innovative in using a modular multi-model collaborative architecture for defect recognition and classification for bearing surface defects such as scuffing, indentation, dirt / rust and linearity. Each model focuses on feature extraction of a specific defect, and the model performance is optimized through data enhancement and targeted training. Finally, the independent confidence of each model output is weighted and calculated by applying a weight factor, and the highest weighted probability is selected by a comparator to determine the final defect category, and the normalized defect bounding box coordinates are simultaneously output, improving the accuracy and robustness of the detection. The application significantly improves the automation and intelligence level and has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of component defect detection and machine vision technology, specifically to a method, equipment, and medium for detecting and classifying surface defects in bearings. Background Technology

[0002] The statements in this section are provided only as background information in connection with this disclosure and may not constitute prior art.

[0003] As a key component in precision machinery, the quality of bearings directly affects the operating efficiency and safety of the equipment. Surface defects in bearings (such as dents, dents, dirt / rust, linear defects, etc.) can lead to a decline in their performance, seriously affecting the service life and stability of the equipment.

[0004] Currently, traditional bearing defect detection methods still rely on manual visual inspection or traditional machine vision algorithms, which have certain limitations. Manual inspection is inefficient and easily affected by the subjective factors, fatigue, and experience of the inspectors, leading to missed or false detections. Traditional machine vision algorithms have poor adaptability to complex backgrounds and minute defects, and cannot meet the high standards of "zero-defect" quality control required by modern manufacturing industries.

[0005] To improve the accuracy and efficiency of bearing defect detection, deep learning, especially convolutional neural networks (CNNs), has made significant progress in image recognition in recent years. By training deep neural network models, features can be automatically learned and accurately classified from massive amounts of data. This is particularly promising for use in industrial production lines for detecting surface defects in bearings. However, most current deep learning methods rely on a single, general-purpose model, which often exhibits low recognition accuracy and robustness when faced with multiple types of defects. Furthermore, industrial environments place stringent demands on real-time detection. Therefore, achieving rapid detection while maintaining high accuracy and adapting to conventional hardware environments is a pressing technical challenge in the field of intelligent industrial quality inspection. Summary of the Invention

[0006] The purpose of this invention is to address the problems of high subjectivity, low efficiency, and high false negative rates in bearing surface defect detection due to heavy reliance on manual visual inspection, as well as the insufficient feature extraction capabilities, poor robustness, and high dependence on high-end GPU hardware computing power of traditional single general-purpose deep learning models when dealing with complex defects with diverse backgrounds and shapes. This invention provides a bearing surface defect detection and classification method, device, and medium. It adopts a modular multi-model parallel architecture with a "divide and conquer" approach. By deploying four dedicated detection models customized for different defect physical characteristics (dents, crush marks, dirt / rust, and linear defects) for specific feature extraction and enhancement, and based on a weighted confidence collaborative decision-making mechanism with preset differentiated weight factors, it achieves real-time, high-precision detection and classification of various weak and complex surface defects in a conventional CPU environment. This effectively solves the feature confusion problem, significantly reduces the hardware cost and deployment threshold of intelligent quality inspection systems, and improves the robustness and automation level of detection in industrial production environments.

[0007] The technical solution of the present invention is as follows: A method for detecting and classifying surface defects in bearings, comprising: Step S1: Acquire the surface image of the bearing to be inspected and input it in parallel into four preset dedicated defect detection models; Step S2: Use four dedicated detection models to extract linear defect features, dirt or rust features, pressure marks features, and dent features from the bearing surface, and perform targeted feature enhancement processing. Step S3: Each dedicated detection model independently outputs the confidence score corresponding to the defect category. The confidence scores are weighted according to the preset weighting factors to obtain the weighted confidence score. Step S4: Input the four weighted confidence scores into the comparator, determine the final defect category based on the magnitude of the weighted confidence scores, and simultaneously output the corresponding bounding box coordinates and detection results.

[0008] Furthermore, the defect categories include: Linear defects, dirt or rust defects, dent defects, and bump defects.

[0009] Furthermore, the dent feature extraction process in step S2 includes: Step S101: Use ResNet50 as the backbone network to extract basic features; Step S102: Enhance the edge features of the dent by fixing the edge perception module with a Sobel-like kernel; Step S103: Utilize the multi-scale feature fusion module to capture local concave features of different sizes by executing 1×1, 3×3, and 5×5 convolutional structures in parallel; Step S104: Weighted fusion of basic features, edge features and multi-scale features, and dimensionality reduction using depthwise separable convolution.

[0010] Furthermore, the pressure injury feature extraction process in step S2 includes: Step S201: Use ResNet50, which integrates deformable convolutional networks, as the backbone network; Step S202: Enhance the spatial response of the geometric deformation features of the pressure injury area through a shape-aware attention mechanism; Step S203: Combine global average pooling and max pooling to achieve multi-scale feature fusion, and use the feature pyramid structure to understand the overall shape change.

[0011] Furthermore, the dirt or rust feature extraction process in step S2 includes: Step S301: Generate a spatial weight map using a channel attention mechanism to enhance the response to irregular texture regions; Step S302: Enhance the response of texture features by utilizing local binary mode, and improve robustness to environmental disturbances by combining illumination-invariant feature extraction technology.

[0012] Furthermore, the linear defect feature extraction process in step S2 includes: Step S401: Use the lightweight ResNet34 as the backbone network; Step S402: Improve line visibility in low-contrast environments using a contrast enhancement module; Step S403: Use orientation-sensitive convolution kernels to capture the features of thin lines at different angles and perform bi-branch prediction output.

[0013] Furthermore, each dedicated defect detection model employs a multi-task loss function. Joint training is performed using the following formula:

[0014] in: The classification loss function; The bounding box regression loss function; Predict loss based on confidence level; and This is the preset loss balance weighting factor.

[0015] Furthermore, the decision logic in steps S3 and S4 includes: Step S501: Each dedicated defect detection model first independently calculates the binary classification probability. , These correspond to linear defects, dirt or rust defects, dent defects, and bump defects, respectively. Step S502: Apply a confidence-weighted strategy, using preset weighting factors. The confidence scores of each specialized defect detection model are weighted, and the weighted confidence score is calculated. The formula is as follows:

[0016] Weighting factors for dent defects Improve the rate of identifying critical defects; Step S503: Select the defect type with the highest weighted probability as the main prediction category. When the highest weighted probability exceeds the preset threshold, it is determined that there is a defect; if the highest weighted probability is lower than the threshold, it is determined to be an intact sample.

[0017] The present invention also proposes an electronic device, comprising: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory to perform the method described above.

[0018] The present invention also proposes a computer-readable storage medium for storing instructions that, when executed, cause the method described above to be implemented.

[0019] In summary, the core technical solution proposed in this invention is a "divide and conquer dedicated model fusion architecture." This solution abandons the traditional approach of using a single general-purpose model to handle all defect types, instead decomposing the complex, multi-category defect detection task into multiple independent sub-tasks. For the unique physical characteristics of different defects (such as dents, dents, dirt, etc.), this invention tailors a dedicated deep learning detection model for each defect type and fuses the outputs of each model through a collaborative decision-making mechanism, thereby achieving comprehensive and accurate identification of multiple defects.

[0020] Compared with existing technologies, the advantages of this invention are: 1. This invention replaces a single general-purpose model with a modular multi-model architecture, solving the problem of feature confusion when multiple defects with vastly different morphologies coexist. Experiments show that this invention achieves a 99.7% recognition rate for the presence or absence of bearing defects and an 82% recognition rate for specific defect categories, effectively compensating for the uncertainties of manual inspection.

[0021] 2. This invention adopts a lightweight model design and supports multi-core parallel processing, achieving a detection speed of 0.852 seconds per sheet in a conventional CPU server environment, which fully meets the real-time quality inspection requirements of industrial production lines. It also breaks the dependence on high-end GPU hardware and reduces the cost of intelligent transformation for enterprises.

[0022] 3. By introducing edge enhancement, shape attention and dynamic resource allocation mechanisms, this invention can adaptively handle complex lighting changes, oil pollution interference and multi-scale defect features in industrial environments, significantly reducing false alarm rates and providing a practical intelligent solution for the quality control of precision mechanical parts. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0024] Figure 1 This is a flowchart of the bearing surface defect detection and classification method based on multi-model collaboration of the present invention; Figure 2 This is a schematic diagram of intact samples and samples with different surface defects in the bearing dataset of this invention; Figure 3 This is a framework diagram of the bearing surface defect detection and classification method based on multi-model collaboration of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0025] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0026] The features and performance of the present invention will be further described in detail below with reference to embodiments.

[0027] Example 1 Please see Figure 1 and Figure 3 A method for detecting and classifying surface defects in bearings, comprising: Step S1: Acquire the surface image of the bearing to be inspected and input it in parallel into four preset dedicated defect detection models; wherein, the four dedicated defect detection models are: Linear defect detection model, dirt or rust detection model, pressure damage detection model, dent damage detection model; Step S2: Using four dedicated inspection models, extract linear defect features, dirt or rust features, pressure marks, and dent features from the bearing surface (each feature is as follows). Figure 2 As shown in the figure, targeted feature enhancement processing is performed; specifically, each dedicated detection model uses its own dedicated backbone network to extract features and combines edge perception or attention mechanism modules to generate defect probability and coordinates; Step S3: Each dedicated detection model independently outputs the confidence score corresponding to the defect category. The confidence scores are weighted according to the preset weighting factors to obtain the weighted confidence score. The decision-making effect is optimized by strengthening the weighting factors of key defects. Step S4: Input the four weighted confidence scores into the comparator, determine the final defect category based on the magnitude of the weighted confidence scores, and simultaneously output the corresponding normalized bounding box coordinates and detection results.

[0028] In this embodiment, specifically, the defect categories include: Linear defects, dirt or rust defects, dent defects, and bump defects.

[0029] In this embodiment, specifically, the dent feature extraction process in step S2 includes: Step S101: In the process of impact damage detection, ResNet50 is used as the backbone network to extract basic features; Step S102: Enhance the edge features of the dent by fixing the edge perception module with a Sobel-like kernel; Step S103: Utilize the multi-scale feature fusion module to capture local concave features of different sizes (i.e., capture dent distortions of different sizes) by executing 1×1, 3×3, and 5×5 convolutional structures in parallel. Step S104: Weighted fusion of basic features, edge features and multi-scale features, and dimensionality reduction using depthwise separable convolution, finally outputting the binary classification probability of the damage and the coordinates of 5 normalized bounding boxes. Specifically, the impact detection model uses a ResNet50 backbone network, extracts edge features by fixing Sobel-like kernels, and captures local depressions of different sizes by combining 1×1, 3×3, and 5×5 parallel convolutions. Finally, it outputs the impact binary classification probability and the coordinates of 5 normalized bounding boxes.

[0030] In this embodiment, specifically, the pressure injury feature extraction process in step S2 includes: Step S201: In the crush damage detection process, ResNet50, which integrates a deformable convolutional network, is used as the backbone network; Step S202: Enhance the spatial response of the geometric deformation features of the pressure injury area through a shape-aware attention mechanism; Step S203: Combine global average pooling and max pooling to achieve multi-scale feature fusion, and use the feature pyramid structure to understand the overall shape changes; Specifically, the indentation detection model integrates a shape-aware attention mechanism to enhance geometric deformation features and uses a feature pyramid structure to fuse global contextual information to identify indentation areas on the bearing surface.

[0031] In this embodiment, specifically, the dirt or rust feature extraction process in step S2 includes: Step S301: During the dirt and rust detection process, a channel attention mechanism is used to generate a spatial weight map to enhance the response to irregular texture areas; Step S302: Enhance the response of texture features by utilizing Local Binary Pattern (LBP) and improve robustness to environmental disturbances by combining illumination-invariant feature extraction techniques (i.e., suppress ambient illumination and disturbances). Specifically, the dirt or rust detection model uses a channel attention mechanism (1×1 convolution + Sigmoid) to generate a spatial weight map, handle irregular erosion areas, and output a single normalized bounding box.

[0032] In this embodiment, specifically, the linear defect feature extraction process in step S2 includes: Step S401: Use the lightweight ResNet34 as the backbone network; Step S402: Improve line visibility in low-contrast environments using a contrast enhancement module; Step S403: Use orientation-sensitive convolution kernels to capture the features of thin lines at different angles and perform dual-branch prediction output; Specifically, the linear defect detection model uses a lightweight ResNet34 network and improves line visibility through a contrast enhancement module, specifically targeting fine stripe defects.

[0033] In this embodiment, specifically, each dedicated defect detection model employs a multi-task loss function. Joint training is performed using the following formula:

[0034] in: The classification loss function; The bounding box regression loss function; Predict loss based on confidence level; and This is the preset loss balance weighting factor.

[0035] In this embodiment, specifically, the decision logic in steps S3 and S4 includes: Step S501: Each dedicated defect detection model first independently calculates the binary classification probability. , ,Right now , , , These correspond to linear defects, dirt or rust defects, dent defects, and bump defects, respectively. Step S502: Apply a confidence-weighted strategy, using preset weighting factors. (These are the weighting factors for linear defects) Weighting factors for defects such as dirt or rust Weighting factors for pressure damage defects Weighting factors for dents and scratches (Set the weighting factor for dents and scratches) To achieve the highest level of accuracy in identifying critical defects, the confidence level (binary classification probability) of each specialized defect detection model was assessed. The weighted values ​​are then calculated to determine the weighted confidence level. The formula is as follows:

[0036] In this embodiment, specifically, the weighting factor of the dent defect is used. Improve the identification rate of critical defects; that is, by adjusting the weighting factor, strengthen the identification weight of critical defects (in this example, dent defects), thereby reducing the false negative rate; Step S503: Select the defect type with the highest weighted probability as the primary prediction category. When the highest weighted probability exceeds a preset threshold, it is determined that a defect exists; if the highest weighted probability is lower than the threshold, it is determined to be an intact sample. That is, this embodiment applies a threshold adaptive mechanism. Exceeding the preset threshold At that time, it was determined that a corresponding defect existed.

[0037] The bearing outer circle dataset used in this embodiment contains five types of samples: intact, dented, crushed, dirty / rusted, and linear defects (black / white lines). All defect image data are labeled, including defect category labels and corresponding bounding box coordinates.

[0038] In this embodiment, specifically, the impact detection model significantly improves its sensitivity to local distortions through the Sobel edge enhancement path; The indentation detection model uses deformable convolution to adaptively adjust the receptive field to cope with varying deformation scales; The dirt or rust detection model uses a channel attention mechanism to generate a spatial weight map to handle irregular corrosion areas; The linear defect detection model generates a fine feature map through dimensionality reduction, ensuring the ability to capture fine scratches.

[0039] Experimental results show that this method meets industrial-grade requirements in terms of both accuracy and efficiency. Under an Intel Xeon E5-2630 v4 processor environment, the single-image detection speed in single-threaded mode is 0.852 seconds, and the throughput after parallel optimization can reach 5-10 images / second. In terms of accuracy, the system achieves a defect detection rate of up to 99.7%, and a specific defect classification accuracy of 82%. This performance balances recognition accuracy and computational efficiency, effectively replacing traditional manual visual inspection and traditional single deep learning models.

[0040] In summary, this invention significantly improves the level of automated detection of bearing surface defects, providing an efficient and reliable solution for industrial quality inspection.

[0041] Based on the same technical concept, embodiments of the present invention also provide an electronic device that can implement the bearing surface defect detection and classification method provided in the above embodiments of the present invention. In one embodiment, the electronic device can be a server, a terminal device, or other electronic equipment. Figure 4 As shown, the electronic device may include: At least one processor and a memory connected to the at least one processor. In this embodiment of the invention, the specific connection medium between the processor and the memory is not limited. Figure 4 The example used is the connection between the processor and memory via a bus. The bus... Figure 4 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Buses can be divided into address buses, data buses, control buses, etc., but for ease of representation, [the specific bus type is not shown here]. Figure 4The processor is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, a processor can also be called a controller; there are no restrictions on the name.

[0042] In this embodiment of the invention, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can perform the bearing surface defect detection and classification method described above. The processor can implement... Figure 4 The functions of each module in the device shown.

[0043] The processor is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory and calling data stored in memory, it can monitor the device's various functions and process data, thereby enabling overall monitoring of the device.

[0044] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.

[0045] The processor can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the bearing surface defect detection and classification method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0046] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia cards, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), and electrically erasable programmable read-only memory (EPROM). Only memory (EEPROM), magnetic storage, magnetic disks, optical disks, etc. A memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. The memory in embodiments of this invention can also be a circuit or any other device capable of performing storage functions for storing program instructions and / or data.

[0047] By designing and programming the processor, the code corresponding to the bearing surface defect detection and classification method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the method described in the foregoing embodiments during operation. How to design and program the processor is a technique well-known to those skilled in the art and will not be elaborated upon here.

[0048] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a bearing surface defect detection and classification method described above.

[0049] In some alternative embodiments, the present invention also provides a method for detecting and classifying bearing surface defects, which can also be implemented as a program product including program code. When the program product is run on a device, the program code is used to cause the control device to perform the steps in the method for detecting and classifying bearing surface defects according to various exemplary embodiments of the present invention as described above.

[0050] It should be noted that although several units or sub-units of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Furthermore, although the operation of the method of the invention is described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0051] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can be implemented in one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs) containing computer-usable program code. The form of a computer program product implemented on ROM, optical memory, etc.

[0052] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a server, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0053] Program code for performing the operations of this invention can be written using any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0054] In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0055] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0056] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0057] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.

[0058] This background section is provided to generally present the context of the invention. The work of the currently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither expressly nor impliedly acknowledged as prior art to the invention.

Claims

1. A method of bearing surface defect detection and classification, the method comprising: include: Step S1: Acquire the surface image of the bearing to be inspected and input it in parallel into four preset dedicated defect detection models; Step S2: Use four dedicated detection models to extract linear defect features, dirt or rust features, pressure marks features, and dent features from the bearing surface, and perform targeted feature enhancement processing. Step S3: Each dedicated detection model independently outputs the confidence score corresponding to the defect category. The confidence scores are weighted according to the preset weighting factors to obtain the weighted confidence score. Step S4: Input the four weighted confidence scores into the comparator, determine the final defect category based on the weighted confidence scores, and simultaneously output the corresponding bounding box coordinates and detection results; The dent feature extraction process in step S2 includes: Step S101: Use ResNet50 as the backbone network to extract basic features; Step S102: Enhance the edge features of the dent by fixing the edge perception module with a Sobel-like kernel; Step S103: Utilize the multi-scale feature fusion module to capture local concave features of different sizes by executing 1×1, 3×3, and 5×5 convolutional structures in parallel; Step S104: Weighted fusion of basic features, edge features and multi-scale features, and dimensionality reduction using depthwise separable convolution; The decision logic in steps S3 and S4 includes: Step S501: Each special defect detection model first independently calculates a binary classification probability , Corresponding to linear defects, dirty or rusty defects, crush defects, and scratch defects, respectively; Step S502: applying a confidence weighting strategy, calculating a weighted confidence by a preset weight factor The confidence of each special defect detection model is weighted, and a weighted confidence is calculated The formula is as follows: By weighting factors of scratch defects Improving critical defect identification rate; Step S503: Select the defect type with the highest weighted probability as the main prediction category. When the highest weighted probability exceeds the preset threshold, it is determined that there is a defect; if the highest weighted probability is lower than the threshold, it is determined to be an intact sample.

2. A method of bearing surface defect detection and classification according to claim 1, wherein, The defect categories include: Linear defects, dirt or rust defects, dent defects, and bump defects.

3. A method of bearing surface defect detection and classification according to claim 2, wherein, The pressure injury feature extraction process in step S2 includes: Step S201: Use ResNet50, which integrates deformable convolutional networks, as the backbone network; Step S202: Enhance the spatial response of the geometric deformation features of the pressure injury area through a shape-aware attention mechanism; Step S203: Combine global average pooling and max pooling to achieve multi-scale feature fusion, and use the feature pyramid structure to understand the overall shape change.

4. The method of claim 3, wherein, The dirt or rust feature extraction process in step S2 includes: Step S301: Generate a spatial weight map using a channel attention mechanism to enhance the response to irregular texture regions; Step S302: Enhance the response of texture features by utilizing local binary mode, and improve robustness to environmental disturbances by combining illumination-invariant feature extraction technology.

5. A method of bearing surface defect detection and classification according to claim 4, wherein, The linear defect feature extraction process in step S2 includes: Step S401: Use the lightweight ResNet34 as the backbone network; Step S402: Improve line visibility in low-contrast environments using a contrast enhancement module; Step S403: Use orientation-sensitive convolution kernels to capture the features of thin lines at different angles and perform bi-branch prediction output.

6. The method for detecting and classifying bearing surface defects according to claim 5, characterized in that, Each special-purpose defect detection model adopts a multi-task loss function Joint training is performed, and the formula is as follows: in: is a classification loss function; The bounding box regression loss function; Predict loss based on confidence level; and This is the preset loss balance weighting factor.

7. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which executes the instructions stored in the memory to perform the method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions that, when executed, cause the method as described in any one of claims 1-6 to be implemented.