Small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis
Through the small sample medical image segmentation method of feature fusion and dynamic prototype synthesis, the problem of segmentation performance degradation caused by supporting image and query image differences is solved, and higher segmentation accuracy and generalization capabilities are achieved.
Patent Information
- Application Number
- CN202510560542.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-08
AI Technical Summary
The existing small sample medical image segmentation method cannot effectively solve the problem that when there are significant differences in organ and tissue size or structure of support images and query images, the generated prototype cannot accurately represent the foreground category in the query image, resulting in a degradation of segmentation performance.
A small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis is adopted to generate support features and query features of multiple scales through the U-Net decoder, and query features and support features are fused on the same scale through the feature fusion module. The semantic information of multiple support prototypes is integrated with the dynamic prototype synthesis module to generate mixed prototypes, and the representation ability of querying image foreground categories is enhanced.
It improves the accuracy and generalization ability of medical image segmentation, maintains high segmentation expressiveness when there are significant differences between supporting images and query images, and enhances the ability to characterize images.
Smart Images

Figure CN120451557A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical image segmentation and relates to a small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis. Background Art
[0002] Medical image segmentation holds immense value in modern medical diagnosis. This technology allows doctors to extract the contours and structure of a patient's tissues, organs, or lesions, making the identification of pathological sites more intuitive. This helps doctors gain a deeper understanding of a patient's health and assess disease progression.
[0003] However, while medical image segmentation technology provides strong support for clinical diagnosis, it still faces numerous challenges, such as a scarcity of labeled data, variations in equipment and imaging parameters, and individual patient differences. These issues limit model training effectiveness and generalization capabilities. Small-sample medical image segmentation addresses these issues. By training a model capable of predicting new categories using limited labeled samples, it effectively addresses the diversity and complexity of medical images and improves segmentation performance.
[0004] However, existing small-sample medical image segmentation methods cannot effectively solve the problem that when the support image and the query image have significant differences in the size or structure of organs and tissues, the generated prototype cannot accurately represent the foreground category in the query image, which leads to a decrease in segmentation performance. Summary of the Invention
[0005] To solve the above-mentioned problems in the prior art, the present invention adopts a small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis, comprising: acquiring medical image data, inputting the medical image data into a trained medical image segmentation model, and obtaining a medical image segmentation result; the medical image segmentation model comprises: a feature extraction module, a feature fusion module, a prototype generation module, and a dynamic prototype prediction module;
[0006] The training process of the medical image segmentation model includes:
[0007] S1. Obtain a medical image dataset and preprocess the medical images in the medical image dataset to obtain multiple sets of medical image pairs; each set of medical image pairs includes: a support image and a query image;
[0008] S2. Input each set of medical image pairs into a feature extraction module to obtain multi-scale feature pairs for each set of medical image pairs; each scale feature pair includes a supporting feature and a query feature;
[0009] S3, inputting the multi-scale feature pairs of each medical image pair into a feature fusion module to obtain multi-scale fusion features of each medical image pair;
[0010] S4. Input the multi-scale fusion features and the feature pair with the maximum number of channels of each medical image pair into the prototype generation module to obtain the multi-scale support prototype and query prototype of each medical image pair;
[0011] S5. Input the query prototype, multi-scale support prototype, and query feature with the maximum number of channels of each medical image pair into the dynamic prototype prediction module to obtain the predicted query probability and the query image segmentation result; obtain the predicted support probability based on the feature pair with the minimum number of channels;
[0012] S6. Calculate the loss function value based on the predicted query probability and the predicted support probability, and update the model parameters based on the loss function value. When the loss function value is minimized, a trained medical image segmentation model is obtained.
[0013] Beneficial effects:
[0014] 1. The present invention generates support features and query features at multiple scales through a U-Net decoder, and fuses query features and support features at the same scale through a feature fusion module, which can effectively combine fine-grained details with broader contextual information, so that the initial support prototype can more accurately capture the foreground category in the query image, enhance the diversity and expressiveness of the support prototype, thereby improving segmentation accuracy and better adapting to the unique characteristics of the query image; 2. The dynamic prototype synthesis module of the present invention generates a more generalized comprehensive support prototype by integrating semantic information from multiple support prototypes; then, by merging query-related prototype features, a hybrid prototype is obtained, which further enhances the representation ability of the foreground category of the query image, thereby improving image segmentation performance; through multiple iterations, the support prototype and query prototype are continuously optimized, and finally a query prototype is generated that can accurately represent the foreground category of the query image, so that even when there are significant differences between the support image and the query image, a high expressiveness can be maintained. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flowchart of a small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis provided by an embodiment of the present invention;
[0016] Figure 2 A structural diagram of a small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis provided by an embodiment of the present invention;
[0017] Figure 3 A structural diagram of a feature fusion module provided in an embodiment of the present invention;
[0018] Figure 4 A structural diagram of a query prototype generation module provided by an embodiment of the present invention;
[0019] Figure 5 This is a structural diagram of the dynamic prototype synthesis module provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0021] like Figure 1 、 Figure 2 As shown, an embodiment of the present invention adopts a small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis, including: obtaining medical image data, the medical image data including a support image and a query image, inputting the support image and the query image into a trained medical image segmentation model to obtain a medical image segmentation result; the medical image segmentation model includes: a feature extraction module, a feature fusion module, a prototype generation module, and a dynamic prototype synthesis module;
[0022] The training process of the medical image segmentation model includes:
[0023] S1. Obtain a medical image dataset and preprocess the medical images in the medical image dataset to obtain multiple sets of medical image pairs; each set of medical image pairs includes: a support image and a query image;
[0024] Preprocessing of medical images in medical image datasets includes:
[0025] The medical image is converted into a two-dimensional medical image through a slicing operation, and data augmentation processing is performed. The enhanced medical image is adjusted to a uniform size of 256×256. The adjusted medical image is copied and spliced to obtain a 256×256×3 multi-channel medical image;
[0026] For the copy image and stitch operation, the formula is:
[0027] I=concat(I,I,I)
[0028] Among them, concat is a concatenation operation.
[0029] Randomly extract images to form a support set and queryset Combine the images in the support set and the query set to obtain multiple sets of medical image pairs. in, is the i-th support image, represents the label of the i-th support image, is the i-th query image, and K is the number of images in the support set and query set.
[0030] S2. Input each group of medical image pairs into a feature extraction module to obtain multi-scale feature pairs for each group of medical image pairs;
[0031] The feature extraction module is a U-Net network; its encoder-decoder structure extracts features from the input image. First, the U-Net encoder gradually extracts low-level and high-level features of the image through convolution and pooling operations. The decoder then restores the spatial resolution of the image through upsampling and fuses feature maps from the encoder to capture multi-scale information. Skip connections allow the decoder to directly utilize features from the encoder, preserving image details. At this stage, the support image and query image are each subjected to U-Net feature extraction, resulting in multi-scale feature pairs that provide effective feature representations for subsequent feature fusion.
[0032] In this embodiment, each set of multi-scale feature pairs of medical image pairs includes four feature pairs of different scales: Each feature pair includes: Supporting features and query features The sizes are 32×32×512, 64×64×256, 128×128×128, and 256×256×64, respectively, where c is the number of feature channels, c = {512, 256, 128, 64}.
[0033] S3, inputting the multi-scale feature pairs of each medical image pair into a feature fusion module to obtain multi-scale fusion features of each medical image pair;
[0034] The feature fusion module (Query Guided Feature Fusion, QGFF) processes the multi-scale feature pairs of medical image pairs by: processing the feature pairs of each scale of the medical image pairs separately Perform feature fusion to obtain the fusion features of each scale The fusion process occurs at each level with 512, 256, 128, and 64 channels.
[0035] like Figure 3 As shown, the feature fusion module performs feature fusion on the medical image pairs. Processing includes:
[0036] S31. Extracting supporting features and query features Local features and global features
[0037] The specific process is based on the support characteristics of 512 channels and query features For example:
[0038]
[0039] in, To support the local features extracted from the feature, To support the global features extracted from the feature, The local features extracted for the query features, The global features extracted from the query features, Conv2d represents the convolution operation, AdaptiveAvgPool2d represents the average pooling operation, LayerNorm represents the layer normalization operation, and ReLU is the activation function.
[0040] This strategy can more accurately capture the different information in local and global features, thereby achieving clearer separation, reducing interference, and ensuring the preservation of key information. This is particularly important for addressing common challenges in medical images, such as blurred boundaries, low contrast, and high variability.
[0041] S32. Local features of support features and query features Perform fusion to obtain initial local fusion features; perform convolution on the initial local fusion features, combine the initial local fusion features after convolution and before convolution to obtain the final local fusion features;
[0042] Among them, convolution of the initial local fusion features can enhance the expression ability and avoid information loss. At the same time, the introduction of jump connection combines the initial local fusion features before and after convolution to ensure that the original input information is not lost, further improving the ability to capture details and the accuracy of feature expression; the specific process is based on the local features of 512 channels. For example:
[0043]
[0044] in, It is a local fusion feature.
[0045] S33. Global features that support features and query features The initial global fusion features are fused and then convolved to obtain the initial global fusion features. The initial global fusion features are then combined with the initial global fusion features before and after convolution to obtain the final global fusion features.
[0046] The specific process is based on the global features of 512 channels For example:
[0047]
[0048] in, It is the global fusion feature.
[0049] S34, weighted combination of the final local fusion feature and the global fusion feature to obtain the fusion feature
[0050] The specific process takes the local fusion features and global fusion features of 512 channels as an example:
[0051]
[0052] in, It is the result of mixing global fusion features and local fusion features, σ is the Sigmoid function, and α is the dynamic adjustment weight obtained. is the final fusion feature.
[0053] S4. Input the multi-scale fusion features and the feature pair with the maximum number of channels of each medical image pair into the prototype generation module to obtain the multi-scale support prototype and query prototype of each medical image pair;
[0054] Multi-scale fusion features include fusion features of multiple scales Multi-scale fusion features of medical image pairs using prototype generation module and the feature pair with the maximum number of channels Processing includes:
[0055] S41. Fusion features of each scale based on the labels of the supporting images Perform mask average pooling operation to obtain the support prototype of each scale
[0056] The formula is as follows:
[0057]
[0058] in, To fusion features, To support the label of the image, ⊙ is the element-wise product operation, and MAP represents the mask average pooling operation.
[0059] S42. Support features for the maximum number of channels based on the labels of the supported images Perform mask average pooling operation to obtain the support prototype P s,max ;
[0060] The formula is as follows:
[0061]
[0062] S43, will support prototype Ps,max Query characteristics with maximum number of channels Match and get the predicted query probability
[0063] The formula is as follows:
[0064]
[0065] in, Representative query features With support prototype P s,max The negative cosine similarity is multiplied by a scaling factor k=20, τ is the learnable threshold obtained through the fully connected layer, σ represents the Sigmoid function, is the probability that the query feature is predicted to be the foreground class.
[0066] S44. Query probability based on prediction Query features Perform mask average pooling operation to obtain the query prototype P q .
[0067] The formula is as follows:
[0068]
[0069] in, is the predicted query image segmentation result, is the probability that the query feature is predicted to be the background class.
[0070] This process effectively constructs support prototypes and query prototypes, providing accurate reference information for subsequent image segmentation tasks.
[0071] S5. Input the query prototype, multi-scale support prototypes, and query features with the maximum number of channels of each medical image pair into the dynamic prototype prediction module to obtain the predicted query probability and the query image segmentation result; obtain the predicted support probability based on the feature pair with the minimum number of channels;
[0072] like Figure 4 、 Figure 5 As shown, the dynamic prototype prediction module includes: multiple dynamic prototype synthesis modules and multiple query prototype generation modules; the dynamic prototype prediction module predicts the query prototype P of the medical image pair. q , multi-scale support prototype And the query feature of the maximum number of channels Processing includes:
[0073] S51, inputting the multi-scale support prototype and the query prototype into the first dynamic prototype synthesis module for dynamic prototype synthesis to obtain a first hybrid prototype and a multi-scale first support prototype;
[0074] The specific steps include:
[0075] S511, supporting prototypes at all scales Calculate the mean prototype P mean , support prototypes for all scales Respectively with the mean prototype P mean Subtract to get the difference prototype of all scales For the mean prototype P mean and all scales of difference prototypes Update and get the updated mean prototype P′ mean and prototypes of differences at all scales
[0076] The operation formula is as follows:
[0077]
[0078] P′ mean ←θ mean ⊙P mean
[0079]
[0080] Among them, Mean represents the average operation, is an element-wise subtraction operation, is the difference prototype, θ mean is the learnable parameter of the mean prototype, are the learnable parameters of the difference prototype, initialized to 1, 0.4, 0.3, 0.2, and 0.1 respectively, where i = 1, 2, 3, and 4.
[0081] S512, the updated mean prototype P' mean and all scales of difference prototypes Add together to get the optimized support prototype Prototype all scale differences Respectively with the mean prototype P′ mean Add together to get the updated support prototypes for all scales (ie the first supporting prototype), the optimized supporting prototype With query prototype P q Perform weighted combination to obtain the first hybrid prototype
[0082] The formula is as follows:
[0083]
[0084] Among them, θ s To support prototypes The learnable parameters, θ q To query the learnable parameters of the prototype, they are initialized to 0.5 and 0.5 respectively. Represents the addition operation; updated support prototype as input for the next iteration.
[0085] S52: Input the first mixed prototype and the query feature with the maximum number of channels into a first query prototype generation module to obtain a first predicted query probability, a first query image segmentation result, and a first query prototype;
[0086] The specific steps include:
[0087] The first hybrid prototype Query characteristics with maximum number of channels Match and get the predicted query probability Based on the predicted query probability Compute predicted query image segmentation results (i.e. the first query image segmentation result), according to the predicted query image segmentation result Query features Perform mask average pooling operation to obtain the updated query prototype (ie the first query prototype).
[0088] The formula is as follows:
[0089]
[0090] Among them, the updated query prototype As input to the next iteration, is the probability that the query feature is predicted to be the foreground class, is the probability that the query feature is predicted to be the background class.
[0091] S53, inputting the previous query prototype and the previous multi-scale support prototype into the current dynamic prototype synthesis module for dynamic prototype synthesis to obtain the current hybrid prototype and the multi-scale current support prototype;
[0092] The process of synthesizing a dynamic prototype based on the previous query prototype and the previous multi-scale support prototype is consistent with step S51, and the specific steps include:
[0093] S531. Calculate the mean prototype based on the previous support prototypes of all scales, subtract the previous support prototypes of all scales from the mean prototype to obtain the difference prototypes of all scales, update the mean prototype and the difference prototypes of all scales to obtain updated mean prototypes and difference prototypes of all scales;
[0094] S532, add the updated mean prototype and the difference prototypes of all scales to obtain the optimized support prototype; add the difference prototypes of all scales to the mean prototype respectively to obtain the current support prototype of all scales, and perform weighted combination of the optimized support prototype and the previous query prototype to obtain the current mixed prototype Among them, m is the index of the dynamic prototype synthesis module and the query prototype generation module.
[0095] S54, the current hybrid prototype The query features with the maximum number of channels are input into the current query prototype generation module to obtain the current predicted query probability The current query image segmentation result and the current query prototype;
[0096] The process of generating the current query prototype based on the current mixed prototype and the query feature of the maximum number of channels is consistent with step S52, and the specific steps include: matching the current mixed prototype with the query feature of the maximum number of channels to obtain the current predicted query probability; calculating the predicted query image segmentation result based on the current predicted query probability, and performing a masked average pooling operation on the query feature based on the predicted query image segmentation result to obtain the current query prototype.
[0097] S55, repeat steps S53 to S54 until the predicted query probability output by the last query prototype generation module is obtained and query image segmentation results Where M is the number of dynamic prototype synthesis modules and query prototype generation modules.
[0098] In this embodiment, M is 3.
[0099] The predicted support probability based on the feature pair with the minimum number of channels includes:
[0100] Convolution is performed on the feature pair with the minimum number of channels to obtain the features of the two channels; Softmax normalization is performed on the features of the two channels to obtain the predicted support probability; the support probability includes: the probability of predicting the background class and the probability of predicting the foreground class The sum of the two is always 1.
[0101] S6. Calculate the loss function value based on the predicted query probability and support probability, update the model parameters based on the loss function value, and obtain a trained medical image segmentation model when the loss function value is minimized.
[0102] Loss function value in, is the query loss based on the predicted query probability, is the support loss based on the predicted support probability.
[0103] For the query image, a binary cross entropy loss function is used to compare the true label of the query image with the predicted foreground and background probabilities to calculate the segmentation loss. This loss function can effectively distinguish between foreground and background, ensuring that the model can accurately segment the foreground in the image. The formula is as follows:
[0104]
[0105] Among them, H and W are The height and width of , h, w are the indexes of height and width, is the true binary mask of the query image, and are the predicted probabilities that the query image is predicted as the foreground class and the background class, respectively.
[0106] For the support image, a binary classification is performed on top of the U-Net decoder to obtain the predicted label of the support image and calculate the support loss. This loss helps to further constrain the feature extraction ability of the network, making the features of the support image and the query image more representative. The formula for the support loss is:
[0107]
[0108] in, is the ground-truth binary mask of the support image, and are the predicted probabilities that the support image is predicted as the foreground class and the background class, respectively.
[0109] Model evaluation phase: The query images in the test set and the support set are input into the trained model to generate predicted labels to obtain the final segmentation results.
[0110] The method was tested on the CHAOS, SABS, and CMR datasets. The Dice coefficient (%), a commonly used evaluation metric for medical image segmentation, was used to evaluate the performance of the method on the medical image datasets. Table 1 also compares method 1, which uses self-regularization and contrastive learning; method 2, which uses a strong interaction between compression and excitation modules; method 3, which adopts an approach inspired by anomaly detection and avoids explicit background modeling; and method 4, which uses the present invention.
[0111] The table below shows the test results on the database. It can be seen that in terms of the Dice (%) indicator, the network model based on the present invention performs well on various data sets.
[0112] CHAOS SABS CMR Dice Dice Dice Method 1 80.77 73.53 76.32 Method 2 42.51 29.00 58.20 Method 3 78.51 72.97 75.80 Method 4 81.79 76.37 77.14
[0113] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation plans of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis, characterized by: include: Acquire medical image data, input the medical image data into a trained medical image segmentation model, and obtain a medical image segmentation result; The medical image segmentation model includes: feature extraction module, feature fusion module, prototype generation module and dynamic prototype prediction module; The training process of the medical image segmentation model includes: S1. Obtain a medical image dataset and preprocess the medical images in the medical image dataset to obtain multiple sets of medical image pairs; each set of medical image pairs includes: a support image and a query image; S2. Input each set of medical image pairs into a feature extraction module to obtain multi-scale feature pairs for each set of medical image pairs; each scale feature pair includes a supporting feature and a query feature; S3, inputting the multi-scale feature pairs of each medical image pair into a feature fusion module to obtain multi-scale fusion features of each medical image pair; S4. Input the multi-scale fusion features and the feature pair with the maximum number of channels of each medical image pair into the prototype generation module to obtain the multi-scale support prototype and query prototype of each medical image pair; S5. Input the query prototype, multi-scale support prototype, and query feature with the maximum number of channels of each medical image pair into the dynamic prototype prediction module to obtain the predicted query probability and the query image segmentation result; obtain the predicted support probability based on the feature pair with the minimum number of channels; S6. Calculate the loss function value based on the predicted query probability and the predicted support probability, and update the model parameters based on the loss function value. When the loss function value is minimized, a trained medical image segmentation model is obtained.
2. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 1 is characterized in that: Preprocessing of medical images in a medical image dataset includes: converting the medical images into two-dimensional medical images through slicing operations, performing data augmentation processing, adjusting the enhanced medical images to a uniform size, copying and splicing the adjusted medical images to obtain multi-channel medical images; and constructing multiple groups of medical image pairs based on all multi-channel medical images.
3. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 1, characterized in that: The feature extraction module is the U-Net network.
4. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 1, characterized in that: The multi-scale feature pairs of medical image pairs include feature pairs of multiple different scales. Each feature pair includes: Supporting features and query features The feature fusion module processes the multi-scale feature pairs of the medical image pair by: processing the feature pairs of each scale of the medical image pair Perform fusion to obtain the fusion features of each scale Feature pairs for medical image pairs Integration includes: S31. Extracting supporting features and query features Local features and global features S32, local features Perform fusion to obtain initial local fusion features; perform convolution on the initial local fusion features, combine the initial local fusion features after convolution and before convolution to obtain the final local fusion features; S33, global features The initial global fusion features are fused and then convolved to obtain the initial global fusion features. The initial global fusion features are then combined with the initial global fusion features before and after convolution to obtain the final global fusion features. S34, weighted combination of the final local fusion feature and the global fusion feature to obtain the fusion feature 5. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 1, characterized in that: Multi-scale fusion features include fusion features of multiple scales Multi-scale fusion features of medical image pairs using prototype generation module and the feature pair with the maximum number of channels Processing includes: S41. Fusion features of each scale based on the labels of the supporting images Perform mask average pooling operation to obtain the support prototype of each scale S42. Support features for the maximum number of channels based on the labels of the supported images Perform mask average pooling operation to obtain the support prototype P s,max ; S43, will support prototype P s,max Query characteristics with maximum number of channels Match and get the predicted query probability S44. Query probability based on prediction Query features Perform mask average pooling operation to obtain the query prototype P q .
6. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 1, characterized in that: The dynamic prototype prediction module includes: multiple dynamic prototype synthesis modules and multiple query prototype generation modules; the dynamic prototype prediction module predicts the query prototype P of the medical image pair. q , multi-scale support prototype And the query feature of the maximum number of channels Processing includes: S51, inputting the multi-scale support prototype and the query prototype into the first dynamic prototype synthesis module for dynamic prototype synthesis to obtain a first hybrid prototype and a multi-scale first support prototype; S52: Input the first mixed prototype and the query feature with the maximum number of channels into a first query prototype generation module to obtain a first predicted query probability, a first query image segmentation result, and a first query prototype; S53, inputting the previous query prototype and the previous multi-scale support prototype into the current dynamic prototype synthesis module for dynamic prototype synthesis to obtain the current hybrid prototype and the multi-scale current support prototype; S54, inputting the current mixed prototype and the query feature of the maximum number of channels into the current query prototype generation module to obtain the current predicted query probability, the current query image segmentation result and the current query prototype; S55 . Repeat steps S53 to S54 until the predicted query probability and query image segmentation result output by the last query prototype generation module are obtained.
7. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 6, characterized in that: Dynamic prototype synthesis based on the previous query prototype and the multi-scale previous support prototype includes: S531. Calculate the mean prototype based on the previous support prototypes of all scales, subtract the previous support prototypes of all scales from the mean prototype to obtain the difference prototypes of all scales, update the mean prototype and the difference prototypes of all scales to obtain updated mean prototypes and difference prototypes of all scales; S532. Add the updated mean prototype and the difference prototypes of all scales to obtain the optimized support prototype; add the difference prototypes of all scales to the mean prototype respectively to obtain the current support prototype of multiple scales; perform weighted combination of the optimized support prototype and the previous query prototype to obtain the hybrid prototype.
8. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 6, characterized in that: The query prototype generation module processes the current mixed prototype and the query features of the maximum number of channels, including: matching the current mixed prototype with the query features of the maximum number of channels to obtain the current predicted query probability, calculating the current predicted query image segmentation result based on the current predicted query probability, and performing a masked average pooling operation on the query features based on the current predicted query image segmentation result to obtain the current query prototype.
9. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 8, characterized in that: The current hybrid prototype Query characteristics with maximum number of channels Matching includes: in, Represents query features With hybrid prototype The negative cosine similarity of is multiplied by a scaling factor, τ is the learnable threshold, σ represents the Sigmoid function, is the current predicted query probability, where m is the index of the dynamic prototype synthesis module and the query prototype generation module.
10. The small sample medical image segmentation method based on feature fusion and dynamic prototype synthesis according to claim 1, characterized in that: The loss function value is: in, is the query loss based on the predicted query probability, is the support loss based on the predicted support probability.