A domain-oriented adaptive segmentation system and method for colorectal cancer MRI

CN122990198APending Publication Date: 2026-10-27TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611177891.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0057]本发明提出了一种用于结直肠癌MRI分割的无监督域适应框架,通过将多视角可靠性引导伪标签学习与可靠性感知病灶原型对齐相结合,同时实现了伪标签监督质量与跨域特征对齐精度的双重提升;其中多视角可靠性引导伪标签学习模块从像素、区域和样本三个视角层面联合建模伪标签可靠性,能够系统性地抑制临床域偏移引发的多源伪标签噪声,从源头上减少监督污染,可靠性感知病灶原型对齐模块则利用可靠性权重筛选高置信度目标特征构建纯净原型,避免了噪声特征导致的原型偏移,实现了精准的跨域语义对齐,有效减小了特征漂移。在跨域结直肠癌MRI分割任务上的实验表明,在存在显著域偏移的情况下,本方法相比当前最优无监督域适应方法取得了一致的性能提升,充分证明了其在不使用任何目标域标注的情况下能够实现鲁棒的跨域适应。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990198A_ABST
    Figure CN122990198A_ABST
Patent Text Reader

Abstract

The application discloses a kind of domain-oriented adaptive colorectal cancer MRI segmentation system and method, multi-view reliability guide pseudo-label learning module is jointly modeled from three complementary views of pixel-level statistics, regional structure, sample-level distribution Pseudo-label reliability, construct multi-view weighted field, realize the dynamic regulation and control of strong enhancement branch Pseudo-label supervision and consistency regularization;Reliability perception lesion prototype alignment module then aggregates high confidence lesion features in target domain, generates semantic pure lesion prototype, and completes alignment operation with source domain prototype, effectively suppresses cross-domain feature drift problem.Finally, the two modules rely on source domain supervision loss and target domain adaptive loss to carry out end-to-end joint training, form iterative optimization mechanism, and collaboratively complete high-reliability pseudo-label supervision and accurate cross-domain feature alignment, which can improve the generalization ability of colorectal cancer segmentation model in cross-center scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and medical image segmentation technology, specifically relating to the application of unsupervised domain adaptation technology in multicenter colorectal cancer magnetic resonance imaging (MRI) segmentation. Background Technology

[0002] Medical image segmentation technology can automatically extract the boundaries and quantitative information of anatomical structures and lesion areas, serving as a core supporting technology for computer-aided diagnosis, surgical planning, and prognostic assessment. Colorectal cancer is the third most common malignant tumor worldwide. Accurate preoperative assessment of tumor invasion depth, lymph node metastasis, and mesangial involvement is crucial for precise staging, individualized treatment, and prognostic evaluation of colorectal cancer. Magnetic resonance imaging (MRI), with its high soft tissue resolution and radiation-free advantages, has become the preferred imaging method for preoperative assessment of colorectal cancer. However, pixel-level segmentation of colorectal cancer MRI still relies on manual work by experienced radiologists, which is time-consuming, labor-intensive, and exhibits significant inter-observer variability, making it difficult to meet the needs of large-scale, standardized clinical applications.

[0003] Deep learning models commonly suffer from severe performance degradation when deployed across healthcare institutions. The root cause lies in the significant domain shift introduced by systematic differences in imaging equipment, scanning protocols, and patient populations across different institutions. This prevents models trained on source domain data from directly generalizing to unseen target domains. Simultaneously, pixel-level annotation of medical images is extremely costly, making it virtually impractical to re-annotate data for each new target domain in clinical practice. Against this backdrop, unsupervised domain adaptation (UDA) has emerged as a mainstream technological paradigm for resolving this contradiction.

[0004] Existing unsupervised domain adaptation methods mainly fall into two categories: one is cross-domain alignment methods, which reduce the distributional differences between the source and target domains by learning domain-invariant representations, but are prone to misaligning meaningless background features, losing task-relevant semantics, and causing representation distortion; the other is self-training methods, which iteratively optimize the model by generating target domain pseudo-labels, but under severe domain shifts, the initial pseudo-label quality is low, easily leading to irreversible error accumulation. In the clinical scenario of colorectal cancer MRI segmentation, the limitations of the above two types of methods are further amplified. Clinical domain shift is not caused by a single factor; changes in imaging contrast lead to blurred tumor boundaries, differences in scanning protocols cause lesion morphology distortion, and different patient groups cause global distribution shifts. These multi-layered interferences not only reduce pseudo-label accuracy, forming supervisory contamination, but also interfere with target domain feature learning, causing representation drift. The two reinforce each other, forming a vicious cycle: the contaminated supervisory signal forces the feature encoder to update in the wrong direction, and the drifted features further weaken the model's discriminative ability, continuously deteriorating the quality of pseudo-labels. Existing technologies cannot break this cycle from both the supervision space and the feature space simultaneously. Therefore, there is an urgent need for a robust unsupervised domain adaptation method that can simultaneously suppress multi-source pseudo-label noise and cross-domain feature drift, in order to improve the generalization ability of colorectal cancer MRI image segmentation models in cross-medical institution scenarios and promote the clinical translation and application of medical image segmentation technology. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides a pseudo-label learning and prototype alignment method for domain-adaptive colorectal cancer MRI segmentation. By using complementary multi-view reliability modeling to suppress pseudo-label noise caused by clinical domain shift, a stable target domain lesion prototype is constructed under reliability constraints to achieve robust cross-domain semantic alignment. This breaks the vicious cycle of supervision contamination and representation drift, and improves the generalization ability of the colorectal cancer segmentation model in cross-center scenarios.

[0006] The present invention adopts the following technical solution:

[0007] A pseudo-label learning and prototype alignment method for domain-adaptive MRI segmentation of colorectal cancer is proposed. This method is based on a weak-strong dual-view self-training paradigm. By co-constraining the supervision space and feature space, it breaks the vicious cycle of supervision contamination and representation drift caused by domain offset in clinical multi-center data. The overall process takes labeled data from the source domain and unlabeled data from the target domain as input. After being processed by a shared Encoder-Decoder segmentation network, the data enters the multi-view reliability-guided pseudo-label learning (RGPL) module and the reliability-aware lesion prototype alignment (RLPA) module, respectively. Finally, the model parameters are optimized end-to-end through a joint loss function.

[0008] Source Domain: The input data for the source domain is a colorectal cancer MRI dataset with expert pixel-level annotations. The source domain is represented as follows: ,in It is a source domain medical image, This corresponds to pixel-level segmentation annotations. All images undergo grayscale conversion, ROI cropping, intensity normalization, and mask binarization. The preprocessed source domain images are directly input into a shared Encoder-Decoder segmentation network to obtain prediction results, which are then used in conjunction with the ground truth annotations to calculate the source domain supervision loss, weighted by cross-entropy loss and Dice loss. This loss is directly backpropagated to optimize the network parameters, ensuring the model's basic segmentation performance in the source domain.

[0009] Target domain: The target domain data is an unlabeled colorectal cancer MRI dataset, and the target domain is represented as follows. This dataset contains only unlabeled target domain images. The target domain data is divided into a weak enhancement branch and a strong enhancement branch. The same unlabeled target domain MRI image undergoes both intensities of data augmentation simultaneously. The weak enhancement branch performs only minor geometric transformations such as random horizontal and vertical flipping, generating stable, low-noise predictions for pseudo-label generation and reliability assessment. The strong enhancement branch performs significant perturbations such as random rotation, scaling, translation, and elastic deformation, generating challenging samples to train the model's domain generalization ability and robustness. The enhanced images from both branches are input into the same Encoder-Decoder network with shared parameters, simultaneously outputting pixel-level segmentation probability maps and bottleneck layer high-dimensional feature maps. These are then fed into a multi-view reliability-guided pseudo-label learning module and a reliability-aware lesion prototype alignment module for further processing.

[0010] Encoder-Decoder network module: A segmentation network built on UNet++, using ResNet34 pre-trained on ImageNet as the encoder, and replacing batch normalization in the decoder with group normalization to improve the stability of mini-batch training.

[0011] The multi-perspective reliability-guided pseudo-label learning module, as the core optimization unit in the supervised space, systematically evaluates pseudo-label reliability from three complementary perspectives: pixel-level statistics, region-level structure, and sample-level distribution. First, it calculates the normalized prediction entropy and maximum prediction probability based on the prediction probability map output by the weak enhancement branch. Then, it generates pixel-level statistical reliability weights through an exponential decay function. The prediction uncertainty and decision confidence of each pixel are quantified. Then, three morphological features—area, compactness, and solidity—are extracted from the pseudo-labels generated by the weak enhancement branch. These features are compared with the statistical distribution of the lesions in the source domain to obtain a regional structural consistency score. The score is then propagated to all pixels within the region and fused with the maximum prediction probability to generate a structure-aware reliability weight. To suppress pseudo-labels with high local confidence but unreasonable morphology, a dynamic annealing confidence threshold that gradually increases with training iterations is then used to generate a hard confidence mask. Simultaneously, the pseudo-label foreground ratio of the current sample is calculated and compared with the expected foreground range obtained from the source domain statistics to obtain the normalized bias, and then a sample-level scaling factor is generated. The global distribution bias of the entire image is calibrated; finally, the signals from the three perspectives are integrated to generate a multi-view reliability weighted field. By jointly applying statistical and structural weights to pixels that pass the confidence threshold, and assigning minimal constants to low-confidence pixels to preserve the basic gradient flow, fine-grained filtering of noise supervision signals is achieved.

[0012] The reliability-aware lesion prototype alignment module: The RLPA module operates in the feature space, using the reliability-weighted field generated by the RGPL module to solve the cross-domain feature mismatch problem. First, it extracts high-dimensional features from the bottleneck layer of the Encoder-Decoder network from the source and target domains respectively. Based on the true annotations in the source domain, it selects lesion pixels and aggregates them to obtain the initial source domain lesion prototypes, and uses an exponential moving average method to update online to maintain a stable reference benchmark. At the same time, it uses a multi-view reliability-weighted field and a prototype aggregation confidence threshold to select pixels in the target domain that are pseudo-labeled as lesions and have a qualified confidence level. These pixels are then aggregated according to reliability weights to obtain semantically pure target domain lesion prototypes. Finally, it calculates the L2 distance between the source and target domain lesion prototypes as the prototype alignment loss. The target domain lesion feature representation is explicitly pulled toward the source domain, and only the lesion category is aligned to avoid noise interference from the background region.

[0013] The final global joint loss function is derived from the source domain supervised loss. Multi-view reliability-weighted pseudo-label loss Category-aware consistency loss Alignment loss with prototype Weighted composition, where By utilizing a multi-view reliability weighted field, differentiated supervision is applied to the prediction of strongly enhanced branches, prioritizing the learning of high-reliability regions. The predictive consistency of branches is enhanced by varying the strength of KL divergence constraints, and additional weights are applied to lesion pixels to alleviate class imbalance. All losses are backpropagated through the supervisory signal flow, and the network is trained end-to-end using a stochastic gradient descent algorithm with momentum, resulting in a colorectal cancer segmentation model adapted to the target domain.

[0014] The method described above, which guides pseudo-label learning with multi-perspective reliability, jointly models pseudo-label reliability from three complementary perspectives: pixel-level statistics, region-level structure, and sample-level distribution. Pixel-level statistical reliability assessment first models the pixel-level prediction uncertainty of the target domain as the fundamental signal for reliability estimation. Given the class prediction probability output by the weak enhancement branch, let pixel... The predicted probability vector is The normalized prediction entropy is defined as:

[0015]

[0016] Where C is the number of categories. Represents pixels Category The predicted probability. Normalization factor. The entropy is constrained within the range [0,1] to make it suitable for reliability modulation. Based on this uncertainty metric, the pixel-level statistical reliability weight is defined as:

[0017]

[0018] in The rate of entropy decay is controlled. This weight assigns lower values ​​to uncertain predictions and higher values ​​to predictions with high confidence, thus providing a continuous estimate of pixel-level reliability. However, entropy alone cannot fully reflect the confidence of the prediction category itself. A prediction may have relatively low entropy but still lack a sufficiently strong class bias. Therefore, we further introduce a maximum prediction probability:

[0019]

[0020] It directly measures the confidence level of the most likely class at pixel x. and It provides complementary statistical signals: Capturing forecast uncertainty These two signals reflect the confidence level in the decision. They form the statistical basis for subsequent reliability modeling.

[0021] Building upon pixel-level statistical signals, we further evaluate the reliability of pseudo-labels from a regional structure perspective. Under domain offset, predictions with high local confidence may still form morphologically unreasonable regions. To reduce such errors, we introduce a morphology-prior-guided correction strategy, comparing each connected component in the weakly predicted lesion map with the source domain structure statistics. The regional-level structural reliability assessment treats each candidate lesion region as a structural unit. For the connected component R, we use three complementary descriptors to describe its morphology: Area, Compactness, and Solidity, representing the region's scale, shape, and structural integrity, respectively. These descriptors allow us to assess whether high-confidence predictions also possess structural rationality, thus constraining predictions with high local confidence but morphological anomalies.

[0022] To quantify the deviation between the morphological distribution of candidate regions in the target domain and that of the source domain, the structural consistency score of region R is defined as:

[0023]

[0024] in Indicates the area In morphological dimension The observed values ​​on and These are the mean and standard deviation of the corresponding statistics estimated from the actual labeled lesions in the source domain. The weights assigned to dimension k satisfy the following conditions: A higher score indicates a greater consistency between the region and the prior structure of the source domain. Since all pixels within a connected component share the same region structure, the score... propagate to every pixel To obtain the region-sensing structure signal Then, the signal is compared with pixel-level confidence. Integration, resulting in an integration reliability score:

[0025]

[0026] in The contribution of pixel-level confidence and region-level structural consistency is balanced. Based on the fusion score, the structure-aware reliability weight is defined as follows:

[0027]

[0028] in Controlling attenuation intensity. This design suppresses predictions with high local confidence but poor structure, enabling... This complements pixel-level uncertainty modeling and improves the quality of pseudo-labels at the region level.

[0029] Beyond pixel-level and region-level reliability estimation, we further model sample-level distribution consistency to capture global image biases in target prediction. Specifically, we extend the multi-view reliability-guided pseudo-label learning with a dynamic confidence gate and a foreground scaling term. First, following the confidence-based pseudo-label filtering strategy in self-training, we apply a dynamic threshold... Define a hard confidence mask:

[0030]

[0031] in It is an indicator function. This is the annealing threshold, which is used to gradually expand the effective supervision set during training. To further calibrate image-level distribution bias, the pseudo-label foreground ratio of the target samples is defined as:

[0032]

[0033] in Represents the target pixel space. These are pseudo-labels generated by the weak enhancement branch. (Proportion) We measure the proportion of predicted foreground pixels in the current target sample. Based on source domain statistics, we estimate the expected range of foreground proportions. To quantify the deviation of the current sample from the prior range, a normalized bias is defined:

[0034]

[0035] When r falls within the expected range, the deviation is 0; otherwise, the deviation increases with increasing distance from the interval boundary. This provides a simple sample-level measure of distribution anomalies. Then, a sample-level scaling factor is defined:

[0036]

[0037] in Control the severity of punishment. As deviation increases... This will gradually reduce the contribution of the corresponding samples to the supervision of false labels. Finally, the statistical, structural, and sample-level signals are integrated into a multi-view reliability weighted field:

[0038]

[0039] in It is a small constant used to preserve the basic gradient flow for low-confidence pixels. Pixels that pass the confidence threshold are... and Joint weighting, and the remaining pixels obtain .coefficient The entire image is calibrated by ensuring foreground proportion consistency. The reliability at the pixel, region, and sample levels was unified for subsequent self-training.

[0040] The multi-view reliability-guided pseudo-label learning module optimizes target domain self-training through two loss functions, the first being the multi-view reliability-weighted pseudo-label loss. Defined as:

[0041]

[0042] in This indicates the pseudo-labels generated by the weak enhancement branch. It represents the predicted probability of class c at pixel x by the strong enhancement branch. It is a small constant that avoids division by zero. By using... This loss, weighted for each pixel, assigns stronger supervision to regions that are reliable at the pixel, region, and sample levels. To improve consistency under strong perturbations, we further introduce a category-aware consistency loss. Defined as:

[0043]

[0044] in and Let represent the probability distributions predicted by the weak enhancement branch and the strong enhancement branch, respectively. It is the foreground enhancement coefficient. KL divergence encourages strong enhancement predictions to align with the weak enhancement reference distribution, while foreground weighting strengthens the constraint on lesion pixels to alleviate the class imbalance problem. and Complementary to each other: pass Prioritize reliable pseudo-label supervision for high-confidence regions, while This improves the perturbation invariance learning ability across the entire target image by enhancing the foreground.

[0045] The method described herein involves a reliability-aware lesion prototype alignment module that constructs target domain lesion prototypes from reliable pseudo-label features and aligns them with source domain prototypes to reduce feature drift and improve semantic consistency. A key issue in prototype alignment is the noise problem in target feature aggregation. Therefore, we use a multi-view reliability weighted field. This guides prototype construction, allowing more reliable lesion regions to contribute more significantly to the target prototype. Specifically, the target domain lesion prototype... The calculation is as follows:

[0046]

[0047] in This represents the encoder feature vector of the target pixel x. It is the confidence threshold for prototype aggregation. It is a small constant that ensures numerical stability. Aggregation is performed only using target pixels labeled as lesions by pseudo-labels and meeting the confidence threshold. For the source domain, we construct a lesion prototype from the ground truth annotations and update it using an exponential moving average (EMA) to maintain a stable source domain reference prototype.

[0048]

[0049] in Represents the source domain pixel space, It is the feature vector of pixel x in the source domain. This is the EMA momentum coefficient. This update scheme maintains the stability of the source domain reference prototype during training. Based on the source and target domain prototypes, the reliability-aware lesion prototype alignment loss is defined as:

[0050]

[0051] This loss explicitly pulls reliable target domain lesion representations toward source domain lesion prototypes. Background regions often exhibit significant appearance variations across different domains, and forcing alignment of these regions introduces spurious signals, weakening cross-domain discriminative ability. Therefore, we restrict prototype alignment to lesion categories, allowing the model to focus on task-relevant discriminative semantics and avoid interference from uninformative background variations.

[0052] The overall loss function of the deep neural network model constructed using the method described above is expressed as follows:

[0053]

[0054] in, The source domain supervision loss consists of cross-entropy loss and Dice loss; A multi-view reliability-weighted pseudo-label loss is used to optimize the prediction of the strong enhancement branch; This is a category-aware consistency loss used to improve prediction consistency under strong perturbations; A reliability-aware lesion prototype alignment loss is used to reduce cross-domain feature differences; =1.0、 =0.1 and =0.3 is the weighting coefficient for each loss term.

[0055] Beneficial effects

[0056] Compared with the prior art, the present invention has the following advantages:

[0057] This invention proposes an unsupervised domain adaptation framework for colorectal cancer MRI segmentation. By combining multi-view reliability-guided pseudo-label learning with reliability-aware lesion prototype alignment, it simultaneously improves both the quality of pseudo-label supervision and the accuracy of cross-domain feature alignment. The multi-view reliability-guided pseudo-label learning module jointly models pseudo-label reliability from three perspectives: pixel, region, and sample. This systematically suppresses multi-source pseudo-label noise caused by clinical domain shift, reducing supervision contamination at its source. The reliability-aware lesion prototype alignment module uses reliability weights to select high-confidence target features to construct pure prototypes, avoiding prototype shift caused by noisy features and achieving accurate cross-domain semantic alignment, effectively reducing feature drift. Experiments on cross-domain colorectal cancer MRI segmentation tasks show that, even with significant domain shift, this method achieves consistent performance improvements compared to the current best unsupervised domain adaptation methods, fully demonstrating its robust cross-domain adaptation capabilities without using any target domain annotations. Attached Figure Description

[0058] Figure 1 is an overall structural diagram of the unsupervised domain adaptation framework proposed in this invention.

[0059] Figure 2 is a qualitative comparison of different unsupervised domain adaptation methods on the target domain.

[0060] Figure 3 shows the training dynamic curves of different models, where (a) is the curve of the Dice coefficient change in the target domain, (b) is the curve of the proportion of high-confidence pseudo-labels change, and (c) is the curve of the L2 distance between the source domain and the target domain lesion prototype.

[0061] Figure 4 shows the hyperparameter sensitivity analysis of the framework of this invention, where (a) represents the sensitivity of the reliability fusion coefficient α, and (b) represents the prototype alignment weight λ. rlpa The sensitivity, (c) is the entropy decay coefficient β e Sensitivity. Detailed Implementation

[0062] The present invention will be described in detail below with reference to specific embodiments.

[0063] All embodiments were implemented using the PyTorch 1.12.1 framework, with a hardware environment consisting of a single NVIDIA RTX2080Ti GPU (11GB VRAM), CUDA version 11.6, cuDNN version 8.3.2, and Python version 3.8.13.

[0064] Example 1: Unsupervised adaptive T2-weighted MRI segmentation for colorectal cancer

[0065] This embodiment addresses the T2-weighted MRI segmentation task for cross-center colorectal cancer, fully implementing the multi-view reliability-guided pseudo-label learning and prototype alignment method described in the claims. In clinical scenarios, differences in imaging equipment, scanning protocols, and patient groups across different medical institutions can lead to significant domain shifts. Existing unsupervised domain adaptation methods either introduce semantic noise due to the alignment background or accumulate errors due to poor pseudo-label quality. The core design idea of ​​this invention is to systematically filter pseudo-label noise at the pixel, region, and sample levels through multi-view reliability modeling, solving the supervision contamination problem; based on this, a clean lesion prototype is constructed using reliable features and aligned with the source domain, solving the feature drift problem. The two form a positive loop, breaking the error accumulation loop of traditional methods. All parameters have been validated with clinical data and optimized using grid search to ensure stable segmentation performance even in scenarios with significant domain shifts. The specific implementation steps are as follows:

[0066] A1. Data Acquisition and Preprocessing

[0067] This embodiment uses two colorectal cancer pelvic MRI datasets from different medical institutions with significant imaging differences. All data are axial T2-weighted sequences with a slice thickness of 3-5 mm, a slice interval of 1 mm, and a scanning field of view of 300-380 mm.

[0068] The source domain dataset consisted of MRI scans from 321 pathologically confirmed colorectal cancer patients. All annotations were independently completed by two associate chief radiologists with over 5 years of clinical experience. After cross-validation, the annotation consistency Kappa coefficient was 0.89. Slices with severe motion artifacts, metallic artifacts, lesions completely obscured by intestinal gas, or invisible lesions were removed, resulting in 6672 valid axial slices. To alleviate the inherent class imbalance problem in medical images, negative slices were randomly downsampled to achieve a positive-to-negative sample ratio of 1:2. The target domain dataset used the publicly available ISICDM 2023 Colorectal Cancer Segmentation Challenge dataset, containing MRI scans from 150 patients without pixel-level annotations. After screening using artifact removal criteria identical to the source domain, 3171 valid slices were obtained. Both datasets were strictly partitioned at the patient level with an 85% training set and a 15% validation set ratio to ensure no overlap across subsets.

[0069] All slices undergo a unified, standardized preprocessing workflow:

[0070] A11. DICOM parsing and window width and level adjustment: Read the pixel data of the DICOM file and convert it into the actual signal intensity value according to the Rescale Slope and Rescale Intercept in the file label; for T2-weighted MRI of colorectal cancer, adjust the window level with a window width of 350HU and a window level of 75HU to stretch the signal intensity of the region of interest to the gray range of 0~255.

[0071] A12. Grayscale conversion: according to the formula Convert a multi-channel image to a single-channel grayscale image, where , , These are the pixel values ​​for the red, green, and blue channels of the image, respectively.

[0072] A13. ROI cropping: Calculate the minimum bounding rectangle of the lesion mask for positive sections and obtain its center coordinates. , A 192×192 region is cropped based on the center of the image. When the region exceeds the image boundary, zero-value filling is performed using the global minimum value of the image, limited by the image boundary. For negative sections, a 192×192 region is directly cropped based on the geometric center of the image. In special cases, if the lesion area is less than 10 pixels, the section is directly removed. If the lesion area accounts for less than 5% after cropping, the cropping position is readjusted based on the centroid of the lesion to ensure that the lesion is completely included within the ROI and accounts for no less than 5%.

[0073] A14. Intensity Normalization: Percentile truncation normalization maps image intensity to the [-1, 1] interval: First, calculate the 1st percentile P1 and 99th percentile P99 of the pixel intensity, truncate pixel values ​​exceeding the range [P1, P99], and then use the formula... Complete the normalization; if P99=P1, discard the slice.

[0074] A15. Mask Binarization and Alignment: Convert multi-class labels into a binary mask, set the lesion region to 1 and the background region to 0; the mask performs ROI cropping operation exactly the same as the image, ensuring that the mask and the image are spatially aligned.

[0075] A16. Data Augmentation: The target domain data employs a weak-strong dual-branch data augmentation strategy, with the same target domain image being processed simultaneously by two augmentation branches. The weak augmentation branch performs only random horizontal and vertical flipping operations to generate stable, low-noise prediction results for pseudo-label generation and reliability assessment; the strong augmentation branch performs large-amplitude perturbation operations, including angles ranging from […]. , Random rotation (using bilinear interpolation), random scaling with a scaling factor range of [0.8, 1.2], random translation with both horizontal and vertical translation ranges of [-10, 10] pixels, and control parameters. , The elastic deformation is measured (using bilinear interpolation). The enhanced image is then validated; if the area of ​​completely black regions exceeds 10%, the enhancement operation is repeated to ensure that the effective area of ​​the image accounts for no less than 90%.

[0076] To address the common artifact problem in clinical MRI images, this embodiment supplements the following preprocessing anomaly handling:

[0077] (1) Metal artifact processing: A morphological opening operation-based artifact removal method is adopted. The opening operation is performed on the image using a 5×5 rectangular structuring element. First, the isolated bright spots of the bright metal artifacts are eliminated by the erosion operation. Then, the morphological features of the surrounding normal tissue are restored by the dilation operation. After removing the bright metal artifacts, the ROI cropping and intensity normalization are performed.

[0078] (2) Motion artifact handling: A motion artifact detection and removal method based on image gradient variance is adopted. The gradient variance of the image is calculated as a measure of image texture richness. Motion artifacts will cause the overall image to be blurred and the gradient variance to be significantly reduced. If the gradient variance of a certain slice is less than the threshold of 0.05, it is determined that there are serious motion artifacts, and the slice is directly removed and not used for model training and inference.

[0079] (3) Intestinal gas artifact processing: Threshold segmentation combined with neighborhood mean filling is used. For images normalized to the [-1,1] interval, threshold segmentation is used to identify gas regions, and the gas regions are filled with the mean of normal tissue pixels in the 3×3 neighborhood around the gas region to avoid the low signal of the gas region interfering with the lesion segmentation results.

[0080] The thresholds and structuring element sizes mentioned above are optimized values ​​for the dataset used in this embodiment. Those skilled in the art can adjust the specific values ​​of the above parameters through conventional experiments based on the actual imaging equipment, scanning protocol, and data distribution.

[0081] A2. Segmentation Network Architecture Construction and Parameter Initialization

[0082] This invention employs an Encoder-Decoder segmentation network based on UNet++. UNet++ was chosen as the basic architecture because its nested skip connection structure can better integrate multi-scale features, making it suitable for segmenting small lesions in medical images. The encoder backbone uses a ResNet34 pre-trained on ImageNet, retaining its first four residual blocks, with output channels of 64, 128, 256, and 512 respectively. Each residual block contains two 3×3 convolutional layers and one skip connection. After loading the pre-trained weights, the mean and variance parameters of all batch normalization (BN) layers in the encoder are frozen, and only the convolutional layer weights are trained. This is because medical images and natural images have certain similarities in their underlying features; freezing the BN layers can preserve the feature extraction capability of the pre-trained model while avoiding the problem of inaccurate BN layer statistics under small-batch training. To adapt to single-channel medical image input, the number of input channels of the first 7×7 convolutional layer of the original ResNet34 is changed from 3 to 1, and the convolutional kernel weights are converted from the mean of the 3 channels, calculated using the following formula: Ensure the weight initialization is reasonable.

[0083] The decoder is based on the nested skip-connect structure of UNet++, containing four upsampling blocks. Each upsampling block consists of one 2×2 deconvolutional layer, two 3×3 convolutional layers, and one group normalization (GN) layer. All BN layers in the original UNet++ are replaced with GN layers. Each group contains 32 channels. If the number of channels in a layer is not divisible by 32, it is adjusted to the nearest integer. For example, when the last layer has 64 channels, it is divided into two groups of 32 channels each. This design significantly improves stability under mini-batch training because the statistics of the GN layer are calculated within each group of channels, regardless of the batch size. All convolutional layers are followed by the ReLU activation function. The segmentation head uses a 1×1 convolutional layer to map the 64-channel features of the last layer of the decoder to a 2-channel class probability map. Finally, a sigmoid activation function is used to output pixel-level predicted probabilities. Simultaneously, a 512-dimensional high-dimensional bottleneck feature is extracted from the output of the last residual block of the encoder for subsequent prototype alignment calculations.

[0084] For parameter initialization, the encoder uses ImageNet pre-trained weights for all layers except the first convolutional layer, and the newly added 1-channel input convolutional layer is initialized using the Kaiming normal distribution. All convolutional layers in the decoder and segmentation head are initialized using the Kaiming normal distribution, with the weights of the GN layer initialized to 1 and the biases initialized to 0. If gradient explosion occurs during training, an L2 norm constraint is applied to the weights of all convolutional layers, with the maximum norm set to 1.0.

[0085] A3. Multi-perspective reliability-guided pseudo-label learning

[0086] The multi-view reliability-guided pseudo-label learning module is the core of this invention in solving the problem of supervised contamination. Its design motivation stems from the fact that clinical domain offset can generate differentiated pseudo-label noise at the pixel, region, and sample levels: pixel-level noise mainly originates from boundary blurring caused by changes in imaging contrast; region-level noise mainly originates from morphological distortion caused by differences in scanning protocols; and sample-level noise mainly originates from global distribution offset caused by differences in patient groups. Reliability modeling from a single viewpoint cannot comprehensively suppress these multi-source noises. Therefore, this invention forms a complementary reliability assessment system through joint modeling from three perspectives.

[0087] A31. Pixel-level statistical reliability modeling. Pixel-level probability plots output by weakly enhanced branches. As input, first calculate the normalized prediction entropy for each pixel. It is used to quantify the uncertainty of prediction, and the calculation formula is:

[0088]

[0089] in The number of categories for the binary classification task. To find the maximum entropy value of class C, normalize the entropy value to the interval [0,1]. When =0, define To avoid numerical errors, pixel-level statistical reliability weights are generated based on this uncertainty measure using an exponential decay function.

[0090]

[0091] in =2.5 is the entropy decay coefficient. This parameter controls the strength of the penalty for prediction uncertainty. The larger the value, the heavier the penalty for high-entropy pixels, and the faster the reliability weight decreases; The smaller the value, the lighter the penalty, and more pixels will be included in the supervision. When the target domain offset is large and the false label noise is high, the value can be appropriately increased. To filter out more noise, the value can be increased to 3.0-3.5; when the domain offset is small, it can be reduced. To retain more effective monitoring signals, the value is adjusted to 1.5-2.0. This invention determines the range [1.0, 4.0] using a grid search. =2.5 is the optimal value, at which point the model achieves the best balance between noise suppression and sufficient supervision. The exponential decay function is chosen over the nonlinear function because the exponential function can impose a stronger penalty on pixels with high uncertainty while maintaining a higher weight on pixels with low uncertainty, which better reflects the distribution characteristics of pseudo-label noise. To compensate for the limitation that entropy values ​​cannot fully reflect the strength of class decision-making, the maximum predicted probability for each pixel is further calculated: This value directly measures the confidence level of the most likely class at a pixel, complementing the entropy value and together forming the statistical basis for reliability modeling.

[0092] A32. Regional-level structural reliability modeling. To address the issue of pseudo-labels with high local confidence but unreasonable morphology under domain offset, a morphological prior-guided correction strategy is introduced. Colorectal cancer lesions exhibit certain statistical regularities in morphology; for example, their area is typically between 20-500 pixels, compactness between 1.5-3.0, and solidity between 0.6-0.9. This prior knowledge can effectively filter out pseudo-labels with abnormal morphology.

[0093] First, pseudo-labels are generated based on weak enhancement branches. ,right Perform 8-connected component analysis on the foreground region with a value of 1 to obtain all candidate lesion regions. If the area of ​​a connected component is less than 5 pixels, it is considered noise and discarded, and not included in subsequent calculations. For each retained connected component R, three complementary morphological features are extracted: area (number of pixels contained in the connected component); compactness; and density. Perimeter(R) is the perimeter of the connected component; the compactness of a circle is 1, and the more irregular the shape, the greater the compactness; solidity ,in The area of ​​the convex hull of the connected components is represented by a solidity value closer to 1, indicating a more complete region structure. Based on statistical results of lesions accurately labeled in the source domain, the mean values ​​of the three features were obtained. and standard deviation The mean area was 128.6 with a standard deviation of 85.2; the mean compactness was 2.1 with a standard deviation of 0.8; and the mean solidity was 0.78 with a standard deviation of 0.12. For each candidate region R, its structural consistency score with the prior source domain was calculated. , in, =0.4、 =0.3、 =0.3 represents the weight of each morphological feature, determined through grid search. The area weight is the largest because area is the most significant feature for distinguishing lesions from noise. The structural consistency score s(R) is propagated to all pixels within the connected components to obtain the region-aware structural signal s(x). The pixel-level confidence score is then fused to obtain the fusion reliability score. ,in, =0.6 is the fusion coefficient. It is determined within the range [0.3, 0.9] through grid search, balancing the contributions of pixel-level and region-level information. The larger the value, the more it relies on pixel-level confidence. The smaller the value, the greater the reliance on region-level structural priors. Finally, the structure-aware reliability weight is calculated based on the fusion score. ,in, =1.0 is the attenuation intensity coefficient. This design effectively suppresses predictions with high local confidence but unreasonable structure.

[0094] A33. Sample-level distribution calibration. This calibrates the distribution bias of pseudo-labels at the global image level to avoid over-segmentation or under-segmentation of the entire image. In clinical data, the foreground proportion of colorectal cancer lesions is typically between 2% and 15%. If the foreground proportion of pseudo-labels in an image exceeds this range, there is a high probability of global distribution bias. First, a dynamic annealing confidence threshold that gradually increases with training iterations is used, calculated as follows:

[0095] in, The current iteration number is [number], with a total of 15000 iterations. The initial threshold is 0.5, and the final threshold is 0.8. The effective supervision set is gradually expanded. A hard confidence mask is generated based on this dynamic threshold. ,in This is an indicator function, set to 1 if the condition is met, and 0 otherwise. Then, the pseudo-label foreground proportion of the current sample is calculated. ,in, Let be the total number of pixels in the image. Based on source domain statistics, the expected foreground ratio range is [0.02, 0.15]. Calculate the normalized bias:

[0096]

[0097] Generate sample-level scaling factors based on the deviation: ,in, =1.0 is the penalty intensity coefficient, when When it exceeds the expected range, It decreases linearly as the deviation increases; when When ≥1, =0, this sample does not participate in pseudo-label supervision. For extreme cases, if... =0 (no prospect forecast) or >0.5 (severe over-segmentation), set directly =0, to avoid introducing serious noise.

[0098] A34. Generation of Multi-View Reliability Weighted Field. The final multi-view reliability weighted field is generated by integrating the above signals. The calculation formula is as follows: ,in, Minimum weights for low-confidence pixels, used to preserve the basic gradient flow. For pixels that pass the confidence threshold, [the following is applied]: and Joint weighting; pixels that fail to meet the threshold are assigned minimal weights, retaining only a weak gradient signal.

[0099] A35. Calculate the self-training loss. Based on the multi-view reliability weighted field, calculate two complementary self-training losses: the multi-view reliability weighted pseudo-label loss. and category-aware consistency loss . The predictions used to supervise the strong enhancement branches are consistent with the pseudo-labels generated by the weak enhancement branches, and the calculation formula is as follows:

[0100]

[0101] in, To enhance the predicted probability of the branch, the predicted probability of category c at pixel x is... To avoid the small constant of division by zero, this loss provides stronger supervision for reliable region assignment across all three perspectives. To ensure consistent prediction distributions for strong and weak enhancement branches, and to apply additional weights to lesion pixels to mitigate class imbalance, the calculation formula is as follows:

[0102]

[0103] in, =3.0 is the foreground enhancement coefficient. The KL divergence is calculated using the following formula: KL divergence encourages strong enhancement predictions to align with weak enhancement reference distributions, while foreground weighting strengthens the constraint on lesion pixels.

[0104] A4. Reliability-Aware Lesion Prototype Alignment

[0105] The reliability-aware lesion prototype alignment module is the core of this invention in solving the feature drift problem. Its design motivation stems from the fact that self-training methods can only optimize pseudo-label quality in the output space, failing to fundamentally address the inherent differences in feature distribution between the source and target domains. Furthermore, traditional cross-domain alignment methods are prone to introducing semantic noise due to the alignment background. A prototype is a feature center for a certain category, representing the core semantics of that category. Aligning only lesion prototypes allows the model to focus on task-related discriminative semantics, avoiding noise interference from the background region. Simultaneously, using a multi-view reliability-weighted field to guide prototype construction can filter out noisy features, generating semantically pure target domain lesion prototypes.

[0106] A41. Target domain lesion prototype construction. 512-dimensional features of target domain pixels are extracted from the encoder bottleneck layer. Only pixels with pseudo-labels indicating lesions and confidence levels reaching the prototype aggregation threshold are used for weighted aggregation. The calculation formula is as follows:

[0107]

[0108] in, =0.9 is the prototype aggregation confidence threshold, which retains only pixels with extremely high confidence to ensure the semantic purity of the prototype. The value of needs to balance the purity and representativeness of the prototype. Too high a value will result in too few pixels participating in the aggregation, leading to insufficient representativeness of the prototype; if... Too low a value will introduce noisy features, resulting in impure prototype semantics. This invention determines the value within the range [0.7, 0.95] using a grid search. =0.9 is the optimal value. For special cases, if there are no pixels in the current batch that meet the conditions, skip this prototype update, use the target domain prototype from the previous iteration, and apply the prototype alignment loss from this iteration. Set to 0 to avoid gradient vanishing; if no valid prototype pixels are found in 10 consecutive batches, reduce the value appropriately. We will gradually restore it after the model performance is improved.

[0109] A42. Source Domain Lesion Prototype Construction and Update. Based on the ground truth annotations in the source domain, lesion features are extracted to construct an initial source domain prototype, which is then updated using an exponential moving average. Before training begins, the initial source domain prototype is calculated using features from all lesion pixels in the source domain training set. ,in To provide a true annotation of the source domain, These are the encoder features for the source domain pixels. The source domain prototype is updated once per training batch, using the following formula:

[0110]

[0111] in, =0.99 is the EMA momentum coefficient. This represents the source domain pixel space for the current batch. The reason for using the EMA method instead of a fixed prototype or recalculation per round is that EMA can smooth feature fluctuations between batches, maintain the stability of the source domain prototype, and slowly absorb improvements in the model's feature extraction capabilities. The larger m is, the slower the prototype update and the higher the stability; the smaller m is, the faster the prototype update and the better it reflects the latest state of the model. This invention chooses m=0.99 because this value achieves the best balance between stability and adaptability.

[0112] A43. Prototype Alignment Loss. Based on the source and target domain prototypes, calculate the reliability-aware lesion prototype alignment loss: This loss explicitly pulls the reliable target domain lesion representation toward the source domain lesion prototype. Since background regions typically exhibit significant appearance variations across different domains, forced background alignment introduces spurious signals and weakens cross-domain discrimination capabilities. Therefore, this invention aligns only the lesion category, allowing the model to focus on task-relevant discriminative semantics and avoid interference from uninformative background changes. If the target domain prototype is not updated, then... =0, not included in this loss calculation.

[0113] A5. Model Training and Optimization

[0114] The overall joint loss function is composed of a weighted average of the source domain supervision loss, the multi-view reliability weighted pseudo-label loss, the category-aware consistency loss, and the prototype alignment loss. The calculation formula is as follows:

[0115]

[0116] The weighting coefficients for each loss term are as follows: =1.0、 =0.1、 =0.3, and the optimal value was determined in the interval [0.1,2.0] through grid search. =1.0 because pseudo-label loss is the core of self-training in the target domain; =0.1 because consistency loss is an auxiliary loss, and excessive weights will lead to model overfitting and enhancement transformation; =0.3 because the prototype alignment loss operates on the feature space; excessively large weights would cause the model to over-align source domain features, losing unique information from the target domain. The source domain supervision loss Lsrc is composed of a weighted average of the cross-entropy loss and the Dice loss, each with a weight of 0.5. Cross-entropy loss Dice loss , One-hot encoding of the source domain as actually labeled. denoted as the predicted probability of the source domain image. Cross-entropy loss can optimize pixel-level classification accuracy, while Dice loss can alleviate class imbalance. Combining the two can achieve better segmentation results.

[0117] The optimizer uses stochastic gradient descent (SGD) with momentum set to 0.9 and weight decay set to 5 × 10⁻⁶. -4 The learning rate employs a tiered learning rate strategy, with an initial learning rate of 2.5 × 10⁻⁶. -4 The encoder learning rate multiplier is 1×, the decoder is 2×, and the segmenter is 5×, to accelerate the convergence of the decoder and segmenter. The learning rate decay uses a polynomial decay strategy with a power of 0.9, calculated using the following formula: Polynomial decay can maintain a low learning rate in the later stages of training, which is beneficial for the model to converge to a better local minimum. The total number of training iterations is 15,000, with a batch size of 8. Each batch contains 4 labeled source domain images and 4 unlabeled target domain images. The source and target domain samples are randomly sampled from their respective training sets. The random seed of the data loader is set to 42, and a warm-up phase of 750 iterations is set, during which only the source domain supervised loss is used for the first 750 iterations. Training does not introduce target domain loss, ensuring the model acquires basic segmentation capability in the source domain. During training, the L2 norm of all gradients is pruned, and the maximum norm is set to 1.0 to prevent gradient explosion. An early stopping strategy is employed: if the Dice coefficients on the validation set show no improvement after 2000 consecutive iterations, training is terminated early to preserve the optimal model weights. During the inference phase, only the trained Encoder-Decoder network is used; no data augmentation or module computation is performed.

[0118] To address common anomalies during training, this embodiment provides the following standardized handling solutions:

[0119] (1) No valid prototype pixels: If there are no valid prototype pixels in the target domain image of the current batch, skip the current prototype update, use the target domain prototype of the previous iteration, and set the prototype alignment loss of the current iteration to 0; if there are no valid prototype pixels in 10 consecutive batches, appropriately reduce the prototype aggregation confidence threshold.

[0120] (2) Category distribution shift handling: If statistics show that the foreground proportion of pseudo-labels in the target domain is consistently lower than that of the target domain, or higher Then adjust the penalty strength of the sample-level scaling factor. At the same time, the perturbation intensity of the strong enhancement branch is appropriately adjusted to increase the diversity of difficult samples.

[0121] (3) Loss oscillation handling: If the total loss suddenly oscillates by more than 20% during training, the learning rate is reduced to half of the original value, and the encoder parameters are frozen for 500 iterations. Normal learning rate and parameter updates are restored after the loss stabilizes.

[0122] (4) Overfitting treatment: If the Dice coefficient of the source domain validation set continues to rise while the Dice coefficient of the target domain validation set continues to fall, then increase the weight decay coefficient to 1×10. -3 At the same time, it enhances the perturbation intensity of the strong-strength branch.

[0123] To address anomalies during the inference phase, this embodiment provides the following standardized handling scheme:

[0124] (1) Handling inconsistencies in continuous reasoning across multiple slices: For continuous slices of 3D MRI sequences, 3D Conditional Random Field (CRF) is used to smooth the segmentation results of adjacent slices to ensure that the segmentation results of the same lesion are continuous on adjacent slices.

[0125] (2) False positive filtering: If multiple isolated small lesions (area less than 10 pixels) appear in the prediction results, the one with the largest area is retained, and the rest are regarded as false positives and removed.

[0126] (3) Handling inconsistent input sizes: If the input image size is inconsistent with the training size, bilinear interpolation is used to scale the image to 192×192. After inference, the mask is scaled back to the original size. If the lesion area output during inference is less than 5 pixels or greater than 50% of the image area, it is marked as a suspicious result and manually reviewed.

[0127] Experimental Analysis

[0128] To better illustrate the effects of the present invention, the specific implementation results of the present invention are described below:

[0129] Comparative experiments with existing methods show that the present invention achieves optimal performance across all five evaluation metrics. Compared to the current best MSCDA method, the Dice coefficient is improved from 0.772 to 0.785, and the average symmetry surface distance is reduced from 2.43 to 2.08, a relative reduction of 14.4%, with a difference of only 4.7 percentage points from the Dice limit of fully supervised methods. This result fully demonstrates that the present invention can effectively recover the segmentation performance of the target domain without using any target domain annotations. Figure 2 Qualitative comparison results show that the model trained using only the source domain has serious problems of missed detection and oversegmentation; CycleGAN and SIFA methods can recover some lesion areas, but the contours are rough and there are obvious structural errors; the segmentation results of the MSCDA method have been significantly improved, but there are still boundary deviations and local structural anomalies; the segmentation mask generated by this invention is closest to the real annotation in terms of lesion range and shape, with complete lesion coverage and clear boundaries, and can effectively handle the significant domain shift problem caused by differences in imaging conditions in clinical scenarios.

[0130] Ablation experiments show that adding the Multi-View Reliability-Guided Pseudo-Label Learning (RGPL) module improves the Dice coefficient from 0.735 to 0.758 and reduces the average symmetry surface distance from 2.95 to 2.38, indicating that the RGPL module effectively improves the reliability of pseudo-label supervision. Further adding the Reliability-Aware Lesion Prototype Alignment (RLPA) module increases the Dice coefficient to 0.785 and reduces the average symmetry surface distance to 2.08, demonstrating that the RLPA module provides additional performance improvement through precise cross-domain feature alignment. This result reveals the complementarity of the two modules: RGPL operates in the output space, improving supervision quality by filtering noisy pseudo-labels, but it cannot fundamentally address the inherent differences in feature distribution between the source and target domains; RLPA operates in the feature space, explicitly aligning lesion prototypes to pull target domain features towards the semantic center of the source domain. The synergistic effect of the two modules forms a positive feedback loop, which is the core reason why the performance of this invention is significantly better than single-module methods. Ablation experiments on the internal sub-components of the RGPL module show that removing any one of the sub-components—pixel-level statistical reliability, region-level structural reliability, or sample-level distribution calibration—leads to performance degradation. Removing pixel-level statistical reliability causes the greatest performance degradation, indicating that statistical reliability is the main factor in suppressing local pseudo-label noise. Region-level structural reliability and sample-level distribution calibration provide complementary reliability information at the region and sample levels, respectively. The combination of the three achieves the best pseudo-label quality improvement effect.

[0131] The training dynamics analysis results reveal the underlying mechanism by which this invention can stabilize the training process. For example... Figure 3 As shown in (a), the baseline model shows improved performance in the early stages of training, but its performance deteriorates significantly in the later stages due to error accumulation. This is because the baseline model cannot suppress pseudo-label noise; erroneous supervision signals continuously impair target domain representation learning, forcing the target feature encoder to update in the wrong direction. This causes the representation to deviate from the true semantic distribution and produce representation drift. The drifted features further weaken the discriminative ability, which in turn worsens the quality of pseudo-labels, ultimately creating a vicious cycle. The model with only the RGPL module can stabilize the training process and avoid performance degradation because the RGPL module filters out most of the noisy pseudo-labels through multi-view reliability modeling, reducing supervision pollution. Figure 3As shown, the complete model of this invention maintains the highest Dice coefficient for most stages of training, while rapidly reducing the L2 distance between the source and target domain lesion prototypes to a low level. This indicates that the synergistic effect of the RGPL and RLPA modules achieves a stable optimization process and good convergence. The curve showing the change in the proportion of high-confidence pseudo-labels reveals that although the baseline model rapidly accumulates a high proportion of confident pseudo-labels, this fails to translate into sustained segmentation gain. This phenomenon reveals that the number of pseudo-labels is an unreliable supervisory quality proxy, and explicit reliability control is crucial to preventing error accumulation under domain shift.

[0132] Hyperparameter sensitivity analysis results show that the present invention maintains stable and excellent performance within a reasonable hyperparameter range. For example... Figure 4 As shown in (a), the reliability fusion coefficient The optimal performance is observed in the range [0.5, 0.7], indicating that both pixel-level confidence and region-level structural priors are essential; extreme values ​​lead to performance degradation. Figure 4 As shown in (b), prototype alignment weights The optimal value is 0.3. Smaller values ​​lead to insufficient alignment, while larger values ​​cause the model to over-align source domain features, losing unique information from the target domain. Figure 4 As shown in (c), the entropy decay coefficient The method exhibits stable performance within the range of [1.5, 3.5], verifying its robustness.

[0133] Example 2: Semi-supervised adaptive MRI segmentation of colorectal cancer

[0134] This embodiment optimizes the core method of the present invention for a real-world clinical scenario where the target domain has limited labeled data. It combines a small amount of real-world labeled data with pseudo-labels to further improve segmentation performance. In clinical practice, while labeling the entire target domain is not feasible, a small number of expert-annotated samples are usually available. Utilizing this labeled data can significantly improve the model's generalization ability.

[0135] For data partitioning, 10% of patients were randomly selected from the target domain training set as the labeled set, and the remaining 90% as the unlabeled set. The labeled set was annotated at the pixel level by experts. During training, each iteration sampled 3 images from the source domain training set, 1 image from the target domain labeled set, and 4 images from the target domain unlabeled set, forming a training batch with a batch size of 8. The supervised loss was calculated for the source domain images and the target domain labeled images, while the unlabeled target domain images underwent the same pseudo-label learning and prototype alignment process as in Example 1.

[0136] The overall joint loss function is adjusted to ,in The supervised loss for labeled images in the target domain is calculated in the same way as... The parameters are identical to those in Example 1, with a weight of 1.0. The total number of iterations remains at 15,000. Experimental results show that when the target domain has 10% labeled data, the Dice coefficient of the target domain increases to 0.805, narrowing the gap with the upper limit of fully supervised learning to 2.7 percentage points, fully demonstrating the excellent performance of this method in semi-supervised scenarios. Further experiments show that even with only 5% labeled data in the target domain, the Dice coefficient of this method can still reach 0.796, indicating that this method can efficiently utilize a small amount of labeled data to improve model performance.

[0137] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A domain-adaptive segmentation method for colorectal cancer MRI, characterized in that, Includes the following steps: S1 Source and target domain data preprocessing and input; S2 network forward propagation: The preprocessed source domain image and target domain image are input into the Encoder-Decoder segmentation network with shared parameters. The source domain image outputs the segmentation prediction result, and the target domain image is processed by the weak enhancement branch and the strong enhancement branch respectively, and outputs the pixel-level segmentation probability map and the bottleneck layer high-dimensional feature map. S3 Source Domain Supervised Training: Calculate the source domain supervised loss based on the segmentation prediction results and ground truth annotations of the source domain image. Backpropagation optimizes network parameters; the source domain supervised loss It is composed of a weighted average of cross-entropy loss and Dice loss; S4 Multi-Perspective Reliability-Guided Pseudo-Label Learning: Utilizing the segmentation probability map output by the weak augmentation branch in the target domain, pseudo-label reliability is jointly modeled from three complementary perspectives: pixel-level statistics, region-level structure, and sample-level distribution. From the pixel-level statistical perspective, the normalized prediction entropy and maximum prediction probability of each pixel are calculated, and pixel-level statistical reliability weights are generated through an exponential decay function. From a regional structural perspective, three morphological features—area, compactness, and solidity—are extracted from each connected component in the pseudo-labels of weakly enhanced branches. These features are compared with the statistical distribution of the lesions actually labeled in the source domain to obtain a regional structural consistency score. This score is then propagated to all pixels within the region and fused with the maximum prediction probability to generate a structure-aware reliability weight. ; From a sample-level distribution perspective, a hard confidence mask is generated using a dynamic annealing confidence threshold that gradually increases with training iterations. Calculate the pseudo-label foreground ratio of the current sample and compare it with the expected foreground range of the source domain statistics to generate a sample-level scaling factor. Integrating signals from the above three perspectives generates a reliability-weighted field. Based on this weighted field, the multi-view reliability weighted pseudo-label loss is calculated. and category-aware consistency loss ; S5 Reliability-Aware Lesion Prototype Alignment: Based on the source domain's true annotations, lesion pixels are selected, and the source domain lesion prototype is updated online using an exponential moving average method. ; Based on target domain multi-view reliability weighted field By aggregating the prototype with a confidence threshold, pixels with pseudo-labels that are lesions and meet the confidence threshold are selected. These pixels are then weighted according to reliability to generate semantically pure target domain lesion prototypes. ; Calculate the L2 distance between the lesion prototypes in the source and target domains as the prototype alignment loss. Align only lesion category characteristics; S6 Joint Optimization: Constructing a source domain supervised loss Multi-view reliability-weighted pseudo-label loss Category-aware consistency loss Alignment loss with prototype The weighted overall joint loss function is used to train the network end-to-end using the stochastic gradient descent algorithm with momentum, resulting in a colorectal cancer segmentation model adapted to the target domain.

2. The method according to claim 1, characterized in that, The specific steps of the data preprocessing are as follows: (1) Source domain data preprocessing: DICOM parsing and window width and window level adjustment, grayscale conversion, ROI cropping, percentile truncation intensity normalization and mask binarization are performed in sequence; ① Window width and window level adjustment: For T2-weighted MRI of colorectal cancer, a window width of 300-400HU and a window level of 50-100HU are used to stretch the signal intensity of the region of interest to the range of 0-255 gray level. ②ROI cropping: For positive slices, calculate the coordinates of the center of the smallest bounding rectangle of the lesion mask, and crop a square region of 128×128, 192×192 or 256×256 based on this center; for negative slices, crop a region of the same size based on the geometric center of the image. ③Intensity normalization: The 0.5-2 percentile and 98-99.5 percentile are used to truncate pixel values ​​that are out of range, and then linearly mapped to the [-1,1] interval; (2) Preprocessing of target domain data: A weak-strong dual-branch parallel enhancement strategy is adopted. The same target domain MRI image is simultaneously input into two independent enhancement branches to generate weak enhancement images and strong enhancement images respectively; ① Weak enhancement branch: Performs only minor geometric transformations of random horizontal and vertical flips, each with a flip probability of 0.5; ② Strong enhancement branch: Performs a large-scale perturbation using the following combination: random rotation: angle range is [ , The system employs bilinear interpolation; random scaling: the scaling factor ranges from [0.7, 1.3]; random translation: both horizontal and vertical translation ranges are [-15, 15] pixels; random elastic deformation: control parameters... =10-20、 =2-4, using bilinear interpolation.

3. The method according to claim 1, characterized in that, Multi-view reliability-guided pseudo-label learning jointly models pseudo-label reliability from three complementary levels: pixel-level statistics, region-level structure, and sample-level distribution, and generates a multi-view reliability weighted field. The specific process is as follows: (1) Pixel-level statistical reliability modeling: Based on the category prediction probability of the weak enhancement branch output, calculate the normalized prediction entropy of each pixel. and maximum prediction probability Pixel-level statistical reliability weights are generated using an exponential decay function. Quantify the prediction uncertainty and decision confidence of each pixel; ;in, This is the entropy decay coefficient, with a value ranging from 1.5 to 3.5, used to control the intensity of the penalty for prediction uncertainty; (2) Regional-level structural reliability modeling: Three morphological features, namely area, compactness, and solidity, are extracted from the pseudo-labels generated by the weak enhancement branches. These features are compared with the statistical distribution of the real labeled lesions in the source domain to obtain the regional-level structural consistency score s(R). The score is then propagated to all pixels in the region to obtain the regional-aware structural signal s(x). The s(x) is then compared with the maximum prediction probability. Fusion generation fusion reliability score Then, structure-aware reliability weights are generated through an exponential decay function. ; ; ;in, This represents the fusion coefficient between pixel-level confidence and region-level structural consistency. This is the structural weight attenuation coefficient; (3) Sample-level distribution reliability modeling: A dynamic annealing confidence threshold that gradually increases with training iterations is adopted. Generate hard confidence mask Simultaneously, the pseudo-label foreground ratio r of the current sample is calculated and compared with the expected foreground range obtained from the source domain statistics. , The normalized bias was obtained by comparison. This leads to the generation of sample-level scaling factors. To calibrate the global distribution bias of the entire image; ;in, This is a sample-level penalty intensity coefficient used to control the degree of penalty for global distribution bias; (4) Multi-view reliability weighted field: Integrate pixel-level, region-level and sample-level signals to generate a multi-view reliability weighted field. The calculation formula is: ;in, The minimum weight for low-confidence pixels is set to a value of [value]. It is used to preserve the basic gradient flow for low-confidence pixels.

4. The method according to claim 1, characterized in that, The multi-view reliability-weighted pseudo-label loss The calculation formula is: ;in The pseudo-label generated for the weak enhancement branch represents the value of category c at pixel x. ϵ is a small constant used to avoid division by zero, representing the predicted probability of class c at pixel x for the strong enhancement branch.

5. The method according to claim 1, characterized in that, The category-aware consistency loss The calculation formula is: ; in and These are the probability distributions predicted by the weak enhancement branch and the strong enhancement branch, respectively. This is the foreground enhancement coefficient, with a value of 3.0, used to alleviate the class imbalance problem in medical images; KL divergence is used to measure the difference between two probability distributions.

6. The method according to claim 1, characterized in that, The process involves constructing source domain lesion prototypes and target domain lesion prototypes and calculating prototype alignment loss. The specific process is as follows: Constructing a prototype of the target domain lesion. The calculation formula is: ; in For target pixels encoder feature vector, Aggregate confidence thresholds for the prototype. Construct and update the source domain lesion prototype online. Using the exponential moving average method, the update formula is as follows: ; in For the source domain pixel space, To accurately label the source domain, For source domain pixels eigenvectors, The EMA momentum coefficient, with a value of 0.99, is used to smooth inter-batch characteristic fluctuations; the reliability-aware lesion prototype alignment loss is calculated. The calculation formula is: ;in It is the square of the L2 distance, which only calculates the prototype distance of the lesion category and does not include the background category.

7. The method according to claim 1, characterized in that, When there is a small amount of labeled data in the target domain, the supervised loss of the labeled data in the target domain will be reduced. By incorporating a global joint loss function, a semi-supervised adaptive segmentation method is formed; the target domain supervised loss... The calculation method and source domain supervision loss They are exactly the same, with a weight of 1.

0.

8. The method according to claim 1, characterized in that, The overall loss function of the constructed deep neural network model is expressed as: ;in, The source domain supervision loss consists of cross-entropy loss and Dice loss; A multi-view reliability-weighted pseudo-label loss is used to optimize the prediction of the strong enhancement branch; This is a category-aware consistency loss used to improve prediction consistency under strong perturbations; A reliability-aware lesion prototype alignment loss is used to reduce cross-domain feature differences; =1.0、 =0.1 and =0.3 is the weighting coefficient for each loss term.

9. A segmentation system for domain-oriented adaptive colorectal cancer MRI using the method described in any one of claims 1-8, characterized in that, include: Data preprocessing module: used for preprocessing the source and target domain data; The segmentation network module adopts an Encoder-Decoder architecture based on UNet++ to perform the network forward propagation operation; the multi-view reliability-guided pseudo-label learning module is used to perform the pseudo-label reliability modeling and self-training loss calculation operations. Reliability-aware lesion prototype alignment module: used to perform the source domain and target domain lesion prototype construction and alignment operations; Model training module: Used to perform the joint loss calculation and network parameter optimization operations.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-8.