A tooth image segmentation method, system, computer device and storage medium

By combining the Mamba mechanism and the ROI attention mechanism with the SPTF-MBAE model, the problem of not utilizing spatial distribution patterns in tooth image segmentation was solved, achieving high accuracy and boundary optimization in tooth image segmentation.

CN121725245BActive Publication Date: 2026-07-31XIAN UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN UNIV OF POSTS & TELECOMM
Filing Date
2025-12-19
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies fail to effectively utilize the spatial distribution patterns of teeth in tooth image segmentation, resulting in insufficient segmentation accuracy.

Method used

The Mamba mechanism is used to model the long-range dependencies of global structural features. The spatial gradient and channel semantic features are extracted by combining the ROI attention mechanism. The SPTF-MBAE tooth segmentation model is used to extract multi-scale features and boundary features, and a boundary confidence map is generated for segmentation.

Benefits of technology

It significantly improves the accuracy of tooth image segmentation, especially in cases where the contrast between teeth and background is low or the boundaries are blurred. It can accurately locate key tooth areas, optimize boundary features, and improve the accuracy of segmentation boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121725245B_ABST
    Figure CN121725245B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, computer device, and storage medium for tooth image segmentation, belonging to the field of oral medical image analysis. The method includes: acquiring tooth image data; extracting multi-scale features from the tooth image data; modeling long-range dependencies of global structural features based on the Mamba mechanism to obtain contextual features; extracting spatial gradient features and channel semantic features based on the ROI attention mechanism and fusing them to obtain enhanced features; progressively upsampling the multi-scale features and enhanced features to obtain upsampling results; extracting boundary features from the multi-scale features and enhanced features to obtain a boundary confidence map; enhancing the tooth contours in the upsampling results based on the boundary confidence map to obtain fused features; and segmenting the fused features using a segmentation mask to obtain the segmentation result of the tooth image data. This method extracts spatial gradient features and channel semantic features, achieving adaptive focusing and locking key tooth regions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of oral medical image analysis, specifically relating to a method, system, computer equipment, and storage medium for tooth image segmentation. Background Technology

[0002] In the field of oral disease diagnosis and treatment, panoramic radiographs are a key screening tool in the initial diagnosis stage due to their low radiation exposure and controllable cost, making them particularly suitable for radiation-sensitive pediatric patients. Among these techniques, tooth semantic segmentation based on panoramic radiographs is a fundamental and crucial task. As a core component of computer-aided diagnosis, this technology has become a research hotspot in oral medical image analysis. Researchers have applied classic algorithms from the field of medical image segmentation to this area, aiming to solve a series of complex problems, from common challenges in medical images—structural overlap and boundary blurring—to the unique characteristics of dental images—the complexity of tooth morphology and structure.

[0003] To address the aforementioned challenges, existing technologies have significantly enhanced the robustness of Res-UNet models to noise and blurred boundaries in oral medical images by introducing residual connections. Furthermore, by incorporating Transformer architectures, such as TransUNet and Swin-Unet models, long-range dependencies are modeled, thereby improving the model's understanding of the global image. However, these models do not consider the unique spatial distribution and morphological information of teeth, making it difficult to focus on key regions in the image and reducing the accuracy of tooth image segmentation. Summary of the Invention

[0004] To address the problem that existing technologies neglect the unique spatial distribution patterns of teeth, thus affecting the accuracy of tooth image segmentation, this invention provides a tooth image segmentation method, system, computer device, and storage medium.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for segmenting tooth images, comprising: Acquire dental imaging data; extract global structural features from dental imaging data; Based on the Mamba mechanism, long-range dependency modeling is performed on global structural features to obtain context features; based on the ROI attention mechanism, spatial gradient features and channel semantic features are extracted from the numerical subspace and the category subspace respectively, and the spatial gradient features and channel semantic features are fused to obtain enhanced features. The numerical subspace and the category subspace are obtained by decomposing the context features along the channel dimension. Progressive upsampling is performed on multi-scale features and enhancement features to obtain upsampling results; boundary features are extracted from multi-scale features and enhancement features to obtain boundary confidence maps; tooth contours in the upsampling results are enhanced based on boundary confidence maps to obtain fusion features; and the fusion features are segmented using a segmentation mask to obtain the segmentation results of the tooth image data.

[0006] Optionally, in the tooth image segmentation method provided by the present invention, the tooth image is processed by the SPTF-MBAE tooth segmentation model to obtain the segmentation result; wherein, the SPTF-MBAE tooth segmentation model is an encoder-decoder symmetrical structure, and the corresponding layers of the encoder and the decoder are connected by skip connections, the encoder bottleneck layer is embedded in the SPTF module, and the decoder is embedded in the MBAE module. Global structural features are extracted layer by layer from dental image data using an encoder; Enhanced features are obtained by processing global structural features through the SPTF module; The decoder upsamples the multi-scale features and enhancement features to obtain the upsampled result; the MBAE module extracts the boundary confidence map from the multi-scale features and enhancement features, and the upsampled result is enhanced based on the boundary confidence map to obtain the fused feature; the segmentation result is obtained from the fused feature through the output layer of the decoder.

[0007] Optionally, the tooth image segmentation method provided by the present invention further includes: The global structural features are expanded into a one-dimensional sequence to obtain serialized features; The input matrix, time step, and output matrix are generated from the serialized features. The hidden state at the current time step is updated based on the input matrix, time step, and serialized features to obtain the updated hidden state. Contextual features are constructed from the updated hidden states and the corresponding output matrices.

[0008] Optionally, the tooth image segmentation method provided by the present invention further includes: The context features are decomposed along the channel dimension into a numerical subspace corresponding to the numerical channel and a category subspace corresponding to the category channel; Spatial gradient features are obtained by capturing intensity distribution from the numerical subspace based on spatial attention; channel semantic features are obtained by capturing semantic dependencies between features from the category subspace based on channel attention. The weights of the spatial gradient features and channel semantic features are determined based on the global response strength of the numerical and categorical channels, respectively. The enhanced features are obtained by multiplying the spatial gradient features and channel semantic features and their respective weights element by element.

[0009] Optionally, the tooth image segmentation method provided by the present invention further includes: Multiple tooth edge features of different scales are extracted from multi-scale features and enhancement features in parallel using convolution kernels of different scales; Multiple tooth edge features at different scales are stitched together to obtain stitched tooth edge features. A convolutional layer is then used to perform feature mapping on the stitched tooth edge features to obtain a boundary confidence map.

[0010] Optionally, the tooth image segmentation method provided by the present invention further includes: Acquire dental imaging data for training purposes; Multi-scale features for training are extracted from training dental image data using an encoder; The SPTF module is used to extract training augmentation features from the multi-scale features used in training. The ROI loss function is calculated based on the predicted bounding boxes corresponding to the enhanced features used in training and the ground truth bounding boxes corresponding to the tooth image data used in training. The parameters of the SPTF-MBAE tooth segmentation model are then optimized based on the ROI loss.

[0011] Optionally, the tooth image segmentation method provided by the present invention further includes: Pixel boundaries are extracted from the real segmentation mask corresponding to the training tooth image data; dilation and erosion are performed on the pixel boundaries respectively, and the difference is calculated to obtain the boundary region; a corresponding weight mask is constructed based on the boundary region. Extract training boundary confidence maps from multi-scale features and augmented features; The boundary region loss function and the binary cross-entropy loss function are calculated based on the training boundary confidence map, weight mask, and true segmentation mask. The parameters of the SPTF-MBAE tooth segmentation model are then optimized based on the boundary region loss value and the binary cross-entropy loss value.

[0012] The present invention also provides a dental image segmentation system, comprising: A multi-scale feature extraction module is used to acquire dental image data and extract global structural features from the dental image data. The feature enhancement module is used to model long-range dependencies of global structural features based on the Mamba mechanism to obtain context features; based on the ROI attention mechanism, spatial gradient features and channel semantic features are extracted from the numerical subspace and the category subspace respectively, and the spatial gradient features and channel semantic features are fused to obtain enhanced features. The numerical subspace and the category subspace are obtained by decomposing the context features along the channel dimension. The image segmentation module is used to progressively upsample multi-scale features and enhancement features to obtain upsampling results; extract boundary features from multi-scale features and enhancement features to obtain boundary confidence maps; enhance the tooth contours in the upsampled results based on the boundary confidence maps to obtain fusion features; and segment the fusion features using a segmentation mask to obtain the segmentation results of the tooth image data.

[0013] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps in a tooth image segmentation method.

[0014] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, can execute any step of a tooth image segmentation method.

[0015] The tooth image segmentation method provided by this invention has the following beneficial effects: The tooth image segmentation method provided by this invention utilizes the Mamba mechanism to serialize global structural features, dynamically capturing the spatial distribution patterns and long-range dependencies of the lateral tooth arrangement, and generating feature representations rich in contextual information. Subsequently, the contextual features are decomposed into numerical and categorical subspaces using a ROI attention mechanism, extracting spatial gradient features focusing on tooth intensity distribution and local texture, as well as channel semantic features capturing the semantic distinction between teeth and background. Weighted fusion is then used to achieve adaptive focusing, accurately locking key tooth regions in the image. Furthermore, the boundary confidence map generated by boundary feature extraction refines and enhances the tooth contour, optimizing boundary features and effectively improving the accuracy of tooth image segmentation boundaries. Attached Figure Description

[0016] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of a tooth image segmentation method provided in an embodiment of the present invention; Figure 2 This is an example of an automated configuration process for nnU-Net data provided in an embodiment of the present invention; Figure 3 This is an example of a multi-scale Encoder-Decoder structure based on nnU-Net planning provided in an embodiment of the present invention; Figure 4This is an example of a flowchart of an SPTF module provided in an embodiment of the present invention; Figure 5 An example of the SSM mechanism provided in this embodiment of the invention; Figure 6 This is an example of an ROI attention mechanism provided in an embodiment of the present invention; Figure 7 This is an example of an SPTF module structure diagram provided in an embodiment of the present invention; Figure 8 This is an example of a module structure diagram provided in an embodiment of the present invention; Figure 9 This is an example of a multi-scale boundary extraction process provided in an embodiment of the present invention; Figure 10 This is an example of a children's teeth dataset provided in an embodiment of the present invention; Figure 11 An example of an adult teeth dataset provided in an embodiment of the present invention; Figure 12 This is an example of a LabelMe annotation tool provided in an embodiment of the present invention; Figure 13 This is an example of the EISeg annotation tool provided in the embodiments of the present invention; Figure 14 This is a visualization example provided for an embodiment of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0019] Example 1 This invention provides a method for segmenting tooth images, specifically as follows: Figure 1 As shown, it includes the following steps: Step 11: Acquire dental image data. Extract multi-scale features from the dental image data, including global structural features. Specifically, process the dental images using the SPTF-MBAE dental segmentation model to obtain segmentation results. The SPTF-MBAE dental segmentation model has an encoder-decoder symmetrical structure, connecting corresponding layers of the encoder and decoder via skip connections. The encoder bottleneck layer embeds the SPTF module, and the decoder embeds the MBAE module. The encoder extracts multi-scale features layer by layer from the dental image data. The SPTF module processes the global structural features to obtain enhanced features. The decoder upsamples the multi-scale features and enhanced features to obtain upsampled results. The MBAE module extracts boundary confidence maps from the multi-scale features and enhanced features, and enhances the upsampled results based on the boundary confidence maps to obtain fused features. The output layer of the decoder uses the fused features to obtain the segmentation result.

[0020] Specifically, the present invention is based on, as follows Figure 2The nnU-Net automated data configuration workflow shown is used for data preprocessing. Considering the characteristics of panoramic dental images, this invention implements an automated data configuration workflow based on the nnU-Net framework. In the data feature extraction stage, 87 RGB three-channel dental images were identified, including background and tooth labels. In the data fingerprint calculation and configuration generation stage, the geometric properties of the data and the intensity distribution of the three channels were analyzed, and the spatial characteristics of the samples were evaluated. In the data preprocessing execution stage, according to the generated configuration file, the system sequentially performs non-zero region cropping, Z-score-based channel normalization, and adaptive resampling on the raw data, effectively eliminating intensity differences and spatial scale inconsistencies between images. For example, the raw data is first read and parsed, and defined using the dataset description file (dataset.json). For instance, channels 0, 1, and 2 are named R, G, and B respectively; the label corresponding to the background is defined as 0; and the label corresponding to the teeth is defined as 1. 87 training samples are used, stored in PNG format, and this dataset is named "Dataset 111 for Tooth Segmentation Task". Data preprocessing, data analysis, and fingerprint calculation are then performed. The extracted geometric attributes, statistical features, and data distribution are used as spatial, intensity, and category decisions, respectively. Data preprocessing is completed through methods such as cropping, normalization, and resampling. Cropping can involve creating a non-zero mask and calculating bounding boxes, then cropping the data based on these bounding boxes and updating the segmentation labels. Normalization can be determined based on spatial, intensity, and category decisions, such as no normalization, Z-score normalization, CT normalization, or RGB normalization. The specific normalization method is determined by those skilled in the art based on actual needs, and this invention does not impose limitations. Data resampling can also be determined based on spatial, intensity, and category decisions. For example, for image data in the original data, bicubic interpolation is used, while for the segmentation mask, nearest neighbor interpolation is used. Both types of data then undergo anisotropy assessment. After unified resampling, a unified pixel physical spacing is defined; for example, the distance between the center points of two adjacent pixels in each dimension is 1.0 physical unit.

[0021] Among them, such as Figure 3As shown, the SPTF-MBAE tooth segmentation model adopts an encoder-decoder symmetrical structure. The encoder contains eight consecutive encoding stages, extracting multi-scale representations from local tooth features to global structure layer by layer. The last layer uses 1×2 asymmetric pooling specifically adapted to the aspect ratio of the dataset, avoiding information loss caused by excessive feature map compression. The decoder employs a seven-stage progressive upsampling strategy. During this process, skip connections are used to fuse the feature maps of each layer with the corresponding layer of the encoder, effectively integrating shallow spatial information and deep semantic features to achieve accurate boundary localization and region segmentation. Specifically, this invention embeds an SPTF module in the encoder bottleneck layer to capture long-range spatial dependencies in specific spatial regions, and introduces an MBAE module in the high-resolution stage of the decoder to focus on tooth edge information extraction. This dual-module collaborative mechanism significantly improves the semantic consistency and boundary accuracy of the segmentation results through global dependency modeling and local edge information extraction. For example, for an input image with [B,C,H,W] and a value of [3,3,320,768], during the encoding stage, it is first processed through two layers of basic residual blocks, resulting in a feature vector of [3,32,320,768]. Then, a layer of basic residual blocks with downsampling is used in conjunction with the two layers of basic residual blocks, resulting in a feature vector of [3,64,160,384]. Next, multiple downsampling processes are performed, with each downsampling layer of basic residual blocks adding one more layer, up to a total of four layers. The resulting feature vectors are [3,128,80,192], [3,256,40,96], [3,512,20,48], [3,512,10,24], and [3,512,5,12]. Finally, a four-layer SPTF module is embedded in the bottleneck layer to capture long-range spatial dependencies in specific spatial regions. The decoding stage is symmetrical to the encoding stage. An additional MBAE module is introduced in the high-resolution upsampling stage to extract edge information.

[0022] Step 12: Model long-range dependencies of global structural features based on the Mamba mechanism to obtain context features; extract spatial gradient features and channel semantic features from numerical subspace and category subspace respectively based on ROI attention mechanism, and fuse spatial gradient features and channel semantic features to obtain enhanced features. The numerical subspace and category subspace are obtained by decomposing context features along the channel dimension.

[0023] The contextual features can be determined through the following steps: Step 121: Expand the global structural features into a one-dimensional sequence to obtain serialized features.

[0024] Step 122: Generate an input matrix, time step, and output matrix from the serialized features. Update the hidden state at the current time step based on the input matrix, time step, and serialized features to obtain the updated hidden state.

[0025] Step 123: Construct contextual features from the updated hidden states and the corresponding output matrix.

[0026] Specifically, the SPTF module generates tooth region coordinates through ROI bounding box prediction, combines it with the ROI attention module, and utilizes the Mamba layer to handle long-distance sequence dependencies, effectively capturing global context information. The process is as follows: Figure 4 As shown, the input image is first normalized by instance, then processed by the LeakyReLu activation function, then global average pooling, and finally processed by bounding boxes and masks to obtain an enhanced feature map. This achieves the transition from global semantic understanding to local region focusing, effectively guiding the model to concentrate its attention on the key tooth region and suppressing background interference.

[0027] In particular, traditional state-space models, when modeling long-sequence data, suffer from fixed parameters, making it difficult to adaptively adjust the modeling strategy based on input information. For example... Figure 5 As shown, the Mamba mechanism used in this invention transforms fixed parameters into dynamic variables that depend on the input by introducing a Structured State Space Model (SSM), enabling the model to adaptively select which spatial locations to focus on based on the current features and to adaptively adjust the modeling strategy based on the input information.

[0028] Specifically, when the SPTF module obtains the input features of the encoder bottleneck layer... That is, the global structural features and the hidden state of the previous time step. The input matrix is ​​generated by Mamba through three independent linear projection layers. Output matrix and time step These three time-varying parameters, among which the input matrix Used to control the degree of influence of the current input on the state, output matrix The time step is used to determine how to extract information from the hidden state. Used to regulate the rate of state updates. When encountering areas containing important tooth features, It will automatically enlarge to enhance the state of that area; while for background areas that are smaller... This allows the model to skip ahead quickly, enabling content-aware selective modeling.

[0029] The process of updating the hidden state follows the discretized state-space equation, as shown in equation (1): (1) in, This is the discretized state transition matrix. To ensure computational efficiency, a predefined diagonal matrix is ​​used. The input transformation matrix controls the degree to which the current input affects the state. t represents the current processing time step in the sequence, and the time step size. Used to adjust the rate of state updates. Then, the state will be hidden. With the corresponding output matrix Multiplying these together yields a fusion of contextual features accumulated from the beginning of the sequence to the current position. .

[0030] In summary, by unfolding a two-dimensional feature map into a one-dimensional sequence along the spatial dimension, Mamba can capture long-range dependencies across the entire image with linear time complexity, offering a significant computational advantage compared to self-attention-based mechanisms. Specifically, Mamba's efficient sequence modeling capability is highly compatible with the inherent spatial sequence pattern of the lateral arrangement of teeth in dental images. In tooth semantic segmentation tasks, individual teeth exhibit a lateral spatial pattern, with strong correlations between adjacent teeth, while the tooth group shows obvious semantic discontinuities from the surrounding background. The Mamba mechanism dynamically adjusts... , and It can automatically identify and enhance the association between tooth regions when scanning feature sequences, while suppressing the propagation of background noise, thus providing key global contextual information for subsequent ROI attention mechanisms.

[0031] The enhancement features can be determined through the following steps: Step 124: Decompose the context features along the channel dimension into a numerical subspace corresponding to the numerical channel and a category subspace corresponding to the category channel.

[0032] Step 125: Capture the intensity distribution from the numerical subspace based on spatial attention to obtain spatial gradient features; capture the semantic dependencies between features from the category subspace based on channel attention to obtain channel semantic features.

[0033] Step 126: Determine the weights of the spatial gradient features and channel semantic features based on the global response intensities of the numerical and categorical channels respectively; multiply the spatial gradient features and channel semantic features and their respective weights element by element to obtain the enhanced features.

[0034] Specifically, after extracting contextual features from global structural features based on the SSM mechanism, the ROI attention module extracts and fuses multi-dimensional information from these contextual features. For example, the ROI attention module... Figure 6As shown, a dual-path attention parallel processing architecture was designed by combining a channel decomposition strategy. Specifically, context features... The image is decomposed along the channel dimension into two complementary subspaces: the numerical channel and the categorical channel. The numerical channel focuses on capturing the intensity distribution characteristics of the image, including continuous features such as gray-level gradients and texture changes. This can effectively identify density differences and edge transition regions of teeth. The categorical channel focuses on discrete features of semantic categories, learning high-level semantic information between teeth and background.

[0035] In the dual-path parallel attention architecture, the features decomposed from the main path are fed into two parallel paths: spatial attention and channel attention. The spatial attention branch extracts spatial gradient features through 2D convolution and then performs average pooling and max pooling operations in parallel. Average pooling captures the overall intensity distribution, while max pooling highlights features in salient regions. The complementary information from both is fused after sigmoid activation to generate a spatial weight mask, explicitly indicating which spatial locations in the image are more likely to contain tooth structures. The channel attention branch learns the interdependencies between channels through cascaded convolutional layers, capturing the semantic relationships between different feature dimensions.

[0036] Subsequently, spatial information is aggregated using average pooling, and the global response intensity of each channel is encoded as a scalar weight. After sigmoid activation, a channel weight vector is generated, dynamically adjusting the importance of each channel. The outputs of the two branches are multiplied element-wise to achieve feature fusion, generating a comprehensive attention map that takes into account both spatial location and channel semantics. This dual-path collaborative mechanism fully leverages the complementary advantages of multi-dimensional features. When the intensity contrast between the teeth and the background is low, the categorical channel can compensate for the deficiencies of the numerical channel through semantic priors. Similarly, when the semantic boundaries are ambiguous, the fine-grained intensity information of the numerical channel can provide additional localization cues. The enhanced features of the final output provide a highly discriminative representational basis for subsequent bounding box prediction.

[0037] In addition, during the model training phase, the ROI loss function can be calculated and the model updated through the following steps: Step 127: Obtain training tooth image data; extract training multi-scale features from the training tooth image data using the encoder; extract training augmentation features from the training multi-scale features using the SPTF module; calculate the ROI loss function based on the predicted bounding boxes corresponding to the training augmentation features and the ground truth bounding boxes corresponding to the training tooth image data; optimize the parameters of the SPTF-MBAE tooth segmentation model based on the ROI loss.

[0038] Specifically, based on the above implementation methods, such as Figure 7As shown, this invention also provides a specific example of an SPTF module, which integrates three core components: Mamba selective state space model, ROI attention mechanism, and bounding box regression prediction. In the left branch, the input features are normalized by reshaping and layer normalization and then fed into the state space model (SSM) module for sequence modeling. After reshaping, the two-dimensional spatial structure features are restored, preserving complete spatial topology information. In the right branch, global average pooling and flattening are passed into a two-layer fully connected network, i.e., two linear layers are used in conjunction with the ReLU activation function, while the Sigmoid activation function is used to ensure that the coordinates are normalized to the [0,1] interval. Finally, the features of the left and right branches are fed into the ROI attention module for multi-dimensional feature extraction and fusion, and the output results are obtained through 2D convolutional layer processing. The predicted bounding box coordinates are shown in formula (2):

[0039] (2) in, For the predicted bounding box, For ROI predictor, This indicates the characteristics of the bottleneck layer. and For the width and height of the bounding box, and These are the center coordinates of the bounding box. Then, the ROI loss is applied. Measure the prediction box With real frame The difference is shown in formula (3):

[0040] (3) in, , For inclusion and By employing the hierarchical design described above, the SPTF module effectively constrains the learning scope of the model, guiding it to concentrate computational resources on the tooth region, which is more important for the segmentation task.

[0041] Step 13: Perform progressive upsampling on the multi-scale features and enhancement features to obtain the upsampling results; extract boundary features from the multi-scale features and enhancement features to obtain the boundary confidence map; enhance the tooth contours in the upsampling results based on the boundary confidence map to obtain the fusion features; segment the fusion features using a segmentation mask to obtain the segmentation results of the tooth image data.

[0042] The boundary confidence plot can be determined through the following steps: Step 131: Extract multiple tooth edge features of different scales from multi-scale features and enhancement features in parallel using convolution kernels of different scales.

[0043] Step 132: Concatenate multiple tooth edge features of different scales to obtain concatenated tooth edge features. Perform feature mapping on the concatenated tooth edge features through a convolutional layer to obtain a boundary confidence map.

[0044] Specifically, considering that boundary blurring is the main cause of coarse segmentation results in dental panoramic image segmentation tasks, this invention designs an MBAE module on the high-resolution feature layer of the decoder to achieve pixel-level accurate segmentation. The structure of the MBAE module is as follows: Figure 8 As shown. For example, the MBAE module, as an independent boundary optimization component, complements the main segmentation network. By explicitly strengthening boundary supervision, it significantly improves the edge quality of the segmentation mask, providing accurate contour information for the subsequent precise separation and automatic numbering of tooth instances. Its core structure is as follows. Figure 9 As shown, this is a boundary-aware path that includes a multi-scale edge extraction stage and an edge enhancement stage. The boundary confidence map is first processed by multi-scale edge extraction and edge enhancement, and finally processed by 1×1 convolution to obtain the boundary confidence map. In the multi-scale feature extraction stage, a parallel multi-branch convolutional architecture is used to extract boundary features in parallel through convolutional kernels of different scales. The 3×3 small convolutional kernel focuses on capturing the local fine structure of the tooth edge, the 5×5 medium convolutional kernel perceives the medium-scale features of the tooth contour, and the 7×7 large convolutional kernel is responsible for extracting the global contextual information of the tooth shape, thereby ensuring that local and global information can be extracted completely. The specific process is shown in formula (4):

[0045] (4) in, Represents high-resolution features in the Decoder. This indicates the features captured using a specific convolution kernel, while This represents the final fused features. In the edge enhancement stage, features output from each branch in the multi-scale feature extraction stage are concatenated, and then combined using two consecutive... Convolutional layers are used, and multi-scale information is fused by combining BN normalization and ReLU activation functions. Finally, through... Convolutional layers map features into single-channel boundary confidence maps. (Boundary Confidence Map), as shown in formula (5):

[0046] (5) in, It is the sigmoid activation function. Edge loss can be optimized through the following steps:

[0047] Step 133: Extract pixel boundaries from the real segmentation mask corresponding to the training tooth image data; perform dilation and erosion on the pixel boundaries respectively, and calculate the difference to obtain the boundary region; construct the corresponding weight mask based on the boundary region; extract the training boundary confidence map from multi-scale features and enhancement features; calculate the boundary region loss function and the binary cross-entropy loss function based on the training boundary confidence map, weight mask and real segmentation mask, and optimize the parameters of the SPTF-MBAE tooth segmentation model based on the boundary region loss value and the binary cross-entropy loss value.

[0048] Specifically, to further improve the quality of boundary segmentation, a boundary-aware loss function can also be used. Model optimization is performed. First, pixel-level boundaries are extracted from the real segmentation mask through morphological operations. Dilation and erosion operations are performed using 3×3 convolution kernels, and the precise boundary regions are obtained by interpolation calculation. As shown in formula (6):

[0049] (6) in, pixel-level boundaries The boundary region after dilation treatment, pixel-level boundaries The boundary area after corrosion treatment. Then, in the precise boundary area... Based on this, construct a dynamic weight mask Higher weights are assigned to boundary regions, while non-boundary regions retain their basic weights, as shown in formula (7):

[0050] (7) Here, can be set to 10, while the non-boundary region weights can be set to 1. Final boundary loss. The weighted binary cross-entropy (WBCE) and boundary region Dice loss are combined to balance classification accuracy with the shape consistency of the boundary region, as shown in Equations (8), (9) and (10):

[0051] (8) (9) (10) Among them, the weighted binary cross-entropy loss Focusing on the accuracy of boundary pixel classification, the boundary region Dice loss. The focus is on optimizing the consistency of the boundary region. Weighted binary cross-entropy loss The weight can be set to, for example, 0.5.

[0052] In summary, the tooth image segmentation method provided by this invention introduces the encoder-decoder symmetrical structure of the SPTF-MBAE tooth segmentation model and combines skip connections to effectively integrate shallow spatial information and deep semantic features. The SPTF module embedded in the encoder bottleneck layer focuses on global dependency modeling, while the MBAE module embedded in the decoder enhances edge perception. This dual-module collaborative mechanism significantly improves the semantic consistency and boundary localization accuracy of tooth region segmentation through the complementarity of multi-scale feature extraction and boundary enhancement, thereby directly improving the accuracy of tooth image segmentation.

[0053] Furthermore, based on the Mamba mechanism, global structural features are serialized. By dynamically adjusting state space parameters, long-range dependencies in the lateral alignment of teeth are captured. This mechanism adaptively strengthens the association between tooth regions and suppresses background noise, thereby generating context-rich feature representations. This provides more accurate global semantic guidance for subsequent segmentation tasks, effectively reducing missegmentation caused by structural overlap and ultimately improving the overall accuracy of tooth image segmentation. The ROI attention mechanism decomposes contextual features into numerical and categorical subspaces, extracting spatial gradient features focusing on tooth intensity distribution and channel semantic features capturing semantic distinctions, respectively. Weighted fusion achieves adaptive focusing. This dual-path attention parallel processing architecture complementarily enhances the representation ability of key regions, especially providing redundant localization cues when tooth-background contrast is low or boundaries are blurred, thus accurately locking onto the tooth target and significantly improving the accuracy of the segmentation results. By extracting tooth edge features in parallel using multi-scale convolutional kernels and fusing them to generate a boundary confidence map, this design can capture complete edge information from local fine structures to global context. Combined with subsequent contour enhancement operations, it directly optimizes the common boundary blurring problem in panoramic dental images, making the model more clearly delineate the tooth contour, reducing edge roughness, and thus improving the boundary accuracy of tooth image segmentation.

[0054] Furthermore, an ROI loss function is introduced during the training phase. This optimizes model parameters by analyzing the difference between predicted and ground truth bounding boxes, guiding the SPTF module to focus more on learning key tooth regions. This bounding box regression-based supervision mechanism effectively constrains the allocation of computational resources, avoids distraction caused by background interference, and thus enhances the model's ability to recognize tooth regions, indirectly improving the accuracy of the segmentation mask. By combining a boundary-aware loss function with weighted binary cross-entropy and Dice loss, the learning weights of boundary regions are explicitly strengthened during training. A dynamic weight mask constructed using morphological operations highlights the importance of boundary pixels. This loss design balances classification accuracy and shape consistency, providing fine-grained optimization, especially for boundary blurring issues. This allows the model to maintain stable segmentation performance in complex dental arch scenarios, ultimately improving the boundary accuracy and overall accuracy of tooth image segmentation.

[0055] Example 2 Based on Example 1, this invention further compares and verifies the provided tooth image segmentation method with existing methods. The existing publicly available tooth datasets are shown in Table 1, covering data from different modalities and application scenarios, mainly categorized as follows: Figure 10 The children's teeth dataset shown and such Figure 11 The adult dental datasets shown are divided into two main categories, supporting different tasks such as tooth segmentation, disease detection, and tooth number recognition.

[0056] Table 1 Overview of existing dental datasets As can be seen from Table 1, existing public datasets have reached a certain scale in adult dental analysis, while the number of datasets in pediatric dental analysis is relatively limited and mostly concentrated on common diseases.

[0057] To address this deficiency, the dataset constructed in this invention provides pixel-level annotations for two key abnormalities in children's teeth: supernumerary teeth and ectopic eruption. A total of 110 datasets have been annotated, aiming to fill the gap in this sub-field and provide support for the development of related diagnostic models.

[0058] In constructing the dental dataset, this invention addresses the typical small-sample problem of scarce pediatric dental abnormality samples by designing a complete annotation scheme. First, key abnormality diagnostic target samples, accounting for approximately 8% of the total sample size, are selected as the focus of annotation. Regarding the choice of annotation tools, to balance efficiency and quality, this invention employs two mainstream annotation tools—LabelMe and EISeg—to handle annotation tasks at different stages. LabelMe, as a general-purpose image annotation tool, primarily relies on manually drawn polygons, offering strong flexibility and suitability for region labeling and category marking in image segmentation tasks. Its output JSON format facilitates subsequent model training. However, this method is inefficient in large-scale data annotation and lacks automated model support. In contrast, EISeg, developed based on the PaddlePaddle deep learning framework, integrates an interactive segmentation algorithm. By introducing positive and negative sample points, it achieves semi-automated pixel-level segmentation, significantly improving the annotation efficiency of semantic and instance segmentation tasks, especially suitable for fine outlining of tooth contours. However, its effectiveness depends to some extent on the quality of the pre-trained model. To combine the advantages of both tools, this invention adopts a collaborative annotation strategy of automatic followed by manual annotation: first, EISeg is used to complete the initial positioning of the tooth contour, and then the data format is converted and imported into LabelMe for manual inspection and correction of areas with inaccurate boundaries and segmentation errors. This strategy leverages the efficiency of EISeg in batch processing while retaining the flexibility of LabelMe in fine-tuning details, effectively improving the annotation efficiency and quality of large-scale dental image data.

[0059] Furthermore, in constructing the dental dataset, this invention designed a systematic annotation method to accurately characterize the complex conditions of children's teeth. First, at the tooth category level, each permanent and deciduous tooth was assigned a standardized location identifier according to the FDI tooth coding system, ensuring consistency between the data and clinical practice. Second, specific category expansion was carried out for the core issue of tooth developmental abnormalities in this invention. Specifically, in addition to the standard FDI coding system, "9x" series identifiers were introduced to annotate supernumerary teeth, and "10x" series identifiers were introduced to annotate ectopic erupted teeth. The specific annotation process is as follows... Figure 12 and Figure 13 As shown.

[0060] Subsequently, to verify the effectiveness of the proposed collaborative annotation strategy of automatic annotation followed by manual annotation, a comparative experiment was conducted with a single-tool annotation scheme. The results are shown in Tables 2 and 3: Table 2. Performance Comparison of Annotation Tools for Training Sets Table 3. Performance Comparison of Annotation Tools for Test Sets While using EISeg alone performs well on the training set, its generalization ability on the test set is limited. Manual labeling, on the other hand, is costly but offers stronger generalization capabilities. The collaborative strategy provided in this invention effectively balances labeling efficiency and quality, offering a reliable data foundation for subsequent model training.

[0061] Next, the segmentation performance of the tooth image segmentation method provided by this invention is compared with that of existing models, as shown in Table 4: Table 4. Experimental Results Comparing Methods The tooth image segmentation method provided in this invention significantly outperforms mainstream segmentation models on the dataset provided in this invention. The DSC index is 7.39% higher than MedSAM and 13.81% higher than UNet, demonstrating the superiority of the proposed architecture. Since nnUNet performs exceptionally well, it has been established as the baseline model for subsequent ablation studies. The ablation experimental results are shown in Table 5.

[0062] Table 5 Ablation Experiment Results Among them, the baseline model improved its IOU from 94.31% to 94.66% after adding the SPTF module; it improved to 94.40% after adding the MBAE module alone; and the complete model achieved the best performance, with DSC improving to 97.89% and IOU improving to 94.76%, which fully demonstrates the design effectiveness of the SPTF and MBAE modules and also verifies the necessity of the dual-module collaborative design.

[0063] Furthermore, to further evaluate the generalization performance of the model across datasets, the tooth image segmentation method provided in this invention was compared with existing image segmentation methods on the dataset constructed in this invention and the Niibhaa public dataset, as shown in Table 6: Table 6 Experimental results of dataset generalization performance The tooth image segmentation method provided by this invention not only performs excellently on the dataset constructed in this invention, but also achieves the best performance on the Niibhaa public dataset, with its DSC improved to 97.96% and IOU improved to 95.28%, which is significantly better than other comparative models, fully verifying the model's good generalization ability under different data distributions.

[0064] The visualization effect obtained by segmenting the dental image using the dental image segmentation method provided by this invention is as follows: Figure 14As shown, this method can more completely delineate the tooth contour, accurately capture boundary details, and has good robustness against bright artifacts such as fillings, effectively avoiding missegmentation. In summary, the tooth image segmentation method provided by this invention has achieved optimal performance on both self-built datasets and public datasets. Its segmentation results can completely delineate the tooth contour, accurately restore boundary details, and have good robustness against bright artifacts such as metal fillings. In clinical applications, it assists doctors in achieving more efficient and accurate diagnosis of complex dentitions.

[0065] Example 3 The present invention also provides a dental image segmentation system, comprising: The multi-scale feature extraction module is used to acquire dental image data and extract multi-scale features from the dental image data, including global structural features. The feature enhancement module is used to model long-range dependencies of global structural features based on the Mamba mechanism to obtain context features; based on the ROI attention mechanism, spatial gradient features and channel semantic features are extracted from the numerical subspace and the category subspace respectively, and the spatial gradient features and channel semantic features are fused to obtain enhanced features. The numerical subspace and the category subspace are obtained by decomposing the context features along the channel dimension. The image segmentation module is used to progressively upsample multi-scale features and enhancement features to obtain upsampling results; extract boundary features from multi-scale features and enhancement features to obtain boundary confidence maps; enhance the tooth contours in the upsampled results based on the boundary confidence maps to obtain fusion features; and segment the fusion features using a segmentation mask to obtain the segmentation results of the tooth image data.

[0066] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps in an embodiment of a tooth image segmentation method. Specific implementation methods can be found in the method embodiments, and will not be repeated here.

[0067] Furthermore, the present invention also provides a non-transitory computer-readable storage medium containing instructions on which a computer program is stored. For example, a memory containing instructions that can be executed by a processor of a computer device to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the computer program is executed by the processor, it can implement the steps in an embodiment of a tooth image segmentation method. Specific implementation methods can be found in the method embodiments, which will not be repeated here.

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

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

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

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

[0072] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention patent. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.

Claims

1. A method for segmenting tooth images, characterized in that, include: Acquire dental image data; process the dental images using the SPTF-MBAE dental segmentation model to obtain segmentation results; wherein, the SPTF-MBAE dental segmentation model is an encoder-decoder symmetrical structure, connecting corresponding layers of the encoder and decoder through skip connections, the bottleneck layer of the encoder is embedded in the SPTF module, and the decoder is embedded in the MBAE module; extract multi-scale features layer by layer from the dental image data using the encoder, wherein the multi-scale features include global structural features; The SPTF module models long-range dependencies of the global structural features based on the Mamba mechanism to obtain context features; spatial gradient features and channel semantic features are extracted from the numerical subspace and the category subspace respectively based on the ROI attention mechanism, and the spatial gradient features and channel semantic features are fused to obtain enhanced features, wherein the numerical subspace and the category subspace are obtained by decomposing the context features along the channel dimension; The decoder progressively upsamples the multi-scale features and enhancement features to obtain an upsampling result; the MBAE module extracts boundary features from the multi-scale features and enhancement features to obtain a boundary confidence map; the tooth contour in the upsampling result is enhanced based on the boundary confidence map to obtain a fusion feature; and the output layer of the decoder segments the fusion feature using a segmentation mask to obtain the segmentation result of the tooth image data.

2. The dental image segmentation method of claim 1, wherein, Based on the Mamba mechanism, long-range dependency modeling is performed on the global structural features to obtain context features including: The global structural features are expanded into a one-dimensional sequence to obtain serialized features; An input matrix, a time step, and an output matrix are generated from the serialization features. The hidden state at the current time step is updated based on the input matrix, the time step, and the serialization features to obtain the updated hidden state. The context features are constructed from the updated hidden states and the corresponding output matrices.

3. The dental image segmentation method of claim 1, wherein, Based on the ROI attention mechanism, spatial gradient features and channel semantic features are extracted from the numerical subspace and the category subspace, respectively. The spatial gradient features and channel semantic features are then fused to obtain enhanced features, including: The context features are decomposed along the channel dimension into a numerical subspace corresponding to the numerical channel and a category subspace corresponding to the category channel; The spatial gradient features are obtained by capturing the intensity distribution from the numerical subspace based on spatial attention; the channel semantic features are obtained by capturing the semantic dependencies between features from the category subspace based on channel attention. The weights corresponding to the spatial gradient feature and the channel semantic feature are determined based on the global response intensity of the numerical channel and the category channel, respectively; the enhanced feature is obtained by multiplying the spatial gradient feature and the channel semantic feature and their respective weights element by element.

4. The dental image segmentation method of claim 3, wherein, Boundary feature extraction is performed on the multi-scale features and enhanced features to obtain the boundary confidence map, including: Multiple tooth edge features of different scales are extracted from the multi-scale features and enhancement features in parallel using convolution kernels of different scales; The tooth edge features at multiple different scales are spliced ​​together to obtain spliced ​​tooth edge features. The spliced ​​tooth edge features are then subjected to feature mapping through a convolutional layer to obtain the boundary confidence map.

5. The dental image segmentation method of claim 4, wherein, Before processing the tooth image using the SPTF-MBAE tooth segmentation model to obtain the segmentation result, the following steps are also included: Acquire dental imaging data for training purposes; The encoder extracts multi-scale features for training from the training tooth image data. The SPTF module is used to extract training enhancement features from the training multi-scale features. The ROI loss function is calculated based on the predicted bounding boxes corresponding to the enhanced features used in training and the ground truth bounding boxes corresponding to the dental image data used in training. The parameters of the SPTF-MBAE dental segmentation model are then optimized based on the ROI loss.

6. The dental image segmentation method of claim 5, wherein, After extracting training augmentation features from the training multi-scale features using the SPTF module, the method further includes: Pixel boundaries are extracted from the real segmentation mask corresponding to the training tooth image data; the pixel boundaries are dilated and eroded respectively, and the difference is calculated to obtain the boundary region; a corresponding weight mask is constructed based on the boundary region. Extract training boundary confidence maps from the multi-scale features and augmented features; Based on the training boundary confidence map, weight mask, and true segmentation mask, the boundary region loss function and the binary cross-entropy loss function are calculated. The parameters of the SPTF-MBAE tooth segmentation model are then optimized based on the boundary region loss value and the binary cross-entropy loss value.

7. A dental image segmentation system, characterized by, include: A multi-scale feature extraction module is used to acquire dental image data; the dental images are processed by the SPTF-MBAE dental segmentation model to obtain segmentation results; wherein, the SPTF-MBAE dental segmentation model is an encoder-decoder symmetrical structure, and the corresponding layers of the encoder and decoder are connected by skip connections, the bottleneck layer of the encoder is embedded in the SPTF module, and the decoder is embedded in the MBAE module; multi-scale features are extracted layer by layer from the dental image data by the encoder, wherein the multi-scale features include global structural features; The feature enhancement module is used to model the long-range dependencies of the global structural features based on the Mamba mechanism through the SPTF module to obtain context features; and to extract spatial gradient features and channel semantic features from the numerical subspace and the category subspace respectively based on the ROI attention mechanism, and to fuse the spatial gradient features and channel semantic features to obtain enhanced features, wherein the numerical subspace and the category subspace are obtained by decomposing the context features along the channel dimension; The image segmentation module is used to progressively upsample the multi-scale features and enhancement features through the decoder to obtain an upsampling result; extract boundary features from the multi-scale features and enhancement features through the MBAE module to obtain a boundary confidence map; enhance the tooth contour in the upsampling result based on the boundary confidence map to obtain a fusion feature; and segment the fusion feature using the output layer of the decoder to obtain the segmentation result of the tooth image data.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the tooth image segmentation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that When the computer program is loaded by the processor, it is able to execute the steps of the tooth image segmentation method according to any one of claims 1 to 6.