A medical image segmentation method and system based on bias correction
By employing a dual-model collaborative framework and bias correction using hybrid supervision signals, the problem of learning bias accumulation in the Mean Teacher framework is solved, improving the boundary segmentation accuracy and robustness of medical image segmentation, adapting to clinical annotation-scarce scenarios, and achieving efficient medical image segmentation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-02
AI Technical Summary
In existing semi-supervised medical image segmentation methods, the learning bias caused by the Mean Teacher framework leads to insufficient accuracy and robustness in boundary segmentation, especially with performance degradation under limited labeled data.
A dual-model collaborative framework is adopted, which combines weak and strong data augmentation, uses a predefined binary mask matrix for regional mixing to construct a hybrid supervision signal, and optimizes the student model through bias correction loss and hybrid recombination loss to suppress bias accumulation.
It improves the model's segmentation accuracy and robustness in boundary regions, adapts to scenarios with scarce clinical annotations, enhances segmentation accuracy and generalization ability, and reduces inference costs.
Smart Images

Figure CN122134747A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image segmentation technology, and in particular to a medical image segmentation method and system based on bias correction. Background Technology
[0002] Medical image segmentation is one of the core technologies in intelligent healthcare, directly impacting the accuracy of disease detection, surgical planning, and prognostic assessment. Existing fully supervised segmentation methods rely on large-scale pixel-level labeled data, but the medical image labeling process is cumbersome, time-consuming, and requires specialized medical knowledge, resulting in a scarcity of high-quality labeled data and severely limiting the technology's practical application. Semi-supervised learning, by combining a small amount of labeled data with a large amount of unlabeled data to train the model, has become a key direction for alleviating the labeling bottleneck.
[0003] Existing semi-supervised segmentation methods are mostly based on the Mean Teacher framework, utilizing unlabeled data through pseudo-labels and consistency constraints. The specific implementation process is as follows: First, two types of medical images are collected and preprocessed, such as standardization and size uniformity. Some methods supplement the sample set with simple data augmentation such as random flipping and translation. Next, a student-teacher dual model with consistent structure is built. The initial weights of the teacher model are the same as those of the student model, and the teacher model is dynamically updated later through the exponential moving average (EMA) of the student model weights without participating in direct training. Then, labeled images and augmented samples are input into the student model. The student model parameters are updated by backpropagation by calculating the supervised loss (such as cross-entropy loss and Dice loss) between the prediction results and the ground truth labels. At the same time, unlabeled images and their different augmented versions are input into the two models respectively. The teacher model outputs pseudo-labels that have been filtered by probability thresholds. The consistency loss between the student model prediction results and these pseudo-labels is calculated and weighted and summed with the supervised loss to guide the student model update. Finally, the above training process is repeated until the model converges. The stabilized student model is then used to process the medical images for segmentation output.
[0004] However, the Mean Teacher framework is essentially a self-reinforcing loop within the same model, where the teacher model's weights are updated by a moving average of the student model's weights. When the student model develops initial biases due to limited labeled data, these biases are smoothly transferred to the teacher model via the moving average. The teacher model then generates pseudo-labels with the same biases, which are used as supervisory signals to retrain the student model, creating a positive feedback loop that amplifies the biases. Ultimately, this leads to a systematic learning bias in the model, reducing the boundary segmentation accuracy of semi-supervised segmentation. Summary of the Invention
[0005] Therefore, it is necessary to provide a medical image segmentation method and system based on deviation correction to address the aforementioned technical problems.
[0006] This invention provides a medical image segmentation method based on bias correction, comprising: Acquire medical image data, which includes: labeled images with real annotations and unlabeled images without real annotations. Real annotations are used to identify lesion areas in medical images. Weak data augmentation and strong data augmentation were performed on labeled and unlabeled images respectively to obtain augmented medical image data. The augmented medical image data includes: labeled images after weak data augmentation, unlabeled images after weak data augmentation, labeled images after strong data augmentation, and unlabeled images after strong data augmentation. The teacher model is used to predict the corresponding pseudo-labeled images by using weakly augmented and strongly augmented unlabeled images. Based on a predefined binary mask matrix, two images are selected from the enhanced medical image data for region-level mixing to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data; and the real annotations and pseudo annotations are mixed at the region level using the same binary mask matrix to obtain a mixed supervision signal. The student model is trained using weakly augmented reconstructed data, and the auxiliary model with the same architecture as the student model is trained using strongly augmented reconstructed data. The prediction results of the student model and the auxiliary model are obtained respectively. The bias correction loss between the prediction results of the student model and the prediction results of the auxiliary model, as well as the hybrid reconstruction loss between the prediction results of the student model, the prediction results of the auxiliary model, and the mixed supervision signal are determined. The weighted sum of the bias correction loss and the hybrid reconstruction loss is used as the total loss function, and the parameters of the student model are optimized by minimizing the total loss function to obtain the trained student model. The medical image to be processed is acquired, and the trained student model is used to segment the medical image to obtain the medical image segmentation result.
[0007] Optionally, based on a predefined binary mask matrix, two images are selected from the enhanced medical image data and mixed at the region level using the following formula to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data: ; in, This is element-wise multiplication. To replace the reconstructed image, The first image to participate in the replacement and recombination. The second image involved in the replacement and recombination. It is a binary mask matrix.
[0008] Optionally, the parameters of the teacher model are updated from the student model parameters using an exponential moving average, based on the following formula: ; in, This represents the number of model iterations. No. Parameters of the next iteration of the teacher model For the first Parameters of the next iteration of the teacher model For the first The parameters of the student model in the next iteration. This is the smoothing coefficient.
[0009] Optionally, a bias correction loss is determined between the predictions of the student model and the predictions of the auxiliary model, specifically including: The prediction results of the student model are determined based on the following formula: ; in, To input the image data for the student model, The predicted output of the student model. For student model weights, To assist the model in predicting the corresponding pseudo-labels; The prediction results of the auxiliary model are determined based on the following formula: ; in, Image data is used as input for the auxiliary model. To assist the model's prediction output, To assist in model weights, Predict and output the corresponding pseudo-labels for the student model; The bias correction loss between the student model's predictions and the auxiliary model's predictions is determined based on the following formula: ; ; ; in, For deviation correction loss, The bias correction loss term for the student model. The bias correction loss term for the auxiliary model. This is the Dice loss function.
[0010] Alternatively, the total loss function can be a weighted sum of the deviation correction loss and the mixed recombination loss, based on the following formula: ; in, Adjust the loss weights for the bias; ; in, For unlabeled recombination loss weights, For mixed recombination loss, These are the predicted segmentation maps corresponding to the labeled image and the mixed image of the labeled image. This is a hybrid supervision signal obtained from two labeled images corresponding to ground truth annotations. This is the predicted segmentation map corresponding to the unlabeled image and the mixed image of unlabeled images. This is a hybrid supervision signal obtained from the pseudo-labels of two unlabeled images. This is the predicted segmentation map corresponding to the mixed image of labeled and unlabeled images. This is a hybrid supervision signal obtained from the real annotations of labeled images and the corresponding pseudo annotations of unlabeled images. This is the predicted segmentation map corresponding to the mixed image of unlabeled and labeled images. It is a hybrid supervision signal obtained from the pseudo-labels corresponding to the unlabeled images and the real labels of the labeled images.
[0011] Optionally, weak data augmentation includes: random rotation and / or random flipping; strong data augmentation includes: random rotation and / or random flipping, color jitter, Gaussian blur and / or random cropping.
[0012] Optionally, the student model, teacher model, and assistant model have the same network architecture, which is either U-Net or V-Net.
[0013] This invention provides a medical image segmentation system based on bias correction, comprising: The data acquisition module is used to acquire medical image data, which includes: labeled images with real annotations and unlabeled images without real annotations. Real annotations are used to identify lesion areas in medical images. The data augmentation module is used to perform weak data augmentation and strong data augmentation on labeled and unlabeled images respectively, to obtain augmented medical image data; the augmented medical image data includes: labeled images after weak data augmentation, unlabeled images after weak data augmentation, labeled images after strong data augmentation, and unlabeled images after strong data augmentation. The pseudo-labeling module is used to predict the corresponding pseudo-labeled images by using the teacher model to perform weak data augmentation on unlabeled images and strong data augmentation on unlabeled images. The replacement and recombination module is used to select two images from the enhanced medical image data based on a predefined binary mask matrix for region-level mixing to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data; and to perform region-level mixing of real and pseudo annotations through the binary mask matrix to obtain a mixed supervision signal; The model training module is used to train the student model using weakly augmented recombined data and to train an auxiliary model with the same architecture as the student model using strongly augmented recombined data, obtaining the prediction results of the student model and the auxiliary model respectively; it determines the bias correction loss between the prediction results of the student model and the prediction results of the auxiliary model, as well as the hybrid recombination loss between the prediction results of the student model, the prediction results of the auxiliary model, and the mixed supervision signal; it uses the weighted sum of the bias correction loss and the hybrid recombination loss as the total loss function, and optimizes the parameters of the student model by minimizing the total loss function to obtain the trained student model; The model application module is used to acquire the medical image to be processed, and to segment the medical image using the trained student model to obtain the medical image segmentation result.
[0014] The medical image segmentation method and system based on deviation correction provided in this invention have the following advantages compared with the prior art: This invention constructs a dual-model collaborative framework of a student model and an auxiliary model. These two models are trained using augmented data of different intensities, and the bias correction loss of their prediction results forces both models to learn more essential features. Furthermore, the total loss function obtained by weighting the bias correction loss and the hybrid recombination loss enables the student model and the auxiliary model to co-evolve through mutual correction, rather than one model unilaterally and smoothly feeding bias into the other model. This effectively suppresses the accumulation of positive feedback of bias, thereby improving the robustness and segmentation accuracy of the model in difficult regions such as boundaries. Attached Figure Description
[0015] Figure 1 This is a general framework diagram of a bias-correction-based medical image segmentation method provided in one embodiment; Figure 2 This is a schematic diagram of replacement and reconstruction data augmentation for a bias-corrected medical image segmentation method provided in one embodiment; Figure 3 This is a schematic diagram of the bias correction framework for a bias correction-based medical image segmentation method provided in one embodiment. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0017] Existing semi-supervised segmentation methods have a series of limitations, all stemming from inherent deficiencies in their architecture design or training logic. These limitations can be summarized as follows: 1. High dependence on annotation: It still requires a certain scale of pixel-level annotations. When faced with a very small number of annotations (5%-10%), the performance drops significantly and it cannot fully adapt to clinical annotation-scarce scenarios.
[0018] 2. Significant learning bias: In traditional Mean Teacher frameworks, the teacher model is updated by the exponential moving average of the student model weights. The accumulation of noise in a single model can easily lead to false labeling errors, causing the model to deviate from the correct learning direction.
[0019] 3. Low data utilization: Labeled and unlabeled data are processed separately, feature distribution alignment is insufficient, and effective information in unlabeled data is not fully explored; data augmentation strategies are simplistic and lack expansion of data diversity.
[0020] 4. Insufficient boundary segmentation accuracy: It has limited ability to characterize blurred boundaries in medical images, and performs poorly in boundary evaluation metrics such as 95HD (Hausdorf distance).
[0021] This invention provides a medical image segmentation system based on bias correction, the system comprising: The data acquisition module is used to acquire medical image data, which includes labeled images with real annotations and unlabeled images without real annotations. Real annotations are used to identify lesion areas in medical images.
[0022] The data augmentation module performs weak and strong data augmentation on labeled and unlabeled images, respectively, to obtain augmented medical image data. The augmented medical image data includes: labeled images after weak data augmentation, unlabeled images after weak data augmentation, labeled images after strong data augmentation, and unlabeled images after strong data augmentation.
[0023] The pseudo-labeling module is used to predict the corresponding pseudo-labeled images by using the teacher model to perform predictions on unlabeled images after weak data augmentation and unlabeled images after strong data augmentation.
[0024] The replacement and reconstruction module is used to select two images from the enhanced medical image data based on a predefined binary mask matrix for region-level blending, resulting in weakly enhanced and strongly enhanced reconstructed data. The binary mask matrix is then used to perform region-level blending of real and pseudo-annotations to obtain a mixed supervision signal.
[0025] The model training module trains a student model using weakly augmented reconstructed data and an auxiliary model with the same architecture as the student model using strongly augmented reconstructed data, obtaining the prediction results of the student and auxiliary models respectively. It determines the bias correction loss between the prediction results of the student and auxiliary models, and the hybrid reconstructing loss between the prediction results of the student and auxiliary models and the mixed supervision signal. The weighted sum of the bias correction loss and the hybrid reconstructing loss is used as the total loss function, and the parameters of the student model are optimized by minimizing the total loss function to obtain the trained student model.
[0026] The model application module is used to acquire the medical image to be processed, and to segment the medical image using the trained student model to obtain the medical image segmentation result.
[0027] A specific embodiment of the present invention is provided: This invention proposes a semi-supervised medical image segmentation system based on bias correction. The system corrects learning biases caused by a single teacher-student frame and errors in ground truth annotation through multi-model collaborative training and specific data augmentation strategies.
[0028] 1. System composition.
[0029] The system includes the following core components: 1) Student Model.
[0030] The core learning component of the system, the model, is responsible for the main segmentation predictions on the input medical image data. During training, it receives data processed using weak data augmentation and replacement / recombination strategies. The model's parameters are optimized through backpropagation. After system training is complete, the student model is the only component retained for final inference and deployment.
[0031] 2) Teacher Model.
[0032] The system's supervision signal generation component, which is not directly trained via backpropagation, generates stable and high-quality pseudo-labels for the unlabeled data during training. The parameters of the teacher model are obtained by smoothing the parameters of the student model through an exponential moving average (EMA), which enables it to provide more stable and reliable supervision signals than the real-time student model.
[0033] 3) Auxiliary Model.
[0034] The system's bias correction component has the exact same network architecture as the student model. During training, it receives data processed with strong data augmentation and replacement / reorganization strategies. The auxiliary model supervises the student model through mutual monitoring (calculating the bias correction loss). This forces both models to learn consistent features under different perturbations, thereby correcting their learning biases. The auxiliary model is only used during the training phase and is discarded during the inference phase.
[0035] 4) Data Processing Module.
[0036] A logical data preprocessing and enhancement unit, which is responsible for implementing the core data strategy of this invention.
[0037] A. Multi-intensity data augmentation: Generates weak data augmentation (such as random rotation and / or random flipping) and strong data augmentation (such as random rotation and / or random flipping, color jitter, Gaussian blur and / or random cropping) for the same batch of input data.
[0038] B. Replacement and Recombination: This is one of the key innovations of this invention. It uses a binary mask matrix (Mask) ), and two samples from different sources (labeled / unlabeled) The training samples and their corresponding labels (real or pseudo) are mixed at the region level to generate new, more informative training samples. .
[0039] 2. System operation process.
[0040] Overall system operation process (such as) Figure 1 As shown below: 1) Data input.
[0041] The system loads a batch of medical images from both unlabeled and labeled datasets.
[0042] 2) Data augmentation.
[0043] The data processing module applies both weak and strong data augmentation to the batch of images simultaneously, generating two independent data streams.
[0044] 3) Pseudo-label generation.
[0045] The teacher model predicts the unlabeled images in the two data streams and generates corresponding pseudo-labels.
[0046] 4) Replacement and recombination.
[0047] The data processing module performs replacement and recombination operations on the two data streams (including images, ground truth annotations, and pseudo-annotations) to generate weakly enhanced recombined data and strongly enhanced recombined data.
[0048] 5) Model training.
[0049] Weakly augmented recombinant data is fed into the student model for training.
[0050] The enhanced recombined data is fed into the auxiliary model for training.
[0051] 6) Loss calculation and optimization.
[0052] The system calculates two main losses: a) Mixed recombination loss ( a) Model prediction and recombined label / pseudo-label segmentation loss; b) Bias correction loss ( (i.e., the consistency loss between the prediction results of the student model and the auxiliary model).
[0053] 7) Weight update.
[0054] The system updates the weights of the student and auxiliary models through backpropagation of the total loss. Simultaneously, the weights of the teacher model are smoothly updated using EMA based on the new weights of the student models.
[0055] 8) Reasoning stage.
[0056] After training, only the final student model is used to segment new medical images.
[0057] This invention also provides a medical image segmentation method based on bias correction. By introducing a novel replacement and recombination data augmentation strategy and constructing a bias correction framework that includes a student model, a teacher model, and an auxiliary model, the method aims to fully explore the effective information in limited labeled data, efficiently utilize a large amount of unlabeled data, and actively correct the learning bias generated during training, thereby significantly improving the model's segmentation accuracy, generalization ability, and training stability in two-dimensional and three-dimensional medical images.
[0058] Specifically, the method includes: Acquire medical image data, which includes: labeled images with real annotations and unlabeled images without real annotations. Real annotations are used to identify lesion areas in medical images.
[0059] Weak and strong data augmentation were performed on labeled and unlabeled images respectively to obtain augmented medical image data. The augmented medical image data includes: labeled images after weak data augmentation, unlabeled images after weak data augmentation, labeled images after strong data augmentation, and unlabeled images after strong data augmentation.
[0060] The teacher model is used to predict the corresponding pseudo-labeled images by using unlabeled images after weak data augmentation and unlabeled images after strong data augmentation.
[0061] Based on a predefined binary mask matrix, two images are selected from the enhanced medical image data for region-level blending to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data. Then, the true and false annotations are blended at the region level using the same binary mask matrix to obtain a mixed supervision signal.
[0062] The student model is trained using weakly augmented reconstructed data, and an auxiliary model with the same architecture as the student model is trained using strongly augmented reconstructed data. The prediction results of the student and auxiliary models are obtained respectively. The bias correction loss between the prediction results of the student model and the auxiliary model, and the hybrid reconstructing loss between the prediction results of the student model, the auxiliary model, and the mixed supervision signal are determined. The weighted sum of the bias correction loss and the hybrid reconstructing loss is used as the total loss function, and the parameters of the student model are optimized by minimizing the total loss function to obtain the trained student model.
[0063] The medical image to be processed is acquired, and the trained student model is used to segment the medical image to obtain the medical image segmentation result.
[0064] Another specific embodiment of the present invention is provided: Step 1: Data augmentation and pseudo-label generation.
[0065] This step aims to prepare data inputs with different perturbations for subsequent training and to utilize the teacher model. Generate stable pseudo-labels.
[0066] 1) Data augmentation: Adding labeled data to a batch of input data. and unlabeled data Two different intensities of data augmentation were applied.
[0067] Weak data augmentation ( ): such as random rotation, random flipping.
[0068] Strong data augmentation ( (This involves adding color dithering, blurring, and cropping to a weak enhancement base, resulting in two sets of data:) and .
[0069] 2) Pseudo-label generation: Teacher model Inference is performed on the two sets of augmented unlabeled data to generate corresponding pseudo-labels. and .
[0070] 3) Teacher model update: To ensure the stability of pseudo-labels, the weights of the teacher model are updated. It is not updated directly through backpropagation, but rather by the weights of the student model. (See step 3) The result is obtained by smoothing and updating using the exponential moving average (EMA), as shown in the formula: ; in: This represents the number of model iterations. For the first The parameters of the next iteration of the teacher model; For the first The parameters of the next iteration of the teacher model; For the first The parameters of the student model in the next iteration; The smoothing coefficient controls the smoothness of the teacher model updates; it was set to 0.99 in the experiment. During training, the student model is constantly updated. Directly using the student model to generate pseudo-labels would produce significant fluctuations. The exponential moving average makes the teacher model more stable, generates more reliable pseudo-labels, and helps the student model learn the target features better.
[0071] Step 2: Replace and reorganize data enhancement.
[0072] This step is one of the core innovations of this invention, aiming to break down the barriers between labeled and unlabeled data, increase data diversity, and enable the model to learn more robust features.
[0073] Specific operations are as follows: Figure 2 As shown. The system selects two groups of samples (images) from either unlabeled or labeled data. and ), and generate a binary mask matrix. (For example, the central region is 0 and the outer region is 1).
[0074] 1) Perform replacement and recombination: Use the following formula to perform region-level blending to obtain the replaced and recombined image. : ; in, This is element-wise multiplication. To replace the reconstructed image; The first image to participate in the replacement and recombination; The second image involved in the replacement and recombination; The binary mask matrix determines the source of the reconstructed image regions; the outer perimeter of the reconstructed image originates from... The central region of the reconstructed image originates from ; The level represents the strength (weak or strong) of the data augmentation applied to the input image before it was processed.
[0075] 2) Generate hybrid supervision signals: corresponding ground truth labels ( ) and pseudo-labels ( They also use the exact same mask. Regional-level mixing is performed to obtain mixed supervision signals. .
[0076] Step 3: Bias correction framework and training.
[0077] This step is another core innovation of the invention, aiming to utilize the student model. and auxiliary models The two models use mutual supervision to proactively correct biases. They have the exact same network architecture.
[0078] like Figure 3 As shown, the training framework contains two parallel branches: 1) Student Model Branch: Student Model Receive weak data augmentation and replacement reconstructed image data And obtain the predicted output. As shown in the formula.
[0079] ; in, This is the predicted output of the student model; For student model weights; The input is the image data for the student model; This is used to assist the model in predicting the corresponding pseudo-labels.
[0080] 2) Auxiliary model branch: Auxiliary model Receive strong data enhancement and replacement reconstructed image data And obtain the predicted output. As shown in the formula.
[0081] ; in, This is the prediction output of the auxiliary model; For auxiliary model weights; Image data is used as input for the auxiliary model; Predict and output the corresponding pseudo-labels for the student model.
[0082] 3) Deviation correction loss The system introduces a consistency loss between the predictions of the two models as a bias correction supervision. The student model's predictions... It needs to be compared with the predictions of the auxiliary model (after processing) ( ) Keep it consistent; and vice versa. As shown in the formula:
[0083] ; ; ; in: For deviation correction loss, The bias correction loss term for the student model. The bias correction loss term for the auxiliary model. Let be the Dice loss function. Bias correction supervision is designed as a two-way constraint in this framework, but it does not force the student model and the auxiliary model to make completely consistent predictions. Instead, it allows them to provide feature supplementation and mutual guidance during the mutual learning process.
[0084] In this way, when faced with data perturbations of varying intensities, the two models are forced to learn consistent, perturbation-insensitive essential features, thereby correcting each other's learning biases caused by noise or data augmentation.
[0085] Step 4: Loss function calculation and optimization.
[0086] The model's total loss It consists of two parts: 1) Mixed recombination loss ( ).
[0087] This is the main segmentation supervision loss, calculated separately for the student model and the auxiliary model. This loss is based on four different types of replacement and recombination (…). l - l , u - u , l - u , u - l ) is calculated, and the reconstructed portion (which is entirely from unlabeled data) is calculated. u - u Apply a smaller weight (The experiment was set to 0.1) to control for the influence of noise pseudo-labels.
[0088] ; in: — For student models, As an auxiliary model; This is the weight of the unlabeled recombination loss (the weight of unlabeled recombination). For mixed recombination loss, These are the predicted segmentation maps corresponding to the labeled image and the mixed image of the labeled image. This is a hybrid supervision signal obtained from two labeled images corresponding to ground truth annotations. This is the predicted segmentation map corresponding to the unlabeled image and the mixed image of unlabeled images. This is a hybrid supervision signal obtained from the pseudo-labels of two unlabeled images. This is the predicted segmentation map corresponding to the mixed image of labeled and unlabeled images. This is a hybrid supervision signal obtained from the real annotations of labeled images and the corresponding pseudo annotations of unlabeled images. This is the predicted segmentation map corresponding to the mixed image of unlabeled and labeled images. It is a hybrid supervision signal obtained from the pseudo-labels corresponding to the unlabeled images and the real labels of the labeled images.
[0089] Setting up in the experiment The teacher model has some noise in its predictions of unlabeled data. Hyperparameters were used in the experiment to control its impact on the overall training process.
[0090] 2) Total loss function ( ).
[0091] The total loss function is the hybrid recombination loss. and deviation correction loss (The weighted sum derived from step 3) ; in The weights for the bias correction loss (hyperparameters controlling the strength of bias correction supervision) are used. The system minimizes the total loss. To simultaneously optimize the parameters of both the student model and the auxiliary model.
[0092] Step 5: Inference.
[0093] After the model training converges, the teacher model and auxiliary models These will be discarded. The system only retains well-trained student models. It is used for segmentation prediction of new, unseen medical images, ensuring efficiency and simplicity during deployment.
[0094] The technology of this invention demonstrates significant advantages in medical image segmentation performance and clinical adaptability: First, the segmentation accuracy is significantly improved. In the case of limited annotation scenarios of mainstream medical image segmentation datasets (such as heart and left atrium related datasets), the core segmentation evaluation metrics far outperform existing semi-supervised segmentation methods. Second, the boundary delineation capability is significantly enhanced. In response to the common problem of blurred boundaries of organ / lesion regions in medical images, special optimization has resulted in excellent performance of boundary distance-related evaluation indicators, effectively improving the accuracy and completeness of boundary segmentation. Third, it has outstanding generalization ability. Even in extremely scarce scenarios with very low annotation ratios, it can still maintain stable and high-performance segmentation results, fully adapting to the actual needs where clinical annotation data is difficult to obtain. Fourth, the inference cost is controllable. Only a single student model is required in the inference stage, and the model deployment parameter scale is consistent with the existing conventional methods. No additional computing resources are required, which facilitates rapid implementation and widespread application in clinical scenarios.
[0095] Another specific embodiment of the present invention is provided: This invention is implemented on a computing device equipped with an NVIDIA RTX 3090 GPU using the PyTorch deep learning framework.
[0096] 1. Dataset and basic model architecture.
[0097] The ACDC (2D Cardiac MRI) dataset uses the U-Net architecture for all base models (student model, teacher model, and auxiliary model). Input images are processed to 256x256 pixels.
[0098] U-Net model processing steps: 1. Encoder downsampling: The input image is sequentially passed through four convolutional blocks, each containing two 3×3 2D convolutions + ReLU activation, followed by 2×2 max pooling (stride 2) to achieve downsampling. After each downsampling, the number of feature map channels doubles, simultaneously extracting multi-scale semantic features. 2. Bottleneck layer feature enhancement: After downsampling to the minimum scale (16×16 pixels), a bottleneck layer is constructed through two 3×3 convolutions + ReLU activation to deepen high-level feature representation. 3. Decoder upsampling and feature fusion: Upsampling is achieved using 2×2 transposed convolutions. Simultaneously, skip connections are used to fuse low-level spatial features of the encoder at the corresponding scale with the current high-level semantic features, compensating for detail loss during the upsampling process. 4. Output layer segmentation: Finally, a 1×1 convolution maps the number of channels to the number of target categories (left ventricle, right ventricle, myocardium, 3 categories), generating a 256×256 pixel segmentation probability map.
[0099] LA (3D Left Atrial MRI) dataset: The base models (student model, teacher model, and auxiliary model) all adopt the V-Net architecture. The input image size is processed to 112x112x80 voxels.
[0100] V-Net model processing steps: 1. Encoder downsampling: Input volume data is downsampled through four 3D convolutional blocks, each containing two 3×3×3 3D convolutions + ReLU activation, combined with 2×2×2 3D max pooling. The number of channels gradually increases from 16 to 128, efficiently capturing 3D spatial structural features. 2. Bottleneck layer and residual connections: After downsampling to the smallest voxel scale (14×14×10), a bottleneck layer is constructed through residual connections to alleviate the gradient vanishing problem during deep network training and enhance feature propagation. 3. Decoder upsampling and feature fusion: Upsampling is achieved using 3D transposed convolutions, and 3D spatial features at the encoder scale are fused through skip connections to accurately restore the 3D structural details of the left atrium. 4. Output layer segmentation: After mapping to two classes (left atrium, background) segmentation probability maps by 1×1×1 3D convolutions, the output is a 112×112×80 voxel segmentation result with the same size as the input, adapting to the anatomical structure restoration requirements of 3D medical images.
[0101] 2. Training parameters.
[0102] Optimizer: Stochastic Gradient Descent (SGD) with momentum.
[0103] Learning rate: Initial learning rate Set to 0.01 and use a cosine annealing strategy for attenuation.
[0104] Batch Size: Set to 24 on the ACDC dataset and 8 on the LA dataset.
[0105] Number of iterations: The total number of training iterations is 30k on ACDC and 15k on LA.
[0106] 3. Key hyperparameters.
[0107] Binary mask matrix ( On ACDC, the size of the central zero-value region is 128x128. On LA, the size of the central zero-value region is 56x56x40.
[0108] The smoothing coefficient of the teacher model EMA ( ): Set to 0.99.
[0109] Unlabeled recombination loss weight ( ): Set to 0.1, Deviation correction loss weight ( Based on the ablation experiment results, the value was set to 0.25.
[0110] 4. Data augmentation.
[0111] Weak data augmentation: random rotation (-10° to 10°) and / or random flipping (horizontal / vertical).
[0112] Strong data augmentation: On top of weak augmentation, additional color dithering, Gaussian blur and / or random cropping are applied.
[0113] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A medical image segmentation method based on bias correction, characterized in that, include: Acquire medical image data, which includes: labeled images with real annotations and unlabeled images without real annotations, wherein the real annotations are used to identify lesion areas in the medical images; Weak data augmentation and strong data augmentation are performed on labeled images and unlabeled images respectively to obtain augmented medical image data; the augmented medical image data includes: labeled images after weak data augmentation, unlabeled images after weak data augmentation, labeled images after strong data augmentation, and unlabeled images after strong data augmentation. The teacher model is used to predict the corresponding pseudo-labeled images by using weakly augmented and strongly augmented unlabeled images. Based on a predefined binary mask matrix, two images are selected from the enhanced medical image data for region-level mixing to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data; and the real annotations and pseudo annotations are mixed at the region level using the same binary mask matrix to obtain a mixed supervision signal. The student model is trained using weakly augmented reconstructed data, and the auxiliary model with the same architecture as the student model is trained using strongly augmented reconstructed data. The prediction results of the student model and the auxiliary model are obtained respectively. The bias correction loss between the prediction results of the student model and the prediction results of the auxiliary model, as well as the hybrid reconstruction loss between the prediction results of the student model, the prediction results of the auxiliary model, and the mixed supervision signal are determined. The weighted sum of the bias correction loss and the hybrid reconstruction loss is used as the total loss function, and the parameters of the student model are optimized by minimizing the total loss function to obtain the trained student model. The medical image to be processed is acquired, and the trained student model is used to segment the medical image to obtain the medical image segmentation result.
2. The medical image segmentation method based on bias correction as described in claim 1, characterized in that, Based on a predefined binary mask matrix, two images are selected from the enhanced medical image data and mixed at the region level using the following formula to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data: ; in, This is element-wise multiplication. To replace the reconstructed image, The first image to participate in the replacement and recombination. The second image involved in the replacement and recombination. It is a binary mask matrix.
3. The medical image segmentation method based on bias correction as described in claim 1, characterized in that, The parameters of the teacher model are updated by the student model parameters using an exponential moving average method, based on the following formula: ; in, This represents the number of model iterations. No. Parameters of the next iteration of the teacher model For the first Parameters of the next iteration of the teacher model For the first The parameters of the student model in the next iteration. This is the smoothing coefficient.
4. The medical image segmentation method based on bias correction as described in claim 1, characterized in that, The method for determining the deviation correction loss between the prediction results of the student model and the prediction results of the auxiliary model specifically includes: The prediction results of the student model are determined based on the following formula: ; in, To input the image data for the student model, The predicted output of the student model. For student model weights, To assist the model in predicting the corresponding pseudo-labels; The prediction results of the auxiliary model are determined based on the following formula: ; in, Image data is used as input for the auxiliary model. To assist the model's prediction output, To assist in model weights, Predict and output the corresponding pseudo-labels for the student model; The bias correction loss between the student model's predictions and the auxiliary model's predictions is determined based on the following formula: ; ; ; in, For deviation correction loss, The bias correction loss term for the student model. The bias correction loss term for the auxiliary model. This is the Dice loss function.
5. The medical image segmentation method based on bias correction as described in claim 4, characterized in that, The total loss function is based on the weighted sum of the deviation correction loss and the mixed recombination loss, as expressed in the following formula: ; in, Adjust the loss weights for the bias; ; in, For unlabeled recombination loss weights, For mixed recombination loss, These are the predicted segmentation maps corresponding to the labeled image and the mixed image of the labeled image. This is a hybrid supervision signal obtained from two labeled images corresponding to ground truth annotations. This is the predicted segmentation map corresponding to the unlabeled image and the mixed image of unlabeled images. This is a hybrid supervision signal obtained from the pseudo-labels of two unlabeled images. This is the predicted segmentation map corresponding to the mixed image of labeled and unlabeled images. This is a hybrid supervision signal obtained from the real annotations of labeled images and the corresponding pseudo annotations of unlabeled images. This is the predicted segmentation map corresponding to the mixed image of unlabeled and labeled images. It is a hybrid supervision signal obtained from the pseudo-labels corresponding to the unlabeled images and the real labels of the labeled images.
6. The medical image segmentation method based on bias correction as described in claim 1, characterized in that, The weak data augmentation includes: random rotation and / or random flipping; the strong data augmentation includes: random rotation and / or random flipping, color jitter, Gaussian blur and / or random cropping.
7. The medical image segmentation method based on bias correction as described in claim 1, characterized in that, The student model, teacher model, and assistant model have the same network architecture, which is either U-Net or V-Net.
8. A medical image segmentation system based on bias correction, characterized in that, include: The data acquisition module is used to acquire medical image data, which includes: labeled images with real annotations and unlabeled images without real annotations, wherein the real annotations are used to identify lesion areas in the medical images; The data augmentation module is used to perform weak data augmentation and strong data augmentation on labeled and unlabeled images respectively to obtain augmented medical image data; the augmented medical image data includes: labeled images after weak data augmentation, unlabeled images after weak data augmentation, labeled images after strong data augmentation, and unlabeled images after strong data augmentation. The pseudo-labeling module is used to predict the corresponding pseudo-labeled images by using the teacher model to perform weak data augmentation on unlabeled images and strong data augmentation on unlabeled images. The replacement and recombination module is used to select two images from the enhanced medical image data based on a predefined binary mask matrix for region-level mixing to obtain weakly enhanced reconstructed data and strongly enhanced reconstructed data; and to perform region-level mixing of real and pseudo annotations through the binary mask matrix to obtain a mixed supervision signal; The model training module is used to train the student model using weakly augmented recombined data and to train an auxiliary model with the same architecture as the student model using strongly augmented recombined data, obtaining the prediction results of the student model and the auxiliary model respectively; it determines the bias correction loss between the prediction results of the student model and the prediction results of the auxiliary model, as well as the hybrid recombination loss between the prediction results of the student model, the prediction results of the auxiliary model, and the mixed supervision signal; it uses the weighted sum of the bias correction loss and the hybrid recombination loss as the total loss function, and optimizes the parameters of the student model by minimizing the total loss function to obtain the trained student model; The model application module is used to acquire the medical image to be processed, and to segment the medical image using the trained student model to obtain the medical image segmentation result.