A 3D medical image segmentation method
Through the joint optimization and data enhancement strategy of the dual network segmentation model, the problems of edge blur and category imbalance in three-dimensional medical image segmentation are solved, and segmentation accuracy and generalization capabilities are improved, especially the segmentation performance of small-category organs.
Patent Information
- Application Number
- CN202510696653.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-28
AI Technical Summary
The existing three-dimensional medical image segmentation method faces sample edge blur and category imbalance, and the segmentation accuracy is low, and relies on a large amount of high-quality labeled data, which makes it difficult to promote in practical applications.
The dual-network segmentation model is adopted to obtain the predicted segmentation probability map and the predicted symbol distance field through two parallel subnets, and combine cross entropy loss, Dice loss and symbol distance function loss, and conduct joint optimization training. Soft pseudo-labels and predicted symbol distance field are used for collaborative supervision, enhancing the model's learning ability for labeled and unlabeled data, and improving the segmentation performance through data augmentation and edge enhancement modules.
In the limited label scenario, the generalization ability and segmentation accuracy of the model are improved, especially the segmentation performance of small-category organs, enhance the perception ability of edge areas, alleviate the problem of category imbalance, and improve the segmentation performance of three-dimensional medical images.
Smart Images

Figure CN120219754B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a three-dimensional medical image segmentation method. Background Art
[0002] Image segmentation is a key research area in computer vision and image processing. Its goal is to divide an image into several non-overlapping connected regions and extract regions of interest (ROIs). In the field of medical image segmentation, segmentation of three-dimensional medical images plays a crucial role in clinical diagnosis and treatment planning. However, deep learning models typically rely on large amounts of high-quality annotated data. The costly and time-consuming process of annotating medical images severely restricts their widespread adoption in practical applications.
[0003] In recent years, semi-supervised learning methods have become a research hotspot. Their core idea is to improve the generalization ability of the model by effectively utilizing unlabeled data and alleviate the problem of scarce labeled data. However, in existing semi-supervised segmentation methods, when edges are blurred and structures are complex, pseudo-label noise tends to concentrate in edge areas, leading to local missegmentation and even global morphological distortion, affecting the reliability of the model in clinical applications. In addition, another important challenge facing medical image segmentation is the problem of class imbalance. Since the number of samples in small categories in medical images is usually small, the model tends to predict large categories, which leads to performance degradation. These small categories of organs are often small in size and samples are scarce, further increasing the difficulty of model training.
[0004] In summary, since the model relies on sample data for training, and when the sample edges are fuzzy, the results are complex, and the number of small category samples is small, the existing three-dimensional medical image segmentation has problems such as fuzzy segmentation edges and low segmentation accuracy. Summary of the Invention
[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problem of low segmentation accuracy in the prior art when facing fuzzy edges of three-dimensional medical image samples and imbalanced sample categories.
[0006] To solve the above technical problems, the present invention provides a three-dimensional medical image segmentation method, comprising:
[0007] Acquire a three-dimensional medical image sample set including labeled samples and unlabeled samples;
[0008] All samples are fed into two parallel sub-networks of the dual-network segmentation model to obtain two predicted segmentation probability maps for each sample. Soft pseudo labels for unlabeled samples are calculated based on the unnormalized classification scores of unlabeled samples. The sub-networks are constructed based on the V-Net network.
[0009] Using the distance regression head and the hyperbolic tangent function, we obtain two predicted symbol distance fields for each sample based on the decoded feature maps output by the decoder of each sub-network.
[0010] For each labeled sample: calculate the cross entropy loss function between each predicted segmentation probability map and the true label to obtain the segmentation loss; calculate the signed distance function loss between each predicted signed distance field and the true signed distance function to obtain the regression loss; add the segmentation loss and the regression loss to obtain the supervision loss of the labeled sample;
[0011] For each unlabeled sample: calculate the average of the cross entropy loss and Dice loss between each predicted segmentation probability map and the soft pseudo label to obtain the pseudo label consistency loss; calculate the signed distance function loss between the two predicted signed distance fields to obtain the signed distance consistency loss; add the pseudo label consistency loss and the signed distance consistency loss to obtain the consistency loss of the unlabeled sample;
[0012] Based on the supervision loss of labeled samples and the consistency loss of unlabeled samples, the total loss function is obtained to train each sub-network in the dual network segmentation model;
[0013] The trained dual-network segmentation model is used to obtain the segmentation results of the input three-dimensional medical image to be segmented.
[0014] Preferably, the predicted signed distance field of the sample is expressed as:
[0015] ;
[0016] in, express Class samples pass through the sub-network The predicted signed distance field after , A and B represent the two parallel sub-networks of the dual network segmentation model; sample labeling status mark ,when is the labeled sample, When is an unlabeled sample; is the hyperbolic tangent function, represents a distance regression head with an output channel of 1; express Class samples pass through the sub-network The decoded feature map output by the decoder.
[0017] Preferably, the supervision loss of the labeled samples is calculated, including:
[0018] Calculate the cross entropy loss function between the predicted segmentation probability map of the labeled sample in each sub-network and its corresponding true label to obtain the segmentation loss , expressed as: ;
[0019] Calculate the signed distance function loss between the predicted signed distance field and the true signed distance function of the labeled sample in each sub-network to obtain the regression loss , expressed as: ;
[0020] Split the loss With regression loss Add together to get the supervision loss of the labeled sample , expressed as: ;
[0021] in, and Represent the learnable weighting factors of the first sub-network A and the second sub-network B respectively; represents the cross entropy loss, and Y represents the true label of the labeled sample; and They represent the predicted segmentation probability maps output by the first sub-network A and the second sub-network B respectively. The calculation formula is: ; To label samples through the sub-network The obtained decoding feature map The unnormalized classification scores of all voxels in , expressed as: , represents a 1×1×1 three-dimensional convolutional layer, Indicates the number of labeled samples The classification scores corresponding to the categories are , Indicates the total number of organ categories in the sample; Represents the Softmax function; represents the exponential function; and Respectively represent the predicted symbol distance fields of the labeled samples output by the first sub-network A and the second sub-network B; Represents the signed distance function loss, which is the average of L1 loss and mean square error loss; Represents the true signed distance function of the labeled sample, which is expressed as: , represents the infimum, represents the voxel point in the true label, represents the voxel point of the true label surface, Represents voxel points and The squared Euclidean distance between 、 and Represent the external area, surface and internal area of the true label respectively.
[0022] Preferably, calculating the consistency loss of unlabeled samples includes:
[0023] Calculate the average of the cross entropy loss and Dice loss of the predicted segmentation probability map of the unlabeled sample in each sub-network and the soft pseudo label to obtain the pseudo label consistency loss , expressed as:
[0024] ;
[0025] Calculate the signed distance function loss between the predicted signed distance fields of unlabeled samples in each sub-network to obtain the signed distance consistency loss , expressed as: ;
[0026] Add the pseudo-label consistency loss and the signed distance consistency loss to get the consistency loss of the unlabeled samples , expressed as: ;
[0027] in, and Respectively represent the predicted segmentation probability maps of unlabeled samples output by the first sub-network A and the second sub-network B; Represents the segmentation loss, which is the average of the cross entropy loss and the Dice loss; and They represent the soft pseudo labels corresponding to the unnormalized classification scores output by the first sub-network A and the second sub-network B for the unlabeled samples; Zhongruan fake label ; Indicates the preset soft false label smoothing parameter, Indicates that unlabeled samples pass through the subnetwork The obtained decoding feature map The unnormalized classification scores of all voxels in , expressed as: ; Indicates the number of unlabeled samples The unnormalized classification scores corresponding to the categories, , Indicates the total number of organ categories in the sample; and They represent the predicted signed distance fields of the unlabeled samples output by the first sub-network A and the second sub-network B respectively.
[0028] Preferably, the supervised loss based on the labeled samples Consistency loss with unlabeled samples , and get the total loss function , expressed as:
[0029] ;
[0030] in, Represents the consistency loss weight, the expression is , Indicates the current training round, Indicates the preset maximum number of training rounds.
[0031] Preferably, the two predicted segmentation probability maps output by the two sub-networks of the trained dual-network segmentation model are averaged and fused to obtain a fused segmentation probability map; an argmax operation is performed on the fused segmentation probability map to obtain a predicted segmentation label; and based on the predicted segmentation label, the segmentation result of the three-dimensional medical image to be segmented is obtained.
[0032] Preferably, the three-dimensional medical image is input into a sub-network based on the V-Net network to obtain a predicted segmentation probability map of the sample, including:
[0033] 3D medical image samples As a subnetwork The input of the encoder of ; where the sub-network identifier , A and B represent the two parallel sub-networks of the dual network segmentation model; sample labeling status mark ,when is the labeled sample, When it is an unlabeled sample; after passing through four serial coding layers, the encoded feature map is output; in each coding layer, the input feature map is sequentially passed through the serial three-dimensional convolution block and the simple attention module to output the attention convolution feature map, and after passing through the downsampling unit, the output feature map of each coding layer is output, which is expressed as: ; ; Represents a subnetwork No. The output feature map of the layer encoding layer, ; represents a downsampling block, including a 3D convolution block with a stride of 2; Represents a subnetwork No. The attention convolution feature map output by the layer encoding layer after the three-dimensional convolution block and the simple attention module are connected in series; represents a simple attention module; Represents the 3D convolutional block in the encoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series.
[0034] The encoded features are input into the bottleneck module, and after being connected in series with a 3D convolution block and a simple attention module, a global feature map is output.
[0035] The global feature map is input into the decoder, and after passing through four serial decoding layers, the decoded feature map is output;
[0036] The decoded feature map is input into the segmentation prediction unit of the output layer, and the corresponding predicted segmentation probability map is output.
[0037] Preferably, the global feature map is input into the decoder, and after passing through four serially connected decoding layers, a decoded feature map is output, including:
[0038] In each decoding layer, the input feature map is upsampled and then jump-connected with the attention convolution feature map of the corresponding encoding layer. After passing through the three-dimensional convolution block, the output feature map of each decoding layer is output, which is expressed as: ; Represents a subnetwork No. The output feature map of the layer decoding layer, ; Represents the 3D convolutional block in the decoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series. Represents an upsampling block, which consists of a 3D transposed convolution with a stride of 2, a batch normalization layer, and a ReLU activation layer in series. represents pixel-by-pixel addition, Represents a subnetwork No. Attention convolution feature map of the encoding layer;
[0039] The output feature map of the second decoding layer is passed through the dimension adjustment block and the distance regression head to obtain the predicted symbol distance map, which is then adjusted using the preset edge sensitivity parameters to obtain the edge enhanced feature map;
[0040] The edge enhancement feature map is fused with the highest layer output feature map to output the decoded feature map.
[0041] Preferably, the acquisition of the decoding feature map includes:
[0042] Calculate the output feature map of the second decoding layer Prediction signed distance graph of , expressed as:
[0043] ;
[0044] Based on preset edge sensitivity parameters Get edge enhancement feature map from predicted symbol distance map , expressed as: ;
[0045] Based on the highest layer output feature map of the decoder and edge enhancement feature map , get the decoding feature map , expressed as: ;
[0046] in, represents a distance regression head with an output channel of 1, Represents a dimension adjustment block.
[0047] Preferably, before inputting the three-dimensional medical image sample into the dual-network segmentation model, the method further includes performing data enhancement on the three-dimensional medical image sample, including:
[0048] Randomly crop and randomly flip the labeled samples and unlabeled samples to obtain the corresponding labeled three-dimensional input sample data and unlabeled 3D input sample data ;
[0049] Based on the small category organ area contained in each annotated 3D input sample data The regional volume , and small organ collections The volume of the smallest category , calculate the volume weight of the small category organ area ;
[0050] Calculate the signed distance function of the small category organ region based on the position of the voxel points in the small category organ region ; represents the infimum, Indicates the first Layer slices in The voxel point at position, Represents the voxel points on the surface of small category organ areas, Represents voxel points and The squared Euclidean distance between 、 and Respectively in small organ regions the external area, surface and internal area of the
[0051] Based on the volume weight and signed distance function of the small category organ region and the fitted Dirac function, the active contour deformation field of the target organ region is calculated. , expressed as: ; represents the deformation amplitude control parameter, It represents the fitting Dirac function, which is expressed as , is a positive constant, is the calculation variable for fitting the Dirac function; represents the gradient of the level set, expressed as ;
[0052] Based on three-dimensional Gaussian kernel function Compute the smooth deformation field with the active contour deformation field ; is a three-dimensional Gaussian kernel function, is the standard deviation, is the convolution operator symbol;
[0053] Annotating 3D input sample data and their corresponding ground-truth labels based on smooth deformation fields Perform smooth deformation to obtain the input sample corresponding to the labeled sample and the enhanced true label , is the element-by-element multiplication operator.
[0054] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0055] The three-dimensional medical image segmentation method described in the present invention adopts a dual-network collaborative training framework when training the dual-network segmentation model. Based on the predicted segmentation probability map, soft pseudo labels and predicted signed distance field output by the two sub-networks, the supervision loss of the labeled samples and the consistency loss of the unlabeled samples are calculated for joint optimization, thereby achieving effective learning of labeled samples and unlabeled samples, thereby obtaining stronger generalization capabilities in limited label scenarios and further optimizing the model's segmentation performance for three-dimensional medical images. For labeled samples, the cross-entropy loss is used to learn the classification of each voxel category of the organ, and the signed distance function loss is used to accurately learn the geometric shape of the target organ to ensure basic segmentation performance. For unlabeled data, the soft pseudo labels and predicted segmentation probability maps output by the two sub-networks are cross-coordinated and mutually supervised to avoid the prediction bias of a single model; and the signed distance function consistency is used to enforce the synergy of the geometric prediction and improve the stability of the segmentation edge.
[0056] At the same time, the present invention introduces a simple attention module in the encoder part and integrates the edge enhancement module operation in the decoder part. The present invention uses the simple attention module to perform attention weighting on the voxel-level features in the three-dimensional medical image, thereby enhancing the perception of key areas. The simple attention module calculates the attention weight through the energy function and does not rely on additional parameters. It can improve the network's perception of key areas in the three-dimensional medical image at a lower computational cost. The present invention uses the edge enhancement operation to make the network pay more attention to the edge area and enhance the perception of weak edge areas, thereby improving the segmentation performance of weak edge medical images and further improving the segmentation accuracy.
[0057] The present invention performs data enhancement on three-dimensional medical images and proposes an active contour deformation data enhancement strategy. The shape of small organ regions in labeled and unlabeled samples is transformed through the level set method to enhance the diversity of training samples, thereby alleviating the problem of category imbalance, enhancing the feature representation ability of small category organs, and enhancing the generalization ability and robustness of the model, so that the trained dual-network segmentation model can have higher segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0059] Figure 1 is a flowchart of the steps of the three-dimensional medical image segmentation method provided by the present invention;
[0060] Figure 2 It is a flowchart of the data enhancement steps;
[0061] Figure 3 This is a flowchart of the steps of a 3D medical image segmentation method based on active contour deformation and edge enhancement;
[0062] Figure 4 It is a schematic diagram comparing the two-dimensional cross-section and three-dimensional segmentation results of the present invention and different semi-supervised methods at a 5% annotation ratio. DETAILED DESCRIPTION
[0063] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.
[0064] Reference Figure 1 As shown in the flowchart of the steps of the three-dimensional medical image segmentation method provided by the present invention, the specific steps include:
[0065] S101: Acquire a three-dimensional medical image sample set including labeled samples and unlabeled samples;
[0066] S102: Input all samples into two parallel sub-networks of the dual-network segmentation model, obtain two predicted segmentation probability maps for each sample, and calculate the soft pseudo labels of the unlabeled samples based on the unnormalized classification scores of the unlabeled samples; the sub-networks are constructed based on the V-Net network;
[0067] S103: Using the distance regression head and the hyperbolic tangent function, based on the decoded feature maps output by the decoder of each sub-network for all samples, obtain two predicted symbol distance fields for each sample;
[0068] Class samples pass through the sub-network The predicted signed distance field after , is expressed as: ;
[0069] Among them, the sub-network identifier , A and B represent the two parallel sub-networks of the dual network segmentation model; sample labeling status mark ,when is the labeled sample, When is an unlabeled sample; is the hyperbolic tangent function, represents a distance regression head with an output channel of 1; express Class samples pass through the sub-network The decoded feature map output by the decoder;
[0070] S104: For each labeled sample: calculate the cross entropy loss function between each predicted segmentation probability map and the true label to obtain the segmentation loss; calculate the signed distance function loss between each predicted signed distance field and the true signed distance function to obtain the regression loss; add the segmentation loss and the regression loss to obtain the supervision loss of the labeled sample;
[0071] S105: For each unlabeled sample: calculate the average of the cross entropy loss and the Dice loss between each predicted segmentation probability map and the soft pseudo label to obtain the pseudo label consistency loss; calculate the signed distance function loss between the two predicted signed distance fields to obtain the signed distance consistency loss; add the pseudo label consistency loss and the signed distance consistency loss to obtain the consistency loss of the unlabeled sample;
[0072] S106: Based on the supervision loss of the labeled samples and the consistency loss of the unlabeled samples, a total loss function is obtained to train each sub-network in the dual-network segmentation model;
[0073] S107: Obtain a segmentation result of the input three-dimensional medical image to be segmented using the trained dual-network segmentation model.
[0074] Specifically, in step S104, the supervision loss of the labeled sample is calculated, including:
[0075] S104-1: Calculate the cross entropy loss function between the predicted segmentation probability map of the labeled sample in each sub-network and its corresponding true label to obtain the segmentation loss , expressed as: ;
[0076] S104-2: Calculate the signed distance function loss between the predicted signed distance field and the true signed distance function of the labeled sample in each sub-network to obtain the regression loss , expressed as: ;
[0077] S104-3: Will split the loss With regression loss Add together to get the supervision loss of the labeled sample , expressed as: ;
[0078] in, and Represent the learnable weighting factors of the first sub-network A and the second sub-network B respectively; represents the cross entropy loss, and Y represents the true label of the labeled sample; and They represent the predicted segmentation probability maps output by the first sub-network A and the second sub-network B respectively. The calculation formula is: ; To label samples through the sub-network The obtained decoding feature map The unnormalized classification scores of all voxels in , expressed as: , represents a 1×1×1 three-dimensional convolutional layer, Indicates the number of labeled samples The classification scores corresponding to the categories are , Indicates the total number of organ categories in the sample; Represents the Softmax function; represents the exponential function; and Respectively represent the predicted symbol distance fields of the labeled samples output by the first sub-network A and the second sub-network B; Represents the signed distance function loss, which is the average of L1 loss and mean square error loss; Represents the true signed distance function of the labeled sample, which is expressed as: , represents the infimum, represents the voxel point in the true label, represents the voxel point of the true label surface, Represents voxel points and The squared Euclidean distance between 、 and Represent the external area, surface and internal area of the true label respectively.
[0079] Specifically, in step S105, the consistency loss of the unlabeled samples is calculated, including:
[0080] S105-1: Calculate the average of the cross entropy loss and Dice loss between the predicted segmentation probability map of the unlabeled sample in each sub-network and the soft pseudo label to obtain the pseudo label consistency loss , expressed as:
[0081] ;
[0082] S105-2: Calculate the signed distance function loss between the predicted signed distance fields of the unlabeled samples in each sub-network to obtain the signed distance consistency loss , expressed as: ;
[0083] S105-3: Add the pseudo-label consistency loss and the signed distance consistency loss to get the consistency loss of the unlabeled samples , expressed as: ;
[0084] in, and Respectively represent the predicted segmentation probability maps of unlabeled samples output by the first sub-network A and the second sub-network B; Represents the segmentation loss, which is the average of the cross entropy loss and the Dice loss; and They represent the soft pseudo labels corresponding to the unnormalized classification scores output by the first sub-network A and the second sub-network B for the unlabeled samples; Zhongruan fake label ; Indicates the preset soft false label smoothing parameter, Indicates that unlabeled samples pass through the subnetwork The obtained decoding feature map The unnormalized classification scores of all voxels in , expressed as: ; Indicates the number of unlabeled samples The unnormalized classification scores corresponding to the categories, , Indicates the total number of organ categories in the sample; and They represent the predicted signed distance fields of the unlabeled samples output by the first sub-network A and the second sub-network B respectively.
[0085] Therefore, the supervision loss based on the labeled samples Consistency loss with unlabeled samples , and get the total loss function , expressed as: ;
[0086] in, Represents the consistency loss weight, the expression is , Indicates the current training round, Indicates the preset maximum number of training rounds.
[0087] In this embodiment, after training for a preset maximum number of rounds and obtaining a trained dual-network segmentation model, the 3D medical image to be segmented is input and image segmentation is performed. Specifically, the two predicted segmentation probability maps output by the two subnetworks of the trained dual-network segmentation model are averaged and fused to obtain a fused segmentation probability map. An argmax operation is performed on the fused segmentation probability map to obtain a predicted segmentation label. Based on the predicted segmentation label, a segmentation result for the 3D medical image to be segmented is obtained.
[0088] Throughout the training process, the two sub-networks of this embodiment are jointly optimized through supervision loss and consistency loss, and effectively learn from both labeled and unlabeled data based on self-supervision and mutual supervision mechanisms. This results in stronger generalization capabilities in limited label scenarios and improved segmentation accuracy for small categories of objects.
[0089] Based on the above embodiment, this embodiment improves and expands the classic V-Net by introducing a simple attention module in the encoder part and integrating an edge enhancement module in the decoder part to obtain EEVNet. Based on EEVNet, a 3D medical image is input into a sub-network (EEVNet) based on the V-Net network to obtain a predicted segmentation probability map of the sample, including:
[0090] S201: 3D medical image samples As a subnetwork The input of the encoder of ; where the sub-network identifier , A and B represent the two parallel sub-networks of the dual network segmentation model; sample labeling status mark ,when is the labeled sample, When is an unlabeled sample; after four serial coding layers, the output is the coding feature map;
[0091] In each encoding layer, the input feature map passes through the series of three-dimensional convolution blocks and simple attention modules to output the attention convolution feature map. After passing through the downsampling unit, the output feature map of each encoding layer is output, which is expressed as: ; ;
[0092] in, Represents a subnetwork No. The output feature map of the layer encoding layer, ; represents a downsampling block, including a 3D convolution block with a stride of 2; Represents a subnetwork No. The attention convolution feature map output by the layer encoding layer after the three-dimensional convolution block and the simple attention module are connected in series; represents a simple attention module; Represents the 3D convolutional block in the encoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series.
[0093] S202: Input the encoded features into the bottleneck module, and output the global feature map through the serial 3D convolution block and the simple attention module;
[0094] S203: Input the global feature map into the decoder, and after passing through four serially connected decoding layers, output the decoded feature map;
[0095] S204: Input the decoded feature map into the segmentation prediction unit of the output layer, and output the corresponding predicted segmentation probability map.
[0096] Specifically, in step S203, the global feature map is input into the decoder, and after passing through four serially connected decoding layers, a decoded feature map is output, including:
[0097] S203-1: In each decoding layer, the input feature map is upsampled and then jump-connected with the attention convolution feature map of the corresponding encoding layer. After passing through the three-dimensional convolution block, the output feature map of each decoding layer is output, which is expressed as:
[0098] ;
[0099] in, Represents a subnetwork No. The output feature map of the layer decoding layer, ; Represents the 3D convolutional block in the decoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series. Represents an upsampling block, which consists of a 3D transposed convolution with a stride of 2, a batch normalization layer, and a ReLU activation layer in series. represents pixel-by-pixel addition, Represents a subnetwork No. Attention convolution feature map of the encoding layer;
[0100] S203-2: After the output feature map of the second decoding layer is passed through the dimension adjustment block and the distance regression head to obtain a predicted symbol distance map, it is adjusted using a preset edge sensitivity parameter to obtain an edge enhanced feature map, including:
[0101] Calculate the output feature map of the second decoding layer Prediction signed distance graph of , expressed as:
[0102] ;
[0103] Based on preset edge sensitivity parameters Get edge enhancement feature map from predicted symbol distance map , expressed as: ;
[0104] in, represents a distance regression head with an output channel of 1, Represents a dimension adjustment block;
[0105] S203-3: Fuse the edge enhancement feature map with the highest layer output feature map and output the decoded feature map, which is expressed as: ;in To decode the feature map, Output feature map for the highest layer of the decoder, is the edge enhancement feature map.
[0106] The purpose of adding a simple attention module to each layer of the decoder in this embodiment is to perform attention weighting on voxel-level features and enhance the perception of key areas. The simple attention module calculates the attention weight through an energy function and does not rely on additional parameters. Compared with traditional channel attention, it can improve the network's perception of key areas at a lower computational cost. Targets in medical images usually have unclear edges and fewer pixels in edge areas, which makes model training difficult. The edge enhancement module can make the network pay more attention to edge areas during training, enhance the perception of weak edge areas, and thus improve the segmentation performance of weak-edge medical images.
[0107] Based on the above embodiment, in the embodiment of the present invention, before the three-dimensional medical image sample is input into the dual network segmentation model, the three-dimensional medical image sample is further enhanced. Figure 2 As shown in the figure, it is a flowchart of the data enhancement steps. The specific steps include:
[0108] S301: Randomly crop and randomly flip the labeled samples and unlabeled samples to obtain the corresponding labeled three-dimensional input sample data and unlabeled 3D input sample data ;
[0109] S302: Based on the small category organ region contained in each labeled three-dimensional input sample data The regional volume , and small organ collections The volume of the smallest category , calculate the volume weight of the small category organ area ;
[0110] S303: Calculate the signed distance function of the small category organ region based on the position of the voxel points in the small category organ region ; represents the infimum, Indicates the first Layer slices in The voxel point at position, Represents the voxel points on the surface of small category organ areas, Represents voxel points and The squared Euclidean distance between 、 and Respectively in small organ regions the external area, surface and internal area of the
[0111] S304: Calculate the active contour deformation field of the target organ region based on the volume weight and signed distance function of the small category organ region and the fitted Dirac function , expressed as: ; represents the deformation amplitude control parameter, It represents the fitting Dirac function, which is expressed as , is a positive constant, is the calculation variable for fitting the Dirac function; represents the gradient of the level set, expressed as ;
[0112] S305: Based on three-dimensional Gaussian kernel function Compute the smooth deformation field with the active contour deformation field ; is a three-dimensional Gaussian kernel function, is the standard deviation, is the convolution operator symbol;
[0113] S306: Annotate 3D input sample data and its corresponding true label based on the smooth deformation field Perform smooth deformation to obtain the input sample corresponding to the labeled sample and the enhanced true label , is the element-by-element multiplication operator.
[0114] The embodiment of the present invention is based on the data enhancement strategy of active contour deformation and the curve evolution theory of the level set method to perform shape transformation on small organ regions to enhance the diversity of training samples. This transformation can effectively adjust the shape and volume of small category organs, thereby enhancing the generalization ability and robustness of the model.
[0115] Based on the above embodiment, in the embodiment of the present invention, the image enhancement method, the improved sub-network based on the V-Net network and the model training method provided by the present invention are all applied to the present embodiment, and the three-dimensional medical image to be segmented is segmented. Figure 3 FIG. 1 is a flowchart of a three-dimensional medical image segmentation method based on active contour deformation and edge enhancement, which specifically includes:
[0116] S401: Divide and preprocess the medical image dataset, apply data augmentation operations to the training set consisting of labeled data and unlabeled data, and generate input samples;
[0117] S401-1: Divide and preprocess the medical image dataset to construct a training set containing labeled data and unlabeled data;
[0118] S401-2: Randomly crop and flip the training set to obtain the corresponding annotated 3D sample data and unlabeled 3D input sample data ;
[0119] S401-3: Calculate the volume weight of the small category organs contained in each annotated 3D input sample data ,in, Represents a small category organ area, represents the volume of small class organs, is the minimum symbol, Represents a set of labels for small categories, To represent a small category label set The volume of the smallest category;
[0120] S401-4: Calculating small organ regions The signed distance function ,in, , and Represents organs the surface, external area and internal area of is the first Layer slices in The voxel point at the position represents the voxel point on the surface of the small category organ area, and represents the squared Euclidean distance between the voxel point and; is the voxel point on the organ surface, Voxel and The squared Euclidean distance between represents the infimum;
[0121] S401-5: Calculate the active contour deformation field ,in, is the parameter that controls the deformation amplitude, To fit the Dirac function, its role is to limit the deformation to occur only near the zero level set; is a positive constant, is the calculation variable for fitting the Dirac function, is the gradient of the level set. In this embodiment, , ;
[0122] S401-6: Computing Smooth Deformation Fields ,in, is a three-dimensional Gaussian kernel function, is the standard deviation, is the convolution operator symbol. In this embodiment, ;
[0123] S401-7: Calculate and obtain input samples of the annotated 3D medical image after active contour deformation and the enhanced true labels ,in, for The true label, Represents the element-wise multiplication operator.
[0124] S402: Constructing a dual-network collaborative training framework based on edge-enhanced EEVNet, initializing two sub-networks EEVNetA and EEVNetB, and inputting input samples into the two sub-networks for training respectively; the EEVNet includes an encoder, a bottleneck layer, a decoder, and a dual output layer;
[0125] S402-1: Configure training parameters, including: In this embodiment, the batch size is set to 2; the maximum training round is set to ; The optimizer uses the stochastic gradient descent method with momentum term, momentum coefficient is 0.95, and weight decay coefficient is ; The learning rate is dynamically adjusted using a polynomial decay strategy. Round update is ,in is the initial learning rate, Set to 0.001;
[0126] S402-2: Input the input samples to the sub-networks EEVNetA and EEVNetB with the same network structure respectively;
[0127] S402-3: The input sample passes through the encoder in the sub-network to extract multi-level features. The encoder has four encoding layers, each of which is composed of a stack of three-dimensional convolution blocks, simple attention modules and downsampling blocks. The layer encoding process can be expressed as:
[0128] ;
[0129] ;
[0130] in, Represents a subnetwork identifier, where subnetwork A and subnetwork B are two parallel subnetworks in the method; Indicates the sample labeling situation. is the labeled sample, When is an unlabeled sample; , express The feature map of the layer input, when , Represents the input to the subnetwork 3D medical image samples for the encoder; represents the feature map after processing by the 3D convolution block and the simple attention module, Represents the feature map after one layer of encoding; It is a simple attention module operation; Represents the 3D convolutional block in the encoder, which consists of several convolutional layers, batch normalization layers, and ReLU activation layers; For the downsampling operation, the feature map is downsampled by a three-dimensional convolution with a stride of 2;
[0131] S402-4: After four layers of encoding, the deepest feature map Enter the bottleneck layer for further processing, which is expressed as ;
[0132] S402-5: The low-level features in the encoder are passed to the decoder through a jump connection. The decoder has four decoding layers. Each decoding layer is composed of a stack of three-dimensional convolution blocks and upsampling blocks. The layer decoding process can be expressed as ,in, , Indicates the decoder The output features of the layer, for Layer decoding features, when hour, The feature map representing the output of the bottleneck layer; For the The attention convolution feature map of the layer encoding layer, represents the element-by-element addition symbol, The upsampling block consists of a 3D transposed convolution with a stride of 2, a batch normalization layer, and a ReLU activation layer; Represents the 3D convolutional block in the decoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series.
[0133] S402-6: Calculate the predicted signed distance function of the second layer output features ,in, It is a dimension adjustment block, which adjusts the feature dimension through convolution and deconvolution to make it consistent with the highest layer feature. Alignment, For the distance regression head with an output channel of 1; calculate the features after edge enhancement ,in, is a hyperparameter that controls edge sensitivity. In this embodiment, ; Perform edge enhancement on the second layer output features and fuse them with the top layer features, which can be expressed as ,in, is the highest level fusion feature, Decode features for the highest layer;
[0134] S402-7: Each sub-network outputs predicted segmentation prediction and signed distance function prediction, including:
[0135] The segmentation prediction first generates an unnormalized classification score for each voxel, then performs a Softmax operation on the classification score to obtain the segmentation probability, and performs a temperature-scaled Softmax operation on the classification score of the unlabeled data to obtain a soft pseudo label. ,in, for Class samples pass through the sub-network The obtained decoding feature map The unnormalized classification scores of all voxels in , It is a 1×1×1 three-dimensional convolution layer;
[0136] Calculate segmentation probability ,in, for Class samples pass through the sub-network The predicted segmentation probability, represents the Softmax function, is an exponential function. express The sample of the class The classification scores corresponding to the categories are , Indicates the total number of organ categories in the sample;
[0137] The soft pseudo label is obtained by performing temperature scaling of the Softmax operation on the classification score of the unlabeled data ,in, is a temperature parameter used to control the smoothness of the soft fake label. In this embodiment, .
[0138] The signed distance function prediction is achieved by the distance regression head and the hyperbolic tangent function, which can be expressed as ,in, is the hyperbolic tangent function, express Class samples pass through the sub-network The decoded feature map output by the decoder, express Class samples pass through the sub-network The predicted signed distance field.
[0139] S403: The dual networks are optimized under the joint constraints of supervision loss and consistency loss until the total loss function converges, obtaining the trained EEVNetA and EEVNetB networks;
[0140] S403-1: Calculate segmentation loss ,in, is the cross entropy loss, and are the learnable weighting factors of the two networks respectively; calculate the signed distance function regression loss ,in, is the true signed distance function, is the signed distance function loss, which is calculated using the average of L1 loss and mean square error loss; the supervision loss of the labeled data ;
[0141] S403-2: Calculate pseudo-label consistency loss ,in, Represents the segmentation loss of unlabeled data, defined as the average of cross entropy loss and Dice loss; calculates the consistency loss of the signed distance function ; Calculate the consistency loss of unlabeled data ;
[0142] S403-3: Calculate consistency loss weight ,in, is the current training round, Indicates the preset maximum training round; calculate the total loss function, expressed as:
[0143] ;
[0144] S403-4: In each training round, the two sub-networks forward propagate their outputs and calculate their respective supervision losses and consistency losses with each other. The total loss is then backpropagated and their parameters are independently updated.
[0145] S403-5: Until the total loss function converges, the trained EEVNetA and EEVNetB networks are obtained.
[0146] S404: Inputting the medical image to be segmented into the trained dual network and outputting the final segmentation result;
[0147] S404-1: Input the 3D medical image to be segmented into the trained EEVNetA and EEVNetB sub-networks to obtain the predicted segmentation probability maps respectively. and ;
[0148] S404-2: Integrate the prediction results of the two sub-networks and use the average fusion strategy to calculate the final segmentation probability map ;
[0149] S404-3: Yes Perform argmax operation and output predicted segmentation label , and obtain the final segmentation result.
[0150] The three-dimensional medical image segmentation method based on active contour deformation and edge enhancement, described in this paper, is based on the curve evolution theory of the level set method. It uses a data augmentation strategy based on active contour deformation to transform the shape of small organ regions to enhance the diversity of training samples. This transformation effectively adjusts the shape and expands the volume of small organ categories, thereby enhancing the model's generalization and robustness. This method improves and expands on the classic V-Net, introducing a simple attention module in the encoder and integrating an edge enhancement module in the decoder to construct an edge-enhanced EEVNet. Specifically, the simple attention module, incorporated into each decoder layer, weights voxel-level features to enhance the perception of key regions. The simple attention module calculates attention weights using an energy function and does not rely on additional parameters. Compared to traditional channel-wise attention, it can improve the network's perception of key regions at a lower computational cost. Objects in medical images often have unclear edges and fewer pixels in edge regions, making model training difficult. The edge enhancement module allows the network to focus more on edge regions during training, enhancing its perception of weak edge regions and thus improving the segmentation performance of medical images with weak edges. Furthermore, during the entire training process, the two sub-networks are jointly optimized through supervision loss and consistency loss, and effective learning of labeled and unlabeled data is achieved based on self-supervision and mutual supervision mechanisms, thereby achieving stronger generalization capabilities in limited label scenarios.
[0151] Based on the above embodiments, in order to further illustrate the effect of the three-dimensional medical image segmentation method based on active contour deformation and edge enhancement provided by the embodiments of the present invention, image segmentation simulation experiments are performed using the three-dimensional medical image segmentation method based on active contour deformation and edge enhancement provided by this embodiment and the existing MT (Mean Teacher) method, UA-MT (Uncertainty-Aware Mean Teacher) method, ICT (Interpolation Consistency Training) method, DHC (Dual-debiased Heterogeneous Co-training) method and STAC (Shape Transformation Driven by Active Contour) method, and the experimental results are compared.
[0152] Specifically, the two sub-networks of this embodiment are implemented using the Pytorch 2.4.1 deep learning framework in the Ubuntu 20.04 operating system environment. The training and testing of the model are performed on a single NVIDIA GeForce RTX 4090 GPU with a memory capacity of 24GB. The network parameter settings are as follows: the batch size is set to 2; the maximum training round is set to ; The optimizer uses the stochastic gradient descent method with momentum term, momentum coefficient is 0.95, and weight decay coefficient is ; Initial learning rate Set to 0.001; hyperparameters are set to: , , , , .
[0153] The training set images, test set images, and 3D medical images to be segmented used in all experiments are from the AMOS library, which contains 500 CT and 100 MR abdominal scans, covering a total of 15 abdominal organs. The total number of categories including background The experiment uses two semi-supervised training settings: the labeled data accounts for 2% and 5% respectively, and the remaining samples are used as unlabeled data. In all experiments, DSC (Dice Similarity Coefficient), ASD (Average Surface Distance) and 95% HD (95% Hausdorff Distance) are used as evaluation indicators. DSC is defined as ,in, For the The true label area of the class, For the The predicted segmentation region of the class; ASD is defined as ,in, and Represent the contour point sets of the model segmentation prediction area and the true annotation area respectively, Represents contour points and The Euclidean distance between Represents the number of contour points in the predicted segmented region; 95% HD is defined as ,in, represents the 95% quantile function, and The DSC value represents the voxel point set for the segmentation prediction region and the ground-truth annotation region, respectively. A larger DSC value indicates a higher degree of overlap between the prediction result and the ground-truth annotation, and thus a higher segmentation accuracy. A smaller ASD value indicates a closer match between the predicted contour and the ground-truth annotation, and a smoother and more precise segmentation edge. A smaller 95% HD value indicates a smaller worst-case edge error for the model, and a closer match between the segmentation edge and the ground-truth annotation.
[0154] Table 1 shows the comparative segmentation performance of the MT method, UA-MT method, ICT method, DHC method, STAC method, and the image segmentation method of the present invention under two annotation ratios (2% and 5%) in the AMOS database. Experimental results show that at a 2% annotation ratio, the image segmentation method of the present invention achieves the highest DSC value compared to other methods, demonstrating its high segmentation accuracy. Furthermore, the image segmentation method of the present invention achieves the lowest ASD and 95% HD, demonstrating its superior performance in edge segmentation. When the annotation ratio is 5%, the image segmentation method of the present invention achieves a DSC of 53.79%, an ASD of 4.86, and a 95% HD of 10.47, respectively. The overall segmentation performance is superior to that of other methods, further validating the effectiveness of the proposed active contour deformation data augmentation strategy and edge enhancement module in improving segmentation performance. Furthermore, the adopted dual-network collaborative training framework effectively promotes the network's comprehensive learning of both annotated and unannotated data, thereby improving the segmentation performance of the image segmentation method of the present invention even with minimal annotated data.
[0155] Table 1 Comparison of segmentation performance of different semi-supervised models at different annotation ratios
[0156]
[0157] Furthermore, in order to visually compare the performance differences of each model in the multi-organ segmentation task, three 3D abdominal CT scan images were selected from the AMOS library. Figure 4The figure shows a comparison diagram of the two-dimensional cross-sectional and three-dimensional segmentation results of the present invention and different semi-supervised methods at a 5% annotation ratio; it specifically shows the two-dimensional cross-sectional segmentation results and the corresponding three-dimensional segmentation visualization results of the three images (numbered 1 to 3) of the MT method, UA-MT method, ICT method, DHC method, STAC method and the image segmentation method of the present invention at a 5% annotation ratio, wherein the 1st and 2nd rows are the two-dimensional cross-sectional segmentation results and three-dimensional segmentation visualization results of the image numbered 1, the 3rd and 4th rows are the two-dimensional cross-sectional segmentation results and three-dimensional segmentation visualization results of the image numbered 2, and the 5th and 6th rows are the two-dimensional cross-sectional segmentation results and three-dimensional segmentation visualization results of the image numbered 3. The first column is the true label result, and the 2nd to 7th columns are the segmentation results of the MT method, UA-MT method, ICT method, DHC method, STAC method and the image segmentation method of the present invention, respectively. From Figure 4 It can be observed that for small organ types, the image segmentation method of the present invention significantly reduces mis-segmentation and under-segmentation, demonstrating superior overall segmentation integrity compared to other methods. Furthermore, the 3D volume segmentation results demonstrate that the image segmentation method of the present invention maintains the structural integrity of small organ types, with minimal localized fractures seen in other models.
[0158] The three-dimensional medical image segmentation method described in the present invention adopts a dual-network collaborative training framework when training a dual-network segmentation model. Based on the predicted segmentation probability map, soft pseudo labels and predicted signed distance field output by the two sub-networks, the supervision loss of the labeled samples and the consistency loss of the unlabeled samples are calculated for joint optimization, thereby achieving effective learning of labeled samples and unlabeled samples, thereby obtaining stronger generalization capabilities in limited label scenarios, and further optimizing the model's segmentation performance for three-dimensional medical images. For labeled samples, the cross-entropy loss is used to deal with the category imbalance problem, and the signed distance function loss is used to accurately learn the geometric shape of the target organ to ensure basic segmentation performance. For unlabeled data, the soft pseudo labels and predicted segmentation probability maps output by the two sub-networks are cross-coordinated trained and supervised to avoid the prediction bias of a single model; and the signed distance function consistency is used to enforce the synergy of geometric predictions and improve the stability of segmentation edges. At the same time, the present invention introduces a simple attention module in the encoder part and integrates the edge enhancement module operation in the decoder part. The present invention uses a simple attention module to perform attention weighting on voxel-level features in three-dimensional medical images, thereby enhancing the perception of key areas. The simple attention module calculates the attention weights through an energy function and does not rely on additional parameters. It can improve the network's perception of key areas in three-dimensional medical images at a lower computational cost. The present invention uses edge enhancement operations to make the network pay more attention to edge areas, enhance the perception of weak edge areas, thereby improving the segmentation performance of weak edge medical images and further improving segmentation accuracy. The present invention performs data enhancement on three-dimensional medical images, proposes an active contour deformation data enhancement strategy, and uses the level set method to perform shape transformation on small organ areas in labeled samples and unlabeled samples to enhance the diversity of training samples, thereby alleviating the problem of category imbalance, enhancing the feature representation ability of small category organs, and enhancing the generalization and robustness of the model, so that the trained dual-network segmentation model can have higher segmentation accuracy.
[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0163] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A three-dimensional medical image segmentation method, characterized in that: include: Acquire a three-dimensional medical image sample set including labeled samples and unlabeled samples; All samples are input into the two parallel sub-networks of the dual-network segmentation model, and two predicted segmentation probability maps are obtained for each sample. The soft pseudo labels of the unlabeled samples are calculated based on the unnormalized classification scores of the unlabeled samples. The sub-network is built on the V-Net network, and a simple attention module is introduced in the encoder part to enhance the perception of key areas; Integrate the edge enhancement module in the decoder to enhance the perception of weak edge areas; Using the distance regression head and the hyperbolic tangent function, we obtain two predicted symbol distance fields for each sample based on the decoded feature maps output by the decoder of each sub-network. For each labeled sample: calculate the cross entropy loss function between each predicted segmentation probability map and the true label to obtain the segmentation loss; calculate the signed distance function loss between each predicted signed distance field and the true signed distance function to obtain the regression loss; add the segmentation loss and the regression loss to obtain the supervision loss of the labeled sample; For each unlabeled sample: calculate the average of the cross entropy loss and Dice loss between each predicted segmentation probability map and the soft pseudo label to obtain the pseudo label consistency loss; calculate the signed distance function loss between the two predicted signed distance fields to obtain the signed distance consistency loss; add the pseudo label consistency loss and the signed distance consistency loss to obtain the consistency loss of the unlabeled sample; Based on the supervision loss of labeled samples and the consistency loss of unlabeled samples, the total loss function is obtained to train each sub-network in the dual network segmentation model; Using the trained dual-network segmentation model to obtain the segmentation results of the input three-dimensional medical image to be segmented; Before inputting the 3D medical image samples into the dual network segmentation model, data enhancement is also performed on the 3D medical image samples, including: Randomly crop and randomly flip the labeled samples and unlabeled samples to obtain the corresponding labeled three-dimensional input sample data and unlabeled 3D input sample data ; Based on the small category organ area contained in each annotated 3D input sample data The regional volume , and small organ collections The volume of the smallest category , calculate the volume weight of the small category organ area ; Calculate the signed distance function of the small category organ region based on the position of the voxel points in the small category organ region ; represents the infimum, Indicates the first Layer slices in The voxel point at position, Represents the voxel points on the surface of small category organ areas, Represents voxel points and The squared Euclidean distance between 、 and Respectively in small organ regions the external area, surface and internal area of the Based on the volume weight and signed distance function of the small category organ region and the fitted Dirac function, the active contour deformation field of the target organ region is calculated. , expressed as: ; represents the deformation amplitude control parameter, It represents the fitting Dirac function, which is expressed as , is a positive constant, is the calculation variable for fitting the Dirac function; represents the gradient of the level set, expressed as ; Based on three-dimensional Gaussian kernel function Compute the smooth deformation field with the active contour deformation field ; is a three-dimensional Gaussian kernel function, is the standard deviation, is the convolution operator symbol; Annotating 3D input sample data and their corresponding true labels based on smooth deformation fields Perform smooth deformation to obtain the input sample corresponding to the labeled sample and the enhanced true label , is the element-by-element multiplication operator.
2. The three-dimensional medical image segmentation method according to claim 1, characterized in that: The predicted signed distance field of the sample is expressed as: ; in, express Class samples pass through the sub-network The predicted signed distance field after , A and B represent the two parallel sub-networks of the dual network segmentation model; sample labeling status mark ,when is the labeled sample, When is an unlabeled sample; is the hyperbolic tangent function, represents a distance regression head with an output channel of 1; express Class samples pass through the sub-network The decoded feature map output by the decoder.
3. The three-dimensional medical image segmentation method according to claim 2, characterized in that: Calculate the supervision loss of the labeled samples, including: Calculate the cross entropy loss function between the predicted segmentation probability map of the labeled sample in each sub-network and its corresponding true label to obtain the segmentation loss , expressed as: ; Calculate the signed distance function loss between the predicted signed distance field and the true signed distance function of the labeled sample in each sub-network to obtain the regression loss , expressed as: ; Split the loss With regression loss Add together to get the supervision loss of the labeled sample , expressed as: ; in, and Represent the learnable weighting factors of the first sub-network A and the second sub-network B respectively; represents the cross entropy loss, and Y represents the true label of the labeled sample; and They represent the predicted segmentation probability maps output by the first sub-network A and the second sub-network B respectively. The calculation formula is: ; To label samples through the sub-network The obtained decoding feature map The unnormalized classification scores of all voxels in , expressed as: , represents a 1×1×1 three-dimensional convolutional layer, Indicates the number of labeled samples The classification scores corresponding to the categories are , Indicates the total number of organ categories in the sample; Represents the Softmax function; represents the exponential function; and Respectively represent the predicted symbol distance fields of the labeled samples output by the first sub-network A and the second sub-network B; Represents the signed distance function loss, which is the average of L1 loss and mean square error loss; Represents the true signed distance function of the labeled sample, which is expressed as: , represents the infimum, represents the voxel point in the true label, represents the voxel point of the true label surface, Represents voxel points and The squared Euclidean distance between 、 and Represent the external area, surface and internal area of the true label respectively.
4. The three-dimensional medical image segmentation method according to claim 3, characterized in that: Calculate the consistency loss of unlabeled samples, including: Calculate the average of the cross entropy loss and Dice loss of the predicted segmentation probability map of the unlabeled sample in each sub-network and the soft pseudo label to obtain the pseudo label consistency loss , expressed as: ; Calculate the signed distance function loss between the predicted signed distance fields of unlabeled samples in each sub-network to obtain the signed distance consistency loss , expressed as: ; Add the pseudo-label consistency loss and the signed distance consistency loss to get the consistency loss of the unlabeled samples , expressed as: ; in, and Respectively represent the predicted segmentation probability maps of unlabeled samples output by the first sub-network A and the second sub-network B; Represents the segmentation loss, which is the average of the cross entropy loss and the Dice loss; and They represent the soft pseudo labels corresponding to the unnormalized classification scores output by the first sub-network A and the second sub-network B for the unlabeled samples; Zhongruan fake label ; Indicates the preset soft false label smoothing parameter, Indicates that unlabeled samples pass through the sub-network The obtained decoding feature map The unnormalized classification scores of all voxels in , expressed as: ; Indicates the number of unlabeled samples The unnormalized classification scores corresponding to the categories, , Indicates the total number of organ categories in the sample; and They represent the predicted signed distance fields of the unlabeled samples output by the first sub-network A and the second sub-network B respectively.
5. The three-dimensional medical image segmentation method according to claim 4, characterized in that: Supervision loss based on labeled samples Consistency loss with unlabeled samples , and get the total loss function , expressed as: ; in, Represents the consistency loss weight, the expression is , Indicates the current training round, Indicates the preset maximum number of training rounds.
6. The three-dimensional medical image segmentation method according to claim 1, characterized in that: The two predicted segmentation probability maps output by the two sub-networks of the trained dual-network segmentation model are averaged and fused to obtain a fused segmentation probability map; an argmax operation is performed on the fused segmentation probability map to obtain a predicted segmentation label; and based on the predicted segmentation label, the segmentation result of the three-dimensional medical image to be segmented is obtained.
7. The three-dimensional medical image segmentation method according to claim 1, characterized in that: Input the 3D medical image into the sub-network based on the V-Net network to obtain the predicted segmentation probability map of the sample, including: 3D medical image samples As a subnetwork The input of the encoder of ; where the sub-network identifier , A and B represent the two parallel sub-networks of the dual network segmentation model; sample labeling status mark ,when is the labeled sample, When it is an unlabeled sample; after passing through four serial coding layers, the encoded feature map is output; in each coding layer, the input feature map is sequentially passed through the serial three-dimensional convolution block and the simple attention module to output the attention convolution feature map, and after passing through the downsampling unit, the output feature map of each coding layer is output, which is expressed as: ; ; Represents a subnetwork No. The output feature map of the layer encoding layer, ; represents a downsampling block, including a 3D convolution block with a stride of 2; Represents a subnetwork No. The attention convolution feature map output by the layer encoding layer after the three-dimensional convolution block and the simple attention module are connected in series; represents a simple attention module; Represents the 3D convolutional block in the encoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series. The encoded features are input into the bottleneck module, and after being connected in series with a 3D convolution block and a simple attention module, a global feature map is output. The global feature map is input into the decoder, and after passing through four serial decoding layers, the decoded feature map is output; The decoded feature map is input into the segmentation prediction unit of the output layer, and the corresponding predicted segmentation probability map is output.
8. The three-dimensional medical image segmentation method according to claim 7, characterized in that: The global feature map is input into the decoder, and after passing through four serial decoding layers, the decoded feature map is output, including: In each decoding layer, the input feature map is upsampled and then jump-connected with the attention convolution feature map of the corresponding encoding layer. After passing through the three-dimensional convolution block, the output feature map of each decoding layer is output, which is expressed as: ; Represents a subnetwork No. The output feature map of the layer decoding layer, ; Represents the 3D convolutional block in the decoder, which consists of multiple convolutional layers, batch normalization layers, and ReLU activation layers connected in series. Represents an upsampling block, which consists of a 3D transposed convolution with a stride of 2, a batch normalization layer, and a ReLU activation layer in series. represents pixel-by-pixel addition, Represents a subnetwork No. Attention convolution feature map of the encoding layer; The output feature map of the second decoding layer is passed through the dimension adjustment block and the distance regression head to obtain the predicted symbol distance map, which is then adjusted using the preset edge sensitivity parameters to obtain the edge enhanced feature map; The edge enhancement feature map is fused with the highest layer output feature map to output the decoded feature map.
9. The three-dimensional medical image segmentation method according to claim 8, characterized in that: The acquisition of decoding feature maps includes: Calculate the output feature map of the second decoding layer Prediction signed distance graph of , expressed as: ; Based on preset edge sensitivity parameters Get edge enhancement feature map from predicted symbol distance map , expressed as: ; Based on the highest layer output feature map of the decoder and edge enhancement feature map , get the decoding feature map , expressed as: ; in, represents a distance regression head with an output channel of 1, Represents a dimension adjustment block.
Citation Information
Patent Citations
Cross-modal medical image registration method based on symbolic distance function collaborative segmentation
CN116452645A
Semi-supervised medical image segmentation method of mutual pseudo supervised edge perception double CNN
CN118297976A