Self-supervised few-sample medical image segmentation method based on multilevel consistency constraint

By employing a self-supervised method with multi-level consistency constraints, the semantic shift problem caused by pseudo-label noise in self-supervised few-sample medical image segmentation is solved, achieving more efficient medical image segmentation results and improving the robustness and generalization ability of the model.

CN121811034APending Publication Date: 2026-04-07UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing self-supervised few-shot medical image segmentation methods suffer from semantic shifts caused by pseudo-label noise and insufficient model generalization ability, especially under complex structures and low contrast conditions, resulting in poor segmentation performance.

Method used

A self-supervised method with multi-level consistency constraints is adopted. Feature maps are extracted through feature encoders, and a full-link optimization mechanism is constructed by combining global prototype extraction, feature consistency, prototype consistency and prediction consistency constraints to suppress pseudo-label noise and improve model robustness.

Benefits of technology

It significantly improves the robustness and cross-domain generalization ability of the model, especially maintaining stable and coherent structural segmentation results under conditions of blurred organ boundaries and low contrast, and improving the Dice coefficient by 1%–3%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811034A_ABST
    Figure CN121811034A_ABST
Patent Text Reader

Abstract

The invention discloses a self-supervised few-sample medical image segmentation method based on multilevel consistency constraint, and belongs to the technical field of medical image segmentation, and the method specifically comprises the steps: extracting a support feature map and a query feature map; carrying out support global prototype extraction; after an initial prediction map is generated, combined optimization is carried out in combination with three-layer constraints; geometric invariance and feature robustness are improved through feature consistency constraint; bidirectional prototype calibration and steady-state semantic alignment are realized through prototype consistency constraint; and bidirectional verifiable prediction is formed through prediction consistency constraint, and the overall robustness is improved. According to the method, the consistency constraint is jointly applied to the three aspects of features, prototypes and prediction, a full-link optimization mechanism is constructed, semantic drift caused by pseudo tag noise is effectively inhibited, the robustness and cross-domain generalization ability of the model are remarkably improved, and the method has important application value in clinical auxiliary diagnosis and multi-modal image analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image segmentation technology, specifically a self-supervised few-sample medical image segmentation method based on multi-level consistency constraints. Background Technology

[0002] Medical image segmentation is a key task in computer-aided diagnosis and clinical decision-making, playing a crucial role in numerous medical applications such as organ delineation, lesion localization, treatment planning, and intraoperative navigation. In recent years, with the rapid development of deep learning technology, medical image segmentation models based on fully supervised learning have made significant progress in various image modalities. However, these methods often rely on large amounts of high-quality labeled data, and pixel-by-pixel annotation of medical images requires professional radiologists, which is labor-intensive and time-consuming. At the same time, data privacy protection and imaging differences between different institutions also make the collection of large-scale labeled data very difficult. These limitations greatly restrict the practical application of existing fully supervised segmentation models in clinical practice.

[0003] To address this issue, few-shot medical image segmentation has been proposed as a novel learning paradigm. This method can segment unseen categories with only a few labeled samples, demonstrating great potential in medical image analysis. Its core idea is to learn transferable feature representations from a small number of support images and use these representations to guide the segmentation of similar structures in query images. This method effectively reduces annotation costs and has strong task adaptability, making it very suitable for use in data-scarce medical scenarios. To further reduce the need for manual annotation, researchers have proposed self-supervised few-shot medical image segmentation methods. These methods utilize unlabeled images to generate pseudo-labels, enabling the model to learn meaningful image features without human supervision. A common approach is to use clustering or region partitioning algorithms to generate pseudo-labels, such as segmentation methods based on superpixels or supervoxels. This strategy effectively reduces the cost of manual annotation while maintaining the deep learning model's ability to learn complex structures.

[0004] Among numerous self-supervised few-shot segmentation methods, prototype-based frameworks have become the mainstream research direction. These methods extract feature prototypes to summarize the semantic information of categories, and then use the similarity between the query image and these prototypes for segmentation. Recent studies generally tend to design more complex prototype extraction or prototype refinement modules in order to obtain more representative and discriminative prototype representations. However, such complex prototypes are highly susceptible to interference from pseudo-label noise, which can lead to semantic shifts. Specifically, these methods typically capture fine semantics through mechanisms such as local modeling, cluster integration, or structured feature aggregation. However, in this process, local errors in pseudo-labels (such as boundary shifts, region fragmentation, or incorrect connectivity) are amplified by multi-scale or multi-path modeling mechanisms, making the noise gradually explicit and weakening the stability of the prototype. Furthermore, the inaccuracy of pseudo-labels can also lead to the shift of the prototype's semantic center, that is, the prototype feature center is misled to non-target regions or pseudo-structural locations, causing its expression to deviate from the true organ morphology or lesion distribution. This deviation not only destroys the intra-class consistency of the prototype but also weakens its spatial organization and discriminative ability, thereby limiting the model's generalization performance and semantic reliability. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a self-supervised few-sample medical image segmentation method based on multi-level consistency constraints, which solves the problems mentioned in the background.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A self-supervised few-shot medical image segmentation method based on multi-level consistency constraints is proposed. The method is implemented based on a multi-level consistency constraint model, which includes six key modules: feature encoder, global prototype extraction, prediction generation, feature consistency constraint, prototype consistency constraint, and prediction consistency constraint. The method includes the following steps: S1. Input the support image and query image into the feature encoder to extract the support feature map and query feature map; S2. Use bilinear interpolation to adjust the support feature map to the same size as the support mask, and then use mask mean pooling to extract the global prototype of the support feature map. S3. After generating an initial prediction map based on cosine similarity by combining the query feature map with the global prototype input prediction generation module, joint optimization is performed by combining the three-layer constraints of feature consistency, prototype consistency and prediction consistency. S4. In the feature consistency constraint, the query feature map is compared pixel by pixel with its aligned features after affine transformation. The model is constrained to maintain the consistency of feature representation under different geometric transformations, so as to improve geometric invariance and feature robustness. S5. In the prototype consistency constraint, the supporting prototype is first extracted from the supporting features and the mask; the probability map is obtained on the query image using the prototype and the maximum response region is taken to generate the first query pseudo-mask, and the first query prototype is extracted accordingly; the first query prototype is then self-reconstructed on the same query image to obtain the second query prototype; the supporting prototype is then aligned with the two query prototypes, and the same process from query to support is symmetrically executed to achieve bidirectional prototype calibration and steady-state semantic alignment. S6. In the prediction consistency constraint, construct a multi-path reasoning closed loop from support to query, from query to itself, and from query to support; apply pixel-level consistency between each path to keep the segmentation results in different directions consistent in spatial distribution and semantic content, and use the corresponding image mask to supervise the forward and reverse paths to form a bidirectional verifiable prediction between support and query and improve overall robustness.

[0007] Furthermore, the feature encoder adopts a ResNet101 architecture pre-trained on the ImageNet database. After the third stage of the model, a 1×1 convolutional layer is added to reduce the dimension from 1024 dimensions to 512 dimensions. An additional fully connected layer is added in the fourth stage of the model to extract image-level global features. After the image is encoded by the feature encoder, a feature map with a dimension of 512 and scalar values ​​representing global information are obtained.

[0008] Furthermore, the specific process of the mask mean pooling operation in step S2 is as follows: First, the binary mask is expanded in the channel dimension so that it corresponds one-to-one with the feature map in spatial location; then, the feature map and the mask are multiplied element-wise to mask the feature responses of all non-target regions; finally, the remaining foreground features are summed in the spatial dimension and divided by the total number of foreground pixels to obtain a category-level global prototype composed only of target region information, which is formally represented as: in, This represents the spatial location index in the feature map. Represents the set of all spatial locations. To support the feature map at location eigenvalues, To support the mask in position The value.

[0009] Furthermore, the process of generating the initial prediction map in step 3 satisfies the following mathematical expression: in, This represents the Sigmoid function. Indicates the category threshold. To query the feature map at location eigenvalues, To support the global prototype, Represents the prospect probability. Represents the background probability. This is the final initial prediction map.

[0010] Furthermore, the joint optimization objective of the training process is defined as: in, These are the weights of the feature consistency constraint loss, prototype consistency constraint loss, and prediction consistency constraint loss, respectively. The feature consistency constraint loss The calculation process is as follows: in, To query the number of enhanced views for an image, For temperature parameters, the value is 0.5. To query features at location eigenvectors, To enhance view features in location ; The prototype consistency constraint loss The calculation process is as follows: in, This is the first query prototype. This is the prototype for the second query. To find the prototype consistency loss in the supporting direction; The prediction consistency constraint loss The calculation process is as follows: in, , , , For pixel-wise cross-entropy, These are the weighting coefficients. To query the mask, For self-reconstruction prediction based on query-side prototypes, To apply the query-side prototype to the inverse prediction probability map obtained from the supporting image, To find the prediction consistency loss for the supporting direction.

[0011] Furthermore, the geometric transformation used in the feature consistency constraint is a ±10° shearing transformation; on the abdominal MRI and cardiac MRI datasets, the weighting coefficients... The values ​​are (1, 0.5, 0.5, 0.1, 1, 1); on the abdominal CT dataset, the values ​​of the above weight coefficients are (1, 0.5, 0.25, 0.01, 0.25, 1).

[0012] This invention provides a self-supervised few-shot medical image segmentation method based on multi-level consistency constraints, which has the following beneficial effects: This invention constructs a full-link optimization mechanism from low-level structural representation to high-level semantic alignment by jointly applying consistency constraints at three levels: feature, prototype, and prediction. During the training phase, this method utilizes feature consistency to achieve robust representation under geometric deformation, suppresses semantic drift caused by pseudo-label noise through prototype consistency, and ensures the consistency of results between support and query through prediction consistency, thereby significantly improving the model's robustness and cross-domain generalization ability.

[0013] Experimental results on three publicly available datasets—abdominal MRI, abdominal CT, and cardiac MRI—show that the method of this invention outperforms the existing best model under the same experimental settings. The average Dice coefficient is improved by about 1%–3% compared to the second-best method. In particular, it can still maintain stable and coherent structural segmentation results, especially in cases where organ boundaries are blurred and contrast is low.

[0014] This method achieves high-precision segmentation without the need for a complex prototype generation module and relies only on simple mask mean pooling operations. It provides an efficient and practical solution for self-supervised few-sample medical image segmentation and has important application value in clinical auxiliary diagnosis and multimodal image analysis. Attached Figure Description

[0015] Figure 1 This is a diagram illustrating the overall architecture of the multi-level consistency constraint model of this invention. Figure 2 Segmentation results for an abdominal MRI dataset; Figure 3 Segmentation results for an abdominal CT dataset; Figure 4 Segmentation results for a cardiac MRI dataset; Figure 5 Compare normalized similarity maps (range 0–1) between supporting prototypes and query features in different prototype networks; Figure 6The t-SNE visualization comparison shows the difference in feature distribution between our method and DSPNet. From top to bottom, the images are our method and DSPNet, and from left to right, they are the liver, right kidney, left kidney, and spleen. Detailed Implementation

[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0017] like Figure 1 As shown, the multi-level consistency constraint model of the present invention consists of six key modules: feature encoder, global prototype extraction, prediction generation, feature consistency constraint, prototype consistency constraint and prediction consistency constraint.

[0018] First, support image and query images The input is fed into a parameter-shared feature encoder to obtain the supporting feature map. and query feature map The encoder uses a ResNet101 architecture pre-trained on the ImageNet database, and adds a 1×1 convolutional layer after the third stage of the model to reduce the dimension from 1024 to 512. An additional fully connected layer is added in the fourth stage of the model to extract image-level global features. Finally, after an image is encoded by this feature encoder, a 512-dimensional feature map and a scalar value representing global information can be obtained. Next, the bilinear interpolation algorithm is used to transform the supporting feature map. Adjust the length and width to match the supporting mask. Using the same size, the resized support feature map is then subjected to mask mean pooling to extract the global support prototype. In mask mean pooling, the binary mask is first expanded along the channel dimension to correspond one-to-one with the feature map in spatial location. Then, the feature map and the mask are multiplied element-wise to mask out feature responses from all non-target regions. Finally, the remaining foreground features are summed spatially and divided by the total number of foreground pixels to obtain a category-level global prototype composed only of target region information. This process can be formally represented as: in, This represents the spatial location index in the feature map. A set representing all spatial locations; The final prediction is generated by comparing the query feature vector with the supporting prototype and converting their cosine similarity into foreground probabilities; its mathematical representation is as follows: in, This represents the Sigmoid function. Represents the category threshold; the probability plot obtained by the above formula. Denotes the foreground probability, and its complement. The foreground and background probabilities represent the background probability, and concatenating them yields the final output: During training, the model, guided by the consistency framework, achieves joint optimization through three layers of constraints: feature consistency, prototype consistency, and prediction consistency. Feature consistency aims to maintain the consistent feature responses of the same anatomical structure under different views, thereby learning a deformation-invariant representation. First, a slight geometric transformation is randomly applied to the query image, generating... An enhanced view, characterized as follows: ; To ensure consistency in the pixel space, the enhanced features are projected back to the original image coordinate system through an inverse affine transformation, so that the original features... Strictly aligned with each enhanced feature in spatial location; assuming query features In position The eigenvectors are denoted as The vector corresponding to the enhanced view feature is Each pixel The positive sample pairs are ( If other positions are negative samples, then the loss is defined as: in The temperature parameter is set to 0.5; then, the overall feature consistency loss is obtained by averaging the values ​​of all pixels and the enhanced view. Prototype consistency is used to constrain the bidirectional alignment of the support and query images at their semantic centers, thereby suppressing semantic drift caused by pseudo-label noise; the support prototypes obtained in the previous steps are used. For query features Make predictions, obtain the probability map, and take the region with the largest response to obtain the first query pseudomask. Then, based on this pseudo-mask, the query features are... Extract the corresponding first query prototype, its mathematical expression is: Then the first query prototype was used. For query features Perform self-reconstruction prediction and generate a second query pseudomask. Then use the pseudo-mask to query features. Extract the corresponding second query prototype Therefore, the prototype consistency loss supporting the query direction can be calculated from the prototype obtained in the above manner, and its mathematical expression is: Similarly, the prototype consistency loss in the supporting direction can be obtained through a similar process; the final prototype consistency loss is obtained by adding the prototype consistency losses in both directions, and its mathematical expression is: After completing the prototype consistency step, three prediction paths related to the same pair of support and query samples are obtained: query prediction guided by the support prototype, query self-reconstruction prediction based on the query prototype, and reverse prediction returning from the query prototype to the support image. To ensure that the outputs of different inference paths are interpretable and consistent, a prediction-level consistency constraint based on probabilistic graphs is constructed. First, three probabilistic graphs in the query direction are used to define three component losses. The first component loss is the query supervision term, and its mathematical expression is: in For pixel-wise cross-entropy, The first term is the query mask; the second component loss is the query self-consistency term, used to measure the output consistency of the two query paths at the pixel level, and its mathematical expression is: in The first component is a self-reconstruction prediction based on the query-side prototype on the same query image; the third component loss is a support supervision term, used to verify whether the semantics learned by the query side can also interpret the support image, thus forming a bidirectional prediction loop between support and query, which is mathematically expressed as: in To apply the query-side prototype back to the reverse prediction probability map obtained from the support image, the prediction consistency loss from support to query direction can be obtained by weighting the three component losses obtained in the above manner, and its mathematical expression is as follows: in Here, represents the weighting coefficient; similarly, the prototype consistency loss for the supported direction can be obtained through a similar process; the final prediction consistency loss is obtained by adding the prediction consistency losses for the two directions, and its mathematical expression is: This bidirectional representation simultaneously constrains the correctness of different inference paths to their respective masks and their consistency with each other, enabling the prediction results between support and query to be mutually verified and kept coherent. Combining the feature consistency constraint loss, prototype consistency constraint loss, and prediction consistency loss described above, the joint optimization objective of the training process is defined as: in These are the weights of the three consistency terms; through joint optimization, the model can maintain a stable alignment relationship in the feature space, prototype space, and prediction results.

[0019] Experimental verification I. This experiment conducted extensive experiments on three representative medical image segmentation benchmark datasets, including abdominal MRI, abdominal CT, and cardiac MRI datasets. These datasets cover a variety of imaging modalities and organ types, enabling comprehensive validation of the invention under different anatomical structures and contrast features.

[0020] (1) The abdominal MRI dataset is derived from the ISBI 2019 Joint Healthy Abdominal Organ Segmentation (CHAOS) Challenge. The dataset contains 20 sets of T2-SPIR MRI data, each set containing approximately 36 slices. Compared to CT, MRI has the disadvantages of lower contrast and more significant inter-slice variations, making it a more challenging test scenario for few-sample medical image segmentation, especially under pseudo-annotation conditions. This invention selects four common organs for evaluation: left kidney, right kidney, liver, and spleen.

[0021] (2) The abdominal CT dataset was obtained from the Multi-Atlas Abdominal Annotation Challenge (MICCAI2015). This dataset contains 30 sets of enhanced CT volume data from different subjects, each set of which was manually annotated by professional radiologists for 13 types of abdominal organs. Following most previous studies, we selected four representative organs in our experiment: left kidney, right kidney, liver, and spleen.

[0022] (3) The cardiac MRI dataset is derived from the MICCAI2019 Multi-Sequence Cardiac MRI Segmentation Challenge (MS-CMRSeg). This dataset contains 35 three-dimensional cardiac MRI volume data and annotates three anatomical structures: left ventricular myocardium, left ventricular blood pool, and right ventricle. This dataset is widely used to test the model's generalization ability under highly variable cardiac anatomy and intensity distribution.

[0023] Dataset preprocessing: First, the original 3D medical images were normalized to zero mean and unit variance and spatially resampled to unify the intensity distribution and voxel resolution across different cases. Then, the preprocessed 3D volume data was segmented into fixed-size 2D slices of 256×256. 3D superpixel clustering was performed based on the complete volume data to generate pseudo-labels, providing initial structural guidance for subsequent unsupervised training. During training, two random affine transformations (including rotation, translation, scaling, and shearing) and geometric enhancement strategies such as elastic deformation were independently applied to the same slice to obtain two different enhanced views, which served as the support image and query image inputs to the model, respectively. During testing, to simulate small-sample segmentation scenarios, two slices were collected from corresponding anatomical locations of different patients, forming the support image and query image, respectively.

[0024] II. This invention completes training under a single-sample setting, with a total of 30,000 iterations. All experiments are run on an NVIDIA RTX 3090 GPU, with a total training time of approximately 8 hours and peak VRAM usage of approximately 8GB. The experimental framework is implemented on the PyTorch platform, with a runtime environment including Python 3.10, PyTorch 2.1.1, and CUDA 12.1. Regarding optimization strategies, this invention uses the AdamW optimizer for parameter updates, with its weight decay set to... This is used to suppress model overfitting and improve generalization ability. The initial learning rate is set to... The minimum learning rate is Meanwhile, the learning rate scheduler employs a cosine annealing strategy, causing the learning rate to gradually and smoothly decrease during training, thereby improving training stability and assisting model convergence. Considering computational efficiency and memory overhead, in the feature consistency module, this invention reduces the number of query graph augmentations. The weight is set to 2. To maintain the stability of the relative contributions of each loss term on different datasets and achieve better training results, this invention adjusts the weight of the consistency loss ( Empirical settings were implemented. Specifically, (1,0.5,0.5,0.1,1,1) was used on the abdominal MRI and cardiac MRI datasets, and (1,0.5,0.25,0.01,0.25,1) was used on the abdominal CT dataset to accommodate the imaging characteristics and pseudo-label stability differences of different modalities.

[0025] Third, this invention uses the Dice coefficient as the main evaluation index to quantify the performance of the model in medical image segmentation tasks. The Dice coefficient is a widely used region overlap index that can effectively reflect the degree of matching between the prediction results and the reference labels, and it has good stability and sensitivity, especially when organs or lesions are unevenly distributed.

[0026] Let the predicted segmentation region be The real area is Its Dice coefficient is defined as follows: in, These represent the number of pixels (voxels) in the predicted region and the ground truth region, respectively. This indicates the number of overlapping regions between the two. The Dice coefficient ranges from [0,1], with a larger value indicating a closer match between the predicted result and the true label; when Dice=1, it means that the predicted result is completely consistent with the true segmentation.

[0027] Given that this invention uses pseudo-labels as a reference in unsupervised few-shot scenarios, the Dice coefficient not only measures the model's segmentation performance but also indirectly reflects its robustness to pseudo-label noise. In the experimental report, this invention calculates the Dice coefficient for each organ category and further takes the average as the overall performance index to comprehensively evaluate the model's generalization ability across different anatomical structures.

[0028] IV. To verify the effectiveness of the proposed consistency-driven meta-alignment framework, this invention selects five representative advanced few-shot medical image segmentation models—ALPNet, QNet, RPTNet, GMRD, and DSPNet—as control methods. All models are trained and evaluated uniformly under the same training protocol and testing process to ensure the scientific validity and fairness of the comparison results. To guarantee the objectivity and stability of the results, the experiment employs five-fold cross-validation, selecting one fold as the test set each time, while the remaining four folds are used for training. The final result is expressed as the average Dice coefficient of the five folds.

[0029] The results on the abdominal MRI dataset are shown in Table 1. The average Dice similarity coefficient of our method reached 83.19%, significantly better than the 79.58% of the suboptimal model DSPNet. Specifically, in organs with complex structures and significant intensity variations, such as the liver and spleen, the segmentation accuracy of our invention reached 82.32% and 80.71%, respectively, significantly exceeding other methods. At the same time, in the segmentation of the left and right kidneys, we obtained Dice values ​​of 87.38% and 82.36%, respectively, indicating that our invention still has excellent recognition ability when dealing with organs with similar shapes but large differences in grayscale distribution. Figure 2 The visualization results further confirm the quantitative analysis. The present invention can accurately separate the boundaries of adjacent organs, especially showing higher discriminative power at the junction of the left kidney and spleen, while other models often show boundary confusion or local breakage.

[0030] Table 1. Quantitative comparison of different methods on abdominal MRI datasets. Mean Dice coefficients for four organs are reported, with best and second-best results indicated by bold and underline, respectively.

[0031] The results on the abdominal CT dataset are shown in Table 2. The average Dice value of this invention is 79.17%, which also surpasses the current best RPTNet (79.04%) and DSPNet (75.73%). Specifically, it achieves 78.41% and 79.27% ​​in the segmentation of the right and left kidneys, respectively, demonstrating more balanced cross-organ performance while maintaining overall accuracy. In addition, this invention also maintains stable high accuracy in the segmentation tasks of the liver and spleen (79.99% and 79.01%, respectively), effectively suppressing false positives caused by contrast variations. Figure 3 The visualization comparison of different methods shows that the predicted region edges of the present invention are continuous and the shape is intact, while ALPNet and DSPNet often show excessive expansion in the liver region, and RPTNet has a hollow structure, indicating that the present invention has a greater advantage in maintaining organ integrity and boundary consistency.

[0032] Table 2. Quantitative comparison of different methods on the abdominal CT dataset. The mean Dice coefficients for the four organs are reported, with the best and second-best results indicated by bold and underline, respectively.

[0033] On cardiac MRI datasets, this invention also demonstrates superior performance. As shown in Table 3, it achieves Dice values ​​of 72.63%, 92.25%, and 86.25% for the left myocardium, left ventricular blood pool, and right ventricle, respectively, with an average performance of 83.71%, comprehensively surpassing methods such as QNet and RPTNet. Figure 4 The results show that the present invention is more accurate in depicting the ventricular boundary, can effectively avoid the blurry transition at the junction of myocardium and blood pool, and the output mask is highly consistent with the manual annotation.

[0034] Table 3. Quantitative comparison of different methods on cardiac MRI datasets. The mean Dice coefficients for the three organs are reported, with the best and second-best results indicated by bold and underline, respectively.

[0035] The quantitative and qualitative experimental results above demonstrate that the framework proposed in this invention significantly outperforms existing technologies in three representative medical image segmentation tasks, exhibiting higher segmentation accuracy, stronger structure preservation capabilities, and more stable cross-individual generalization performance. Based on a joint constraint mechanism of feature consistency, prototype consistency, and prediction consistency, this invention maintains robust semantic alignment capabilities under different organs, modalities, and noise conditions, effectively suppressing prediction bias caused by pseudo-labeling and generating smoother, more coherent segmentation results that conform to anatomical features.

[0036] V. This invention conducted ablation experiments on an abdominal MRI dataset to comprehensively evaluate the contributions of different consistency components in the multi-level consistency framework and further analyze the impact of geometric transformation intensity in the feature consistency module on model performance. When evaluating the importance of each consistency component, experiments were conducted by removing loss terms one by one, while maintaining consistency in all other training settings. The experimental results are presented as the average Dice coefficients of the four target organs, as shown in Table 4. When removing the prediction consistency term, to ensure the model can still be trained normally, an additional cross-entropy loss between the query prediction and the corresponding query mask was introduced as auxiliary supervision. Even so, the model performance still showed a significant decline, indicating that the alignment of prediction results between supports and queries plays a crucial role in maintaining segmentation stability. When feature consistency constraints or prototype consistency constraints were removed respectively, the model performance showed significant degradation, indicating that both play irreplaceable roles in maintaining stable feature representation and reliable semantic alignment. Specifically, the lack of feature consistency weakens the model's ability to maintain representational stability under geometric and appearance changes, while the lack of prototype consistency disrupts the semantic coordination between support and query prototypes, thus affecting the coherence of the final prediction.

[0037] Table 4 shows the ablation study of the contributions of each consistency component within the multi-level consistency constraint framework of this invention on an abdominal MRI dataset. Each row corresponds to the removal of one consistency constraint while keeping the other constraints unchanged.

[0038] When analyzing the impact of geometric transformation intensity in the feature consistency module, various common image transformation methods were tested, including horizontal and vertical flips, 90°, 180°, and 270° rotations, and shearing transformations of different amplitudes. The ablation experiment results are shown in Table 5. Quantization results of these transformation settings on the abdominal MRI dataset show that moderate-intensity shearing transformations achieve the highest Dice score, while transformations that are too weak or too strong lead to a decrease in model performance. This is because moderate shearing changes can introduce appropriate spatial perturbations while maintaining the rationality of anatomical structures, thereby providing the network with an effective regularization signal, enabling it to learn more discriminative deformation-insensitive features; however, excessive shearing will destroy local anatomical structures in the image, weaken the correspondence between support and query features, and reduce the effect of feature consistency constraints. In contrast, discrete transformations such as flips or multiple 90° rotations achieve the lowest performance because these transformations introduce unrealistic directional changes in medical images, thereby interfering with the model's recognition and alignment of organ structures. Overall, the experimental results show that moderate shearing transformation improves the model's robustness to spatial variations while maintaining the credibility of anatomical structures, making it a better choice for imposing strong feature consistency constraints in this framework.

[0039] Table 5 shows the ablation study of applying different geometric transformations to the query images in the feature consistency module based on the abdominal MRI dataset.

[0040] VI. To verify the semantic representation quality formed by different networks during the prototype construction stage, the pixel-level similarity distribution between the supporting image prototype and the query features was visualized (see...). Figure 5 Existing few-shot medical image segmentation networks can be broadly categorized into two types: one type constructs both foreground and background prototypes simultaneously, calculating the similarity between query features and the two prototypes and taking the maximum response to obtain the final result; the other type uses only the foreground prototype, obtaining a foreground probability map through sigmoid mapping based on foreground similarity. Despite the differences in mechanisms, both are based on the fundamental principle of "achieving segmentation by measuring the semantic similarity between the prototype and query features." Visualization results show that, even when using only simple mask mean pooling to extract prototypes, this invention, under the consistency constraint mechanism, can still obtain a highly concentrated similarity distribution that precisely corresponds to the target organ region. This result indicates that the prototypes generated by this invention have more compact feature representation and clearer semantic orientation, effectively reflecting the key features of the target structure. In contrast, the prototype similarity responses generated by other networks often diffuse beyond the organ boundary, with surrounding tissues also exhibiting high similarity, resulting in unclear semantic orientation. The above analysis shows that the present invention effectively improves the semantic purity of the prototype and the region discrimination ability through the three-layer consistency constraint of features, prototypes and predictions, making the semantic correspondence between support and query more stable, thereby obtaining segmentation results with clearer boundaries and more coherent regions.

[0041] To further analyze the semantic shift problem and its improvement, t-SNE was used to perform distribution projection on supporting foreground features, query foreground features, and query background features (see...). Figure 6In self-supervised few-shot segmentation tasks, due to noise from pseudo-labels, prototypes often deviate from the true semantic center, amplifying semantic drift in the feature space and causing semantic inconsistency between the support and query domains. Visual results show that for the relatively simple left and right kidneys, both networks form relatively tight clusters. However, for the structurally complex liver and spleen with significant morphological differences, different methods exhibit significant differences. In our proposed method, the foreground features of the support and query domains form highly consistent and well-mixed single clusters, demonstrating stable semantic consistency. In contrast, DSPNet shows a significant separation between the support and query foreground features, exhibiting typical semantic drift. These results demonstrate that the multi-level consistency constraint proposed in this invention can effectively suppress semantic shifts caused by pseudo-label noise, ensuring stable and consistent expression of foreground features under different images, individuals, and appearance conditions. By maintaining the alignment of support and query features at the semantic center, the model ensures more reliable semantic correspondence in prototype construction, similarity calculation, and final segmentation stages, thereby achieving more robust and accurate segmentation performance.

[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A self-supervised few-shot medical image segmentation method based on multi-level consistency constraints, characterized in that, The method is based on a multi-level consistency constraint model, which includes six key modules: feature encoder, global prototype extraction, prediction generation, feature consistency constraint, prototype consistency constraint, and prediction consistency constraint. The method includes the following specific steps: S1. Input the support image and query image into the feature encoder to extract the support feature map and query feature map; S2. Use bilinear interpolation to adjust the support feature map to the same size as the support mask, and then use mask mean pooling to extract the global prototype of the support feature map. S3. After generating an initial prediction map based on cosine similarity by combining the query feature map with the global prototype input prediction generation module, joint optimization is performed by combining the three-layer constraints of feature consistency, prototype consistency and prediction consistency. S4. In the feature consistency constraint, the query feature map is compared pixel by pixel with its aligned features after affine transformation, constraining the model to maintain the consistency of feature representation under different geometric transformations. S5. In the prototype consistency constraint, the supporting prototype is first extracted from the supporting features and the mask; the probability map is obtained on the query image based on the prototype and the largest response region is taken to generate the first query pseudo-mask, and the first query prototype is extracted accordingly. Then, the first query prototype is reconstructed on the same query image to obtain the second query prototype; The supporting prototype is then aligned with the two query prototypes, and the same process from query to support is executed symmetrically to achieve bidirectional prototype calibration and steady-state semantic alignment. S6. In the prediction consistency constraint, construct a multi-path reasoning closed loop from support to query, from query to itself, and from query to support; apply pixel-level consistency between each path to keep the segmentation results in different directions consistent in spatial distribution and semantic content, and use the mask of the corresponding image to supervise the forward and reverse paths to form a bidirectional verifiable prediction between support and query.

2. The self-supervised few-shot medical image segmentation method based on multi-level consistency constraints according to claim 1, characterized in that, The feature encoder uses a ResNet101 architecture pre-trained on the ImageNet database. A 1×1 convolutional layer is added after the third stage of the model to reduce the dimension from 1024 to 512. An additional fully connected layer is added in the fourth stage of the model to extract image-level global features. After the image is encoded by the feature encoder, a 512-dimensional feature map and scalar values ​​representing global information are obtained.

3. The self-supervised few-shot medical image segmentation method based on multi-level consistency constraints according to claim 1, characterized in that, The specific process of mask mean pooling in step S2 is as follows: First, the binary mask is expanded in the channel dimension to correspond one-to-one with the feature map in spatial location; then, the feature map and the mask are multiplied element-wise to mask the feature responses of all non-target regions; finally, the remaining foreground features are summed in the spatial dimension and divided by the total number of foreground pixels to obtain a category-level global prototype composed only of target region information, which is formally represented as: in, This represents the spatial location index in the feature map. Represents the set of all spatial locations. To support the feature map at location eigenvalues, To support the mask in position The value.

4. The self-supervised few-shot medical image segmentation method based on multi-level consistency constraints according to claim 1, characterized in that, The process of generating the initial prediction map in step S3 satisfies the following mathematical expression: in, This represents the Sigmoid function. Indicates the category threshold. To query the feature map at location eigenvalues, To support the global prototype, Represents the prospect probability. Represents the background probability. This is the final initial prediction map.

5. The self-supervised few-shot medical image segmentation method based on multi-level consistency constraints according to claim 1, characterized in that, The joint optimization objective of the training process is defined as: in, , and These are the weights of the feature consistency constraint loss, prototype consistency constraint loss, and prediction consistency constraint loss, respectively. The feature consistency constraint loss The calculation process is as follows: in, To query the number of enhanced views for an image, For temperature parameters, the value is 0.

5. To query features at location eigenvectors, To enhance view features in location ; The prototype consistency constraint loss The calculation process is as follows: in, This is the first query prototype. This is the prototype for the second query. To find the prototype consistency loss in the supporting direction; The prediction consistency constraint loss The calculation process is as follows: in, , , , For pixel-wise cross-entropy, These are the weighting coefficients. To query the mask, For self-reconstruction prediction based on query-side prototypes, To apply the query-side prototype to the inverse prediction probability map obtained from the supporting image, To find the prediction consistency loss for the supporting direction.

6. The self-supervised few-shot medical image segmentation method based on multi-level consistency constraints according to claim 1, characterized in that, The geometric transformation used in the feature consistency constraint is a ±10° shearing transformation; on the abdominal MRI and cardiac MRI datasets, the weighting coefficients... The values ​​are (1, 0.5, 0.5, 0.1, 1, 1); on the abdominal CT dataset, the values ​​of the above weight coefficients are (1, 0.5, 0.25, 0.01, 0.25, 1).

Citation Information

Patent Citations

  • Semantic segmentation model training method and device, computer equipment and storage medium

    CN115861617A

  • Small sample medical image segmentation method based on bidirectional guidance prototype alignment

    CN117314884A

  • Liver tumor image segmentation method based on bounding box weak supervision

    CN117788825A

  • Small sample medical image processing method based on double similarity measurement and joint learning

    CN117809058A