Semi-supervised medical image segmentation method based on dynamic masking and cross-view consistency
Patent Information
- Application Number
- CN202611043960.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]为克服现有半监督医学图像分割方法在标注样本稀缺条件下易受噪声一致性约束影响、对模糊区域预测不稳定以及难以充分利用可靠区域上下文信息的问题,本发明提供一种基于动态遮掩与跨视图一致性的半监督医学图像分割训练方法
[0063]通过对标记样本与未标记样本进行弱增强与强增强处理,并结合零中心掩码执行双向交叉融合操作,实现标记样本与未标记样本的融合,既保留了标记样本的高可靠监督信息,又引入了未标记样本的多样性特征,从而在标记样本有限的情况下扩展有效训练数据分布;通过构建共享编码器与双解码器结构,利用不同解码器的上采样机制形成跨视图预测,使模型能够从不同特征表达空间对同一输入进行建模,为一致性约束提供基础;通过构建不确定性图并进行块级聚合,基于双解码器预测差异生成动态掩码,对未标记样本进行自适应遮掩处理,实现对高置信区域的保留与低置信区域的抑制,从而减少不可靠预测对模型训练的干扰;进一步地,通过利用弱增强未标记样本中的可靠区域生成伪监督信息,对遮掩后的未标记样本进行选择性约束,仅在高置信区域内传递监督信号,在降低伪标签噪声影响的同时增强一致性学习效果;通过构建包含监督损失、一致性损失、融合损失及掩蔽损失的联合优化目标,实现对标记样本与未标记样本的协同训练;本发明适用于二维及三维医学影像分割任务,可有效提升低对比度区域、边界不清区域的分割精度与整体泛化性能;与现有的UAMT、URPC、MC-Net、SS-Net、AD-MT和UnCo等半监督方法相比,本发明对于公开数据集ACDC的分割处理,Dice系数明显更优,在轮廓分割、边缘细节提取精度取得了更好的成绩。
Smart Images

Figure CN123015972A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and deep learning, specifically to a method based on dynamic occlusion and cross-view... Figure 1 A consistent semi-supervised medical image segmentation method is used to improve the model's inference ability in difficult regions such as blurred boundaries and low contrast. Background Technology
[0002] Medical image segmentation plays a crucial role in clinical auxiliary diagnosis, radiotherapy target delineation, and organ volume assessment. However, due to high annotation costs and specialized requirements, semi-supervised medical image segmentation (SSMIS) typically yields only a small number of labeled samples and a large number of unlabeled samples. Existing semi-supervised segmentation methods often employ strategies such as pseudo-labels, self-training, and consistency regularization to utilize the potential information from unlabeled samples. However, in scenarios with blurred organ boundaries, weak textures, and low contrast between lesions and adjacent tissues, significant discrepancies often exist between different prediction branches or different enhanced views. This leads to consistency constraints being easily dominated by noisy pseudo-labels, resulting in instability during training and reduced model generalization ability for difficult regions.
[0003] Meanwhile, traditional copy-paste or cut-mix fusion strategies typically treat labeled and unlabeled samples equally, failing to fully consider the differences in the reliability of the supervision signal and the credibility of pseudo-labels. In scenarios where labeled samples are scarce, if the fusion strategy relies too heavily on the limited number of labeled samples, it can easily lead to overfitting; conversely, excessive introduction of unlabeled pseudo-labels can amplify noise and mislead learning. Therefore, how to utilize spatial context information and prior knowledge of reliable regions to enhance the inference ability for fuzzy regions still lacks effective exploration and systematic solutions.
[0004] Furthermore, most existing occlusion or hybrid enhancement strategies employ static or random occlusion methods, making it difficult to adaptively handle "difficult / uncertain regions" in the samples. This often leads to a mismatch between the occlusion location and the model's truly difficult regions, hindering the model's ability to effectively utilize the spatial context of reliable regions to complete the discriminative information of the occluded regions. Therefore, it is crucial to construct a system that can dynamically adjust during training and integrate with cross-view... Figure 1 There is still a lack of systematic solutions for the masking mechanism of coherent learning collaboration to enhance the inference ability of fuzzy regions. Summary of the Invention
[0005] To overcome the problems of existing semi-supervised medical image segmentation methods, such as susceptibility to noise consistency constraints under conditions of scarce labeled samples, unstable prediction of blurred regions, and difficulty in fully utilizing reliable region context information, this invention provides a method based on dynamic occlusion and cross-viewpoint... Figure 1A semi-supervised medical image segmentation training method with consistent performance. This method utilizes the network's cross-view output differences and uncertainty information on unlabeled samples to adaptively generate dynamic occlusion, allowing the occlusion region to dynamically adjust with sample content and training phases. This enhances the inference of difficult-to-occlude regions by mining their spatial context while preserving reliable regions; simultaneously, it utilizes cross-view... Figure 1 Consistency constraints jointly optimize predictions from different decoding branches or different augmented views, suppressing the propagation of false label noise, thereby improving the model's segmentation accuracy and generalization ability for fuzzy boundaries and difficult structures under conditions of scarce annotations.
[0006] The technical solution adopted in this invention is:
[0007] This invention is based on dynamic occlusion and cross-view. Figure 1 A consistent semi-supervised medical image segmentation method includes the following steps:
[0008] 1) Obtain raw medical image data, divide the raw medical image data into training set, validation set and test set, and further divide the training set into labeled sample set and unlabeled sample set; generate weakly enhanced labeled samples from labeled samples in the labeled sample set, and generate weakly enhanced unlabeled samples and strongly enhanced unlabeled samples from unlabeled samples in the unlabeled sample set respectively; perform a bidirectional cross-fusion operation between the weakly enhanced labeled samples and the weakly enhanced unlabeled samples based on a zero-center mask to generate fused samples.
[0009] 2) Construct a semi-supervised medical image segmentation network, which includes a shared encoder and two decoders. The shared encoder extracts multi-scale features of the input samples (weakly enhanced labeled samples, weakly enhanced unlabeled samples, fused samples, and occluded samples) through a convolution module and a multi-layer downsampling module. The two decoders use different upsampling mechanisms to decode the multi-scale features and output segmentation prediction results, and then convert the segmentation prediction results into a probability map.
[0010] 3) Generate an uncertainty map based on the segmentation prediction results of the weakly enhanced unlabeled samples; perform block-level aggregation operation on the uncertainty map to obtain a block-level uncertainty representation map; compare the block-level uncertainty representation maps corresponding to the two decoders to generate a mask; upsample the mask to the same spatial resolution as the strongly enhanced unlabeled samples to obtain a soft mask; and perform pixel-by-pixel multiplication weighting on the strongly enhanced unlabeled samples based on the soft mask to obtain masked samples.
[0011] 4) Construct the total loss function of the semi-supervised medical image segmentation network and update the network parameters according to the total loss function; calculate the Dice coefficient based on the validation set during the training process, and save the network parameters when the Dice coefficient is better than the historical best value. After reaching the preset total number of training rounds, the training is terminated.
[0012] 5) Use the semi-supervised medical image segmentation network trained in step 4) to segment the real medical image data after weak enhancement.
[0013] Preferably, step 1) is as follows:
[0014] a1) Divide the raw medical image data into training, validation, and test sets, and then further divide the training set into labeled sample sets. and unlabeled sample set ,in To label the total number of samples in the labeled sample set, This represents the total number of unlabeled samples in the unlabeled sample set. Indicates the first One labeled sample, express The corresponding pixel-level segmentation labels, Indicates the first One unlabeled sample;
[0015] a2) Perform weak augmentation operations on the labeled samples in the labeled sample set and the unlabeled samples in the unlabeled sample set respectively to obtain... and A strong enhancement operation is performed on the unlabeled samples in the unlabeled sample set to obtain... The weak enhancement operation involves performing random rotation and flipping sequentially, while the strong enhancement operation involves performing color jitter and blur sequentially.
[0016] a3) Randomly generate a zero-center mask The size of the zero-center mask determines whether the voxel comes from the foreground or background. Size factor , weakly enhanced labeled samples The height of W represents the weakly enhanced labeled sample. The width, and then the weakly enhanced labeled samples and weakly enhanced unlabeled samples Perform bidirectional cross-fusion to obtain fused samples and This allows for the combination of highly reliable semantic information from labeled samples with diverse information from unlabeled samples, thereby expanding the effective training data distribution even with a limited number of labeled samples; fusion samples and The calculation formula is as follows:
[0017]
[0018]
[0019] This indicates pixel-by-pixel multiplication.
[0020] Preferably, step 2) is as follows:
[0021] A semi-supervised medical image segmentation network is constructed. This network includes a shared encoder and two decoders. The shared encoder uses a 5-layer convolutional module paired with a 4-layer downsampling module to extract multi-scale features for each input sample. The two different decoders use transposed convolution and linear interpolation upsampling mechanisms to decode the multi-scale features and output segmentation prediction results. The difference in segmentation prediction results due to the different upsampling mechanisms constitutes cross-view prediction, enabling the semi-supervised medical image segmentation network to model the same input sample from different feature spaces, providing a basis for consistency constraints. The segmentation prediction results are then converted into a probability map. Indicates the first Each decoder pairs the input sample The generated probability graph is calculated using the following formula:
[0022]
[0023] in Indicates a shared encoder. Indicates decoder, Indicates the decoder sequence number. ,in Indicates the number of channels for each category. Indicates the image height. Indicates the image width. Used to convert segmentation prediction results into a probability graph.
[0024] Preferably, step 3) is as follows:
[0025] b1) Assume weakly enhanced unlabeled samples Two different probability maps were obtained after passing through a semi-supervised medical image segmentation network. ,in According to the probability diagram Uncertainty diagram obtained by calculation The formula is as follows:
[0026]
[0027] in, It is a constant less than 0.0001 to prevent singularities in numerical calculations. express No. The predicted probability of a class;
[0028] b2) Perform block-level aggregation operation on the uncertainty graph to obtain a block-level uncertainty representation graph; the block-level aggregation operation adopts average pooling operation, and the kernel size and step size of the average pooling operation are both equal to the preset block size parameter. To make the uncertainty graph Uncertainty representation map mapped from pixel level to block level The block-level uncertainty characterization graphs total Block, the block-level uncertainty characterization diagram The The block calculation is as follows:
[0029]
[0030] in, Uncertainty diagram The The first in the block The uncertainty value of each pixel. It is an uncertainty diagram The total number of pixels in the block;
[0031] b3) Comparison and The size relationship between the two is used to obtain the mask. and Specifically, the mask is constructed based on the following conditions:
[0032]
[0033]
[0034] in, It's an indicator function that returns 1 if the condition is true, and 0 otherwise; and Bilinear interpolation upsampling was used to obtain samples that were strongly enhanced but unlabeled. same size soft mask and Next, the unlabeled samples will be strongly enhanced. and and The occlusion samples are obtained by multiplying each pixel individually. and :
[0035]
[0036]
[0037] By generating dynamic soft masks based on the difference predictions of dual decoders, highly enhanced unlabeled samples are adaptively masked, thus preserving high-confidence regions and suppressing low-confidence regions, thereby reducing the interference of unreliable predictions on the training of semi-supervised medical image segmentation networks.
[0038] Preferably, step 4) is as follows:
[0039] c1) For weakly enhanced labeled samples and weakly enhanced unlabeled samples Probability map obtained by inputting into a semi-supervised medical image segmentation network and Supervisory loss is applied to weakly enhanced labeled samples. The monitoring loss is calculated using the following formula:
[0040]
[0041] in, Indicates the first Each decoder pairs weakly enhanced labeled samples The generated probability map, and weakly enhanced labeled samples The corresponding real tags; This is the dice loss function, used to measure the overlap between the probability map and the true labels;
[0042] For weakly enhanced unlabeled samples, a consistency loss is applied. The calculation is as follows:
[0043]
[0044] in, This represents the mean squared error loss. It is by The soft pseudo-tags obtained after sharpening are calculated using the following formula:
[0045]
[0046] Temperature hyperparameters here The intensity of the sharpening operation was controlled;
[0047] By fusing the sample inputs into a semi-supervised medical image segmentation network, a probability map is obtained. and The pseudo-labels of the fused samples obtained based on the zero-center mask are as follows:
[0048]
[0049] This is a hard pseudo-label. Calculate the fusion loss for the fused samples. :
[0050] Represents cross-entropy loss;
[0051] The probability map is obtained by a semi-supervised medical image segmentation network with masked sample input. and First and Upsampled by nearest neighbor interpolation and The same spatial dimension yields weights. and Then, hard pseudo-labels are fused by pixel-by-pixel weighted fusion. Generate the final fused pseudo-label map :
[0052]
[0053] Calculate the masking loss for occluded samples. :
[0054]
[0055] By generating pseudo-supervision information from regions with low prediction uncertainty in weakly enhanced unlabeled samples, selective constraints are applied to occluded samples, so that the supervision signal mainly acts on high-confidence regions, thereby reducing the impact of pseudo-label noise on the training of the semi-supervised medical image segmentation network and maintaining prediction consistency under enhancement and occlusion perturbation conditions.
[0056] Total loss function The calculation formula is as follows:
[0057]
[0058] These are adjustable hyperparameters related to the number of training iterations, which are gradually increased during training using a Gaussian warm-up method. Specifically, they take the following form:
[0059]
[0060] in, This indicates the current training round, while This represents the total number of training rounds; by constructing a joint optimization objective that includes supervised loss, consistency loss, fusion loss, and masking loss, collaborative training on labeled and unlabeled sample sets is achieved.
[0061] c2) The network parameters of the semi-supervised medical image segmentation network are optimized using a stochastic gradient descent optimizer. During training, the Dice coefficient is calculated based on the validation set, and the current network parameters are saved when the Dice coefficient is better than the historical best value. Training is terminated after the preset total number of training rounds is reached.
[0062] The beneficial effects of this invention are as follows:
[0063] By performing weak and strong enhancement processing on labeled and unlabeled samples, and combining it with a zero-center mask to perform bidirectional cross-fusion, the fusion of labeled and unlabeled samples is achieved. This preserves the high-reliability supervision information of labeled samples while introducing the diverse features of unlabeled samples, thus expanding the effective training data distribution even with limited labeled samples. By constructing a shared encoder and dual decoder structure, and utilizing the upsampling mechanism of different decoders to form cross-view predictions, the model can model the same input from different feature representation spaces, providing a foundation for consistency constraints. By constructing an uncertainty graph and performing block-level aggregation, a dynamic mask is generated based on the prediction differences of the dual decoders to adaptively mask unlabeled samples, achieving the preservation of high-confidence regions and the suppression of low-confidence regions, thereby reducing the interference of unreliable predictions on model training. Furthermore, through... This invention utilizes reliable regions in weakly enhanced unlabeled samples to generate pseudo-supervision information, selectively constraining the masked unlabeled samples and transmitting supervision signals only within high-confidence regions. This reduces the impact of pseudo-label noise while enhancing consistency learning performance. By constructing a joint optimization objective that includes supervision loss, consistency loss, fusion loss, and masking loss, collaborative training of labeled and unlabeled samples is achieved. This invention is applicable to 2D and 3D medical image segmentation tasks, effectively improving segmentation accuracy and overall generalization performance in low-contrast and poorly defined regions. Compared with existing semi-supervised methods such as UAMT, URPC, MC-Net, SS-Net, AD-MT, and UnCo, this invention achieves significantly better Dice coefficients and superior accuracy in contour segmentation and edge detail extraction for the publicly available ACDC dataset. Attached Figure Description
[0064] Figure 1 This is a flowchart of the present invention.
[0065] Figure 2 This is a schematic diagram of the semi-supervised medical image segmentation network architecture of the present invention.
[0066] Figure 3 This is a schematic diagram of bidirectional cross-fusion to generate fused samples in this invention.
[0067] Figure 4 This is a schematic diagram of the uncertainty-guided dynamic masking process in this invention.
[0068] Figure 5 This is a visual comparison of the segmentation results of the present invention and several existing semi-supervised segmentation methods on the test set. Detailed Implementation
[0069] The invention will now be further described with reference to the accompanying drawings.
[0070] like Figures 1 to 4 As shown, the present invention provides a method based on dynamic occlusion and cross-view... Figure 1 The specific implementation steps of the semi-supervised medical image segmentation method with consistent performance are as follows:
[0071] 1) Acquire raw medical image data and divide it into training, validation, and test sets. Further divide the training set into labeled and unlabeled sample sets. Generate weakly enhanced labeled samples from the labeled samples in the labeled sample set, and generate weakly enhanced and strongly enhanced unlabeled samples from the unlabeled samples in the unlabeled sample set. Perform a bidirectional cross-fusion operation between the weakly enhanced labeled and weakly enhanced unlabeled samples based on a zero-center mask to generate fused samples. Details are as follows:
[0072] a1) Divide the raw medical image data into training, validation, and test sets. Then, divide the samples in the training set into two labeled sample sets, with two labeling ratios of 10% and 20% respectively. and unlabeled sample set Based on the two division methods mentioned above, two independent model training sessions were conducted, in which... To label the total number of samples in the labeled sample set, This represents the total number of unlabeled samples in the unlabeled sample set. Indicates the first One labeled sample, express The corresponding pixel-level segmentation labels, Indicates the first One unlabeled sample;
[0073] a2) Perform weak augmentation operations on the labeled samples in the labeled sample set and the unlabeled samples in the unlabeled sample set respectively to obtain... and A strong enhancement operation is performed on the unlabeled samples in the unlabeled sample set to obtain... The weak enhancement operation involves performing random rotation and flipping sequentially, while the strong enhancement operation involves performing color jitter and blur sequentially.
[0074] a3) such as Figure 3 As shown, a zero-center mask is randomly generated. The size of the zero-center mask determines whether the voxel comes from the foreground or background. Size factor , weakly enhanced labeled samples The height of the weakly enhanced labeled sample, W. The width, and then the weakly enhanced labeled samples and weakly enhanced unlabeled samples Perform bidirectional cross-fusion to obtain fused samples and The calculation formula is as follows:
[0075]
[0076]
[0077] This indicates pixel-by-pixel multiplication;
[0078] 2) Construct a semi-supervised medical image segmentation network. The semi-supervised medical image segmentation network includes a shared encoder and two decoders. The shared encoder extracts multi-scale features of the input samples (weakly enhanced labeled samples, weakly enhanced unlabeled samples, fused samples, and occluded samples) through a convolution module and a multi-layer downsampling module. The two decoders use different upsampling mechanisms to decode the multi-scale features and output the segmentation prediction results. The segmentation prediction results are then converted into a probability map.
[0079] like Figure 2 As shown, in the semi-supervised medical image segmentation network architecture, two different decoders use transposed convolution and linear interpolation upsampling mechanisms to decode multi-scale features and output segmentation prediction results. The difference in segmentation prediction results caused by the different upsampling mechanisms constitutes cross-view prediction, enabling the semi-supervised medical image segmentation network to model the same input sample from different feature spaces, providing a basis for consistency constraints. The segmentation prediction results are then converted into a probability map. Indicates the first Each decoder pairs the input sample The generated probability graph is calculated using the following formula:
[0080]
[0081] in Indicates a shared encoder. Indicates decoder, Indicates the decoder sequence number. ,in Indicates the number of channels for each category. Indicates the image height. Indicates the image width. Used to convert segmentation prediction results into a probability graph.
[0082] 3) Generate an uncertainty map based on the segmentation prediction results of weakly enhanced unlabeled samples; perform block-level aggregation operation on the uncertainty map to obtain a block-level uncertainty representation map; compare the block-level uncertainty representation maps corresponding to the two decoders to generate a mask; upsample the mask to the same spatial resolution as the strongly enhanced unlabeled samples to obtain a soft mask; and perform pixel-by-pixel multiplication weighting on the strongly enhanced unlabeled samples based on the soft mask to obtain masked samples.
[0083] like Figure 4 As shown, the dynamic masking process guided by uncertainty is as follows:
[0084] b1) Assume weakly enhanced unlabeled samples Two different probability maps were obtained after passing through a semi-supervised medical image segmentation network. ,in According to the probability diagram Uncertainty diagram obtained by calculation The formula is as follows:
[0085]
[0086] in, It is a constant less than 0.0001 to prevent singularities in numerical calculations. express No. The predicted probability of a class;
[0087] b2) Perform block-level aggregation operations on the uncertainty graph to obtain a block-level uncertainty representation graph; the block-level aggregation operation uses average pooling, and the kernel size and stride of the average pooling operation are both equal to the preset block size parameter. To make the uncertainty graph Uncertainty representation map mapped from pixel level to block level A total of block-level uncertainty characterization diagrams Block, Block-level uncertainty characterization diagram The The block calculation is as follows:
[0088]
[0089] in, Uncertainty diagram The The first in the block The uncertainty value of each pixel. It is an uncertainty diagram The total number of pixels in the block. Set to 16;
[0090] b3) Comparison through uncertainty, i.e., comparison and The size relationship between the two is used to obtain the mask. and Specifically, the mask is constructed based on the following conditions:
[0091]
[0092]
[0093] in, It's an indicator function that returns 1 if the condition is true, and 0 otherwise; and Bilinear interpolation upsampling was used to obtain samples that were strongly enhanced but unlabeled. same size soft mask and Next, the unlabeled samples will be strongly enhanced. and and The occlusion samples are obtained by multiplying each pixel individually. and :
[0094]
[0095]
[0096] 4) Construct the total loss function for the semi-supervised medical image segmentation network and update the network parameters based on the total loss function; calculate the Dice coefficient based on the validation set during training, and save the network parameters when the Dice coefficient is better than the historical best value. Training terminates after reaching the preset total number of training rounds; use the saved network parameters to infer the segmentation results on the test set. Details are as follows:
[0097] c1) For weakly enhanced labeled samples and weakly enhanced unlabeled samples Probability map obtained by inputting into a semi-supervised medical image segmentation network and Supervisory loss is applied to weakly enhanced labeled samples. The monitoring loss is calculated using the following formula:
[0098]
[0099] in, Indicates the first Each decoder pairs weakly enhanced labeled samples The generated probability map, and weakly enhanced labeled samples The corresponding real tags; This is the dice loss function, used to measure the overlap between the probability map and the true labels;
[0100] For weakly enhanced unlabeled samples, a consistency loss is applied. The calculation is as follows:
[0101]
[0102] in, Indicates the mean square error loss. It is by The resulting soft pseudo-tags are calculated using the following formula:
[0103]
[0104] Temperature hyperparameter here The intensity of the sharpening operation was controlled. Set to 0.1;
[0105] By fusing the sample inputs into a semi-supervised medical image segmentation network, a probability map is obtained. and The pseudo-labels of the fused samples obtained based on the zero-center mask are as follows:
[0106]
[0107] This is a hard pseudo-label. Calculate the fusion loss for the fused samples. :
[0108] Represents cross-entropy loss;
[0109] The probability map is obtained by a semi-supervised medical image segmentation network with masked sample input. and First and Upsampled by nearest neighbor interpolation and The same spatial dimension yields weights. and Then, hard pseudo-labels are fused by pixel-by-pixel weighted fusion. Generate the final fused pseudo-label map :
[0110]
[0111] Calculate the masking loss for occluded samples. :
[0112]
[0113] Total loss function The calculation formula is as follows:
[0114]
[0115] These are adjustable hyperparameters related to the number of training iterations, which are gradually increased during training using a Gaussian warm-up method. Specifically, they take the following form:
[0116]
[0117] in, This indicates the current training round, while Indicates the total number of training rounds;
[0118] c2) The semi-supervised medical image segmentation network was optimized using a stochastic gradient descent optimizer. During training, the Dice coefficient was calculated based on the validation set, and the current network parameters were saved when the Dice coefficient was better than the historical best value. Training ended after reaching the preset total number of training epochs. After training, the saved optimal network parameters were used to test the test set. With 10% labeling, the Dice coefficient reached 90.85%, and with 20% labeling, the Dice coefficient reached 91.30%, which was only 0.13% different from the UNet model using all labels. Figure 5 The test results are visualized and compared. GT represents the ground truth label, and Ours represents the test results of the semi-supervised medical image segmentation network of the present invention. From the visualization, UAMT and URPC failed to segment the general outline of the target region, while SS-Net and AD-MT and other methods showed obvious deviations in edge details. The above qualitative results show that the method proposed in this invention is superior to existing semi-supervised segmentation methods.
[0119] 5) Using the semi-supervised medical image segmentation network trained in step 4), the real medical image data after weak enhancement can be segmented.
[0120] The above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that 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 for those skilled in the art.
Claims
1. A semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency, characterized in that: Includes the following steps: 1) Obtain raw medical image data, divide the raw medical image data into a training set, a validation set and a test set, and further divide the training set into a labeled sample set and an unlabeled sample set; Weakly enhanced labeled samples are generated from the labeled samples in the labeled sample set, and weakly enhanced unlabeled samples and strongly enhanced unlabeled samples are generated from the unlabeled samples in the unlabeled sample set, respectively. A bidirectional cross-fusion operation is performed between the weakly enhanced labeled sample and the weakly enhanced unlabeled sample based on a zero-center mask to generate a fused sample; 2) Construct a semi-supervised medical image segmentation network, which includes a shared encoder and two decoders. The shared encoder extracts multi-scale features of the input samples through a convolution module and a multi-layer downsampling module. The two decoders use different upsampling mechanisms to decode the multi-scale features and output segmentation prediction results. The segmentation prediction results are then converted into a probability map. 3) Generate an uncertainty map based on the segmentation prediction results of weakly enhanced unlabeled samples; perform block-level aggregation operation on the uncertainty map to obtain a block-level uncertainty representation map; compare the block-level uncertainty representation maps corresponding to the two decoders to generate a mask; upsample the mask to the same spatial resolution as the strongly enhanced unlabeled samples to obtain a soft mask; and perform pixel-by-pixel multiplication weighting on the strongly enhanced unlabeled samples based on the soft mask to obtain masked samples. 4) Construct the total loss function of the semi-supervised medical image segmentation network and update the network parameters according to the total loss function; calculate the Dice coefficient based on the validation set during training, and save the network parameters when the Dice coefficient is better than the historical best value. After reaching the preset total number of training rounds, the training is terminated. 5) Use the semi-supervised medical image segmentation network trained in step 4) to segment the real medical image data after weak enhancement.
2. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 1, characterized in that: Step 1) is as follows: a1) Divide the raw medical image data into training, validation, and test sets, and then further divide the training set into labeled sample sets. and unlabeled sample set ,in To label the total number of samples in the labeled sample set, This represents the total number of unlabeled samples in the unlabeled sample set. Indicates the first One labeled sample, express The corresponding pixel-level segmentation labels, Indicates the first One unlabeled sample; a2) Perform weak augmentation operations on the labeled samples in the labeled sample set and the unlabeled samples in the unlabeled sample set respectively to obtain... and A strong enhancement operation is performed on the unlabeled samples in the unlabeled sample set to obtain... The weak enhancement operation involves performing random rotation and flipping sequentially, while the strong enhancement operation involves performing color jitter and blur sequentially. a3) Randomly generate a zero-center mask The size of the zero-center mask is Size factor , weakly enhanced labeled samples The height of W represents the weakly enhanced labeled sample. The width; then for the weakly enhanced labeled samples and weakly enhanced unlabeled samples Perform bidirectional cross-fusion to obtain fused samples and ; Fusion samples and The calculation formula is as follows: This indicates pixel-by-pixel multiplication.
3. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 1, characterized in that: Step 2) is as follows: A semi-supervised medical image segmentation network is constructed. The semi-supervised medical image segmentation network includes a shared encoder and two decoders. The shared encoder uses a 5-layer convolutional module combined with a 4-layer downsampling module to extract multi-scale features of each input sample. Two different decoders use transposed convolution and linear interpolation upsampling mechanisms to decode multi-scale features and output segmentation prediction results, respectively. These segmentation prediction results are then converted into probability maps. Indicates the first Each decoder pairs the input samples The generated probability graph is calculated using the following formula: in Indicates a shared encoder. Indicates decoder, Indicates the decoder sequence number. ,in Indicates the number of channels for each category. Indicates the image height. Indicates the image width. Used to convert segmentation prediction results into a probability graph.
4. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 1, characterized in that: Step 3) is as follows: b1) Assume weakly enhanced unlabeled samples Two different probability maps were obtained after passing through a semi-supervised medical image segmentation network. ,in According to the probability diagram Uncertainty diagram obtained by calculation The formula is as follows: in, It is a constant less than 0.0001. express No. The predicted probability of a class; b2) Perform block-level aggregation operations on the uncertainty graph to obtain a block-level uncertainty representation graph; the block-level uncertainty representation graph comprises a total of Block, Block-level uncertainty characterization diagram The The block calculation is as follows: in, Uncertainty diagram The The first in the block The uncertainty value of each pixel. It is an uncertainty diagram The total number of pixels in the block; b3) Comparison and The size relationship between the two is used to obtain the mask. and : in, It's an indicator function that returns 1 if the condition is true, and 0 otherwise; and Bilinear interpolation upsampling was used to obtain samples that were strongly enhanced but unlabeled. same size soft mask and Next, the unlabeled samples were strongly enhanced. and and The occlusion samples are obtained by multiplying each pixel individually. and : 。 5. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 1, characterized in that: Step 4) is as follows: c1) Total Loss Function The calculation formula is as follows: in, To monitor losses, For consistency loss, For the loss of fusion, To cover up the losses; Adjustable hyperparameters for: in, This indicates the current training round, while Indicates the total number of training rounds; c2) Use a stochastic gradient descent optimizer to optimize the network parameters of the semi-supervised medical image segmentation network. During training, calculate the Dice coefficient based on the validation set, and save the current network parameters when the Dice coefficient is better than the historical best value. Training terminates after reaching the preset total number of training rounds.
6. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 5, characterized in that: Weakly enhanced labeled samples Inputting the data into a semi-supervised medical image segmentation network yields a probability map. Supervisory loss is applied to weakly enhanced labeled samples. The monitoring loss is calculated using the following formula: in, Indicates the first Each decoder pairs weakly enhanced labeled samples The generated probability map, and weakly enhanced labeled samples The corresponding real tags; This is the dice loss function.
7. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 6, characterized in that: Weakly enhanced unlabeled samples Inputting the data into a semi-supervised medical image segmentation network yields a probability map. For weakly enhanced unlabeled samples, a consistency loss is applied. The calculation is as follows: in, Indicates the mean square error loss. It is by The soft pseudo-tags obtained after sharpening are calculated using the following formula: This refers to temperature hyperparameters.
8. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 7, characterized in that: A semi-supervised medical image segmentation network with fused sample inputs is used to obtain a probability map. and The pseudo-labels of the fused samples obtained based on the zero-center mask are as follows: This is a hard pseudo-label. Calculate the fusion loss for the fused samples. : This represents the cross-entropy loss.
9. The semi-supervised medical image segmentation method based on dynamic occlusion and cross-view consistency according to claim 8, characterized in that: The probability map is obtained by a semi-supervised medical image segmentation network with masked sample input. and First and Upsampled by nearest neighbor interpolation and The same spatial dimension yields weights. and Then, hard pseudo-labels are fused by pixel-by-pixel weighted fusion. Generate the final fused pseudo-label map : Calculate the masking loss for occluded samples. : 。
