Gear surface defect detection method based on improved YOLO architecture
Patent Information
- Application Number
- CN202611098875.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0007]本发明的目的在于针对现有技术中的上述不足,提供基于改进YOLO架构的齿轮表面缺陷检测方法,解决齿轮表面缺陷检测中缺陷尺度变化显著、局部细节易丢失、复杂金属背景干扰严重以及检测精度与推理效率难以兼顾的技术问题
获取齿轮表面图像;将所述齿轮表面图像输入至预先训练好的YOLO目标检测网络,输出齿轮表面缺陷的类别和位置;所述YOLO目标检测网络包括骨干网络、颈部网络和检测头;其中,采用CSP-EDLAN模块替代所述骨干网络和所述颈部网络中的C3k2模块;采用ADown模块替代所述骨干网络和所述颈部网络中的下采样卷积模块;采用C2TSSA模块替代所述骨干网络中的C2PSA模块;所述检测头采用LQEHead检测头;通过轻量化下采样、增强型特征表征、全局上下文建模与质量感知检测头的联合优化,在兼顾模型复杂度与推理效率的同时,提高了齿轮表面缺陷检测的精度、鲁棒性和泛化能力。
Smart Images

Figure CN122928778A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of gear surface defect detection, specifically relating to a gear surface defect detection method based on an improved YOLO architecture. Background Technology
[0002] Gears, as critical transmission components, are widely used in important fields such as automotive transmissions, aerospace gearboxes, marine propulsion systems, rail transportation, heavy machinery, and high-end intelligent manufacturing equipment. Their service condition directly affects the operating accuracy, power transmission efficiency, equipment reliability, and service life of the transmission system. During long-term service, gears are susceptible to defects such as fracture, missing teeth, scratches, chipping, black scale on the tooth surface and tooth base due to alternating loads, impact vibrations, fluctuations in lubrication conditions, and complex environments. If these defects are not detected and identified in a timely and accurate manner, minor damage may continue to expand under complex operating conditions, leading to decreased transmission accuracy, increased noise and vibration, accelerated wear of components, and even sudden gear failure, unplanned equipment downtime, and catastrophic system failures, causing serious safety hazards and economic losses.
[0003] Early gear defect detection relied primarily on manual experience, typically employing visual observation, expert judgment, or simple measurements for preliminary identification of surface defects. These methods are inefficient, highly subjective, and easily affected by factors such as operator experience, fatigue, and environmental conditions, making them unsuitable for the stringent quality control requirements of large-scale production. Machine vision-based defect detection methods, with their advantages of non-contact imaging, intuitive defect information, and automatic feature extraction, offer an effective technical approach to overcoming the limitations of traditional detection methods.
[0004] Existing methods for detecting surface defects in gears can be mainly categorized into three types: traditional image processing methods, machine learning methods, and deep learning methods. Traditional image processing methods rely on manually designed visual features (such as edge detection, template matching, and local binary patterns), which are easily affected by background interference, noise disturbances, and changes in defect morphology in complex industrial environments. They also suffer from insufficient generalization ability and limited detection accuracy. Machine learning methods overcome the limitations of manually designed features to some extent, but are still limited by feature representation capabilities and model generalization performance, making it difficult to meet the practical needs of high-precision industrial inspection.
[0005] In recent years, deep learning-based target detection methods have gradually become an important research direction in the field of industrial defect detection. Single-stage target detection models, represented by the YOLO series, employ an end-to-end prediction mechanism, achieving a good balance between detection accuracy and inference efficiency, and have become one of the important methods in industrial defect detection tasks.
[0006] However, existing methods still face multiple challenges in gear surface defect detection. First, gear defects vary significantly in scale, ranging from macroscopic fractures and missing teeth to microscopic scratches and black spots, placing high demands on the network's multi-scale feature extraction capabilities. Second, local details are easily lost during feature downsampling, making it difficult to accurately identify small-sized and weakly textured defects. Third, gear surfaces have highly reflective metallic properties, resulting in strong specular and diffuse reflections under different lighting conditions. Furthermore, the presence of lubricating oil during gear transmission further blurs defect edges and increases the complexity of background interference. Fourth, existing methods generally suffer from high model complexity, making it difficult to balance detection accuracy and inference efficiency, thus hindering deployment on resource-constrained industrial equipment. Therefore, a technical solution is urgently needed that can improve the accuracy and robustness of gear surface defect detection while maintaining lightweight design and high inference efficiency. Summary of the Invention
[0007] The purpose of this invention is to address the above-mentioned shortcomings in the prior art by providing a gear surface defect detection method based on an improved YOLO architecture, thereby solving the technical problems of significant changes in defect scale, easy loss of local details, severe interference from complex metal backgrounds, and difficulty in balancing detection accuracy and inference efficiency in gear surface defect detection.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A gear surface defect detection method based on an improved YOLO architecture includes: Acquire an image of the gear surface; The gear surface image is input into a pre-trained YOLO target detection network, which outputs the category and location of the gear surface defects. The YOLO target detection network includes a backbone network, a neck network, and a detection head. Specifically, the CSP-EDLAN module replaces the C3k2 module in the backbone network and the neck network; the ADown module replaces the downsampling convolution module in the backbone network and the neck network; the C2TSSA module replaces the C2PSA module in the backbone network; and the detection head is an LQEHead detection head.
[0009] In some embodiments, the CSP-EDLAN module adjusts the number of channels in the input feature map through convolutional layers and then divides it into a pass-through branch and a processing branch along the channel dimension. The pass-through branch is directly connected to the end of the module to achieve short-circuit propagation of gradient information and feature reuse. The processing branch enters the EDLAN structure, which contains multiple serially connected DualConv layers. The output of each DualConv layer is used as the input of the next DualConv layer. The outputs of all DualConv layers and the pass-through branch are concatenated along the channel dimension and then subjected to feature fusion and channel compression through convolutional layers.
[0010] In some embodiments, in the DualConv layer, the input feature map is divided into multiple groups along the channel dimension. For each group, two sets of parallel convolution operations are performed simultaneously. One set is group convolution, which is used to extract local spatial features, and the other set is pointwise convolution, which is applied to the complete input feature map to achieve cross-channel information interaction and preservation of original information. The outputs of the two sets of convolutions are fused by adding them element-wise.
[0011] In some embodiments, the ADown module divides the input feature map into two branches along the channel dimension. The first branch extracts basic features through convolution operations, and the second branch performs max pooling and convolution operations in sequence to highlight local key responses. The outputs of the two branches are concatenated along the channel dimension to obtain the downsampled feature map.
[0012] In some embodiments, the C2TSSA module calculates the mean vector and covariance matrix of the input feature tokens, maps the tokens to a low-dimensional semantic subspace through linear projection and constructs a statistical attention matrix, and applies the statistical attention matrix to the original input to enhance the feature representation.
[0013] In some embodiments, the statistical attention matrix is constructed using an adaptive regularization coefficient, which is dynamically adjusted according to the dispersion of the token distribution: the regularization strength increases when the feature distribution is relatively dispersed, and decreases when the feature distribution is relatively concentrated.
[0014] In some embodiments, the LQEHead detection head extracts statistical features for characterizing localization stability from bounding box distribution prediction, maps the statistical features to localization quality scalars through a multilayer perceptron, and fuses the quality scalars with the initial classification score to obtain a quality-perceived calibration score, which is then normalized by an activation function and used as the confidence score of the detection output.
[0015] In some embodiments, the statistical features extracted from the bounding box distribution prediction to characterize the localization stability include: the probability values corresponding to the top K sampling points in the bounding box distribution, and the global mean of the bounding box distribution.
[0016] The gear surface defect detection method based on the improved YOLO architecture provided by this invention has the following beneficial effects: A gear surface image is acquired; the gear surface image is input into a pre-trained YOLO object detection network, which outputs the category and location of gear surface defects; the YOLO object detection network includes a backbone network, a neck network, and a detection head; wherein, the CSP-EDLAN module is used to replace the C3k2 module in the backbone network and the neck network; the ADown module is used to replace the downsampling convolution module in the backbone network and the neck network; and the C2TSSA module is used to replace the C2PSA module in the backbone network; the detection head is an LQEHead detection head; through the joint optimization of lightweight downsampling, enhanced feature representation, global context modeling, and quality-aware detection head, the accuracy, robustness, and generalization ability of gear surface defect detection are improved while balancing model complexity and inference efficiency. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the gear surface defect detection method based on the improved YOLO architecture of the present invention; Figure 2 This is a schematic diagram of the CSP-EDLAN module of the present invention; Figure 3 This is a schematic diagram of the ADown module of the present invention; Figure 4 This is a schematic diagram of the C2TSSA module of the present invention; Figure 5 This is a schematic diagram of the structure of the LQEHead detection head of the present invention; Figure 6 The mAP comparison curves of the present invention and the baseline model on the GID dataset are shown. Figure 7 The comparison results are shown in the confusion matrix on the test set; Figure 8 The mAP comparison curves of the present invention and the baseline model on a publicly available gear defect dataset are shown. Figure 9 A visual comparison of the detection results of different models on the GID dataset; Figure 10 A comparison of the visualization detection results of different models on a publicly available gear defect dataset; Figure 11This is a comparison of the detection performance of the present invention and the baseline model on real gear defect images; Figure 12 The feature response heatmaps of this invention are compared with those of the baseline model. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0020] If the application documents contain similar descriptions such as "first, second, third", the following explanation shall be added: In the following description, the terms "first, second, third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0021] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this invention is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.
[0022] To address the problems existing in related technologies, this application provides a method for detecting surface defects in gears based on an improved YOLO architecture. The executing entity of this method can be an electronic device. The electronic device can be various types of terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or it can be implemented as a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0023] In some embodiments, the function of the detection method provided in this application can be implemented by the processor of an electronic device calling program code, wherein the program code can be stored in a computer storage medium.
[0024] This embodiment provides a method for detecting surface defects in gears based on an improved YOLO architecture. Figure 1 This is a flowchart of the gear surface defect detection method based on the improved YOLO architecture of the present invention, as shown below. Figure 1 As shown, it includes: Acquire an image of the gear surface; In this embodiment of the invention, an industrial camera is used to acquire surface images of the gear under controlled lighting conditions to obtain a true image of the gear surface. The acquired gear surface image is preprocessed and then input into a target detection network for defect detection. Preprocessing includes: scaling the original image to 640×640 pixels using a bicubic interpolation algorithm and saving it in JPG format.
[0025] The gear surface image is input into a pre-trained YOLO target detection network, which outputs the category and location of the gear surface defects. The YOLO target detection network includes a backbone network, a neck network, and a detection head. Specifically, the CSP-EDLAN module replaces the C3k2 module in the backbone network and the neck network; the ADown module replaces the downsampling convolution module in the backbone network and the neck network; the C2TSSA module replaces the C2PSA module in the backbone network; and the detection head is an LQEHead detection head.
[0026] In this embodiment of the invention, the YOLO target detection network is based on the YOLO11n architecture and includes three components: a backbone network, a neck network, and a head, which output the type and location of defects on the gear surface.
[0027] The backbone network is used to perform multi-level convolution and downsampling on the input gear surface image to extract multi-scale features from local details to global semantics. The backbone network consists of multiple layers: Layers 0 and 1 are standard convolutional layers (3×3 kernel size, stride 2) used for initial feature extraction and spatial downsampling; Layer 2 uses the CSP-EDLAN module instead of the original C3k2 module for staged feature refinement; Layer 3 uses the ADown module for downsampling, replacing the traditional convolutional downsampling operation; Layer 4 uses the CSP-EDLAN module instead of the original C3k2 module; Layer 5 uses the ADown module for downsampling; Layer 6 uses the CSP-EDLAN module instead of the original C3k2 module; Layer 7 uses the ADown module for downsampling; Layer 8 uses the CSP-EDLAN module instead of the original C3k2 module; Layer 9 uses the SPPF module (Fast Spatial Pyramid Pooling) for multi-scale feature aggregation, enhancing the network's receptive field; Layer 10 uses the C2TSSA module instead of the original C2PSA module for global context dependency modeling. The backbone network outputs three feature maps at different scales (P3, P4, P5), corresponding to spatial resolutions of 80×80, 40×40, and 20×20, respectively.
[0028] It should be noted that the CSP-EDLAN modules deployed in layers 2, 4, 6, and 8 refine features at different scales (80×80, 40×40, 20×20, and 10×10), forming a complete feature extraction chain from high-resolution details to low-resolution semantics. The ADown modules deployed in layers 3, 5, and 7, while downsampling at each level, retain detailed information about small-scale defects through a dual-branch fusion design of average pooling and max pooling, avoiding information loss during downsampling. The SPPF module in layer 9 aggregates features from different receptive fields through multi-scale pooling, enhancing the network's robustness to scale changes.
[0029] The neck network employs an improved PANet structure, receiving feature maps of three different scales from the backbone network. It achieves cross-scale feature fusion and enhancement through bidirectional paths: top-down and bottom-up. In the bottom-up downsampling stage, the ADown module replaces the traditional convolutional module with a stride of 2. At the critical fusion nodes of the neck network, the CSP-EDLAN module is also introduced to refine the fused multi-scale features. The neck network outputs three enhanced feature maps of different scales.
[0030] The detection head employs an LQEHead detection head based on a positioning quality estimation mechanism. It receives three enhanced feature maps at different scales output by the neck network, decodes each scale feature map into defect category confidence and bounding box coordinates, and outputs the category and location of the gear surface defects. The gear surface defect categories include one or more of the following: break, lack, scratch, chip, black scale on the tooth surface (hp_cm), and black scale on the tooth base (hp_cd). These six defect categories cover typical surface damage types caused by alternating loads, impact vibrations, lubrication fluctuations, and complex environments during long-term service. Break and lack are macroscopic defects, with larger scale and relatively regular shapes; scratch, chip, and black scale are microscopic or weakly significant defects, with smaller scale, lower contrast, and susceptibility to background interference.
[0031] In this embodiment of the invention, the CSP-EDLAN module replaces the C3k2 module (layers 2, 4, 6, and 8) in the backbone network and the C3k2 module in the neck network of the YOLO object detection network. The CSP-EDLAN module enhances gradient propagation and channel interaction through cross-stage partial connections, multi-gradient path aggregation, and DualConv double convolution feature extraction mechanisms, thereby improving the network's discriminative representation ability of defects of different scales and morphologies.
[0032] The ADown module replaces the downsampling convolutional modules (layers 3, 5, and 7) in the backbone network and the downsampling convolutional modules in the neck network of the YOLO object detection network. The ADown module, by synergistically fusing average pooling and max pooling, reduces the number of parameters and computational complexity while taking into account global contextual information modeling and local salient feature extraction, thus enhancing the response capability to weakly salient defects such as scratches, dents, and black skin.
[0033] The C2TSSA module is used to replace the C2PSA module (layer 10) in the backbone network of the YOLO object detection network. The C2TSSA module is based on the token statistical self-attention mechanism and achieves global context modeling with linear complexity. While enhancing the perception of weakly significant defect regions, it effectively suppresses interference from complex background noise.
[0034] The detection head used is the LQEHead detection head. The LQEHead detection head extracts positioning stability features from the bounding box distribution prediction by embedding a positioning quality estimation module, realizing dynamic coordination between the positioning quality of the predicted box and the classification confidence, thereby improving the model's positioning accuracy and detection reliability for defects.
[0035] In some embodiments, the CSP-EDLAN module adjusts the number of channels in the input feature map through convolutional layers and then divides it into a pass-through branch and a processing branch along the channel dimension. The pass-through branch is directly connected to the end of the module to achieve short-circuit propagation of gradient information and feature reuse. The processing branch enters the EDLAN structure, which contains multiple serially connected DualConv layers. The output of each DualConv layer is used as the input of the next DualConv layer. The outputs of all DualConv layers and the pass-through branch are concatenated along the channel dimension and then subjected to feature fusion and channel compression through convolutional layers.
[0036] In embodiments of the present invention, such as Figure 2 As shown, the CSP-EDLAN module will take the given input feature map Through a After adjusting the number of channels in the convolutional layer (CBS), the following is obtained: : : Then it is divided into the first branch along the channel dimension. Second branch : ; First Branch By directly connecting to the end of the module, short-circuit propagation of gradient information and feature reuse are achieved, effectively alleviating the problems of gradient vanishing and redundant information accumulation in deep networks.
[0037] Second branch Enter the EDLAN structure. Assume the EDLAN contains... There are 3 DualConv layers, and the output of each layer can be represented as: ; ; The outputs of all DualConv layers and the pass-through branches are concatenated along the channel dimension: ; Finally, through another The convolutional layer performs feature fusion and channel compression to obtain the output feature map. : ; EDLAN does not employ residual connections internally, but instead achieves rich gradient combinations through parallel branches of multi-gradient flow. DualConv layers of different depths have different receptive fields. EDLAN simultaneously concatenates the outputs of all intermediate layers to the output end, forcing the fusion of features from different receptive fields and effectively improving the discriminative representation capability of multi-scale defects.
[0038] The CSP-EDLAN module is deployed in layers 2, 4, 6, and 8 of the backbone network and at key fusion nodes in the neck network. It optimizes gradient propagation paths through cross-stage partial connectivity, enhancing feature reuse and gradient flow. The multi-branch parallel structure of EDLAN enriches gradient combination forms, improving the diversity of feature representation. Pointwise convolutional branches in DualConv ensure sufficient interaction of cross-channel information. These designs synergistically enhance the network's ability to represent and fuse multi-scale features, particularly beneficial for the accurate detection of small-sized defect targets (such as scratches, dents, and black spots) under complex background conditions.
[0039] In some embodiments, in the DualConv layer, the input feature map is divided into multiple groups along the channel dimension. For each group, two sets of parallel convolution operations are performed simultaneously. One set is group convolution, which is used to extract local spatial features, and the other set is pointwise convolution, which is applied to the complete input feature map to achieve cross-channel information interaction and preservation of original information. The outputs of the two sets of convolutions are fused by adding them element-wise.
[0040] In this embodiment of the invention, DualConv is the core convolutional unit of CSP-EDLAN. In the DualConv layer, the input feature map is divided into multiple groups along the channel dimension. For each group, two sets of parallel convolution operations are performed simultaneously: one set is group convolution, used to extract local spatial features; the other set is pointwise convolution, applied to the complete input feature map, used to achieve cross-channel information interaction and preservation of original information. The outputs of the two sets of convolutions have the same dimension and are fused by element-wise addition. Given an input feature map... The calculation process of DualConv can be expressed as follows: ; in, Indicates the number of groups is of Depthwise separable convolution, Representation Standard Pointwise convolution.
[0041] Grouped convolution isolates channels, resulting in a lack of information exchange between channel groups. In contrast, pointwise convolution operates on the complete input feature map (without grouping), forcibly injecting cross-channel global semantics at the physical level. The two sets of outputs are fused element-wise, retaining the computational efficiency advantages of grouped convolution (reducing parameter and computational costs) while compensating for its shortcomings in cross-channel information exchange. DualConv's design addresses the insufficient cross-channel information exchange in traditional grouped convolution, enabling the network to fully integrate feature information from different channels while maintaining a lightweight architecture, thus improving the ability to extract fine-grained features of gear surface defects.
[0042] In some embodiments, the ADown module divides the input feature map into two branches along the channel dimension. The first branch extracts basic features through convolution operations, and the second branch performs max pooling and convolution operations in sequence to highlight local key responses. The outputs of the two branches are concatenated along the channel dimension to obtain the downsampled feature map.
[0043] In embodiments of the present invention, such as Figure 3 As shown, in the backbone network, the ADown module is deployed in layers 3, 5, and 7, replacing the traditional convolutional downsampling with a stride of 2; in the neck network, the ADown module is deployed in the downsampling stage of the bottom-up path, also replacing the traditional convolutional downsampling with a stride of 2. The ADown module takes the input feature map... The algorithm is divided into two branches along the channel dimension. The first branch extracts basic features through convolution operations. ; The second branch performs max pooling and convolution operations sequentially to highlight key local responses: ; Max pooling uses a 2×2 pooling window with a stride of 2. The feature maps output from the two branches have the same spatial dimensions, and are concatenated along the channel dimension to obtain the downsampled feature map. ; Compared to traditional large-stride convolutions, the ADown module, by combining grouped pooling with lightweight convolution design, significantly reduces the number of model parameters and floating-point operations while maintaining or even improving defect detection accuracy. This multi-branch structure enables the network to fuse global contextual information with local detailed features at a lower computational cost, thereby enhancing its ability to perceive minute gear defects.
[0044] In some embodiments, the C2TSSA module calculates the mean vector and covariance matrix of the input feature tokens, maps the tokens to a low-dimensional semantic subspace through linear projection and constructs a statistical attention matrix, and applies the statistical attention matrix to the original input to enhance the feature representation.
[0045] In this embodiment of the invention, in the gear defect detection task, minute defects such as tooth surface cracks, missing teeth, scratches, chips, and black spots typically occupy only a very small pixel area in the image and are easily affected by complex factors such as uneven lighting, oily backgrounds, and metallic reflections. Although the C2PSA module in the YOLO11 baseline model achieves cross-stage partial attention modeling by fusing channel attention and spatial pyramid pooling, it is essentially still mainly limited to the importance labeling of the channel dimension, making it difficult to effectively capture the long-range spatial dependency between the defect area and the background. This results in the response intensity of minute defects being easily submerged by background noise. Figure 4 As shown, the C2TSSA module is used to replace the C2PSA module at the end of the YOLO11n framework backbone network. It performs global context-dependent modeling on the deep features output by the backbone network and then inputs them into the neck network.
[0046] The TSAttention submodule in the C2TSSA module processes input features ,in, For batch size, For the number of tokens, For the channel dimension, calculate the mean vector of all tokens. Covariance Matrix : ; ; By linear projection Tokens are mapped to a low-dimensional semantic subspace, and a statistical attention matrix is constructed. : ; ; in, The trace of the covariance matrix is used to characterize the dispersion of the token distribution; For adaptive regularization coefficients.
[0047] Finally, the statistical attention matrix will be used. Acting on the original input The enhanced feature representation is obtained as follows: ; The C2TSSA module abandons the pairwise token dot product operation in traditional self-attention and instead constructs attention weights based on global statistics, achieving global context modeling with linear complexity. This module effectively enhances the suppression of complex backgrounds such as metallic reflections, oil stains, and uneven lighting, and improves the perceptual response to weakly salient defects (such as minor scratches and dark skin).
[0048] In some embodiments, the statistical attention matrix is constructed using an adaptive regularization coefficient, which is dynamically adjusted according to the dispersion of the token distribution: the regularization strength increases when the feature distribution is relatively dispersed, and decreases when the feature distribution is relatively concentrated.
[0049] In this embodiment of the invention, the statistical attention matrix Adaptive regularization coefficients are used during the construction process. Make adjustments. Defined as: ; In the formula, This indicates that the step size hyperparameter is being updated. Represents the dimension of the subspace.
[0050] The coefficient can be dynamically adjusted based on the token distribution variance: when the feature distribution is more dispersed, the regularization strength increases, thereby prompting the attention matrix to focus on more stable feature patterns; when the feature distribution is more concentrated, the regularization strength decreases, in order to retain richer semantic information.
[0051] This dynamic adjustment mechanism enables the C2TSSA module to adaptively adjust the degree of attention focus according to the actual distribution of input features, effectively suppressing background noise while preserving the discriminative features of defect areas in complex industrial scenarios.
[0052] In some embodiments, the LQEHead detection head extracts statistical features for characterizing localization stability from bounding box distribution prediction, maps the statistical features to localization quality scalars through a multilayer perceptron, and fuses the quality scalars with the initial classification score to obtain a quality-perceived calibration score, which is then normalized by an activation function and used as the confidence score of the detection output.
[0053] This invention provides a detailed description of the confidence calibration mechanism for the LQEHead detection head.
[0054] like Figure 5 As shown, the LQEHead detection head is used to replace the original detection head in the YOLO framework. Let the bounding box distribution prediction output by the detection layer be... ,in For batch size, The number of predicted bounding boxes is [number], and the initial classification score is [score]. , The number of categories. LQEHead first extracts localization stability statistical features from the bounding box distribution prediction. : ; In the formula, Select the one with the highest probability in the distribution One value, This represents the global mean of the distribution. This statistical characteristic comprehensively reflects the peaks and concentrations of the bounding box prediction, and is an effective proxy for positioning quality.
[0055] Then, the statistical features are mapped to a localization quality scalar using a multilayer perceptron. : ; The quality scalar is combined with the initial classification score to obtain the quality perception calibration score. : ; final, After normalization using the Sigmoid activation function, the result is used as the confidence score for the detection output. This design explicitly models the localization quality of the bounding boxes, enabling predicted boxes with higher localization accuracy to obtain higher confidence scores, while effectively suppressing predicted boxes with large localization deviations.
[0056] In summary, the LQEHead module, by introducing a localization quality estimation mechanism, effectively aligns the localization accuracy of the predicted bounding box with the classification confidence. Replacing the baseline model's detection head with LQEHead allows the model to improve the localization reliability and classification confidence of minor defects without increasing computational cost, effectively alleviating the mismatch between regression quality and classification score in the detection head.
[0057] In some embodiments, the statistical features extracted from the bounding box distribution prediction to characterize the localization stability include: the probability values corresponding to the top K sampling points in the bounding box distribution, and the global mean of the bounding box distribution.
[0058] In this embodiment of the invention, the probability values corresponding to the top K sampling points in the probability distribution are selected. These K values reflect the peakedness of the bounding box prediction. If these values are all large and concentrated, it indicates that the model is very certain about the location, and the positioning quality is high; if these values are all relatively small and scattered, it indicates that the model is hesitant about the location, and the positioning quality is low. The global mean of the bounding box distribution reflects the overall level of prediction bias. The two sets of statistics are concatenated to form a complete statistical feature vector characterizing the positioning stability, which not only describes the local peakedness of the distribution but also reflects the overall central tendency of the distribution, providing sufficient statistical basis for accurate evaluation of positioning quality.
[0059] This embodiment describes the training process of the object detection network.
[0060] To verify the detection performance of the model proposed in this invention, a series of experiments were conducted using two publicly available datasets. These datasets contain various typical defect types, covering defect targets at different scales and complex industrial scene features, and can be used to systematically evaluate the detection performance of defect detection algorithms. The defect types mainly include dents, black spots, fractures, and missing teeth.
[0061] The GID dataset, a real-world gear defect dataset, originates from the "Xingzhi Cup" domestic development framework engineering application competition's open competition dataset. The data, collected from real industrial production environments, primarily consists of images of gear component defects, realistically reflecting gear surface texture, defect morphology, and complex background features in industrial visual inspection scenarios. A total of 2000 images are included. During data preprocessing, all images were first uniformly adjusted to 640×640 pixels and saved in JPG format. Then, LabelImg software was used to annotate the images, setting corresponding category labels according to defect type, and the annotation files were stored in XML format. Finally, the XML annotation files were uniformly converted to the TXT format required by the YOLO model and divided into training, validation, and test sets in a 7:2:1 ratio. 1400 images were used for model training, 400 for model validation, and 200 for model testing. The defect samples of each type are evenly distributed across the training, validation, and test sets to reduce the impact of class imbalance on model training and detection performance. This invention uses the GID dataset to train, validate, and test the model in order to evaluate the detection performance, effectiveness, and generalization ability of the proposed method in industrial gear defect detection tasks.
[0062] The publicly available gear defect dataset, sourced from the Roboflow platform (link: https: / / universe.roboflow.com / gear-u48i0 / gear-defect), contains 2978 images of diverse gear defects with significant scale variations. The dataset features a relatively balanced number of samples across each category, and the images are predominantly against pure white backgrounds, captured from the same shooting angle under bright, uniform lighting conditions. To ensure the effectiveness of model training and performance evaluation, this invention re-divides the publicly available gear defect dataset into training, validation, and test sets in a 7:2:1 ratio, containing 2084, 595, and 299 images respectively.
[0063] The hardware and software configurations used in the experiment are detailed in Table 1. On the hardware side, the experimental platform is equipped with an Intel Core Ultra 7 265K CPU, an NVIDIA GeForce RTX 3090 24 GB GPU, 32 GB DDR5 7200 MHz memory, and a 1 TB M.2 NVMe SSD, providing reliable support for large-scale parallel computing and model training. On the software side, the experimental environment is built on PyTorch 2.7.1, using CUDA 12.8 for GPU acceleration, and runs on the Windows 11 operating system to ensure hardware and software compatibility and operational stability. The training hyperparameter settings are shown in Table 2. The model uses the SGD optimizer for parameter updates, with an initial learning rate of 0.01, momentum parameter, and weight decay coefficient of 0.937 and 0.0005, respectively. The training cycle is 200, the input images are uniformly adjusted to 640×640 pixels, and the batch size is set to 32 to balance training efficiency, computational load, and GPU memory usage. The hyperparameters mentioned above, determined by referencing existing empirical research and combining grid search optimization, help promote stable convergence of the model during long-term training. Learning rate decay and warm-up strategies help alleviate the instability of parameter updates in the early stages of training, improving the balance and reliability of the optimization process across different training phases.
[0064] Table 1
[0065] Table 2
[0066] To verify the effectiveness of each module of the present invention, an ablation experiment was conducted on the real gear defect dataset GID dataset in this embodiment.
[0067] Table 3 shows the ablation experimental results after progressively introducing each module into the YOLO11n baseline model. The original YOLO11n baseline model had an mAP50 of 69.9%, an mAP50-95 of 35.9%, a model size of 5.2 MB, 2.6 M parameters, and a computational cost of 6.3 GFLOPs.
[0068] When the CSP-EDLAN module was introduced alone, mAP50 and mAP50-95 improved to 71.4% and 36.9% respectively, representing improvements of 1.5% and 1.0% compared to the baseline, making it the single improvement with the largest accuracy gain among all modules. The ADown module, when introduced alone, primarily contributed to model lightweighting, reducing the model size from 5.2MB to 4.3MB and the number of parameters from 2.6M to 2.1M, while simultaneously improving mAP50 by 0.4%. The C2TSSA module, introduced alone, improved mAP50 to 70.6%. The LQEHead detector, introduced alone, improved mAP50-95 by 0.7%, indicating its significant improvement in positioning quality under stricter IoU thresholds.
[0069] The combination of multiple modules further validated the synergistic complementarity between them. The combination of CSP-EDLAN and LQEHead resulted in mAP50 and mAP50-95 of 72.1% and 37.5%, respectively, improvements of 2.2% and 1.6% compared to the baseline. When ADown, CSP-EDLAN, and C2TSSA were used together, the model achieved 72.3% mAP50 and 37.9% mAP50-95 while reducing the number of parameters to 1.9M. When all four modules were used together, the model achieved the best overall performance, with mAP50 reaching 73.0% and mAP50-95 reaching 38.0%. Compared to the YOLO11n baseline, the final model improved mAP50 and mAP50-95 by 3.1% and 2.1%, respectively, while reducing model size, number of parameters, and GFLOPs by 23.1%, 26.9%, and 6.3%, respectively, and achieving an inference speed of 105.7 FPS.
[0070] Table 3
[0071] To verify the effectiveness of the feature enhancement module of this invention, the original C2PSA module in YOLO11n was used as a baseline, and it was replaced with different feature enhancement structures for comparison. The experimental results are shown in Table 4. The mAP50 and mAP50-95 of the baseline C2PSA were 69.9% and 35.9%, respectively. After adopting C2DA, the model performance decreased slightly, with mAP50 and mAP50-95 at 69.8% and 35.8%, respectively, indicating that this module did not bring effective gains in the current task. The mAP50 of C2BRA and C2CGA increased to 70.1% and 70.2%, respectively, but the mAP50-95 were 35.9% and 35.8%, respectively, indicating that they mainly improved the detection capability at low IoU thresholds, with limited improvement in high-precision localization. In comparison, the module of this invention achieves the best performance, with mAP50 and mAP50-95 reaching 70.6% and 36.2%, respectively, representing improvements of 0.7 and 0.3 percentage points compared to the C2PSA baseline. Furthermore, compared to other feature enhancement modules, the module of this invention exhibits more stable performance advantages. These results demonstrate that the module of this invention can more effectively enhance the representation of key features, improving both target detection capability and bounding box localization quality.
[0072] Table 4
[0073] Furthermore, to verify the effectiveness of the proposed detection head, comparative experiments were conducted on different detection heads within the same baseline framework, and the results are shown in Table 5. The original detection head had an mAP50 of 69.9%, 2.6 M parameters, and a computational cost of 6.3 GFLOPs. EfficientHead reduced the number of parameters and computational cost to 2.3 M and 5.1 GFLOPs, respectively, but its mAP50 decreased to 69.4%, indicating that excessive lightweighting may weaken the feature representation ability. SEAMHead reduced model complexity but also incurred some accuracy loss, with an mAP50 of 69.6%. MultiSEAMHead's mAP50 was on par with the baseline at 69.9%, but the number of parameters increased significantly to 4.5 M, indicating that the additional structure it introduced did not bring effective accuracy gains. In comparison, the detection head proposed in this invention improves mAP50 to 70.5% while maintaining the same number of parameters and computational cost as the original detection head, representing improvements of 0.6, 1.1, 0.9, and 0.6 percentage points compared to Baseline, EfficientHead, SEAMHead, and MultiSEAMHead, respectively. These results demonstrate that the designed detection head can enhance target discrimination capabilities without increasing model complexity, achieving a better balance between accuracy and efficiency.
[0074] Table 5
[0075] To further verify the performance advantages of the algorithm of this invention, we conducted a series of comparative experiments on the real gear defect dataset GIDdataset. The experimental configuration and training parameters used in the experiments were consistent with those described above.
[0076] Figure 6 The comparison of the PR curves of the baseline model YOLO11n and the proposed algorithm on the test set is shown, with the left figure representing YOLO11n and the right figure representing the proposed model (GSDD-Net). It can be seen that both models maintain high accuracy across most recall intervals, but the proposed model has a larger overall envelope area of its PR curve, indicating higher prediction accuracy at the same recall level and more stable detection capabilities in high-recall regions. In terms of quantitative results, YOLO11n's overall mAP50 is 69.9%, while the proposed model improves to 73.0%. Specifically, the AP for the hp_cm, hp_cd, and kp categories improved from 73.1%, 69.1%, and 67.6% to 74.8%, 72.2%, and 71.9%, respectively, demonstrating that the proposed model not only improves overall detection performance but also enhances the recognition ability of each category, especially showing significant improvement in the detection of the kp category. The results above demonstrate that, compared to the baseline model YOLO11n, the model of this invention exhibits superior performance in terms of detection accuracy, recall, and robustness.
[0077] like Figure 7 As shown, this invention compares and analyzes the normalized confusion matrices of the baseline model YOLO11n and the model of this invention on the test set. The diagonal elements of the confusion matrix reflect the correct classification and detection ratios of each target category, while the off-diagonal elements correspond to misclassification. The results show that compared with the baseline model YOLO11n, the diagonal values of the model of this invention are improved in all three target categories. Specifically, hp_cm, hp_cd, and kp are improved from 0.75, 0.69, and 0.65 to 0.79, 0.76, and 0.71, respectively, indicating that the model of this invention has further enhanced its ability to correctly identify each target category. At the same time, the false positives and false negatives in the background are alleviated, indicating that the model of this invention can more effectively distinguish between targets and background and reduce inter-category confusion. Overall, the comparison results of the normalized confusion matrices show that the model of this invention can maintain good background suppression ability while improving the target category discrimination ability, thus obtaining more reliable detection performance.
[0078] To verify the comprehensive performance of the proposed method, the algorithm of this invention was compared with several mainstream object detection algorithms. The experimental results are shown in Table 6. Table 6 shows that the model of this invention achieves a better balance between detection accuracy and model complexity, achieving the best results in the five accuracy indicators of P, R, F1-score, mAP50, and mAP50-95, reaching 74.5%, 67.7%, 70.8%, 73.0%, and 38.0%, respectively. Compared with the baseline model YOLO11n, the mAP50 of the model of this invention is improved from 69.9% to 73.0%, and the mAP50-95 is improved from 35.9% to 38.0%, an improvement of 3.1 and 2.1 percentage points, respectively; at the same time, the number of parameters is reduced from 2.6 M to 1.9 M, GFLOPs are reduced from 6.3 to 5.9, and FPS is improved from 93.7 to 105.7. The above results show that the proposed improvement not only enhances the detection accuracy of the model, but also further improves the lightweight nature and inference efficiency of the model. Compared with other high-performance comparative models, the model of this invention also demonstrates strong competitiveness. Although some models have certain advantages in a single metric, such as higher inference speed or lower computational cost, they are usually accompanied by a significant decrease in accuracy; while models with higher accuracy often require a larger number of parameters or computational overhead. In contrast, the model of this invention achieves the highest mAP50 and mAP50-95 with only 1.9 M parameters, indicating that it can obtain more sufficient feature representation capabilities with lower model complexity. In summary, the model of this invention achieves a better comprehensive trade-off between detection accuracy, parameter size, computational complexity, and inference speed, verifying the effectiveness and practical value of the proposed method in lightweight target detection tasks.
[0079] Table 6
[0080] Table 7 shows the comparison results of mAP50 and mAP50-95 for different models in each single category. Overall, the model of this invention achieved the best or competitive detection performance in the three categories of hp_cm, hp_cd, and kp, indicating that the proposed method not only improves the overall average accuracy but also stably enhances the identification and localization capabilities of different target categories. In terms of mAP50, the model of this invention achieved 72.2%, 71.9%, and 74.8% in the three categories, respectively, representing improvements of 1.7, 3.0, and 4.3 percentage points compared to the baseline YOLO11n. The improvement was most significant in the kp category, indicating that the improved model has stronger feature representation and discrimination capabilities for this type of target. Under the more stringent mAP50-95 metric, the advantages of the proposed model are further demonstrated. It achieves 40.6%, 42.3%, and 31.0% accuracy in the hp_cm, hp_cd, and kp categories, respectively, all outperforming the baseline YOLO11n and representing improvements of 2.4, 1.4, and 2.4 percentage points, respectively. This indicates that the proposed method not only improves target detection capability but also enhances bounding box localization accuracy and exhibits better robustness under multiple IoU threshold evaluation. It is worth noting that the performance of some categories fluctuates across different comparison models, indicating that the adaptability of each model to differences in scale, texture, and morphology between categories is inconsistent. In contrast, the proposed model maintains a stable lead in all three categories, without exhibiting performance degradation in any single category, demonstrating more balanced category adaptability. In summary, Table 5 further verifies the effectiveness of the proposed model at the single-category detection level, showing that the proposed method can simultaneously improve the detection accuracy and localization quality of different target categories, providing reliable support for overall performance improvement.
[0081] Table 7
[0082] Furthermore, to further verify the generalization ability and stability of the model of this invention, a series of comparative experiments were conducted on a publicly available gear defect dataset. The experimental configuration and training parameters used in the experiments were consistent with those in Section 3.2. Table 8 shows the comparison results between the model of this invention and several mainstream detection algorithms on the publicly available gear defect dataset. As can be seen from Table 8, several lightweight YOLO series models show certain competitiveness in terms of efficiency, but their detection accuracy, especially mAP50-95, still has certain limitations. Some models performed well on specific metrics. For example, HyperYOLO-t achieved a high recall of 97.0% and an mAP50-95 of 68.3%, but its parameter count and computational cost reached 3.2 M and 9.6 GFLOPs, respectively. YOLOv12n achieved an mAP50 of 97.3% with 5.8 GFLOPs, but its mAP50-95 was only 67.6%, indicating that its localization accuracy under stricter IoU thresholds was still lower than that of the proposed model. RT-DETR-1 achieved an mAP50 of 97.0%, but its parameter count and computational cost increased significantly to 32.0 M and 103.4 GFLOPs, respectively. In contrast, the proposed model achieved the best overall detection performance, with precision, recall, F1, mAP50, and mAP50-95 of 95.6%, 97.9%, 96.7%, 97.8%, and 69.6%, respectively. Compared to the YOLO11n baseline, the proposed model improves mAP50 and mAP50-95 by 0.7 and 2.1 percentage points, respectively, while reducing the number of parameters from 2.6 M to 1.9 M and the computational cost from 6.3 GFLOPs to 5.9 GFLOPs. Compared to HyperYOLO-t, the proposed model further improves mAP50-95 by 1.3 percentage points while using fewer parameters and lower computational cost. These results demonstrate that the advantages of the proposed model are not only reflected in the improved detection accuracy but also in its ability to improve localization quality at high IoU thresholds with a more compact network structure. Overall, the proposed model achieves a better balance between detection performance and model complexity on publicly available gear defect datasets, further validating its generalization ability and effectiveness.
[0083] Table 8
[0084] Figure 8The comparison of PR curves between YOLO11n and the model of this invention is shown, with the left figure representing YOLO11n and the right figure representing the model of this invention. As can be seen from the figures, compared to YOLO11n, the overall PR curve of the model of this invention is closer to the upper right corner of the coordinate system, with a larger curve envelope area. The mAP50 for all categories increased from 97.1% to 97.8%, indicating that the improved model further enhances overall recall while maintaining high detection accuracy. Looking at the detection results for each category, the AP for the break category is 99.5% in both models, indicating that this category has high separability and that the model of this invention maintains stable detection performance. The AP for the lack category also remains at 99.5%, indicating that the model improvement did not cause a degradation in the detection performance of this category. For the relatively difficult scratch category, its AP increased from 92.3% to 94.4%, an improvement of 2.1%, indicating that the model of this invention can more effectively capture small defect features and enhance the recognition ability of weakly textured targets. Overall, the model of this invention significantly improves the detection performance of the scratch category while maintaining high-precision detection performance for the break and lack categories, thereby optimizing the overall PR curve performance and further enhancing the model's comprehensive detection performance.
[0085] Furthermore, to further evaluate the overall performance of the model of this invention, based on the experimental results in Table 6, this invention selected detection algorithms that performed well on the GID dataset for comparative experiments, including models such as YOLOv8n, YOLO-world, YOLO-worldv2, HyperYOLO-t, and RT-DETR-l; simultaneously, based on the experimental results in Table 8, detection algorithms that performed well on the publicly available gear defect dataset were selected for comparative experiments, including models such as YOLO11n, YOLOv12n, YOLO-worldv2, HyperYOLO-t, and RT-DETR-l. The relevant visualized detection results are shown below. Figure 9 and Figure 10 As shown. Figure 9 and Figure 10Visual comparisons of different detection models on the GID dataset and a publicly available gear defect dataset are presented. Experimental results show that the proposed model exhibits superior defect recognition and localization capabilities on both datasets, accurately detecting various defects on gear surfaces and effectively reducing false negatives and false positives. Compared to other mainstream detection models, the detection boxes generated by the proposed model have a higher degree of overlap with the ground truth bounding boxes, indicating stronger robustness in defect region localization, boundary regression, and key feature representation. In contrast, while other comparative models can identify some significant defects, they still suffer from incomplete detection, localization bias, or misclassification in scenarios with small-sized defects, weak texture defects, and complex background interference. The combined visualization results demonstrate that the proposed model can more fully extract discriminative features of gear surface defects, exhibiting significant advantages in detection accuracy, localization stability, and dataset generalization ability, further validating the effectiveness and practical application potential of the proposed method in gear surface defect detection tasks.
[0086] To verify the practical application effect of the model of this invention in gear surface defect detection, this invention selected multiple gear images containing typical defects such as fracture, missing teeth, scratches, chipping, black scale on the tooth surface, and black scale on the tooth base for visualization testing. The detection results are as follows: Figure 11 As shown in the figure, the first row represents the detection results of the baseline model YOLO11n, and the second row represents the detection results of the model of this invention. As can be seen from the figure, YOLO11n exhibits missed detections, false detections, or localization biases in some complex samples, particularly in its insufficient ability to identify small-scale defects and weakly salient defects against complex metal texture backgrounds. In contrast, the model of this invention can more accurately locate different types of gear surface defects, with a higher matching degree between the detection bounding box and the actual defect area, and a significant reduction in false detections and missed detections. This performance improvement is mainly attributed to the collaborative optimization of ADown, CSP-EDLAN, C2TSSA, and LQEHead in terms of detail information preservation, multi-scale feature fusion, global context modeling, and localization quality perception. The above results demonstrate that the model of this invention, while maintaining lightweight design and high inference efficiency, further improves the accuracy and reliability of gear surface defect detection in complex industrial scenarios.
[0087] Furthermore, to further analyze model performance from a feature perspective, this invention uses Grad-CAM heatmaps to visually compare the feature responses of the algorithm of this invention with the baseline model YOLO11n. For example... Figure 12As shown, the high-response region of the model in this invention can accurately focus on the core area of the defect on the gear surface (highlighted in red), and is highly consistent with the actual defect location, indicating that it has a strong ability to represent local details of defects such as fractures, missing teeth, scratches, chips, and black spots. In contrast, the heatmap response of the baseline model YOLO11n is more dispersed, with false responses in background areas such as complex metal textures, reflections, and oil stains (blue dashed boxes), and insufficient activation of weakly salient defects, which easily leads to missed detections and positioning errors. The above results show that the ADown module enhances the ability to preserve defect edges and texture information during lightweight downsampling; the CSP-EDLAN module improves gradient transfer, channel interaction, and multi-scale semantic fusion capabilities; the C2TSSA module enhances the perception of weakly salient defects and suppresses background interference through global context modeling; and LQEHead achieves synergistic optimization of classification confidence and bounding box positioning quality through positioning quality estimation. The visualization results further verify that the algorithm of this invention has better feature extraction, background suppression, and spatial positioning capabilities in complex industrial scenarios.
[0088] Although specific embodiments of the invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of this patent. Various modifications and variations that can be made by a person skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of this patent.
Claims
1. A method for detecting surface defects in gears based on an improved YOLO architecture, characterized in that, include: Acquire an image of the gear surface; The gear surface image is input into a pre-trained YOLO target detection network, which outputs the category and location of the gear surface defects. The YOLO target detection network includes a backbone network, a neck network, and a detection head. Specifically, the CSP-EDLAN module replaces the C3k2 module in the backbone network and the neck network; the ADown module replaces the downsampling convolution module in the backbone network and the neck network; the C2TSSA module replaces the C2PSA module in the backbone network; and the detection head is an LQEHead detection head.
2. The method according to claim 1, characterized in that, The CSP-EDLAN module adjusts the number of channels in the input feature map through convolutional layers and then divides it into a pass-through branch and a processing branch along the channel dimension. The pass-through branch is directly connected to the end of the module to achieve short-circuit propagation of gradient information and feature reuse. The processing branch enters the EDLAN structure, which contains multiple serially connected DualConv layers. The output of each DualConv layer serves as the input of the next DualConv layer. The outputs of all DualConv layers are concatenated with the pass-through branch along the channel dimension and then subjected to feature fusion and channel compression through convolutional layers.
3. The method according to claim 2, characterized in that, In the DualConv layer, the input feature map is divided into multiple groups along the channel dimension. For each group, two sets of parallel convolution operations are performed simultaneously. One set is group convolution, which is used to extract local spatial features, and the other set is pointwise convolution, which is applied to the complete input feature map to achieve cross-channel information interaction and preservation of original information. The outputs of the two sets of convolutions are fused by adding them element by element.
4. The method according to claim 1, characterized in that, The ADown module divides the input feature map into two branches along the channel dimension. The first branch extracts basic features through convolution operations, and the second branch performs max pooling and convolution operations in sequence to highlight local key responses. The outputs of the two branches are concatenated along the channel dimension to obtain the downsampled feature map.
5. The method according to claim 1, characterized in that, The C2TSSA module calculates the mean vector and covariance matrix of the input feature tokens, maps the tokens to a low-dimensional semantic subspace through linear projection, constructs a statistical attention matrix, and applies the statistical attention matrix to the original input to enhance the feature representation.
6. The method according to claim 5, characterized in that, The statistical attention matrix is constructed using an adaptive regularization coefficient, which is dynamically adjusted based on the dispersion of the token distribution: the regularization strength increases when the feature distribution is relatively dispersed, and decreases when the feature distribution is relatively concentrated.
7. The method according to claim 1, characterized in that, The LQEHead detection head extracts statistical features to characterize localization stability from bounding box distribution prediction, maps the statistical features to localization quality scalars through a multilayer perceptron, and fuses the quality scalars with the initial classification score to obtain a quality-perceived calibration score. After normalization by an activation function, it is used as the confidence score of the detection output.
8. The method according to claim 7, characterized in that, The statistical features extracted from the bounding box distribution prediction to characterize the stability of localization include: the probability values of the top K sampling points in the bounding box distribution, and the global mean of the bounding box distribution.