Bearing ring surface defect detection method based on improved YOLOv11 network
By improving the YOLOv11 network, introducing a receptive field coordinate attention convolution module and a surface detail fusion module, and combining it with the Focaler-DIoU loss function, the problems of insufficient feature extraction and insufficient positioning accuracy of the YOLOv11 network in bearing ring surface defect detection are solved, achieving more efficient defect detection and positioning.
Patent Information
- Application Number
- CN202511569641.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-06
AI Technical Summary
The existing YOLOv11 network is insufficient in extracting the features of small polymorphic defects in bearing ring surface defect detection, is easily affected by complex textures, and has low positioning accuracy, resulting in a high rate of missed detections and serious false detections.
The YOLOv11 network is improved by introducing a receptive field coordinate attention convolution module, a surface detail fusion module, and a Focaler-DIoU loss function. This optimizes the loss functions for feature extraction, feature fusion, and localization, thereby enhancing the detection performance for multi-scale and multi-morphological defects.
It significantly improves the network model's ability to extract features from minute defects, enhances the detection and localization accuracy of multi-scale and multi-morphological defects, reduces the false negative rate, and strengthens the robustness and convergence efficiency in locating irregular defects.
Smart Images

Figure CN121481949A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a bearing ring surface defect detection method, in particular to a bearing ring surface defect detection method based on an improved YOLOv11 network, and belongs to the technical field of industrial visual detection. BACKGROUND
[0002] As a core bearing component, the surface quality of a bearing ring plays a decisive role in the overall performance of the bearing. In the industrial production process, due to factors such as material and processing technology, scratches, black spots, pits and other defects will inevitably occur on the surface of the bearing ring. If not detected in time, it will affect the running accuracy and reliability of the bearing, and even cause serious safety accidents.
[0003] At present, the automatic defect detection technology based on machine vision has gradually replaced the traditional manual visual inspection. The single-stage target detection algorithm represented by the YOLO series has an excellent balance between detection speed and accuracy, and has been widely used in the field of industrial detection. However, the existing general target detection network such as YOLOv11 still has unsatisfactory effect when directly applied to the bearing ring defect detection scene.
[0004] Firstly, the defect morphology of the bearing ring is diverse, and the size difference is significant. There are not only large-area linear scratches, but also pixel-size extremely small point-like black spots, which puts high requirements on the feature extraction capability of the network. Secondly, after grinding processing, the surface of the bearing ring will form complex and directional metal processing texture. These textures are similar to some linear defect features on the image, and are easy to interfere with the detection model, leading to false detection. Finally, the existing network is easy to lose the spatial and detail information of the small defects in the multiple downsampling process, and it is difficult to realize the effective alignment and interaction of different level features in the feature fusion, resulting in high missing detection rate of small defects and insufficient boundary box regression accuracy of irregular shape defects. SUMMARY
[0005] Based on the above background, the purpose of the present application is to provide a bearing ring surface defect detection method based on an improved YOLOv11 network, which solves the technical problems of the existing detection network in processing bearing ring surface defects, such as insufficient extraction of small multi-morphology defect features, easy interference in complex texture background, and low positioning accuracy.
[0006] In order to achieve the above-mentioned purpose of the application, the present application provides the following technical scheme:
[0007] A bearing ring surface defect detection method based on an improved YOLOv11 network, the method comprising the following steps:
[0008] An improved YOLOv11 network model is constructed based on a YOLOv11 network architecture with a backbone network, a neck network and a head network; wherein in the backbone network and the neck network, the original standard convolution module of the YOLOv11 network architecture is replaced by a receptive field coordinate attention convolution module; on three feature map paths of different scales output from the neck network to the head network, a surface detail fusion module is respectively arranged, which is used for processing the features output by the neck network and then inputting them into the head network; the positioning loss function of the improved YOLOv11 network model is configured as a Focaler-DIoU loss function;
[0009] A bearing ring surface image is acquired and processed to form a data set, and the improved YOLOv11 network model is trained using the data set;
[0010] A bearing ring surface image to be detected is acquired and input into the trained improved YOLOv11 network model to obtain surface defect information of the bearing ring to be detected.
[0011] Preferably, the processing steps of the receptive field coordinate attention convolution module specifically include:
[0012] Grouping convolution operation, normalization and nonlinear activation are performed on the input feature map to generate receptive field spatial features;
[0013] The input feature map is respectively subjected to average pooling along the height direction and the width direction, and the pooled features are spliced, convolved, normalized and nonlinearly activated, and then twice convolved and Sigmoid activated to generate coordinate attention weights;
[0014] The receptive field spatial features and the coordinate attention weights are weighted to generate the final output feature map.
[0015] Preferably, the receptive field spatial features and the coordinate attention weights are weighted, specifically including:
[0016] The receptive field spatial features are subjected to shape adjustment processing, and then element-wise multiplied with the coordinate attention weights.
[0017] Preferably, the processing steps of the surface detail fusion module specifically include:
[0018] Shallow high-resolution features from the backbone network and deep semantic features from the up-sampling path of the neck network are received;
[0019] perform feature aggregation on the channel dimension of the shallow high-resolution features and the deep semantic features, and generate first attention weights through a first attention module;
[0020] weight the first attention weights with the shallow high-resolution features and the deep semantic features respectively, to generate optimized shallow features and optimized deep features;
[0021] stack the optimized shallow features and the optimized deep features, and generate final fusion weights through a second attention module;
[0022] perform dynamic weighted fusion on the optimized shallow features and the optimized deep features according to the final fusion weights, to generate a final output feature map.
[0023] Preferably, the first attention module and the second attention module are both modules based on channel and spatial double attention.
[0024] Preferably, the processing steps of the surface detail fusion module further include:
[0025] Before performing feature aggregation on the channel dimension of the shallow high-resolution features and the deep semantic features, a spatial alignment process is performed on the shallow high-resolution features using deformable convolution; wherein the spatial alignment process adjusts the sampling grid points of standard convolution by learning the two-dimensional offset of the sampling position, to compensate for the spatial feature misalignment between the shallow high-resolution features and the deep semantic features caused by multiple down-sampling and up-sampling operations.
[0026] Preferably, the calculation steps of the Focaler-DIoU loss function specifically include:
[0027] calculate the intersection over union (IoU) value between the predicted bounding box and the real bounding box;
[0028] calculate a dynamic weight adjustment factor according to the relationship between the IoU value and preset lower and upper threshold values;
[0029] calculate a DIoU loss value based on the center point distance between the predicted bounding box and the real bounding box, and the diagonal length of the minimum enclosing box containing the predicted bounding box and the real bounding box;
[0030] weight the DIoU loss value with the dynamic weight adjustment factor to obtain the final Focaler-DIoU loss.
[0031] Preferably, the construction steps of the backbone network specifically include:
[0032] The input feature map is passed through a receptive field coordinate attention convolution module, and then sequentially passed through multiple receptive field coordinate attention convolution modules connected in series and receptive field coordinate attention convolution modules combined with parallel convolution layer structures, and then sequentially passed through an improved spatial pyramid pooling module and a cross-stage local pyramid compression attention mechanism module.
[0033] As a preference, the step of constructing the neck network specifically comprises:
[0034] A top-down upsampling path and a bottom-up feature fusion path are set up.
[0035] In the upsampling path, high-level semantic features are fused with features of the same scale from the backbone network through upsampling operations and splicing operations.
[0036] In the feature fusion path, features output by the upsampling path are fused with features of the next level through splicing operations.
[0037] Wherein, the convolution operations in all paths are receptive field coordinate attention convolution modules or receptive field coordinate attention convolution modules combined with parallel convolution layer structures.
[0038] Compared with the prior art, the present application has the following advantages:
[0039] The bearing ring surface defect detection method based on the improved YOLOv11 network can significantly improve the feature extraction capability of the network model for micro defects, enhance the detection performance of the network model for multi-scale and multi-form defects, and improve the positioning accuracy and convergence efficiency of the network model for irregular defects, thereby effectively overcoming the technical difficulties of the network model in the prior art in bearing ring surface defect detection.
[0040] The receptive field coordinate attention convolution module is introduced to replace the original standard convolution, the convolution kernel parameters are dynamically adjusted, the adaptive weight distribution of different scale features is realized, and the coordinate attention mechanism is combined, the long-distance spatial interaction relationship can be accurately captured, the feature response of important channels can be strengthened, and therefore the feature extraction and positioning capability of the network model for local micro defects on the surface of the bearing ring can be effectively improved, and the missed detection rate can be reduced.
[0041] The surface detail fusion module is arranged before the detection head of the network model, through a hierarchical alignment double attention fusion mechanism, the backbone network extracted shallow high-resolution features rich in details and the neck network output deep features rich in semantics are deeply interacted and dynamically weighted and fused, the spatial information loss and feature misplacement problems caused by multiple down-sampling are solved, and the comprehensive feature representation capability of the network model on multi-scale defects with different sizes and shapes is significantly enhanced;
[0042] The Focaler-DIoU is used as a new positioning loss function, by introducing a dynamic weight adjustment factor, the model can pay more attention to the samples difficult to regress in the training process, and by directly minimizing the center point distance between the predicted frame and the real frame, the gradient instability problem caused by the aspect ratio item in the traditional CIoU loss is avoided, the positioning robustness and convergence efficiency of the network model on small and complex shape defects are significantly improved, and the predicted bounding box is more compact and accurate. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.
[0044] Figure 1 Fig. 1 is a network structure schematic diagram of the improved YOLOv11 network model in the present application;
[0045] Figure 2 Fig. 2 is a structure schematic diagram of the receptive field coordinate attention convolution module in the present application;
[0046] Figure 3 Fig. 3 is a structure schematic diagram of the surface detail fusion module in the present application;
[0047] Figure 4 Fig. 4 is an actual application diagram of a detection system of a bearing ring surface defect detection method based on the improved YOLOv11 network of the present application;
[0048] Figure 5 Fig. 5 is a loss function convergence comparison diagram of each improved scheme in the ablation experiment in the present application;
[0049] Figure 6 Fig. 6 is a test result diagram of each network model in the comparative experiment on the bearing inner ring defect data set in the present application;
[0050] Figure 7 Fig. 7 is a visual output result diagram of each network model of the comparative experiment on the bearing inner ring defect area in the present application;
[0051] Figure 8 is the test result figure of each network model in the comparative experiment of the present application on the NEU-DET surface defect data set. DETAILED DESCRIPTION
[0052] The technical solutions of the present application will be further described in detail below with specific examples and in conjunction with the drawings. It should be understood that the implementation of the present application is not limited to the following examples, and any form of modification and / or change made to the present application will fall within the scope of protection of the present application.
[0053] In the present application, all parts and percentages are by weight unless otherwise specified, and the equipment and raw materials used can be purchased from the market or are commonly used in the art. The methods in the following examples are conventional methods in the art unless otherwise specified. The components or equipment in the following examples are general standard components or components known to those skilled in the art unless otherwise specified, and their structure and principles are known to those skilled in the art through technical manuals or through conventional experimental methods.
[0054] The embodiments of the present application are described in detail below in conjunction with the drawings, and in the following detailed description, many specific details are set forth in order to provide a thorough understanding of the embodiments of the present application. However, one or more embodiments can be implemented by those skilled in the art without these specific details.
[0055] Bearing ring defects have high variability, diverse morphology and significant size difference, which puts higher requirements on the local feature extraction capability of the network model. At the same time, the actual industrial production scene needs to balance detection accuracy and real-time performance. The YOLOv11 network model in the prior art is insufficient in extracting features of small and medium-sized defects and edge size information. Due to the diverse shapes and significant size differences of bearing defects, the surface defect detection method based on the YOLOv11 network model has the problems of insufficient feature perception domain adaptability and limited surface detail retention capability in multi-scale target detection, resulting in serious missing detection and false detection of bearing ring surface defects, and low overall detection accuracy.
[0056] To solve the above problems, the embodiments of the present application disclose a bearing ring surface defect detection method based on an improved YOLOv11 network, which comprises the following steps:
[0057] The improved YOLOv11 network model is constructed based on the YOLOv11 network architecture with a backbone network, a neck network and a head network; wherein, in the backbone network and the neck network, the original standard convolution module of the YOLOv11 network architecture is replaced by a receptive field coordinate attention convolution module; on the three feature map paths of different scales output from the neck network to the head network, a surface detail fusion module is respectively arranged, and the surface detail fusion module is used for processing the features output by the neck network and then inputting the features to the head network; the positioning loss function of the improved YOLOv11 network model is configured as a Focaler-DIoU loss function;
[0058] A bearing ring surface image is acquired and processed to form a data set, and the improved YOLOv11 network model is trained by using the data set;
[0059] A bearing ring surface image to be detected is acquired and input to the trained improved YOLOv11 network model to obtain surface defect information of the bearing ring to be detected.
[0060] The method constructs an improved YOLOv11 network model (hereinafter referred to as YOLOv11-RSF network model) based on the YOLOv11 network architecture as shown in Figure 1 First, the receptive field coordinate attention convolution module (hereinafter referred to as RFCAconv module) is used to replace the standard convolution module in the YOLOv11 network model. This design starts from the perspective of receptive field spatial feature optimization, dynamically adjusts the convolution kernel parameters, realizes the adaptive allocation of bearing ring defect feature weights, combines with the coordinate attention, accurately captures the micro defect features and effectively processes the multi-scale defects, and realizes the positioning and adaptive extraction of multi-scale defect features.
[0061] Secondly, the surface detail fusion module (hereinafter referred to as SDFM module) is used to dynamically fuse the surface high-resolution features extracted by the backbone network and the deep semantic features output by the detection head through a dynamic multi-scale feature fusion mechanism. The module uses deformable convolution to align the shallow features in space, solves the feature misplacement problem caused by down-sampling, and then introduces a dynamic weight distribution strategy to automatically adjust the fusion ratio of features at different levels according to the feature confidence, so as to realize multi-level feature fusion on the P3 (1 / 8 down-sampling), P4 (1 / 16), P5 (1 / 32) three scales of the feature pyramid, and realize the complementary advantages of detail features and semantic features on multiple scales, which significantly improves the detection ability of the network model for small defects and multi-size defects of the bearing inner ring.
[0062] Finally, the replacement of the Focaler-DIoU edge regression loss function suppresses the loss weight of simple samples by dynamically adjusting the parameters, forcing the network model to focus on learning small defects that are difficult to locate. At the same time, DIoU is used instead of CIoU to calculate, which directly minimizes the center point distance between the predicted box and the real box, avoiding the gradient instability problem caused by the aspect ratio term, thereby improving the convergence speed and the tightness of the bounding box.
[0063] From Figure 1 It can be seen that the construction steps of the backbone network specifically include:
[0064] The input feature map passes through a receptive field coordinate attention convolution module (RFCAconv), and then passes through a plurality of receptive field coordinate attention convolution modules (RFCAconv) and a receptive field coordinate attention convolution module (C3k2_RFCAconv) combined with a parallel convolution layer structure in turn, and then passes through an improved spatial pyramid pooling module (SPPF) and a cross-stage local pyramid compression attention mechanism module (C2PSA) in turn.
[0065] The construction steps of the neck network specifically include:
[0066] An up-sampling path from top to bottom and a feature fusion path from bottom to top are set;
[0067] In the up-sampling path, the high-level semantic features are fused with the same scale features from the backbone network through up-sampling operation and splicing operation;
[0068] In the feature fusion path, the features output by the up-sampling path are fused with the features of the next level through splicing operation;
[0069] Wherein, the convolution operation in all paths adopts a receptive field coordinate attention convolution module (RFCAconv) or a receptive field coordinate attention convolution module (C3k2_RFCAconv) combined with a parallel convolution layer structure.
[0070] The RFCAconv module, the SDFM module and the Focaler-DIoU edge regression loss function will be described in detail below.
[0071] The detailed description of the RFCAconv module is as follows.
[0072] The standard convolution operation extracts features by sharing convolution kernel weights and sliding windows, which can reduce the number of parameters and maintain translation invariance, but its inherent mechanism has limitations. The defects of the bearing ring are randomly distributed in different locations, have different geometric sizes, and have polymorphic shapes. However, the convolution kernel weight sharing in the convolution feature extraction process ignores the difference in differential information at different locations, making it difficult to fully extract effective feature information and limiting the network model's ability to capture key features.
[0073] The receptive field attention convolution of the RFCAconv module emphasizes the importance of different features within the receptive field sliding block, thereby addressing the convolution kernel parameter sharing problem. The group convolution network architecture is used to accelerate the extraction process of the receptive field spatial features. The features of each receptive field are integrated through average pooling, followed by 1x1 group convolution to promote the correlation between feature information. Finally, the key features are highlighted through the softmax function normalization. The calculation process of RFA can be represented as follows:
[0074]
[0075] where k represents the size of the convolution kernel, Norm represents normalization, X represents the input feature map, F is obtained by multiplying the attention map and the transformed receptive field spatial features After adjusting the shape, the extracted receptive field spatial feature map does not overlap.
[0076] To better capture long-distance spatial interaction relationships, the receptive field attention convolution is integrated with the coordinate attention. The CA strengthens the feature response of important channels, accurately enhances the positioning of small targets in the target area, and allocates dynamic weights to different scale feature branches, achieving adaptive multi-scale fusion.
[0077] Therefore, the detailed structure of the RFCAconv module is as shown in Figure 2 It uses receptive field attention convolution to achieve dynamic weight allocation for different scale features and global average pooling to obtain global information, improving the accuracy of bearing ring defect positioning. As Figure 2 can be seen, the processing steps of the RFCAconv module include:
[0078] Group convolution operation, normalization, and nonlinear activation are performed on the input feature map to generate receptive field spatial features;
[0079] The input feature map is subjected to average pooling along the height and width directions, respectively. The pooled features are concatenated, convolved, normalized, and nonlinearly activated, and then the coordinate attention weights are generated through two convolutions and Sigmoid activation;
[0080] The receptive field spatial feature is weighted with the coordinate attention weight to generate a final output feature map.
[0081] The receptive field spatial feature is weighted with the coordinate attention weight, specifically including:
[0082] The receptive field spatial feature is weighted with the coordinate attention weight.
[0083] The SDFM module is described in detail as follows.
[0084] When the YOLOv11 network model is used to extract the bearing inner ring surface defect features, the shallow high-resolution features extracted by the backbone network can capture subtle textures, but lack an overall understanding of the defect semantics. The deep semantic features output by the detection head part are difficult to accurately locate the micro-defects due to the loss of spatial information caused by multiple down-sampling, and the gradient back-propagation of the deep features has significant attenuation, which causes obvious feature matching imbalance. To solve this problem, the SDFM module optimizes the structure details and high-level semantic features to improve the accuracy of multi-scale defect detection.
[0085] The detailed structure of the SDFM module is shown in Figure 3 The feature aggregation strategy in the channel dimension is used, the two input features of the same size are connected in the channel dimension, then sent to the attention module to generate the corresponding attention weight, finally the generated attention weight is multiplied with the original feature to weight, and the original feature of another branch is aggregated to enhance its representation. The feature optimization process is shown in the following formula:
[0086]
[0087]
[0088] wherein, represents the summation of elements, represents element-wise multiplication, represents n cascaded point convolution layers, C represents the cascading operation in the channel dimension, and represent sigmoid function and global average pooling respectively.
[0089] Then, the optimized features are stacked in the channel and sent to the channel and spatial dual attention module to generate the final fusion weight. The fusion weight generation process is shown in the following formula:
[0090]
[0091]
[0092]
[0093] The fusion process of the surface feature is shown in the following formula:
[0094]
[0095] The SDFM module adopts a hierarchical alignment double-attention fusion mechanism to realize dynamic optimization of multi-scale features through channel attention and spatial attention. The module first reorganizes the same-scale features (P3 / P4 / P5) output by the Backbone and Head in stages, learns the optimal fusion weight through the attention mechanism, and at the same time establishes a cross-level interaction path to deeply fuse the low-level high-resolution detail features and high-level abstract semantic features. This design deeply interacts the surface detail features and high-level semantic information through the double fusion path, not only overcoming the limitations of traditional methods, but also significantly improving the detection capability of the network model for bearing surface multi-scale defects, especially enhancing the focusing capability for small defect areas, so that the detection head obtains significant improvement in positioning and classification accuracy. In combination with the above and Figure 3 It can be seen that the processing steps of the surface detail fusion module specifically include:
[0096] receiving shallow high-resolution features from the backbone network and deep semantic features from the up-sampling path of the neck network;
[0097] performing feature aggregation on the channel dimension of the shallow high-resolution features and the deep semantic features, and generating first attention weights through a first attention module;
[0098] weighting the first attention weights with the shallow high-resolution features and the deep semantic features respectively to generate optimized shallow features and optimized deep features;
[0099] stacking the optimized shallow features and the optimized deep features in the channel dimension, and generating final fusion weights through a second attention module;
[0100] dynamically weighting and fusing the optimized shallow features and the optimized deep features according to the final fusion weights to generate a final output feature map.
[0101] wherein the first attention module and the second attention module are both modules based on channel and spatial double attention. The processing steps of the surface detail fusion module further include:
[0102] Before the feature aggregation of the shallow high-resolution feature and the deep semantic feature in the channel dimension, a deformable convolution is used for spatial alignment processing on the shallow high-resolution feature; wherein the spatial alignment processing adjusts the sampling grid points of the standard convolution by learning the two-dimensional offset of the sampling position, so as to compensate for the spatial feature misalignment between the shallow high-resolution feature and the deep semantic feature due to the multiple down-sampling and up-sampling operations.
[0103] The detailed description of the loss function is as follows.
[0104] The loss function is an important tool for evaluating the difference between the predicted value and the target value. The YOLOv11 network model is a single-stage target detection algorithm, and its loss function includes three parts of classification loss (Lcls), positioning loss (Lloc) and confidence loss (Lconf), and the loss function is as follows:
[0105]
[0106] Among them, the positioning loss function is used to measure the error between the predicted bounding box and the real bounding box, which is the core component of target detection and directly affects the regression accuracy of the bounding box. In the network architecture of YOLOv11, CIoU (complete IoU) loss is used as the bounding box regression loss function, and cross-entropy loss is used to process multi-class classification, and binary cross-entropy loss is used to process confidence prediction. In the bearing ring defect detection task, due to the coexistence of small target defects such as black spots and irregular defects such as linear scratches, CIoU introduces center point distance and aspect ratio penalty on the basis of IoU: it is not enough to optimize low IoU samples, and forced alignment of aspect ratio produces rigid interference on irregular defects. To solve this problem, Focaler-DIoU edge regression loss function is based on DIoU containing only center point distance and IoU, which is simpler to calculate and avoids the potential negative impact of CIoU aspect ratio term. By minimizing the center point distance, the positioning robustness of irregular defects such as linear scratches is enhanced. The DIoU calculation formula is as follows:
[0107]
[0108] Focaler-DIoU introduces a dynamic weight adjustment factor based on DIoU, which focuses on different regression samples through linear interval mapping, so that the model pays more attention to the boundary box regression of difficult samples (low IoU), and achieves the purpose of focusing on easy and difficult samples. The specific Focaler-DIoU calculation formula is as follows:
[0109]
[0110]
[0111]
[0112]
[0113] Focaler-DIoU loss function adjusts the weight distribution of difficult and easy samples dynamically: on the one hand, the loss weight of defect samples with low IoU is increased exponentially, which significantly improves the regression ability of low IoU defect samples, so that the network model focuses more on small target defects in the training stage; on the other hand, the gradient contribution of high IoU simple samples is moderately suppressed to avoid being dominated in the optimization process. This strategy not only retains the sensitivity of DIoU to the distance of the center point, but also compensates for the lack of sensitivity of DIoU to difficult samples through parameters, improves the sensitivity of the network model to low IoU defects, avoids being dominated by high IoU simple samples, and significantly improves the positioning robustness and convergence efficiency of small and complex defects on the bearing surface.
[0114] In order to verify the performance of the method in bearing ring surface defect detection, the following ablation experiments and comparative experiments were carried out. The hardware platform used in the experiment is shown in Figure 4 The experiment uses a self-built bearing inner ring defect dataset, and all data are collected from real bearing industrial production lines. The initial resolution of the collected bearing inner ring image is 5472x3468. In order to adapt to the input size of the YOLO network and improve the training efficiency, 640x640 pixel windows are uniformly cropped. Subsequently, the 640x640 pixel windows containing defect regions are selected by professional quality inspection personnel, and are labeled as five categories including black spots (HB), corner knock (KP), pull hair (LM), wear (MS) and plane print (PMY) according to the defect morphological characteristics. Analysis shows that due to the complex manufacturing process of the bearing inner ring, the samples of various defects show obvious non-uniform distribution characteristics.
[0115] In order to improve the data distribution imbalance problem and enhance the generalization ability of the model, the data enhancement strategy is adopted. First, the mosaic enhancement technology is used, and then the image transformation operations including random rotation, region cropping, multi-scale scaling and brightness adjustment are implemented. Through the above series of enhancement processing, the original training set is expanded from 3118 to 5184, thereby improving the generalization ability of the network model to defects. The constructed dataset is shown in Table 1.
[0116] Table 1 Bearing inner ring defect detection dataset
[0117]
[0118] Before network training, the enhanced dataset needs to be reasonably divided. First, each defect sample is divided into training set, validation set and test set according to the proportion of 6:2:2; then, the defect data of different categories is integrated into the final training set, validation set and test set according to the corresponding proportion. This division method not only ensures the sufficiency of the training data, but also effectively verifies the generalization ability of the model. The specific dataset division results are shown in Table 2.
[0119] Table 2 Training set, validation set and test set division
[0120]
[0121] The hyperparameters of network model training setting are shown in Table 3.
[0122] Table 3 Network training parameters
[0123]
[0124] In order to objectively evaluate the performance of the improved YOLOv11-RSF network model, the following evaluation indexes are adopted: mean average precision (mAP) is used to evaluate the detection accuracy, average precision (AP) of each category is used to analyze the performance of specific category, giga floating point operations (GFLOPS) measures the calculation efficiency, and the number of model parameters (Parameters) evaluates the model complexity.
[0125] In order to verify the effectiveness of the YOLOv11-RSF network model for bearing ring surface defect detection, evaluate the influence of RFCAConv module, SDFM module and Focaler-DIoU loss function on the performance of network model, take the original YOLOv11 network architecture as the baseline model, gradually add the improved module for ablation experiment, and the experimental results are shown in Table 4.
[0126] Table 4 Ablation experiment results
[0127]
[0128] As can be seen from Table 4, the mAP of the YOLOv11 baseline network model is 95.5%, but the detection accuracy of black spots and scratches is relatively low, which is 94.3% and 92.9% respectively. By introducing the RFCAConv module, the network model realizes the improvement of overall accuracy at the cost of increasing a small amount of calculation cost. The module optimizes the positioning and feature extraction ability of small defects from the perspective of spatial feature of receptive field by dynamically adjusting the convolution kernel parameters. After the introduction of the SDFM module, the mAP is improved to 96.6%, which shows that it promotes the interaction between surface texture features and deep semantic features by fusing the hierarchical features of the backbone and head parts, thereby enhancing the focusing ability of the network on the defect area. In addition, the Focaler-DIoU loss function is used instead of the original CIoU, which simplifies the aspect ratio penalty while introducing a dynamic adjustment factor, finally making the mAP increase by 0.5% compared with the baseline network.
[0129] The ablation experiment results show that the YOLOv11-RSF network model integrated with RFCAConv, SDFM and Focaler-DIoU performs excellently in bearing inner ring defect detection, and the final mAP reaches 97.1%, which is 1.6% higher than the baseline network, among which the detection accuracy of black spot defects is improved by 2.7% and the detection accuracy of scratch defects is improved by 2.9%, effectively enhancing the detection ability of the network model for small defects and multi-scale defects on the surface of the bearing inner ring.
[0130] The loss function convergence of each improvement scheme is compared as shown in Figure 5 It can be seen that the YOLOv11-RSF network model exhibits excellent convergence characteristics. In contrast, the remaining network models have several significant fluctuations within the first 100 epochs of the validation phase. This phenomenon is due to the presence of some challenging samples in the validation dataset. However, YOLOv11-RSF maintains a stable convergence trend throughout the training process, and the validation loss does not exhibit significant fluctuations, indicating that this network structure has better training stability and generalization ability.
[0131] In order to further verify the effectiveness of the YOLOv11-RSF defect detection model, comparative experiments were conducted on the self-built bearing inner ring defect dataset. The current mainstream target detection network was selected as the baseline model, including single-stage detection network (YOLOv5, YOLOv11n, YOLOv11s, YOLOv13, SC-YOLOv8) and Transformer architecture detection network (RT-DETR). The experimental results are shown in Table 5, which are comprehensively evaluated from multiple dimensions such as detection accuracy, model parameter amount and model complexity. Moreover, one image of each defect type was randomly selected from the test set, and the test results of different network models were visualized and compared, as shown in Figure 6 .
[0132] Table 5 comparative experimental results
[0133]
[0134] As can be seen from Table 5, on the self-built bearing inner ring surface defect data set, the performance of the YOLOv11-RSF network model is better than that of other target detection networks, the mAP is the highest, reaching 97.1%, which is increased by 1.5%, 1.6%, 0.8%, 2.7%, 1.3%, 3.2% compared with YOLOv5, YOLOv11n, YOLOv11s, YOLOv13, SC-YOLOv8 and RT-DETR respectively.
[0135] Among them, YOLOv5 performs poorly in detecting defects such as scratches and abrasions of multiple scales, with an AP of only 93.4% and 93.8%. Although YOLOv11s improves the detection accuracy compared to YOLOv11n, it significantly increases the parameter quantity and computational cost. YOLOv13 and SC-YOLOv8 have deficiencies in detecting black spot and abrasion defects, with AP values of 92% and 91.2% respectively for YOLOv13, and although the improved model SC-YOLOv8 has improved, its AP values are still 94.4% and 94.2% respectively, which are still not ideal. RT-DETR is based on the Transformer structure, although it has the advantage of global modeling, but has a large parameter quantity and relatively high computational complexity, and the results show that it performs poorly in detecting defects such as black spots, scratches and abrasions, and has certain limitations in detecting small defects and multiple scale defects.
[0136] Compared with the YOLOv11n baseline network, the YOLOv11-RSF network performs better in detecting small and multiple scale defects, with an AP increase of 2.7% for black spot defects, 1.3% for scratches, 3.5% for abrasion defects, 0.8% for planar printing defects, and a detection accuracy of 97.1% for regional defects. The experimental results fully demonstrate that the YOLOv11-RSF network has excellent detection performance in detecting small defects and multiple scale defects.
[0137] In order to more effectively evaluate the performance of the YOLOv11-RSF network model in feature extraction of small defects and multiple scale linear defects, a representative image was randomly selected from each type of defect, and the LayerCAM method was used to generate a heat map to visualize the network focus area. The heat map can intuitively reflect the model's focus on the defect area, and the visualization result is as shown in Figure 7 It can be seen that the YOLOv11-RSF network model can more accurately focus on the defect area, thereby achieving higher detection accuracy.
[0138] To further verify the performance advantage of YOLOv11-RSF network model in other industrial defect detection tasks, the NEU surface defect database (NEU-DET) surface defect dataset released by Northeastern University is selected as the test dataset. The NEU-DET dataset contains six typical surface defects, which are crazing (Cr), patches (Pa), inclusion (In), pitted_surface (PS), rolled-in scale (RS) and scratches (Sc), respectively. Each type of defect provides 300 standardized sample images of 200x200 pixels, totaling 1800 samples. The dataset is randomly divided into training set, validation set and test set in the ratio of 6:2:2 to ensure the balance of data distribution.
[0139] Under the condition of ensuring the same experimental environment, comparative experiments are carried out between YOLOv5, YOLOv11n, YOLOv11s, YOLOv13, SC-YOLOv8, RT-DETR and YOLOv11-RSF. The comparison results of each target detection method are shown in Table 6. In addition, one sample of each defect is randomly selected for comparison with the above detection networks, and the test results are shown in Table 7. Figure 8
[0140] Table 6 Comparison results based on NEU-DET defect dataset
[0141]
[0142] From Table 6, it can be seen that the YOLOv11-RSF network model achieves an mAP value of 78.0% on the NEU-DET dataset, and the overall detection performance is significantly better than that of the comparison models. Compared with YOLOv5, YOLOv11n, YOLOv11s, YOLOv13, SC-YOLOv8, RT-DETR, it is improved by 3.4%, 1.3%, 1.7%, 3.6%, 2.9% and 13.7%, respectively.
[0143] From Figure 8 It can be seen that the detection accuracy of the YOLOv11-RSF network model for the rolled-in_scale defect is particularly significant, although the detection accuracy for defect categories such as crazing, patches, inclusions, pitted_surface and scratches does not reach the optimal level, compared with the existing detection network, YOLOv11-RSF has a significant improvement in the positioning ability and feature focusing of the defect area, and its comprehensive performance still has obvious advantages. The results fully prove the practical value of the YOLOv11-RSF network model in other industrial surface defect detection tasks.
[0144] The principles and implementations of the present application are described herein by applying specific examples. The above examples are only used to help understand the method of the present application and its core idea. It should be noted that for ordinary skilled persons in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A method for detecting surface defects in bearing rings based on an improved YOLOv11 network, characterized in that: The method includes the following steps: Based on the YOLOv11 network architecture with a backbone network, a neck network, and a head network, an improved YOLOv11 network model is constructed. Specifically, in the backbone network and the neck network, the standard convolutional modules of the original YOLOv11 network architecture are replaced with receptive field coordinate attention convolutional modules. A surface detail fusion module is set on each of the three feature map paths at different scales from the neck network output to the head network. This surface detail fusion module processes the features output by the neck network before inputting them into the head network. The localization loss function of the improved YOLOv11 network model is configured as the Focaler-DIoU loss function. Images of the bearing race surface are acquired and processed to form a dataset, and the improved YOLOv11 network model is trained using the dataset. The surface image of the bearing race to be detected is acquired and input into the trained improved YOLOv11 network model to obtain the surface defect information of the bearing race to be detected.
2. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 1, characterized in that: The processing steps of the receptive field coordinate attention convolution module specifically include: The input feature map is subjected to grouped convolution, normalization, and nonlinear activation to generate receptive field spatial features. The input feature map is subjected to average pooling along the height and width directions respectively. The pooled features are then concatenated, convolved, normalized and non-linearly activated. Coordinate attention weights are then generated through two convolutions and Sigmoid activation. The receptive field spatial features are weighted with the coordinate attention weights to generate the final output feature map.
3. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 2, characterized in that: The receptive field spatial features are weighted together with the coordinate attention weights, specifically including: The receptive field spatial features are shaped and then multiplied element-wise with the coordinate attention weights.
4. The bearing ring surface defect detection method based on an improved YOLOv11 network according to claim 1, characterized in that: The processing steps of the surface detail fusion module specifically include: Receive shallow high-resolution features from the backbone network and deep semantic features from the upsampled paths of the neck network; The shallow high-resolution features and the deep semantic features are aggregated along the channel dimension, and a first attention weight is generated through the first attention module. The first attention weight is weighted by the shallow high-resolution feature and the deep semantic feature respectively to generate optimized shallow features and optimized deep features. The optimized shallow features and the optimized deep features are stacked in channels, and the final fusion weights are generated through the second attention module. Based on the final fusion weights, the optimized shallow features and the optimized deep features are dynamically weighted and fused to generate the final output feature map.
5. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 4, characterized in that: Both the first attention module and the second attention module are modules based on channel and spatial dual attention.
6. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 4, characterized in that: The processing steps of the surface detail blending module also include: Before aggregating the shallow high-resolution features and the deep semantic features along the channel dimension, deformable convolution is used for spatial alignment processing of the shallow high-resolution features. The spatial alignment processing adjusts the sampling grid of the standard convolution by learning the two-dimensional offset of the sampling position to compensate for the spatial feature misalignment between the shallow high-resolution features and the deep semantic features caused by multiple downsampling and upsampling operations.
7. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 1, characterized in that: The calculation steps for the Focaler-DIoU loss function specifically include: Calculate the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box; Based on the relationship between the IoU value and the preset lower and upper thresholds, a dynamic weight adjustment factor is calculated; The DIoU loss value is calculated based on the distance between the center points of the predicted bounding box and the true bounding box, and the diagonal length of the minimum bounding box containing both the predicted and true bounding boxes. The DIoU loss value is weighted using the dynamic weight adjustment factor to obtain the final Focaler-DIoU loss.
8. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 1, characterized in that: The specific steps for constructing the backbone network include: The input feature map is passed through a receptive field coordinate attention convolution module, then through multiple sequentially cascaded receptive field coordinate attention convolution modules and a receptive field coordinate attention convolution module combining a parallel convolutional layer structure, and then through an improved spatial pyramid pooling module and a cross-stage local pyramid compression attention mechanism module.
9. The method for detecting surface defects in bearing rings based on an improved YOLOv11 network according to claim 1, characterized in that: The construction steps of the neck network specifically include: Set up a top-down upsampling path and a bottom-up feature fusion path; In the upsampling path, high-level semantic features are fused with features of the same scale from the backbone network through upsampling and concatenation operations. In the feature fusion path, the features output by the upsampling path are fused with the features of the next level through a concatenation operation; All convolution operations in the paths employ either a receptive field coordinate attention convolution module or a receptive field coordinate attention convolution module combined with a parallel convolutional layer structure.
Citation Information
Cited By
Improved StarNet-YOLOv13-based unmanned aerial vehicle field tobacco virus disease lightweight detection method
CN121767895A
High-precision wafer surface tiny scratch detection method based on YOLO improvement
CN121921324A
Self-adaptive dynamic grouping power transmission line construction quality detection method
CN122156208A
