A tooth surface defect segmentation method and system with spatial direction perception and detail feature fusion

By constructing the SFDNet network model and utilizing multi-scale feature extraction and weighted depth supervision, the problems of insufficient feature response and inaccurate boundaries of pitting defects on gear tooth surfaces were solved, achieving efficient tooth surface defect segmentation and detail preservation, and improving the intelligence level of gear inspection.

CN122391272APending Publication Date: 2026-07-14NORTHEASTERN UNIV CHINA +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-06-15
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively identify and segment pitting defects on gear tooth surfaces, especially for small target detection and slender strip-shaped defects. This results in insufficient feature response, incomplete semantic expression, and inaccurate segmentation boundaries, making it difficult to meet the high reliability and intelligent operation and maintenance requirements of modern equipment.

Method used

A VGG encoder is used for multi-scale feature extraction to construct an SFDNet network model. A strip attention module captures directional geometric features, a feature complement mapping module preserves fine-grained details, a cross-interactive attention mechanism aggregates features, and a detail-preserving context fusion module achieves cross-level feature fusion. A weighted multi-level deep supervision mechanism is introduced to guide training.

Benefits of technology

It significantly improves the accuracy and boundary consistency of gear tooth surface defect segmentation, enhances the directional perception of slender defect structures and the preservation of micro-defect details, reduces information loss, and improves the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391272A_ABST
    Figure CN122391272A_ABST
Patent Text Reader

Abstract

The application provides a gear surface defect segmentation method and system with spatial direction perception and detail feature fusion, and belongs to the field of gear defect monitoring. The method uses a VGG encoder loaded with pre-training weights to extract multi-scale features, constructs an SFDNet network model, captures defect direction geometric features through a strip-shaped attention module, aggregates semantic and detail information through a feature complementary mapping module and a cross interaction attention mechanism, realizes cross-level feature fusion through a detail preserving context fusion module, introduces a weighted multi-level deep supervision mechanism to guide efficient updating of network parameters and accelerate model convergence, and finally outputs a gear surface defect segmentation result. The application effectively solves the problems of insufficient extraction of gear surface defect direction features and easy loss of small target information, and improves the accuracy and boundary consistency of gear surface defect segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gear tooth surface defect monitoring and maintenance technology, and more particularly to a tooth surface defect segmentation method and system with spatial orientation perception and detailed feature fusion. Background Technology

[0002] As a core component for power transmission and motion conversion in modern industrial systems, gears' operational reliability directly determines the overall performance and service safety of equipment. During gear transmission, the tooth surface is constantly subjected to the combined effects of cyclic alternating contact stress, friction, and impact loads. Tooth surface failure has become the primary cause of gear transmission system malfunctions. Tooth surface pitting, as a characteristic early stage of failure, is marked by the formation of micro-fatigue cracks and accompanying pits in localized areas of the tooth surface. Without effective intervention, these micro-defects will continue to expand and penetrate under load cycles, eventually leading to large-area material spalling, resulting in a sharp decline in gear meshing accuracy, and even serious accidents such as equipment downtime. Therefore, identifying and segmenting gear tooth surface pitting has significant theoretical value and urgent engineering implications for improving equipment health management and ensuring operational safety.

[0003] Traditional manual methods, such as microscopic inspection or dye penetrant testing, are not only cumbersome and inefficient, but also highly dependent on the experience and subjective judgment of the inspectors, making standardization and large-scale application difficult. Therefore, existing manual pitting detection technologies have significant shortcomings in accuracy, timeliness, and automation, failing to meet the urgent needs of modern high-end equipment for high reliability and intelligent operation and maintenance. In recent years, the rapid development of deep learning and machine vision technologies has provided a new technical path for gear pitting detection. Considering that pitting on gear teeth is in its initial stage, a single pit typically occupies a small area on the overall tooth surface, and its features are easily obscured by complex backgrounds; therefore, it is essentially a typical small-target detection problem. With increased service time and continuous load, pitting defects continuously emerge, expand, and connect, eventually evolving into large-area tooth surface peeling, significantly altering the geometric morphology and texture of the tooth surface. It is worth noting that pitting corrosion typically originates in high-stress areas (near the pitch line) during gear meshing and mainly extends along the tooth width. Therefore, the resulting defects often exhibit a typical elongated strip-like geometric shape with a large aspect ratio. However, most existing detection methods typically employ regular, isotropic convolutional kernels in the feature extraction stage. These convolutional structures are better at capturing features of local blocky or approximately square regions. For tooth surface spalling defects with directional and elongated shapes, they often fail to fully characterize their key structural information, easily leading to insufficient feature response or incomplete semantic expression. Summary of the Invention

[0004] To address the aforementioned technical challenge of extracting features from small and elongated targets in tooth surface defect morphology, this invention provides a tooth surface defect segmentation method and system with spatial orientation awareness and detailed feature fusion. This invention primarily utilizes a VGG encoder with pre-trained weights to extract multi-scale features from tooth surface defect images and constructs an SFDNet network model. A strip-shaped attention module captures the directional geometric features of tooth surface defects along two spatial axes. A feature complementarity mapping module and a cross-interactive attention mechanism achieve complementary aggregation of deep semantic information and fine-grained detail information. A detail-preserving context fusion module completes cross-level adaptive fusion of low-level detail features and high-level semantic features. Simultaneously, a weighted multi-level deep supervision mechanism is introduced to guide network training, thereby enhancing the orientation-aware representation of slender defect structures, preserving fine-grained details of micro-defects, mitigating information loss from progressive sampling, and improving the accuracy and boundary consistency of tooth surface defect segmentation.

[0005] The technical means employed in this invention are as follows:

[0006] A tooth surface defect segmentation method with spatial orientation awareness and detailed feature fusion includes: S1. Use a tooth surface defect morphology acquisition device to acquire high-resolution tooth surface defect images, and preprocess the acquired high-resolution tooth surface defect images to construct a standardized defect dataset. S2. Introduce a VGG encoder with pre-trained weights and use the VGG encoder to extract multi-scale features from tooth surface defect images in the standardized defect dataset to generate a multi-level feature pyramid. S3. Construct an SFDNet network model, input the five-level feature pyramid into the strip attention module through the decoding path of the SFDNet network model, and use horizontal and vertical strip depth convolution to capture the geometric features of tooth surface defects along the two spatial axes to generate a direction-aware feature map. S4. Input the orientation-aware feature map into the feature complement mapping module of the SFDNet network model, extract deep semantic information through the main branch, and retain fine-grained detail information through the sub-branch; S5. Introduce a cross-interactive attention mechanism to aggregate features between the main branch and sub-branches, and generate detailed enhanced feature maps. S6. Input the detail enhancement feature map and the corresponding level encoder features in the five-level feature pyramid after spatial size alignment into the detail preservation context fusion module of the SFDNet network model. Through a learnable adaptive fusion strategy, the cross-level fusion of low-level detail features and high-level semantic features is completed to obtain the refined feature extraction results of defect morphology. S7. During the training phase of the SFDNet network model, a weighted multi-level deep supervision mechanism is introduced. The composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss is independently calculated for the output of each network layer and its corresponding real label mask. The composite losses of each layer are then weighted and fused according to preset weights to guide the network parameter update, accelerate model convergence, and output the tooth surface defect segmentation results.

[0007] Further, step S1 includes: S11. Mount the high-resolution charge-coupled device industrial camera on an adjustable bracket, adjust the camera pose through multi-degree-of-freedom positioning, make the camera optical axis perpendicular to the tooth surface, and obtain high-resolution images of tooth surface defects. S12. Arrange high-brightness LED light sources around the gear meshing area to enhance the contrast of tooth surface texture and pitting defects. S13. Use an industrial camera to collect multiple images of tooth surface defects at different pitting development stages, and uniformly crop and adjust all images to the same pixel size. S14. Use image annotation tools to accurately annotate the pitting areas in each image at the pixel level, generate corresponding semantic labels, and construct a standardized defect dataset.

[0008] Further, step S2 includes: S21. VGG16 is used as the backbone network to build the encoder, and the encoder is initialized with weights pre-trained on a large-scale image dataset. The general visual features of the large-scale image dataset are transferred to the tooth surface defect segmentation task to enhance the feature representation ability of tooth surface defects and accelerate the model training convergence. S22. In the encoding stage, the initialized encoder is used to perform layer-by-layer convolution and downsampling operations on the tooth surface defect image, and a five-level feature pyramid is generated through multi-scale feature extraction, denoted as... These correspond to multi-scale features from shallow to deep layers.

[0009] Further, in step S3, the striped attention module employs a striped attention mechanism, including: S31. Assume the input feature map is represented as... ,in , and These represent the channel dimension, height, and width, respectively. S32. Use a 5×5 depthwise convolution to extract local features from the input feature map to obtain the local feature map. , ; S33, utilizing the core size as Strip depthwise convolution pairs local feature maps Directional features are extracted along the first spatial axis to obtain the first directional feature map. , ,in much smaller ; S34, utilizing the core size as The strip depthwise convolution extracts directional features from the first directional feature map along the second spatial axis, resulting in a direction-aware feature map. , To enhance the directional perception of slender and narrow tooth surface defect structures in the spatial domain.

[0010] Further, step S4 includes: S41. Using the orientation-aware feature map as input feature mapping, according to a preset ratio... Divide the data along the channel dimension into main branches and sub-branches:

[0011] in, Represents the feature map of the main branch. Represents the feature map of the sub-branch. Indicates according to ratio Segment along the channel dimension; S42. Perform two levels of processing on the main branch feature map sequentially. Convolutional mapping and Convolutional operations extract deep semantic information, resulting in feature maps for the main branch processing. : ; in, The convolutional mapping module consists of convolution, batch normalization, and the SiLU activation function. Indicates the convolution operation; S43. Perform analysis on the sub-branch feature map. Convolution operations preserve fine-grained details and yield feature maps for sub-branch processing. : .

[0012] Further, step S5 includes: S51. Calculate the spatial attention graph using a spatial attention mechanism. :

[0013] in, This represents the sigmoid activation function. Indicates batch normalization, express convolution; S52. Calculate the channel attention map using the channel attention mechanism. :

[0014] in, Indicates global average pooling. express Depthwise convolution; S53, Spatial Attention Map Main branch feature map Channel attention map Sub-branch feature map Perform feature aggregation to obtain the aggregated detail-enhanced feature map. :

[0015] in, This indicates element addition.

[0016] Further, step S6 includes: S61. Align the encoder-level features and detail enhancement feature maps in the five-level feature pyramid in terms of spatial dimensions to obtain aligned low-level features and high-level features; where the low-level features are encoder-level features and the high-level features are detail enhancement feature maps. S62. Divide the aligned low-level and high-level features evenly into G groups along the channel dimension, denoted as follows:

[0017]

[0018] S63. Introduce learnable scalar parameters The sigmoid function is used to map it to a fusion ratio for the first... The group features are adaptively fused using the following formula:

[0019] in, Indicates the first Group low-level features, Indicates the first Group high-level features; S64. Concatenate the fusion features of all groups along the channel dimension to obtain the channel-concatenated features. :

[0020] S65, Connect the channel splicing features pass The convolutional mapping module aggregates information between channels to generate the final cross-level fused features. :

[0021] in, express Convolutional mapping module.

[0022] Further, in step S7, during the training phase of the SFDNet network model, a weighted multi-level deep supervision strategy is designed; a composite loss is independently calculated for the output of each network decoder layer and its corresponding ground truth mask, including: S71. Calculate the binary cross-entropy loss using the following formula:

[0023] in, Indicates the first k The prediction map generated by the decoder Represents a true binary mask. Indicates the total number of pixels; S72. Calculate the IoU loss using the following formula:

[0024] in, It is a minimal constant that avoids a denominator of zero; S73. Calculate the boundary loss using the following formula:

[0025] in, Indicates the boundary extraction operator, Represents the boundary pixel weights, used to enhance supervision of difficult-to-segment regions; S74. Based on the binary cross-entropy loss, IoU loss, and boundary loss, calculate the composite loss using the following formula:

[0026] S75. The composite losses calculated independently for each layer are weighted and summed according to a preset weight vector to obtain the total loss function, which guides the efficient updating of network parameters and accelerates model convergence. The formula is as follows:

[0027] in, Indicates the first The loss weight coefficients corresponding to each decoder layer .

[0028] This invention also provides a tooth surface defect segmentation system based on the aforementioned tooth surface defect segmentation method with spatial orientation awareness and detail feature fusion, comprising: an image acquisition and dataset construction module, a multi-scale feature extraction module, an orientation-aware feature extraction module, a semantic and detail branch extraction module, a cross-interaction attention aggregation module, a cross-level feature fusion module, and a weighted depth-supervised training module, wherein: The image acquisition and dataset construction module is used to acquire high-resolution tooth surface defect images using a tooth surface defect morphology acquisition device, and to preprocess the acquired high-resolution tooth surface defect images to construct a standardized defect dataset. The multi-scale feature extraction module is used to introduce a VGG encoder loaded with pre-trained weights, and use the VGG encoder to perform multi-scale feature extraction on tooth surface defect images in the standardized defect dataset to generate a multi-level feature pyramid. The orientation-aware feature extraction module is used to construct an SFDNet network model. The five-level feature pyramid is input into the strip attention module through the decoding path of the SFDNet network model. The horizontal and vertical strip depth convolution is used to capture the directional geometric features of the tooth surface defects along the two spatial axes to generate an orientation-aware feature map. The semantic and detail branch extraction module is used to input the direction-aware feature map into the feature complement mapping module of the SFDNet network model, and extract deep semantic information through the main branch and retain fine-grained detail information through the sub-branch; The cross-interactive attention aggregation module is used to introduce a cross-interactive attention mechanism to aggregate features of the main branch and sub-branches and generate a detail-enhanced feature map. The cross-level feature fusion module is used to input the detail enhancement feature map and the corresponding level encoder features in the five-level feature pyramid after spatial size alignment into the detail preservation context fusion module of the SFDNet network model. Through a learnable adaptive fusion strategy, it completes the cross-level fusion of low-level detail features and high-level semantic features to obtain the refined feature extraction result of defect morphology. The weighted deep supervision training module is used to introduce a weighted multi-level deep supervision mechanism during the training phase of the SFDNet network model. It independently calculates the composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss for the output of each network layer and its corresponding real label mask. The composite losses of each layer are then weighted and fused according to preset weights to guide the network parameter update, accelerate model convergence, and output the tooth surface defect segmentation results.

[0029] Compared with the prior art, the present invention has the following advantages: 1. The tooth surface defect segmentation method with spatial orientation awareness and detail feature fusion provided by the present invention designs a strip-shaped attention module. By using horizontal and vertical strip depth convolution to extract the orientation features of the tooth surface defect image along two spatial axes, it realizes the orientation-aware representation of the slender strip-shaped geometric shape of the tooth surface defect, and enhances the feature response of slender and narrow defect structures in the spatial domain.

[0030] 2. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion provided by the present invention designs a feature complementary mapping module. It extracts deep semantic information through the main branch and retains fine-grained detailed information through the sub-branch. The main branch and the sub-branch are aggregated through a cross-interaction attention mechanism, which realizes the effective preservation of key information of micro-defects such as pitting and prevents the loss of small target information during feature downsampling.

[0031] 3. The tooth surface defect segmentation method with spatial orientation awareness and detail feature fusion provided by this invention designs a detail-preserving context fusion module. By adjusting the adaptive fusion ratio between low-level detail features and high-level semantic features through learnable scalar parameters, it achieves effective capture of local and global representations across levels and reduces information loss caused by progressive sampling.

[0032] 4. The tooth surface defect segmentation method with spatial orientation awareness and detailed feature fusion provided by this invention designs a weighted multi-level deep supervision mechanism. By independently calculating the composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss for the output of each network decoder layer and its corresponding real label mask, and weighting and fusing the composite losses of each layer according to preset weights, it realizes enhanced supervision of the boundary of the difficult-to-segment region, accelerates model convergence and improves the model's generalization ability.

[0033] 5. The tooth surface defect segmentation method with spatial orientation awareness and detail feature fusion provided by this invention is based on a VGG16 encoder and loaded with ImageNet pre-trained weights. Through transfer learning, the general visual features of large-scale image datasets are transferred to the tooth surface defect segmentation task, realizing multi-scale feature extraction of gear surface defects, enhancing feature representation ability and accelerating training convergence.

[0034] In summary, by applying the technical solution of this invention, the existing technologies address the problems of insufficient representation of directional and elongated tooth surface spalling defects using regular, isotropic convolutional kernels, leading to insufficient feature response or incomplete semantic expression, easy loss of small target information during feature downsampling, and coarse segmentation boundaries. This invention significantly improves the accuracy of gear surface defect segmentation by employing a strip-shaped attention module to capture directional geometric features, a feature complementarity mapping module to preserve micro-defect details, a detail-preserving context fusion module to achieve cross-level information complementarity, and a weighted multi-level deep supervision mechanism to strengthen boundary learning. Therefore, the technical solution of this invention solves the problems of insufficient extraction of directional features of tooth surface defects, easy loss of small target information, inaccurate segmentation boundaries, and insufficient model generalization ability in the existing technologies.

[0035] Based on the above reasons, this invention can be widely applied in fields such as gear tooth surface defect monitoring and maintenance, intelligent operation and maintenance of industrial equipment, and machine vision non-destructive testing. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart of the method of the present invention.

[0038] Figure 2 This is a diagram illustrating the overall framework of the SFDNet network model of this invention.

[0039] Figure 3 This is a schematic diagram of the feature complementary mapping module of the present invention.

[0040] Figure 4 A schematic diagram of the structure of the context fusion module for the sake of detail in this invention.

[0041] Figure 5 This is a visualization result of tooth surface spalling morphology recognition provided in an embodiment of the present invention.

[0042] Figure 6 Visualization results of model attention maps provided in embodiments of the present invention Figure 7 The image shows the actual peeling morphology segmentation results provided in the embodiments of the present invention. Detailed Implementation

[0043] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product or device.

[0045] like Figure 1 As shown, this invention provides a tooth surface defect segmentation method with spatial orientation awareness and detailed feature fusion, comprising: S1. Use a tooth surface defect morphology acquisition device to acquire high-resolution tooth surface defect images, and preprocess the acquired high-resolution tooth surface defect images to construct a standardized defect dataset. S2. Introduce a VGG encoder with pre-trained weights and use the VGG encoder to extract multi-scale features from tooth surface defect images in the standardized defect dataset to generate a multi-level feature pyramid. S3. Construct an SFDNet network model. Input the five-level feature pyramid into the strip attention module via the decoding path of the SFDNet network model. Use horizontal and vertical strip depth convolutions to capture the geometric features of tooth surface defects along two spatial axes to generate a direction-aware feature map; such as Figure 2 The diagram shows the overall framework of the SFDNet network model. In the decoding stage, the Strip Attention Module (SAB) is designed to capture slender structural features, thus addressing the common slender defect morphology in gear spalling faults. Simultaneously, a Feature Complementary Mapping Module (FCM) is introduced to mitigate information loss caused by upsampling and enhance the representation of small-scale defects. Finally, a Detail Preserving Context Fusion Module (DPCF) is used to progressively integrate feature maps from different levels, effectively utilizing the complementary relationship between deep semantic information and shallow detail features.

[0046] S4. Input the orientation-aware feature map into the feature complement mapping module of the SFDNet network model, extract deep semantic information through the main branch, and retain fine-grained detail information through the sub-branch; S5. Introduce a cross-interactive attention mechanism to aggregate features between the main branch and sub-branches, and generate detailed enhanced feature maps. S6. Input the detail enhancement feature map and the corresponding level encoder features in the five-level feature pyramid after spatial size alignment into the detail preservation context fusion module of the SFDNet network model. Through a learnable adaptive fusion strategy, the cross-level fusion of low-level detail features and high-level semantic features is completed to obtain the refined feature extraction results of defect morphology. S7. During the training phase of the SFDNet network model, a weighted multi-level deep supervision mechanism is introduced. The composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss is independently calculated for the output of each network layer and its corresponding real label mask. The composite losses of each layer are then weighted and fused according to preset weights to guide the network parameter update, accelerate model convergence, and output the tooth surface defect segmentation results.

[0047] In a specific implementation, as a preferred embodiment of the present invention, step S1 includes: S11. The high-resolution charge-coupled device industrial camera is mounted on an adjustable bracket, and the camera pose is adjusted by multi-degree-of-freedom positioning so that the camera optical axis is perpendicular to the tooth surface to obtain a high-resolution image of the tooth surface defect. In this embodiment, the high-resolution charge-coupled device industrial camera can capture video of its tooth surface at a rate of 210 frames per second.

[0048] S12. Arrange high-brightness LED light sources around the gear meshing area to enhance the contrast of tooth surface texture and pitting defects. S13. Multiple images of tooth surface defects are acquired using an industrial camera at different stages of pitting development, and all images are uniformly cropped and adjusted to the same pixel size. In this embodiment, a total of 840 high-quality images of tooth surface defects at different stages are acquired. All images are uniformly cropped and resized to 256×256 pixels.

[0049] S14. Use the LabelMe image annotation tool to accurately annotate the pitting areas in each image at the pixel level, generate corresponding semantic labels, and construct a standardized defect dataset.

[0050] In a specific implementation, as a preferred embodiment of the present invention, step S2 includes: S21. VGG16 is used as the backbone network to build the encoder, and the encoder is initialized with weights pre-trained on a large-scale image dataset. The general visual features of the large-scale image dataset are transferred to the tooth surface defect segmentation task to enhance the feature representation ability of tooth surface defects and accelerate the model training convergence. S22. In the encoding stage, the initialized encoder is used to perform layer-by-layer convolution and downsampling operations on the tooth surface defect image, and a five-level feature pyramid is generated through multi-scale feature extraction, denoted as... These correspond to multi-scale features from shallow to deep layers.

[0051] In a specific implementation, as a preferred embodiment of the present invention, in step S3, the strip-shaped attention module adopts a stripe attention mechanism, including: S31. Assume the input feature map is represented as... ,in , and These represent the channel dimension, height, and width, respectively. S32. Use a 5×5 depthwise convolution to extract local features from the input feature map to obtain the local feature map. , ; S33, utilizing the core size as Strip depthwise convolution pairs local feature maps Directional features are extracted along the first spatial axis to obtain the first directional feature map. , ,in much smaller ; S34, utilizing the core size as The strip depthwise convolution extracts directional features from the first directional feature map along the second spatial axis, resulting in a direction-aware feature map. , To enhance the directional perception of slender and narrow tooth surface defect structures in the spatial domain.

[0052] In this embodiment, considering that pitting corrosion on tooth surfaces typically begins near the pitch line and spreads significantly faster along the tooth width direction than along the tooth profile direction, the resulting failure exhibits a distinct striped pattern. Based on this, this embodiment proposes a striped attention module that employs horizontal and vertical stripe depth convolutions to capture directional features along two spatial axes, thereby enhancing the representation of elongated and narrow structures in the spatial domain.

[0053] In a specific implementation, as a preferred embodiment of the present invention, step S4 includes: S41. Using the orientation-aware feature map as input feature mapping, according to a preset ratio... Divide the data along the channel dimension into main branches and sub-branches:

[0054] in, Represents the feature map of the main branch. Represents the feature map of the sub-branch. Indicates according to ratio Segment along the channel dimension; S42. Perform two levels of processing on the main branch feature map sequentially. Convolutional mapping and Convolutional operations extract deep semantic information, resulting in feature maps for the main branch processing. : ; in, The convolutional mapping module consists of convolution, batch normalization, and the SiLU activation function. Indicates the convolution operation; S43. Perform analysis on the sub-branch feature map. Convolution operations preserve fine-grained details and yield feature maps for sub-branch processing. : .

[0055] In this embodiment, as Figure 3 The diagram shows the structure of the complementary feature mapping module, which enhances the semantic representation capability of the network. For the main branch feature map... Semantic information is extracted through a deep convolutional structure, while for sub-branch feature maps... Fine-grained details are preserved through lightweight mapping.

[0056] In a specific implementation, as a preferred embodiment of the present invention, step S5 includes: S51. Calculate the spatial attention graph using a spatial attention mechanism. :

[0057] in, This represents the sigmoid activation function. Indicates batch normalization, express convolution; S52. Calculate the channel attention map using the channel attention mechanism. :

[0058] in, Indicates global average pooling. express Depthwise convolution; S53, Spatial Attention Map Main branch feature map Channel attention map Sub-branch feature map Perform feature aggregation to obtain the aggregated detail-enhanced feature map. :

[0059] in, This indicates element addition.

[0060] In a specific implementation, as a preferred embodiment of the present invention, the structural diagram of the detail-preserving context fusion module in step S6 is as follows: Figure 4 ,include: S61. Align the encoder-level features and detail enhancement feature maps in the five-level feature pyramid in terms of spatial dimensions to obtain aligned low-level features and high-level features; where the low-level features are encoder-level features and the high-level features are detail enhancement feature maps. S62. To enhance cross-feature interaction and reduce computational complexity, the aligned low-level and high-level features are uniformly divided into G groups along the channel dimension, denoted as follows:

[0061]

[0062] S63. Introduce learnable scalar parameters The sigmoid function is used to map it to a fusion ratio for the first... The group features are adaptively fused using the following formula:

[0063] in, Indicates the first Group low-level features, Indicates the first Group high-level features; S64. Concatenate the fusion features of all groups along the channel dimension to obtain the channel-concatenated features. :

[0064] S65, Connect the channel splicing features pass The convolutional mapping module aggregates information between channels to generate the final cross-level fused features. :

[0065] in, express Convolutional mapping module.

[0066] In a specific implementation, as a preferred embodiment of the present invention, in step S7, during the training phase of the SFDNet network model, a weighted multi-level deep supervision strategy is designed; a composite loss is independently calculated for the output of each network decoder layer and its corresponding ground truth mask, including: S71. Calculate the binary cross-entropy loss using the following formula:

[0067] in, Indicates the first k The prediction map generated by the decoder Represents a true binary mask. Indicates the total number of pixels; S72. Calculate the IoU loss using the following formula:

[0068] in, It is a minimal constant that avoids a denominator of zero; S73. Calculate the boundary loss using the following formula:

[0069] in, Indicates the boundary extraction operator, The boundary pixel weight (set to 3.0 in the experiment) is used to enhance the supervision of difficult-to-segment regions; S74. Based on the binary cross-entropy loss, IoU loss, and boundary loss, calculate the composite loss using the following formula:

[0070] S75. The composite losses calculated independently for each layer are weighted and summed according to a preset weight vector to obtain the total loss function, which guides the efficient updating of network parameters and accelerates model convergence. The formula is as follows:

[0071] in, Indicates the first The loss weight coefficients corresponding to each decoder layer .

[0072] This invention also provides a tooth surface defect segmentation system based on the aforementioned tooth surface defect segmentation method with spatial orientation awareness and detail feature fusion, comprising: an image acquisition and dataset construction module, a multi-scale feature extraction module, an orientation-aware feature extraction module, a semantic and detail branch extraction module, a cross-interaction attention aggregation module, a cross-level feature fusion module, and a weighted depth-supervised training module, wherein: The image acquisition and dataset construction module is used to acquire high-resolution tooth surface defect images using a tooth surface defect morphology acquisition device, and to preprocess the acquired high-resolution tooth surface defect images to construct a standardized defect dataset. The multi-scale feature extraction module is used to introduce a VGG encoder loaded with pre-trained weights, and use the VGG encoder to perform multi-scale feature extraction on the tooth surface defect images in the standardized defect dataset to generate a multi-level feature pyramid. The orientation-aware feature extraction module is used to construct an SFDNet network model. The five-level feature pyramid is input into the strip attention module through the decoding path of the SFDNet network model. The horizontal and vertical strip depth convolution is used to capture the directional geometric features of the tooth surface defects along the two spatial axes to generate an orientation-aware feature map. The semantic and detail branch extraction module is used to input the direction-aware feature map into the feature complement mapping module of the SFDNet network model, and extract deep semantic information through the main branch and retain fine-grained detail information through the sub-branch; The cross-interactive attention aggregation module is used to introduce a cross-interactive attention mechanism to aggregate features of the main branch and sub-branches and generate a detail-enhanced feature map. The cross-level feature fusion module is used to input the detail enhancement feature map and the corresponding level encoder features in the five-level feature pyramid after spatial size alignment into the detail preservation context fusion module of the SFDNet network model. Through a learnable adaptive fusion strategy, it completes the cross-level fusion of low-level detail features and high-level semantic features to obtain the refined feature extraction result of defect morphology. The weighted deep supervision training module is used to introduce a weighted multi-level deep supervision mechanism during the training phase of the SFDNet network model. It independently calculates the composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss for the output of each network layer and its corresponding real label mask. The composite losses of each layer are then weighted and fused according to preset weights to guide the network parameter update, accelerate model convergence, and output the tooth surface defect segmentation results.

[0073] Example To comprehensively evaluate segmentation performance, this embodiment employs multiple quantitative metrics, including average Dice coefficient (mDice), average intersection-over-union ratio (mIoU), precision, mean absolute error (MAE), and structural metrics. and adaptive measure Among these indicators, The lower the value, the better the performance; while the higher the value of the other indicators, the better the segmentation result.

[0074] Table 1 compares the segmentation results of different models. Overall, traditional VGG and U-Net networks exhibit relatively poor performance on most evaluation metrics, reflecting their limited ability to simulate complex gear surface defect patterns. By combining multi-scale attention mechanisms, YDRSNet and MSSAUNet achieved moderate improvements in segmentation accuracy, but still have limitations in metrics such as mIoU and MAE. The SFDNet network model proposed in this invention achieves the best performance across all evaluation metrics, significantly outperforming mDice (93.11%) and mIoU (87.29%). (94.38%) and The comparison method (88.86%) also achieved the lowest... (0.24). These results demonstrate that the method proposed in this invention can not only segment defect regions more accurately, but also effectively maintain the structural integrity and boundary consistency of the prediction results.

[0075] Table 1: Comparison of segmentation results from different models

[0076] Figure 5 The present invention provides qualitative segmentation visualization results for several representative gear surface defect morphologies. The proposed method achieves segmentation results highly consistent with the actual labels under different defect scales and complex background conditions. It not only effectively suppresses background noise but also demonstrates superior performance in defect boundary integrity, morphological consistency, and multi-objective discrimination, fully showcasing its robustness and excellence in fine-grained gear surface defect segmentation tasks.

[0077] Figure 6 This paper presents a visualization of the feature representations of strip-like peeling defects across different network layers. It can be observed that the network progressively learns hierarchical feature representations, evolving from low-level details to high-level semantic abstractions. In shallow layers, feature responses are mainly concentrated on texture and edge information, with a relatively scattered distribution and considerable background noise and interference. However, initial activation of the defect region can already be observed. As the network depth increases, feature responses become increasingly concentrated in the target region, forming a compact and highly discriminative semantic representation.

[0078] To further verify the engineering applicability of the SFDNet network model proposed in this invention, the trained model was deployed to segment the spalling morphology of real-world gear tooth surfaces. Four representative spalling patterns were selected for evaluation, and the corresponding results are shown below. Figure 7In small-scale pitting scenarios, all methods can accurately locate micro-defect regions. However, PRNet and U-Net exhibit slight segmentation distortion. In multi-point pitting scenarios, both PRNet and U-Net show undersegmentation when identifying small pitting regions. When defects have irregular shapes, PRNet can roughly capture the target outline, but it is prone to oversegmentation and rough boundaries. In contrast, U-Net exhibits significant structural fragmentation and is highly sensitive to noise interference, leading to a severe deterioration in segmentation performance. Conversely, the SFDNet network model proposed in this invention effectively suppresses background noise while maintaining structural continuity, producing smoother and more complete segmented regions.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for segmenting tooth surface defects with spatial orientation perception and detailed feature fusion, characterized in that, include: S1. Use a tooth surface defect morphology acquisition device to acquire high-resolution tooth surface defect images, and preprocess the acquired high-resolution tooth surface defect images to construct a standardized defect dataset. S2. Introduce a VGG encoder with pre-trained weights and use the VGG encoder to extract multi-scale features from tooth surface defect images in the standardized defect dataset to generate a multi-level feature pyramid. S3. Construct an SFDNet network model, input the five-level feature pyramid into the strip attention module through the decoding path of the SFDNet network model, and use horizontal and vertical strip depth convolution to capture the geometric features of tooth surface defects along the two spatial axes to generate a direction-aware feature map. S4. Input the orientation-aware feature map into the feature complement mapping module of the SFDNet network model, extract deep semantic information through the main branch, and retain fine-grained detail information through the sub-branch; S5. Introduce a cross-interactive attention mechanism to aggregate features between the main branch and sub-branches, and generate detailed enhanced feature maps. S6. Input the detail enhancement feature map and the corresponding level encoder features in the five-level feature pyramid after spatial size alignment into the detail preservation context fusion module of the SFDNet network model. Through a learnable adaptive fusion strategy, the cross-level fusion of low-level detail features and high-level semantic features is completed to obtain the refined feature extraction results of defect morphology. S7. During the training phase of the SFDNet network model, a weighted multi-level deep supervision mechanism is introduced. The composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss is independently calculated for the output of each network layer and its corresponding real label mask. The composite losses of each layer are then weighted and fused according to preset weights to guide the network parameter update, accelerate model convergence, and output the tooth surface defect segmentation results.

2. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, Step S1 includes: S11. Mount the high-resolution charge-coupled device industrial camera on an adjustable bracket, adjust the camera pose through multi-degree-of-freedom positioning, make the camera optical axis perpendicular to the tooth surface, and obtain high-resolution images of tooth surface defects. S12. Arrange high-brightness LED light sources around the gear meshing area to enhance the contrast of tooth surface texture and pitting defects. S13. Use an industrial camera to collect multiple images of tooth surface defects at different pitting development stages, and uniformly crop and adjust all images to the same pixel size. S14. Use image annotation tools to accurately annotate the pitting areas in each image at the pixel level, generate corresponding semantic labels, and construct a standardized defect dataset.

3. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, Step S2 includes: S21. VGG16 is used as the backbone network to build the encoder, and the encoder is initialized with weights pre-trained on a large-scale image dataset. The general visual features of the large-scale image dataset are transferred to the tooth surface defect segmentation task to enhance the feature representation ability of tooth surface defects and accelerate the model training convergence. S22. In the encoding stage, the initialized encoder is used to perform layer-by-layer convolution and downsampling operations on the tooth surface defect image, and a five-level feature pyramid is generated through multi-scale feature extraction, denoted as... These correspond to multi-scale features from shallow to deep layers.

4. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, In step S3, the striped attention module employs a striped attention mechanism, including: S31. Assume the input feature map is represented as... ,in , and These represent the channel dimension, height, and width, respectively. S32. Use a 5×5 depthwise convolution to extract local features from the input feature map to obtain the local feature map. , ; S33, utilizing the core size as Strip depthwise convolution pairs local feature maps Directional features are extracted along the first spatial axis to obtain the first directional feature map. , ,in much smaller ; S34, utilizing the core size as The strip depthwise convolution extracts directional features from the first directional feature map along the second spatial axis, resulting in a direction-aware feature map. , To enhance the directional perception of slender and narrow tooth surface defect structures in the spatial domain.

5. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, Step S4 includes: S41. Using the orientation-aware feature map as input feature mapping, according to a preset ratio... Divide the data along the channel dimension into main branches and sub-branches: in, Represents the feature map of the main branch. Represents the feature map of the sub-branch. Indicates according to ratio Segment along the channel dimension; S42. Perform two levels of processing on the main branch feature map sequentially. Convolutional mapping and Convolutional operations extract deep semantic information, resulting in feature maps for the main branch processing. : ; in, The convolutional mapping module consists of convolution, batch normalization, and the SiLU activation function. Indicates the convolution operation; S43. Perform analysis on the sub-branch feature map. Convolution operations preserve fine-grained details and yield feature maps for sub-branch processing. : 。 6. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, Step S5 includes: S51. Calculate the spatial attention graph using a spatial attention mechanism. : in, This represents the sigmoid activation function. Indicates batch normalization, express convolution; S52. Calculate the channel attention map using the channel attention mechanism. : in, Indicates global average pooling. express Depthwise convolution; S53, Spatial Attention Map Main branch feature map Channel attention map Sub-branch feature map Perform feature aggregation to obtain the aggregated detail-enhanced feature map. : in, This indicates element addition.

7. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, Step S6 includes: S61. Align the encoder-level features and detail enhancement feature maps in the five-level feature pyramid in terms of spatial dimensions to obtain aligned low-level features and high-level features; where the low-level features are encoder-level features and the high-level features are detail enhancement feature maps. S62. Divide the aligned low-level and high-level features evenly into G groups along the channel dimension, denoted as follows: S63. Introduce learnable scalar parameters The sigmoid function is used to map it to a fusion ratio for the first... The group features are adaptively fused using the following formula: in, Indicates the first Group low-level features, Indicates the first Group high-level features; S64. Concatenate the fusion features of all groups along the channel dimension to obtain the channel-concatenated features. : S65, Connect the channel splicing features pass The convolutional mapping module aggregates information between channels to generate the final cross-level fused features. : in, express Convolutional mapping module.

8. The tooth surface defect segmentation method with spatial orientation perception and detailed feature fusion according to claim 1, characterized in that, In step S7, during the training phase of the SFDNet network model, a weighted multi-level deep supervision strategy is designed. A composite loss is calculated independently for the output of each network decoder layer and its corresponding ground truth mask, including: S71. Calculate the binary cross-entropy loss using the following formula: in, Indicates the first k The prediction map generated by the decoder Represents a true binary mask. Indicates the total number of pixels; S72. Calculate the IoU loss using the following formula: in, It is a minimal constant that avoids a denominator of zero; S73. Calculate the boundary loss using the following formula: in, Indicates the boundary extraction operator, Represents the boundary pixel weights, used to enhance supervision of difficult-to-segment regions; S74. Based on the binary cross-entropy loss, IoU loss, and boundary loss, calculate the composite loss using the following formula: S75. The composite losses calculated independently for each layer are weighted and summed according to a preset weight vector to obtain the total loss function, which guides the efficient updating of network parameters and accelerates model convergence. The formula is as follows: in, Indicates the first The loss weight coefficients corresponding to each decoder layer .

9. A tooth surface defect segmentation system based on the tooth surface defect segmentation method with spatial orientation awareness and detail feature fusion as described in any one of claims 1-8, characterized in that, include: The system comprises an image acquisition and dataset construction module, a multi-scale feature extraction module, a direction-aware feature extraction module, a semantic and detail branch extraction module, a cross-interaction attention aggregation module, a cross-level feature fusion module, and a weighted deep supervised training module, among which: The image acquisition and dataset construction module is used to acquire high-resolution tooth surface defect images using a tooth surface defect morphology acquisition device, and to preprocess the acquired high-resolution tooth surface defect images to construct a standardized defect dataset. The multi-scale feature extraction module is used to introduce a VGG encoder loaded with pre-trained weights, and use the VGG encoder to perform multi-scale feature extraction on the tooth surface defect images in the standardized defect dataset to generate a multi-level feature pyramid. The orientation-aware feature extraction module is used to construct an SFDNet network model. The five-level feature pyramid is input into the strip attention module through the decoding path of the SFDNet network model. The horizontal and vertical strip depth convolution is used to capture the directional geometric features of the tooth surface defects along the two spatial axes to generate an orientation-aware feature map. The semantic and detail branch extraction module is used to input the direction-aware feature map into the feature complement mapping module of the SFDNet network model, and extract deep semantic information through the main branch and retain fine-grained detail information through the sub-branch; The cross-interactive attention aggregation module is used to introduce a cross-interactive attention mechanism to aggregate features of the main branch and sub-branches and generate a detail-enhanced feature map. The cross-level feature fusion module is used to input the detail enhancement feature map and the corresponding level encoder features in the five-level feature pyramid after spatial size alignment into the detail preservation context fusion module of the SFDNet network model. Through a learnable adaptive fusion strategy, it completes the cross-level fusion of low-level detail features and high-level semantic features to obtain the refined feature extraction result of defect morphology. The weighted deep supervision training module is used to introduce a weighted multi-level deep supervision mechanism during the training phase of the SFDNet network model. It independently calculates the composite loss consisting of binary cross-entropy loss, IoU loss and boundary loss for the output of each network layer and its corresponding real label mask. The composite losses of each layer are then weighted and fused according to preset weights to guide the network parameter update, accelerate model convergence, and output the tooth surface defect segmentation results.