Bearing surface defect detection and repair evaluation method and system and medium
By combining the improved GDS-YOLOv5s model with dynamic convolution and the Ghost module, the feature extraction capability is enhanced, solving the problems of low efficiency of traditional detection methods and large computational complexity of the YOLOv5 model, and achieving efficient and accurate detection and repair evaluation of bearing surface defects.
Patent Information
- Application Number
- CN202510861570.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional manual inspection of bearing surface defects is inefficient and costly, while machine vision inspection is slow and has poor robustness. The YOLOv5 model has high computational complexity and slow inspection speed in bearing surface defect detection, making it difficult to meet industrial needs.
The improved GDS-YOLOv5s model is adopted. The Backbone and Neck parts of the YOLOv5s model are replaced by the C3-GDConv module. The dynamic convolution and Ghost modules are combined to enhance the feature extraction capability. The key area features are strengthened through the SGE attention mechanism. A bearing defect ontology knowledge model is constructed for reasoning and judgment.
It improves the speed and accuracy of bearing surface defect detection, achieves lightweight optimization of the model, improves detection efficiency and reliability, and provides an intelligent defect diagnosis and repair evaluation solution.
Smart Images

Figure CN120707543A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing surface defect detection, and in particular to a bearing surface defect detection and repair evaluation method, system and medium. Background Art
[0002] Bearings are core components in mechanical transmission systems. Surface defects can affect transmission efficiency and equipment life, making factory inspection crucial. Traditional manual inspection relies on technician experience, resulting in low efficiency and high labor costs (due to labor shortages). While machine vision inspection uses industrial cameras to capture images, extract features using edge detection and image filtering, and then classify using methods like support vector machines and multi-layered projections (MLPs), its practical application is limited by its slow speed and poor robustness.
[0003] In recent years, deep learning has shown increasing advantages in bearing surface defect detection. YOLOv5, a mature single-stage object detection algorithm, is highly effective and widely used in industrial defect detection. However, direct application to bearing surface defect detection faces challenges. Firstly, bearing surface defects vary significantly in brightness, type, texture, and size, making detection of subtle defects difficult. Secondly, the YOLOv5 model's complex structure, numerous parameters, and high computational complexity result in slow detection speeds. Summary of the Invention
[0004] The purpose of the present invention is to provide a bearing surface defect detection and repair evaluation method, system and medium, which can improve the accuracy of bearing surface defects and can infer and determine the repairability of bearing defects.
[0005] To solve the above technical problems, an embodiment of the present invention provides a bearing surface defect detection and repair evaluation method, comprising the following steps: Acquire bearing surface images; Low-level features of the bearing surface are extracted from the bearing surface image, and the low-level features are subjected to residual fusion and downsampling to obtain bearing surface feature images of different levels and scales. Refined features of the bearing surface of different scales are obtained by applying a multi-branch structure and dynamic calculation mechanism to the bearing surface feature images of different scales. Contextual enhancement is performed on the refined features of the bearing surface of a specific scale to output bearing surface feature images of different scales and rich in contextual information. The bearing surface feature image scale is amplified by difference, and the bearing surface feature images of different levels and scales are spliced according to the channel dimension to output a cross-scale fused bearing surface feature image; the cross-scale fused bearing surface feature image is subjected to lightweight aggregation of multi-source features and adaptive calibration of feature weights to obtain a cross-scale complementary bearing surface feature image; the key area features of the cross-scale complementary bearing surface feature image are enhanced to output a refined and highlighted image of the bearing surface feature; Predict the target category, bounding box, and confidence level of the refined salient image of the bearing surface features, and output the bearing surface defect detection results; Construct an ontology knowledge model of bearing defects and write semantic rules to reason about whether defective bearings can be repaired.
[0006] In some optional embodiments, the bearing surface defect detection result is output through a GDS-YOLOv5s model, and the GDS-YOLOv5s model structure is: The GDConv module, which is a fusion of the Ghost module and the dynamic convolution module, replaces the original BottleNeck module in the C3 module to form a C3-GDConv module; a C3 module in the Backbone part of the original YOLOv5s model is replaced by a C3-GDConv module, and a multi-branch structure and dynamic calculation mechanism are performed on the bearing surface feature images of different scales to obtain refined features of the bearing surfaces of different scales; a C3 module in the Neck part of the original YOLOv5s model is replaced by a C3-GDConv module, and lightweight aggregation of multi-source features and adaptive calibration of feature weights are performed on the cross-scale fused bearing surface feature images to obtain cross-scale complementary bearing surface feature images; The SGE attention mechanism is added to the Neck part of the original YOLOv5s model to strengthen the key area features of the bearing surface feature image that are complementary across scales, and output a refined and highlighted image of the bearing surface features.
[0007] In some optional embodiments, the GDConv module formed by fusing the Ghost module and the dynamic convolution module specifically includes: Dynamic convolution uses K parallel convolution kernels in each layer. The K parallel convolution kernels dynamically adjust the weights according to the characteristics of the input samples, and then dynamically aggregate the weights of the K parallel convolution kernels. The weight of each convolution kernel is By inputting a sample The characteristics of the dynamic calculation generation, dynamic aggregation expression is as follows: Where, and are weight function and bias function respectively, and Each convolution kernel is Weights and biases; the weight function determines the output of the model, and the bias function standardizes the baseline position of the model output; The Ghost module consists of two parts: dynamic convolution and ghost convolution. It first performs dynamic convolution on the features of the input sample and then performs ghost convolution. The feature extraction of ghost convolution is divided into two stages. The basic feature map of m channels is generated by traditional convolution, and linear transformation is applied to each basic feature map. Generate s-1 new feature maps, and concatenate the new feature maps with the original feature maps to obtain output channels; The workflow of the GDConv module is as follows: the Ghost module first generates basic features, which are divided into two paths, one path performs dynamic convolution and the other path is directly transmitted. The results of the two paths are input into the Concat module for splicing and fusion, and the results are output.
[0008] In some optional embodiments, the SGE attention mechanism is added to the Neck part of the original YOLOv5s model, specifically including: The input of the SGE attention mechanism is a cross-scale complementary bearing surface feature image, which is essentially Convolutional feature image, where C is the number of channels, is the spatial dimension; SGE splits the channel dimension of the convolution feature image into G groups, and each group performs the following operations independently: For each spatial position within a group , , , use the spatial average function to extract global statistical features: Where, is the local eigenvector of the i-th spatial position in the group, For global pooling, local features are compressed into a global semantic vector g, where m represents the number of local feature vectors; Use the global semantic vector g and each local feature vector Doing the dot product, we get the importance coefficient: Where, Represents the i-th local feature The importance coefficient of Importance coefficient Do spatial normalization: Where, is the normalized importance coefficient, is the mean of all importance coefficients, represents the variance of all importance coefficients, A constant to prevent division by zero; For each coefficient Introducing learnable parameters 、 , perform linear transformation on the normalized coefficients: Where, is the normalized importance coefficient, is the importance coefficient after linear transformation; Use sigmoid gating Generate attention weights and scale the importance coefficients after linear transformation , and get the enhanced feature vector : Where, is the sigmoid function, is the local eigenvector of the i-th spatial position in the group, is the enhanced feature vector of the local feature vector.
[0009] In some optional embodiments, the constructing of the bearing defect ontology knowledge model and the writing of semantic rules specifically include: A bearing surface defect ontology model is constructed, and the bearing surface defect categories are defined, namely, Bearing_surface is the bearing surface with defects, Defect_type is the identified bearing surface defect type, Defect_area is the area of the bearing surface groove or scratch defect, Defect_length is the length of the bearing surface scratch defect, Repair_cost is the cost required to repair the bearing surface defect, Repair_method is the repair method required if the bearing surface defect can be repaired, and Repairable_or_not indicates whether the bearing surface defect is repairable; and the corresponding attributes of the bearing surface defect category are defined to describe the type, size, repair cost, method and feasibility information of the bearing surface defect.
[0010] Write semantic rules based on bearing surface defect type, size, and repair cost.
[0011] In some optional embodiments, reasoning whether a bearing detected to be defective can be repaired specifically includes: The bearing surface defect information detected by the GDS-YOLOv5s model is converted into an ontology rule model. Combined with the SWRL rule library, the Drools rule engine is used for reasoning to determine whether the defect is repairable. If so, the corresponding repair method is provided.
[0012] An embodiment of the present invention also provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned bearing surface defect detection and repair evaluation method.
[0013] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the computer program can execute the above-mentioned bearing surface defect detection and repair evaluation method.
[0014] The bearing surface defect detection and repair evaluation method provided by the present invention has at least the following beneficial effects: In the C3-GDConv module, the Ghost module reduces the number of convolution kernels to reduce parameters and computational complexity, thereby improving model efficiency while maintaining or even enhancing the expressiveness of feature maps. Dynamic convolution offers stronger feature expression than standard convolution. Incorporating dynamic convolution into the Ghost module overcomes the feature extraction limitations of binary convolution while retaining the Ghost module's advantages of fewer parameters and lower computational complexity. This improvement increases network detection speed without compromising accuracy, achieving lightweight model optimization.
[0015] The SGE module generates attention masks through simple operations like dot products and normalization, requiring virtually no additional parameters or computation, yet effectively identifies bearing surface defects. It excels in detecting small defects, highlighting small target features by enhancing the spatial distribution of feature maps, thereby improving bearing surface inspection accuracy.
[0016] Intelligent analysis integrated with ontology reasoning effectively improves the reliability and decision-making transparency of bearing surface defect diagnosis, and provides innovative solutions for bearing condition monitoring and management and intelligent manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flow chart of a bearing surface defect detection and repair evaluation method provided according to one embodiment of the present invention; Figure 2 is a schematic diagram of a dynamic convolution structure provided according to an embodiment of the present invention; Figure 3 is a schematic diagram of a Ghost module provided according to an embodiment of the present invention; Figure 4 is a schematic diagram of a GDConv module provided according to an embodiment of the present invention; Figure 5 is a schematic diagram of a C3-GDConv module provided according to an embodiment of the present invention; Figure 6 is a schematic diagram of a SEG structure provided according to an embodiment of the present invention; Figure 7 is a schematic diagram of a GDS-YOLOv5s model provided according to an embodiment of the present invention; Figure 8 is a schematic diagram of a flow chart for detecting a bearing surface based on a GDS-YOLOv5s model according to an embodiment of the present invention; Figure 9 is a schematic diagram of a bearing surface defect body model provided according to an embodiment of the present invention; Figure 10 is a schematic diagram of a process of reasoning using a bearing surface defect ontology model according to an embodiment of the present invention; DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0020] An embodiment of the present invention relates to a method for detecting and repairing bearing surface defects and evaluating the same. The implementation details of the method for detecting and repairing bearing surface defects of this embodiment are described in detail below. The following content is only provided for the convenience of understanding the implementation details and is not necessary for implementing this solution.
[0021] The specific process of the bearing surface defect detection and repair evaluation method of this embodiment can be as follows: Figure 1 Shown, including: Step 101, acquiring a bearing surface image; Types of bearing surface defects include grooves, abrasions, and scratches. Use the LabelImg image annotation tool to annotate bearing surface defect images. The collected bearing surface images are divided into training, validation, and test sets in an 8:1:1 ratio.
[0022] Step 102: Extract low-level bearing surface features from the bearing surface image, perform residual fusion and downsampling on the low-level bearing surface features to obtain bearing surface feature images of different levels and scales; obtain refined bearing surface features of different scales by performing multi-branch structure and dynamic calculation on the bearing surface feature images of different scales; and output bearing surface feature images of different scales and rich in contextual information by performing context enhancement on the refined bearing surface features of a specific scale. The GDConv module, which is a fusion of the Ghost module and the dynamic convolution module, replaces the original BottleNeck module in the C3 module to form a C3-GDConv module. A C3 module in the Backbone part of the original YOLOv5s model is replaced with the C3-GDConv module. The multi-branch structure and dynamic calculation mechanism are used to obtain detailed features of the bearing surface at different scales. Dynamic convolution structure such as Figure 2 As shown in the figure, each layer of dynamic convolution uses K parallel convolution kernels, which dynamically adjust the weights according to the characteristics of the input samples, and then dynamically aggregate the weights of the K parallel convolution kernels; the weight of each convolution kernel is By inputting a sample The characteristics of the dynamic calculation generation, dynamic aggregation expression is as follows: Where, and are weight function and bias function respectively, and They are the weights and biases of each convolution kernel respectively; the weight function determines the output of the model, and the bias function standardizes the baseline position of the model output; The Ghost module consists of two parts: dynamic convolution and ghost convolution. It first performs dynamic convolution on the features of the input sample and then performs ghost convolution. The feature extraction of ghost convolution is divided into two stages. The basic feature map of m channels is generated by traditional convolution, and linear transformation is applied to each basic feature map. Generate s-1 new feature maps, and concatenate the new feature maps with the original feature maps to obtain output channels; Ghost modules such as Figure 3 As shown in the figure, the input is split into multiple branches by dynamic convolution, and each branch is processed and fused with the identity mapping to output the result.
[0023] GDConv module such as Figure 4 As shown in the figure, the workflow of the GDConv module is as follows: the Ghost module first generates basic features, which are divided into two paths, one path performs dynamic convolution and the other path is directly transmitted. The results of the two paths are input into the Concat module together for splicing and fusion, and the results are output.
[0024] C3-GDConv module such as Figure 5 As shown in the figure, the workflow of the C3-GDConv module is as follows: the input is divided into two paths, one is fed into GDConv through Conv, and the other is directly fed into Conc. The results of both paths are fed into Concat and then output through Conv.
[0025] Step 103: amplify the scale of the bearing surface feature image by difference, splice the bearing surface feature images of different levels and scales according to the channel dimension, and output a cross-scale fused bearing surface feature image; perform lightweight aggregation of multi-source features and adaptive calibration of feature weights on the cross-scale fused bearing surface feature image to obtain a cross-scale complementary bearing surface feature image; enhance key area features of the cross-scale complementary bearing surface feature image, and output a refined and highlighted bearing surface feature image; A C3 module in the Neck part of the original YOLOv5s model is replaced with a C3-GDConv module. The cross-scale fused bearing surface feature image is subjected to lightweight aggregation of multi-source features and adaptive calibration of feature weights to obtain a cross-scale complementary bearing surface feature image. The SGE attention mechanism is added to the Neck part of the original YOLOv5s model to strengthen the key area features of the bearing surface feature image that are complementary across scales, and output a refined and highlighted image of the bearing surface features.
[0026] The input of the SGE attention mechanism is a cross-scale complementary bearing surface feature image, which is essentially Convolutional feature image, where C is the number of channels, is the spatial dimension; SGE splits the channel dimension of the convolution feature image into G groups, and each group performs the following operations independently: For each spatial position within a group , , , use the spatial average function to extract global statistical features: Where, is the local eigenvector of the i-th spatial position in the group, For global pooling, local features are compressed into a global semantic vector g, where m represents the number of local feature vectors; Use the global semantic vector g and each local feature vector Doing the dot product, we get the importance coefficient: Where, Represents the i-th local feature The importance coefficient of Importance coefficient Do spatial normalization: Where, is the normalized importance coefficient, is the mean of all importance coefficients, represents the variance of all importance coefficients, A constant to prevent division by zero; For each coefficient Introducing learnable parameters 、 , perform linear transformation on the normalized coefficients: Where, is the normalized importance coefficient, is the importance coefficient after linear transformation; Use sigmoid gating Generate attention weights and scale the importance coefficients after linear transformation , and get the enhanced feature vector : Where, is the sigmoid function, is the local eigenvector of the i-th spatial position in the group, is the enhanced feature vector of the local feature vector.
[0027] SGE structure is as follows Figure 6 , the figure shows the input The convolution feature image is processed by global average pooling, normalization, position-by-position dot product, and sign function operation, combined with residual connection, to The convolution feature image is output after enhancement processing.
[0028] The GDS-YOLOv5s model structure is as follows Figure 7 As shown in the figure, the GDS-YOLOv5s model is modified based on the YOLOv5s model as follows: the C3 module in the Backbone and Neck parts of the original YOLOv5s model is replaced with the C3-GDConv module, and the SGE attention mechanism is added to the Neck part of the original YOLOv5s model; Step 104: predict the target category, bounding box, and confidence level of the refined and highlighted image of the bearing surface features, and output the bearing surface defect detection result; The flow chart of bearing surface detection based on GDS-YOLOv5s model is as follows Figure 8 As shown in the figure, an image containing bearing surface defects is input. After the GDS-YOLOv5s model performs detection and recognition, the output is a bearing surface recognition result image with defects marked.
[0029] Step 105 : construct an ontology knowledge model of bearing defects and compile semantic rules to reason whether a bearing detected to have defects can be repaired.
[0030] Construct the bearing surface defect ontology model. The bearing surface defect ontology model is as follows: Figure 9As shown in the figure, the definition of bearing surface defect categories is shown, namely Bearing_surface is the bearing surface with defects, Defect_type is the identified bearing surface defect type, Defect_area is the area of the bearing surface groove or scratch defect, Defect_length is the length of the bearing surface scratch defect, Repair_cost is the cost required to repair the bearing surface defect, Repair_method is the repair method required if the bearing surface defect can be repaired, Repairable_or_not indicates whether the bearing surface defect is repairable; and the corresponding attributes of the bearing surface defect category are defined, describing the type, size, repair cost, method and feasibility information of the bearing surface defect.
[0031] Write semantic rules based on bearing surface defect type, size, and repair cost.
[0032] The bearing surface defect information detected by the GDS-YOLOv5s model is converted into an ontology rule model. Combined with the SWRL rule library, the Drools rule engine is used for reasoning to determine whether the defect is repairable. If so, the corresponding repair method is provided.
[0033] The process of reasoning using the bearing surface defect ontology model is as follows: Figure 10 As shown in the figure, the ontology definition classes (such as bearing surface, defect type, etc.) on the left are displayed, instances are created based on the classes in the middle (such as bearing surface instances and defect-related attribute instances), and the ontology reasoning engine on the right uses object attributes to associate instances to achieve structuring and reasoning of bearing defect knowledge.
[0034] The steps of the various methods above are divided only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are within the scope of protection of the present invention. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of the invention.
[0035] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0036] That is, those skilled in the art will understand that all or part of the steps in the above-described method embodiments can be implemented by instructing the relevant hardware through a program. The program is stored in a storage medium and includes a number of instructions for causing a device (such as a microcontroller or chip) or a processor to execute all or part of the steps in the method embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0037] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A bearing surface defect detection and repair evaluation method, characterized in that: The method comprises: Acquire bearing surface images; Low-level features of the bearing surface are extracted from the bearing surface image, and the low-level features are subjected to residual fusion and downsampling to obtain bearing surface feature images of different levels and scales. Refined features of the bearing surface of different scales are obtained by applying a multi-branch structure and dynamic calculation mechanism to the bearing surface feature images of different scales. Contextual enhancement is performed on the refined features of the bearing surface of a specific scale to output bearing surface feature images of different scales and rich in contextual information. The bearing surface feature image scale is amplified by difference, and the bearing surface feature images of different levels and scales are spliced according to the channel dimension to output a cross-scale fused bearing surface feature image; the cross-scale fused bearing surface feature image is subjected to lightweight aggregation of multi-source features and adaptive calibration of feature weights to obtain a cross-scale complementary bearing surface feature image; the key area features of the cross-scale complementary bearing surface feature image are enhanced to output a refined and highlighted image of the bearing surface feature; Predict the target category, bounding box, and confidence level of the refined salient image of the bearing surface features, and output the bearing surface defect detection results; Construct an ontology knowledge model of bearing defects and write semantic rules to reason about whether defective bearings can be repaired.
2. The bearing surface defect detection and repair evaluation method according to claim 1, characterized in that: The bearing surface defect detection results are output through the GDS-YOLOv5s model, and the GDS-YOLOv5s model structure is: The GDConv module, which is a fusion of the Ghost module and the dynamic convolution module, replaces the original BottleNeck module in the C3 module to form a C3-GDConv module; a C3 module in the Backbone part of the original YOLOv5s model is replaced by a C3-GDConv module, and a multi-branch structure and dynamic calculation mechanism are performed on the bearing surface feature images of different scales to obtain refined features of the bearing surfaces of different scales; a C3 module in the Neck part of the original YOLOv5s model is replaced by a C3-GDConv module, and lightweight aggregation of multi-source features and adaptive calibration of feature weights are performed on the cross-scale fused bearing surface feature images to obtain cross-scale complementary bearing surface feature images; An SGE attention mechanism is added to the Neck part of the original YOLOv5s model to strengthen the key area features of the bearing surface feature image that are complementary across scales, and output a refined and highlighted image of the bearing surface features.
3. The bearing surface defect detection and repair evaluation method according to claim 2, characterized in that: The GDConv module, which is formed by fusing the Ghost module and the dynamic convolution module, specifically includes: Dynamic convolution uses K parallel convolution kernels in each layer. The K parallel convolution kernels dynamically adjust the weights according to the characteristics of the input samples, and then dynamically aggregate the weights of the K parallel convolution kernels. The weight of each convolution kernel is By inputting a sample The characteristics of the dynamic calculation generation, dynamic aggregation expression is as follows: Where, and are weight function and bias function respectively, and Each convolution kernel is Weights and biases; the weight function determines the output of the model, and the bias function standardizes the baseline position of the model output; The Ghost module consists of two parts: dynamic convolution and ghost convolution. It first performs dynamic convolution on the features of the input sample and then performs ghost convolution. The feature extraction of ghost convolution is divided into two stages. The basic feature map of m channels is generated by traditional convolution, and linear transformation is applied to each basic feature map. Generate s-1 new feature maps, and concatenate the new feature maps with the original feature maps to obtain output channels; The workflow of the GDConv module is as follows: the Ghost module first generates basic features, which are divided into two paths, one path performs dynamic convolution and the other path is directly transmitted. The results of the two paths are input into the Concat module for splicing and fusion, and the results are output.
4. The bearing surface defect detection and repair evaluation method according to claim 2, characterized in that: The SGE attention mechanism is added to the Neck part of the original YOLOv5s model. The SEG module process is as follows: The input of the SGE attention mechanism is a cross-scale complementary bearing surface feature image, which is essentially Convolutional feature image, where C is the number of channels, is the spatial dimension; SGE splits the channel dimension of the convolution feature image into G groups, and each group performs the following operations independently: For each spatial position within a group , , , use the spatial average function to extract global statistical features: Where, is the local eigenvector of the i-th spatial position in the group, For global pooling, local features are compressed into a global semantic vector g, where m represents the number of local feature vectors; Use the global semantic vector g and each local feature vector Doing the dot product, we get the importance coefficient: Where, Represents the i-th local feature The importance coefficient of Importance coefficient Do spatial normalization: Where, is the normalized importance coefficient, is the mean of all importance coefficients, represents the variance of all importance coefficients, A constant to prevent division by zero; For each coefficient Introducing learnable parameters 、 , perform linear transformation on the normalized coefficients: Where, is the normalized importance coefficient, is the importance coefficient after linear transformation; Use sigmoid gating Generate attention weights and scale the importance coefficients after linear transformation , and get the enhanced feature vector : Where, is the sigmoid function, is the local eigenvector of the i-th spatial position in the group, is the enhanced feature vector of the local feature vector.
5. The bearing surface defect detection and repair evaluation method according to claim 1, characterized in that: The construction of the bearing defect ontology knowledge model and the writing of semantic rules specifically include: Construct a bearing surface defect ontology model and define bearing surface defect categories, including Bearing_surface, which represents the bearing surface with defects; Defect_type, which represents the identified bearing surface defect type; Defect_area, which represents the area of the bearing surface groove or scratch defect; Defect_length, which represents the length of the bearing surface scratch defect; Repair_cost, which represents the cost of repairing the bearing surface defect; Repair_method, which represents the repair method required if the bearing surface defect can be repaired; and Repairable_or_not, which represents whether the bearing surface defect is repairable. Furthermore, define the corresponding attributes of the bearing surface defect category to describe the type, size, repair cost, method, and feasibility of the bearing surface defect. Write semantic rules based on bearing surface defect type, size, and repair cost.
6. The bearing surface defect detection and repair evaluation method according to claim 1, characterized in that: The reasoning on whether the defective bearing can be repaired specifically includes: The bearing surface defect information detected by the GDS-YOLOv5s model is converted into an ontology rule model. Combined with the SWRL rule library, the Drools rule engine is used for reasoning to determine whether the defect is repairable. If so, the corresponding repair method is provided.
7. A computer system, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the bearing surface defect detection and repair evaluation method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is run by a processor, it can execute any one of the bearing surface defect detection and repair evaluation methods defined in claims 1 to 6.