Mandibular nerve canal image segmentation network training method based on topology and strip pooling

By training a mandibular nerve canal image segmentation network based on topology and strip pooling, the problems of continuity and integrity in mandibular nerve canal segmentation are solved, achieving efficient segmentation of the mandibular nerve canal and improving the stability and reliability of segmentation.

CN122223344APending Publication Date: 2026-06-16GANYUE MEDICAL TECH (CHENGDU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GANYUE MEDICAL TECH (CHENGDU) CO LTD
Filing Date
2026-05-20
Publication Date
2026-06-16

Smart Images

  • Figure CN122223344A_ABST
    Figure CN122223344A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on topological and strip pooling mandibular nerve canal image segmentation network training method, belong to the image processing technique in computer vision field.The method splits mandibular nerve canal into left and right nerve canal as independent training sample in training stage, on this basis, segmentation network is based on the encoder-decoder structure that is constituted by the convolutional neural module with different channel number and convolution kernel configuration, introduce feature enhancement module SP3D based on three-dimensional strip pooling in the network bottleneck layer position between encoder and decoder, asymmetric global pooling and long strip pooling operation are carried out along different dimensions in space.In addition, by introducing the topological consistency loss function based on center line, the stability and effectiveness of the structural connectivity constraint in the mandibular nerve canal segmentation process are enhanced.Compared with existing methods, the application achieves more significant effect in CBCT mandibular nerve canal segmentation integrity and mandibular nerve topological connectivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to image processing technology in the field of computer vision, specifically, it relates to a training method for mandibular nerve canal image segmentation networks based on topology and strip pooling. Background Technology

[0002] Medical image segmentation of tubular structures is one of the important research directions in the field of medical image processing. The mandibular canal, as a typical three-dimensional tubular anatomical structure, is characterized by its elongated shape, complex spatial orientation, and low gray-level contrast in CBCT images, making segmentation quite challenging. Most existing medical image segmentation methods are mainly based on convolutional neural networks or combinations thereof with other network structures, focusing on learning local region features. Their ability to model the overall connectivity and spatial topological relationships of tubular structures is limited, making it difficult to effectively guarantee the continuity and integrity of the segmentation results. Therefore, there is still significant room for improvement in segmenting elongated structures such as the mandibular canal. Summary of the Invention

[0003] To address the issues of continuity and integrity in mandibular nerve canal medical image segmentation in existing technologies, this invention proposes a mandibular nerve canal image segmentation network training method based on topology and strip pooling, comprising the following steps: S1: Dataset Construction: Collect raw CBCT images of the mandibular region from clinical practice, and preprocess the collected CBCT images to generate panoramic CBCT images for mandibular nerve canal segmentation. In the panoramic CBCT images, the mandibular nerve canal region is manually annotated layer by layer to generate mandibular nerve canal label images corresponding one-to-one with the panoramic CBCT images. Pixels representing the mandibular nerve canal region are assigned a value of 1, and pixels representing the background region are assigned a value of 0. In the training data construction stage, the panoramic CBCT images and their corresponding mandibular nerve canal label images are cropped left and right. The original panoramic mandibular nerve canal images are divided into left and right mandibular nerve canal images along the left and right anatomical regions, and the corresponding label images are cropped simultaneously to form independent image-label pairs for the left and right nerve canals. Through this cropping method, the left and right mandibular nerve canals are included as independent training samples in the training dataset. Finally, the cropped left and right mandibular nerve canal CBCT images and their corresponding label images together constitute the training dataset and are input into the mandibular nerve canal segmentation network for model training. S2: Network Framework Construction: The mandibular nerve canal image segmentation network based on topology and strip pooling includes an encoder part, a bottleneck layer feature enhancement part, a decoder part, and a skip connection part. The encoder part consists of six cascaded encoder layers, each including at least one 3D convolutional feature extraction module and a downsampling layer for progressively extracting multi-scale features of the mandibular nerve canal. The bottleneck layer feature enhancement part is located between the encoder and decoder parts and includes a 3D strip pooling-based feature enhancement module (SP3D). The decoder part consists of five decoder layers corresponding to the encoder layers, each including an upsampling layer and a 3D convolutional feature fusion module. The skip connection part is used to concatenate and fuse the features output by the encoder layer with the features input by the corresponding decoder layer. A multi-scale segmentation output head is provided at the end of the decoder. One iteration of network training is as follows: S2-1: Input the training samples obtained in step S1 into the network. The input image is processed by the first layer of the three-dimensional convolutional feature extraction module to obtain the initial feature representation. S2-2: The initial feature representation is sequentially input into the multi-level encoder layers of the encoder part for feature extraction; the encoder part includes six encoder layers, each of which includes at least one three-dimensional convolutional feature extraction module and a downsampling layer; the input image is processed step by step through the multi-level cascaded encoder layers; wherein, each encoder layer sequentially performs feature extraction and downsampling operations on its input features to obtain the output features of the current level; at the same time, the output features obtained by each encoder layer are retained and used as skip connections to be input to the corresponding decoder layer; the features output by the last encoder layer are the lowest resolution features of the encoder part; S2-3: Input the lowest resolution feature into the bottleneck layer feature enhancement module. The SP3D feature enhancement module performs long-distance spatial dependency modeling on the lowest resolution feature to obtain the enhanced bottleneck layer feature, and uses it as the input feature of the decoder part. S2-4: The enhanced bottleneck layer features are input to the decoder for progressive upsampling and feature fusion; after each decoder layer upsamples the input features, they are concatenated and fused with the output features of the encoder layer corresponding to the current decoder layer; through the skip connection mechanism, the fusion of high-resolution spatial information and deep semantic features is achieved. S2-5: Set up segmentation output heads at multiple scale levels in the decoder part to perform pixel-level classification prediction of decoder features at different resolutions; supervise the multi-scale prediction results with the real label map at the corresponding scale, and construct the total loss function based on topological consistency and centerline connectivity constraints; complete the update of network parameters in one training iteration by minimizing the total loss function.

[0004] Optionally, in step S2-1, the CBCT three-dimensional images of the mandibular nerve canal after cropping the left and right regions are uniformly represented as follows: , Where C represents the number of input channels, and D, H, and W represent the dimensions of the 3D CBCT image in depth, height, and width, respectively; the 3D image The input is fed into the first-layer 3D convolutional feature extraction module of the encoder to obtain the first-layer feature representation: , in This represents the number of channels in the first layer of features, and , These are the depth, height, and width dimensions after downsampling.

[0005] Optionally, in step S2-2, the encoder section comprises six encoder layers; for the last five encoder layers excluding the first encoder layer, each encoder layer uses input features... As input, output the next level feature. Its structure includes at least one 3D convolutional feature extraction operation and one downsampling operation, and its feedforward computation process is expressed as follows: , in, Indicates the first The 3D convolution operation in the layer encoder has a convolution kernel size of . Step size is The padding method is used to maintain the consistency of the spatial dimensions of the feature maps before and after convolution; the 3D convolution operation is used to extract the local structural features of the input features in 3D space; downsampling operation Using a step size of Pooling operations are used to downsample the feature map in depth, height, and width, reducing the spatial resolution of the feature map layer by layer while enhancing the semantic information layer by layer; the feedforward computation output of the sixth-level encoder layer is the lowest-resolution encoder output feature. .

[0006] Optionally, in step S2-3, the lowest resolution encoder output features obtained in step S2-2 are... The input is fed into the SP3D feature enhancement module based on 3D strip pooling to calculate the strip pooling enhanced features. The calculation process is expressed as follows: , The output features of the lowest resolution encoder are represented as follows: ,in This indicates the number of channels for this feature. These represent the spatial dimensions of the feature in depth, height, and width, respectively. This refers to the Feature Enhancement Module SP3D. The SP3D module first uses two sets of independent one-dimensional channel projection operations to transform the features output by the lowest resolution encoder. Mapping to the intermediate feature space yields the first projected features. Second projection features The calculation process is expressed as follows: , , in, , Indicates by The channel compression mapping operation, consisting of 3D convolution, normalization, and nonlinear activation functions, has the following feature channel number: This is used to reduce computational complexity and separate different spatial dependency modeling paths; Based on the first projection feature The global context modeling branch is constructed, and its calculation method is expressed as follows: , , in: Representing local spatial features, Represents global context features, This represents a 3D adaptive global average pooling operation that compresses features to... ; This represents a trilinear interpolation upsampling operation used to restore features to their original state. size; and These represent the kernel size as follows: and The three-dimensional convolution operation is performed; the above two feature paths are added element-wise and then subjected to a nonlinear transformation to obtain the global enhanced feature: , in Represents a nonlinear activation function; Based on the second projection feature We construct strip pooling branches along different directions in three-dimensional space, which are represented as follows: , , , in: , and These represent 3D adaptive strip pooling operations performed along the depth, width, and height directions, respectively, used to aggregate long-range contextual information in a single spatial dimension. After performing 3D convolution on the strip pooling results in each direction and upsampling to the original spatial size, we obtain: , , , Then, the three directional features are summed element-wise and transformed nonlinearly to obtain the directional enhancement features: , global context features With directional enhancement features Perform splicing along the channel dimension, and through... 3D convolution is used to perform channel fusion to obtain fused features. : , in This represents a feature concatenation operation along the channel dimension; Finally, the SP3D module uses a residual connection method to add the fused features to the original input features, resulting in the enhanced bottleneck layer output features. : , in, This represents a non-linear activation function.

[0007] Optionally, in steps S2-4, the decoder section consists of five decoder layers, the first being... The input features of the multi-level decoder layer are denoted as The output features are denoted as First, upsample the input features to obtain the upsampled features: , Upsampled features Corresponding encoder layer output features By concatenating the data along the channel dimension using skip connections, the output features are obtained: , in, This indicates a 3D deconvolution upsampling operation used to restore the spatial resolution of the feature map; This represents a feature concatenation operation along the channel dimension; This represents a 3D convolutional feature fusion operation, used to perform channel dimensionality reduction and semantic fusion on the concatenated features.

[0008] Optionally, in steps S2-5, the total loss function is composed of a multi-scale segmentation loss function and a centerline-based topology consistency loss function; for the multi-scale segmentation loss function, a multi-scale segmentation head is set at the output of the first four decoder layers, and a main segmentation head is set at the output of the final decoder layer to perform segmentation prediction on feature maps of different resolutions respectively; let the final decoder output feature be... The highest resolution segmentation prediction result corresponding to it is denoted as The prediction results for the remaining intermediate scales are denoted as follows: Multi-scale prediction result set This is used for subsequent multi-scale supervised training with the corresponding scale of real label maps; for the centerline-based topological consistency loss function, the centerline skeletons of the prediction results and labels are extracted separately to explicitly measure the degree of overlap and connectivity between the two at the centerline level, thereby constraining the continuity and integrity of the mandibular canal at the topological level.

[0009] Optionally, a centerline-based topological consistency loss function is used to constrain the continuity and integrity of the mandibular nerve canal segmentation results in terms of spatial topology. Its calculation process includes the following steps: This represents the predicted probability graph of the mandibular nerve canal output by the network. This represents the corresponding actual annotation label; where, These represent the dimensions of the 3D data in the depth, height, and width directions, respectively; respectively for and Apply soft skeletonization operation To extract its centerline structure: , , Among them, the soft skeletonization operator This is achieved through an iterative combination of multiple three-dimensional morphological erosion and opening operations. The basic process includes: 3D soft etching operation: , Three-dimensional soft expansion operation: , Three-dimensional opening operation: , in, This represents the 3D input tensor to be processed into a soft skeleton. This indicates the operation of finding the minimum value element by element; , , These represent the pooling kernel size as follows: , , The 3D pooling operation is used to perform local feature aggregation along the depth and direction of 3D data, respectively. Indicates the pooling kernel size as The three-dimensional pooling operation is performed; through multiple iterations of the above operation, non-central region voxels are gradually removed, and only the centerline representation of the segmented structure is retained, thereby obtaining continuous and differentiable centerline features. Based on the skeletonization results, the accuracy of the predicted centerline relative to the centerline of the true label is defined respectively. Recall rate of the predicted centerline relative to the true centerline : , , in, The centerline is used as a smoothing factor to avoid a denominator of zero. Based on the centerline precision and recall mentioned above, the centerline-based topology consistency loss function is defined as follows: , in, The connectivity bias coefficient, and its value is... This coefficient is used to assign values ​​in loss calculations. Compare Higher penalty weight.

[0010] Optionally, the multi-scale segmentation loss is expressed as: , in, A true label diagram of the mandibular nerve canal. The decoder is in the first... Prediction results at each scale Represents the segmentation loss function. The segmentation loss function outputs corresponding weight coefficients for segmentation at different scales. Binary cross-entropy loss With Dice loss Weighted composition: , Here, the weighting coefficients are used for the first... The binary cross-entropy loss at each scale is defined as: , Regarding the first The Dice loss at each scale is defined as: , in, This indicates a summation operation on all voxels in the feature map. To prevent a smoothing factor with a denominator of zero, the final total loss function is obtained by incorporating a centerline-based topology consistency loss. The expression is: , in, and These are adjustable weight coefficients; during training, the multi-scale segmentation loss is minimized simultaneously. Topology consistency loss based on centerline .

[0011] The beneficial effects of this invention are as follows: This invention introduces a three-dimensional strip pooling operation, which can effectively extract long-range spatial context features of the mandibular nerve canal along its extension direction, significantly enhancing the network's ability to perceive slender and minute structures. Simultaneously, this invention introduces a centerline topological consistency constraint, supervising the network training phase from a global topological level, fundamentally overcoming the problems of tubular structure breakage and voids easily caused by traditional pixel-level segmentation methods. This invention effectively improves the overall continuity and segmentation integrity of the mandibular nerve canal, a slender tubular structure, in oral medical image segmentation tasks. It achieves more stable and reliable mandibular nerve canal segmentation results under limited resolution medical imaging conditions, providing an effective technical means for the intelligent identification and assisted diagnosis of the mandibular nerve canal. Attached Figure Description

[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is the network framework diagram of the present invention.

[0014] Figure 2 This is a schematic diagram of the calculation process of the feature enhancement module based on three-dimensional strip pooling of the present invention.

[0015] Figure 3 This is a schematic diagram illustrating the calculation process of the centerline topology consistency loss based on the present invention.

[0016] Figure 4 This is a comparison chart of some output results of the present invention and existing methods. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0018] like Figures 1-3 As shown, the mandibular nerve canal image segmentation network training method disclosed in this invention based on topology and strip pooling includes the following steps: S1: Dataset Construction: Collect raw CBCT images of the mandibular region from clinical practice, and preprocess the collected CBCT images to generate panoramic CBCT images for mandibular nerve canal segmentation. In the panoramic CBCT images, the mandibular nerve canal region is manually annotated layer by layer to generate mandibular nerve canal label images corresponding one-to-one with the panoramic CBCT images. Pixels representing the mandibular nerve canal region are assigned a value of 1, and pixels representing the background region are assigned a value of 0. In the training data construction stage, the panoramic CBCT images and their corresponding mandibular nerve canal label images are cropped left and right. The original panoramic mandibular nerve canal images are divided into left and right mandibular nerve canal images along the left and right anatomical regions, and the corresponding label images are cropped simultaneously to form independent image-label pairs for the left and right nerve canals. Through this cropping method, the left and right mandibular nerve canals are included as independent training samples in the training dataset. Finally, the cropped left and right mandibular nerve canal CBCT images and their corresponding label images together constitute the training dataset and are input into the mandibular nerve canal segmentation network for model training. S2: Network Framework Construction: The mandibular nerve canal image segmentation network based on topology and strip pooling includes an encoder part, a bottleneck layer feature enhancement part, a decoder part, and a skip connection part. The encoder part consists of six cascaded encoder layers, each including at least one 3D convolutional feature extraction module and a downsampling layer for progressively extracting multi-scale features of the mandibular nerve canal. The bottleneck layer feature enhancement part is located between the encoder and decoder parts and includes a 3D strip pooling-based feature enhancement module (SP3D). The decoder part consists of five decoder layers corresponding to the encoder layers, each including an upsampling layer and a 3D convolutional feature fusion module. The skip connection part is used to concatenate and fuse the features output by the encoder layer with the features input by the corresponding decoder layer. A multi-scale segmentation output head is provided at the end of the decoder. One iteration of network training is as follows: S2-1: Input the training samples obtained in step S1 into the network. The input image is processed by the first layer of the three-dimensional convolutional feature extraction module to obtain the initial feature representation. S2-2: The initial feature representation is sequentially input into the multi-level encoder layers of the encoder part for feature extraction; the encoder part includes six encoder layers, each of which includes at least one three-dimensional convolutional feature extraction module and a downsampling layer; the input image is processed step by step through the multi-level cascaded encoder layers; wherein, each encoder layer sequentially performs feature extraction and downsampling operations on its input features to obtain the output features of the current level; at the same time, the output features obtained by each encoder layer are retained and used as skip connections to be input to the corresponding decoder layer; the features output by the last encoder layer are the lowest resolution features of the encoder part; S2-3: Input the lowest resolution feature into the bottleneck layer feature enhancement module. The SP3D feature enhancement module performs long-distance spatial dependency modeling on the lowest resolution feature to obtain the enhanced bottleneck layer feature, and uses it as the input feature of the decoder part. S2-4: The enhanced bottleneck layer features are input to the decoder for progressive upsampling and feature fusion; after each decoder layer upsamples the input features, they are concatenated and fused with the output features of the encoder layer corresponding to the current decoder layer; through the skip connection mechanism, the fusion of high-resolution spatial information and deep semantic features is achieved. S2-5: Set up segmentation output heads at multiple scale levels in the decoder part to perform pixel-level classification prediction of decoder features at different resolutions; supervise the multi-scale prediction results with the real label map at the corresponding scale, and construct the total loss function based on topological consistency and centerline connectivity constraints; complete the update of network parameters in one training iteration by minimizing the total loss function.

[0019] Optionally, in step S2-1, the CBCT three-dimensional images of the mandibular nerve canal after cropping the left and right regions are uniformly represented as follows: , Where C represents the number of input channels, and D, H, and W represent the dimensions of the 3D CBCT image in depth, height, and width, respectively; the 3D image The input is fed into the first-layer 3D convolutional feature extraction module of the encoder to obtain the first-layer feature representation: , in This represents the number of channels in the first layer of features, and , These are the depth, height, and width dimensions after downsampling.

[0020] Optionally, in step S2-2, the encoder section comprises six encoder layers; for the last five encoder layers excluding the first encoder layer, each encoder layer uses input features... As input, output the next level feature. Its structure includes at least one 3D convolutional feature extraction operation and one downsampling operation, and its feedforward computation process is expressed as follows: , in, Indicates the first The 3D convolution operation in the layer encoder has a convolution kernel size of . Step size is The padding method is used to maintain the consistency of the spatial dimensions of the feature maps before and after convolution; the 3D convolution operation is used to extract the local structural features of the input features in 3D space; downsampling operation Using a step size of Pooling operations are used to downsample the feature map in depth, height, and width, reducing the spatial resolution of the feature map layer by layer while enhancing the semantic information layer by layer; the feedforward computation output of the sixth-level encoder layer is the lowest-resolution encoder output feature. .

[0021] Optionally, in step S2-3, the lowest resolution encoder output features obtained in step S2-2 are... The input is fed into the SP3D feature enhancement module based on 3D strip pooling to calculate the strip pooling enhanced features. The calculation process is expressed as follows: , The output features of the lowest resolution encoder are represented as follows: ,in This indicates the number of channels for this feature. These represent the spatial dimensions of the feature in depth, height, and width, respectively. This refers to the Feature Enhancement Module SP3D. The SP3D module first uses two sets of independent one-dimensional channel projection operations to transform the features output by the lowest resolution encoder. Mapping to the intermediate feature space yields the first projected features. Second projection features The calculation process is expressed as follows: , , in, , Indicates by The channel compression mapping operation, consisting of 3D convolution, normalization, and nonlinear activation functions, has the following feature channel number: This is used to reduce computational complexity and separate different spatial dependency modeling paths; Based on the first projection feature The global context modeling branch is constructed, and its calculation method is expressed as follows: , , in: Representing local spatial features, Represents global context features, This represents a 3D adaptive global average pooling operation that compresses features to... ; This represents a trilinear interpolation upsampling operation used to restore features to their original state. size; and These represent the kernel size as follows: and The three-dimensional convolution operation is performed; the above two feature paths are added element-wise and then subjected to a nonlinear transformation to obtain the global enhanced feature: , in Represents a nonlinear activation function; Based on the second projection feature We construct strip pooling branches along different directions in three-dimensional space, which are represented as follows: , , , in: , and These represent 3D adaptive strip pooling operations performed along the depth, width, and height directions, respectively, used to aggregate long-range contextual information in a single spatial dimension. After performing 3D convolution on the strip pooling results in each direction and upsampling to the original spatial size, we obtain: , , , Then, the three directional features are summed element-wise and transformed nonlinearly to obtain the directional enhancement features: , global context features With directional enhancement features Perform splicing along the channel dimension, and through... 3D convolution is used to perform channel fusion to obtain fused features. : , in This represents a feature concatenation operation along the channel dimension; Finally, the SP3D module uses a residual connection method to add the fused features to the original input features, resulting in the enhanced bottleneck layer output features. : , in, This represents a non-linear activation function.

[0022] Optionally, in steps S2-4, the decoder section consists of five decoder layers, the first being... The input features of the multi-level decoder layer are denoted as The output features are denoted as First, upsample the input features to obtain the upsampled features: , Upsampled features Corresponding encoder layer output features By concatenating the data along the channel dimension using skip connections, the output features are obtained: , in, This indicates a 3D deconvolution upsampling operation used to restore the spatial resolution of the feature map; This represents a feature concatenation operation along the channel dimension; This represents a 3D convolutional feature fusion operation, used to perform channel dimensionality reduction and semantic fusion on the concatenated features.

[0023] Optionally, in steps S2-5, the total loss function is composed of a multi-scale segmentation loss function and a centerline-based topology consistency loss function; for the multi-scale segmentation loss function, a multi-scale segmentation head is set at the output of the first four decoder layers, and a main segmentation head is set at the output of the final decoder layer to perform segmentation prediction on feature maps of different resolutions respectively; let the final decoder output feature be... The highest resolution segmentation prediction result corresponding to it is denoted as The prediction results for the remaining intermediate scales are denoted as follows: Multi-scale prediction result set This is used for subsequent multi-scale supervised training with the corresponding scale of real label maps; for the centerline-based topological consistency loss function, the centerline skeletons of the prediction results and labels are extracted separately to explicitly measure the degree of overlap and connectivity between the two at the centerline level, thereby constraining the continuity and integrity of the mandibular canal at the topological level.

[0024] Optionally, a centerline-based topological consistency loss function is used to constrain the continuity and integrity of the mandibular nerve canal segmentation results in terms of spatial topology. Its calculation process includes the following steps: This represents the predicted probability graph of the mandibular nerve canal output by the network. This represents the corresponding actual annotation label; where, These represent the dimensions of the 3D data in the depth, height, and width directions, respectively; respectively for and Apply soft skeletonization operation To extract its centerline structure: , , Among them, the soft skeletonization operator This is achieved through an iterative combination of multiple three-dimensional morphological erosion and opening operations. The basic process includes: 3D soft etching operation: , Three-dimensional soft expansion operation: , Three-dimensional opening operation: , in, This represents the 3D input tensor to be processed into a soft skeleton. This indicates the operation of finding the minimum value element by element; , , These represent the pooling kernel size as follows: , , The 3D pooling operation is used to perform local feature aggregation along the depth and direction of 3D data, respectively. Indicates the pooling kernel size as The three-dimensional pooling operation is performed; through multiple iterations of the above operation, non-central region voxels are gradually removed, and only the centerline representation of the segmented structure is retained, thereby obtaining continuous and differentiable centerline features. Based on the skeletonization results, the accuracy of the predicted centerline relative to the centerline of the true label is defined respectively. Recall rate of the predicted centerline relative to the true centerline : , , in, The centerline is used as a smoothing factor to avoid a denominator of zero. Based on the centerline precision and recall mentioned above, the centerline-based topology consistency loss function is defined as follows: , in, The connectivity bias coefficient, and its value is... This coefficient is used to assign values ​​in loss calculations. Compare Higher penalty weight.

[0025] Optionally, the multi-scale segmentation loss is expressed as: , in, A true label diagram of the mandibular nerve canal. The decoder is in the first... Prediction results at each scale Represents the segmentation loss function. The segmentation loss function outputs corresponding weight coefficients for segmentation at different scales. Binary cross-entropy loss With Dice loss Weighted composition: , Here, the weighting coefficients are used for the first... The binary cross-entropy loss at each scale is defined as: , Regarding the first The Dice loss at each scale is defined as: , in, This indicates a summation operation on all voxels in the feature map. To prevent a smoothing factor with a denominator of zero, the final total loss function is obtained by incorporating a centerline-based topology consistency loss. The expression is: , in, and These are adjustable weight coefficients; during training, the multi-scale segmentation loss is minimized simultaneously. Topology consistency loss based on centerline .

[0026] like Figure 4 As shown, compared with other segmentation networks, the method proposed in this application has better overall connectivity, stronger suppression of segmentation noise, and better edge segmentation and upprocessing of regions of interest.

[0027] Example:

[0028] The training dataset is constructed according to step S1. The data consists of CBCT images containing regions of interest obtained through cone-beam scanning and manually annotated label images containing regions of interest. Each CBCT image forms a pair with its corresponding label image.

[0029] According to step S2-1, the constructed training data is fed into the encoding layer of the network. The input 3D mandibular nerve canal image is processed by depthwise convolution to extract the feature map of the first scale. Through this process, the original features of the image are mapped into an initial 3D feature representation.

[0030] According to steps S2-2 and S2-3, the initial features output from the first encoding layer are sequentially fed into the multi-level encoder layers of the encoder part for feature extraction. The encoder part includes six encoder layers, each of which includes a 3D convolutional feature extraction module and a downsampling layer. The input features of each layer are extracted through convolution operations, and the resolution of the feature map is reduced through downsampling. The output features of each layer also serve as the input to the skip connection layer for subsequent feature fusion. The lowest resolution features output from the sixth encoder are input to the feature enhancement module SP3D located in the bottleneck layer for computation. This module performs long-distance spatial dependency modeling on the features, further improving the expressive power of the feature representation. The enhanced bottleneck output features will serve as the input to the decoder part. According to step S2-4, the bottleneck layer output features are fed into the decoder part. The decoder part consists of five decoder layers. Each decoder layer first performs an upsampling operation to restore the low-resolution features to a higher resolution. The upsampled features are concatenated with the skip connection features from the corresponding encoder layer. The concatenated features are then fused through the 3D convolution module to gradually recover more refined image information.

[0031] According to steps S2-5, segmentation output heads are set at multiple scales in the decoder section to perform pixel-level classification predictions on decoder features at different scales. Finally, the decoder output features are processed by the segmentation heads to generate prediction results, which are then compared with the corresponding label maps to calculate the loss function. The prediction results and label maps are extracted using a skeleton, and the centerline-based topology consistency loss is calculated again. By minimizing the loss function, the network parameters are updated, completing one round of training.

[0032] Testing phase: Select samples that were not used in training for testing. Compare the network output with the labels and calculate the evaluation metrics Dice, clDice, IoU and HD95 to determine the model’s performance in the mandibular canal segmentation task.

[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for training a mandibular nerve tube image segmentation network based on topology and strip pooling, characterized in that, Includes the following steps: S1: Dataset Construction: Collect raw CBCT images of the mandibular region from clinical practice, and preprocess the collected CBCT images to generate panoramic CBCT images for mandibular nerve canal segmentation. In the panoramic CBCT images, the mandibular nerve canal region is manually annotated layer by layer to generate mandibular nerve canal label images corresponding one-to-one with the panoramic CBCT images. Pixels representing the mandibular nerve canal region are assigned a value of 1, and pixels representing the background region are assigned a value of 0. In the training data construction stage, the panoramic CBCT images and their corresponding mandibular nerve canal label images are cropped left and right. The original panoramic mandibular nerve canal images are divided into left and right mandibular nerve canal images along the left and right anatomical regions, and the corresponding label images are cropped simultaneously to form independent image-label pairs for the left and right nerve canals. Through this cropping method, the left and right mandibular nerve canals are included as independent training samples in the training dataset. Finally, the cropped left and right mandibular nerve canal CBCT images and their corresponding label images together constitute the training dataset and are input into the mandibular nerve canal segmentation network for model training. S2: Network Framework Construction: The mandibular nerve canal image segmentation network based on topology and strip pooling includes an encoder part, a bottleneck layer feature enhancement part, a decoder part, and a skip connection part. The encoder part consists of six cascaded encoder layers, each including at least one 3D convolutional feature extraction module and a downsampling layer for progressively extracting multi-scale features of the mandibular nerve canal. The bottleneck layer feature enhancement part is located between the encoder and decoder parts and includes a 3D strip pooling-based feature enhancement module (SP3D). The decoder part consists of five decoder layers corresponding to the encoder layers, each including an upsampling layer and a 3D convolutional feature fusion module. The skip connection part is used to concatenate and fuse the features output by the encoder layer with the features input by the corresponding decoder layer. A multi-scale segmentation output head is provided at the end of the decoder. One iteration of network training is as follows: S2-1: Input the training samples obtained in step S1 into the network. The input image is processed by the first layer of the three-dimensional convolutional feature extraction module to obtain the initial feature representation. S2-2: The initial feature representation is sequentially input into the multi-level encoder layers of the encoder part for feature extraction; the encoder part includes six encoder layers, each of which includes at least one three-dimensional convolutional feature extraction module and a downsampling layer; the input image is processed step by step through the multi-level cascaded encoder layers; wherein, each encoder layer sequentially performs feature extraction and downsampling operations on its input features to obtain the output features of the current level; at the same time, the output features obtained by each encoder layer are retained and used as skip connections to be input to the corresponding decoder layer; the features output by the last encoder layer are the lowest resolution features of the encoder part; S2-3: Input the lowest resolution feature into the bottleneck layer feature enhancement module. The SP3D feature enhancement module performs long-distance spatial dependency modeling on the lowest resolution feature to obtain the enhanced bottleneck layer feature, and uses it as the input feature of the decoder part. S2-4: The enhanced bottleneck layer features are input to the decoder for progressive upsampling and feature fusion; after each decoder layer upsamples the input features, they are concatenated and fused with the output features of the encoder layer corresponding to the current decoder layer; through the skip connection mechanism, the fusion of high-resolution spatial information and deep semantic features is achieved. S2-5: Set up segmentation output heads at multiple scale levels in the decoder part to perform pixel-level classification prediction of decoder features at different resolutions; supervise the multi-scale prediction results with the real label map at the corresponding scale, and construct the total loss function based on topological consistency and centerline connectivity constraints; complete the update of network parameters in one training iteration by minimizing the total loss function.

2. The mandibular nerve tube image segmentation network training method based on topology and strip pooling according to claim 1, characterized in that, In step S2-1, the CBCT three-dimensional images of the mandibular nerve canal after cropping the left and right regions are uniformly represented as follows: , Where C represents the number of input channels, and D, H, and W represent the dimensions of the 3D CBCT image in depth, height, and width, respectively; the 3D image The input is fed into the first-layer 3D convolutional feature extraction module of the encoder to obtain the first-layer feature representation: , in This represents the number of channels in the first layer of features, and , These are the depth, height, and width dimensions after downsampling.

3. The mandibular nerve tube image segmentation network training method based on topology and strip pooling according to claim 1, characterized in that, In step S2-2, the encoder section comprises six encoder layers; for the last five encoder layers excluding the first encoder layer, each encoder layer uses input features... As input, output the next level feature. Its structure includes at least one 3D convolutional feature extraction operation and one downsampling operation, and its feedforward computation process is expressed as follows: , in, Indicates the first The 3D convolution operation in the layer encoder has a convolution kernel size of . Step size is The padding method is used to maintain the consistency of the spatial dimensions of the feature maps before and after convolution; the 3D convolution operation is used to extract the local structural features of the input features in 3D space; downsampling operation Using a step size of Pooling operations are used to downsample the feature map in depth, height, and width, reducing the spatial resolution of the feature map layer by layer while enhancing the semantic information layer by layer; the feedforward computation output of the sixth-level encoder layer is the lowest-resolution encoder output feature. .

4. The mandibular nerve canal image segmentation network training method based on topology and strip pooling according to claim 1, characterized in that, In step S2-3, the lowest resolution encoder output features obtained in step S2-2 are... The input is fed into the SP3D feature enhancement module based on 3D strip pooling to calculate the strip pooling enhanced features. The calculation process is expressed as follows: , The output features of the lowest resolution encoder are represented as follows: ,in This indicates the number of channels for this feature. These represent the spatial dimensions of the feature in depth, height, and width, respectively. This refers to the Feature Enhancement Module SP3D. The SP3D module first uses two sets of independent one-dimensional channel projection operations to transform the features output by the lowest resolution encoder. Mapping to the intermediate feature space yields the first projected features. Second projection features The calculation process is expressed as follows: , , in, , Indicates by The channel compression mapping operation, consisting of 3D convolution, normalization, and nonlinear activation functions, has the following feature channel number: This is used to reduce computational complexity and separate different spatial dependency modeling paths; Based on the first projection feature The global context modeling branch is constructed, and its calculation method is expressed as follows: , , in: Representing local spatial features, Represents global context features, This represents a 3D adaptive global average pooling operation that compresses features to... ; This represents a trilinear interpolation upsampling operation used to restore features to their original state. size; and These represent the kernel size as follows: and The three-dimensional convolution operation is performed; the above two feature paths are added element-wise and then subjected to a nonlinear transformation to obtain the global enhanced feature: , in Represents a nonlinear activation function; Based on the second projection feature We construct strip pooling branches along different directions in three-dimensional space, which are represented as follows: , , , in: , and These represent 3D adaptive strip pooling operations performed along the depth, width, and height directions, respectively, used to aggregate long-range contextual information in a single spatial dimension. After performing 3D convolution on the strip pooling results in each direction and upsampling to the original spatial size, we obtain: , , , Then, the three directional features are summed element-wise and transformed nonlinearly to obtain the directional enhancement features: , global context features With directional enhancement features Perform splicing along the channel dimension, and through... 3D convolution is used to perform channel fusion to obtain fused features. : , in This represents a feature concatenation operation along the channel dimension; Finally, the SP3D module uses a residual connection method to add the fused features to the original input features, resulting in the enhanced bottleneck layer output features. : , in, This represents a non-linear activation function.

5. The mandibular nerve tube image segmentation network training method based on topology and strip pooling according to claim 1, characterized in that, In steps S2-4, the decoder section consists of five decoder layers, the first of which is... The input features of the multi-level decoder layer are denoted as The output features are denoted as First, upsample the input features to obtain the upsampled features: , Upsampled features Corresponding encoder layer output features By concatenating the data along the channel dimension using skip connections, the output features are obtained: , in, This indicates a 3D deconvolution upsampling operation used to restore the spatial resolution of the feature map; This represents a feature concatenation operation along the channel dimension; This represents a 3D convolutional feature fusion operation, used to perform channel dimensionality reduction and semantic fusion on the concatenated features.

6. The mandibular nerve tube image segmentation network training method based on topology and strip pooling according to claim 1, characterized in that, In steps S2-5, the total loss function is composed of a multi-scale segmentation loss function and a centerline-based topology consistency loss function. For the multi-scale segmentation loss function, a multi-scale segmentation head is set at the output of the first four decoder layers, and a main segmentation head is set at the output of the final decoder layer to perform segmentation prediction on feature maps of different resolutions. Let the final decoder output feature be... The highest resolution segmentation prediction result corresponding to it is denoted as The prediction results for the remaining intermediate scales are denoted as follows: Multi-scale prediction result set This is used for subsequent multi-scale supervised training with the corresponding scale of real label maps; for the centerline-based topological consistency loss function, the centerline skeletons of the prediction results and labels are extracted separately to explicitly measure the degree of overlap and connectivity between the two at the centerline level, thereby constraining the continuity and integrity of the mandibular canal at the topological level.

7. The mandibular nerve tube image segmentation network training method based on topology and strip pooling according to claim 6, characterized in that, The centerline-based topology consistency loss function is used to constrain the continuity and integrity of the mandibular nerve canal segmentation results in terms of spatial topology. Its calculation process includes the following steps: This represents the predicted probability graph of the mandibular nerve canal output by the network. This represents the corresponding actual annotation label; where, These represent the dimensions of the 3D data in the depth, height, and width directions, respectively; respectively for and Apply soft skeletonization operation To extract its centerline structure: , , Among them, the soft skeletonization operator This is achieved through an iterative combination of multiple three-dimensional morphological erosion and opening operations. The basic process includes: 3D soft etching operation: , Three-dimensional soft expansion operation: , Three-dimensional opening operation: , in, This represents the 3D input tensor to be processed into a soft skeleton. This indicates the operation of finding the minimum value element by element; , , These represent the pooling kernel size as follows: , , The 3D pooling operation is used to perform local feature aggregation along the depth and direction of 3D data, respectively. Indicates the pooling kernel size as The three-dimensional pooling operation is performed; through multiple iterations of the above operation, non-central region voxels are gradually removed, and only the centerline representation of the segmented structure is retained, thereby obtaining continuous and differentiable centerline features. Based on the skeletonization results, the accuracy of the predicted centerline relative to the centerline of the true label is defined respectively. Recall rate of the predicted centerline relative to the true centerline : , , in, The centerline is used as a smoothing factor to avoid a denominator of zero. Based on the centerline precision and recall mentioned above, the centerline-based topology consistency loss function is defined as follows: , in, The connectivity bias coefficient, and its value is... This coefficient is used to assign values ​​in loss calculations. Compare Higher penalty weight.

8. The mandibular nerve canal image segmentation network training method based on topology and strip pooling according to claim 7, characterized in that, The multi-scale segmentation loss is expressed as: , in, A true label diagram of the mandibular nerve canal. The decoder is in the first... Prediction results at each scale Represents the segmentation loss function. The segmentation loss function outputs corresponding weight coefficients for different scales of segmentation; Binary cross-entropy loss With Dice loss Weighted composition: , Here, the weighting coefficients are used for the first... The binary cross-entropy loss at each scale is defined as: , Regarding the first The Dice loss at each scale is defined as: , in, This indicates a summation operation on all voxels in the feature map. To prevent a smoothing factor with a denominator of zero, the final total loss function is obtained by incorporating a centerline-based topology consistency loss. The expression is: , in, and These are adjustable weight coefficients; during training, the multi-scale segmentation loss is minimized simultaneously. Topology consistency loss based on centerline .