A fetal ultrasound image segmentation method and system based on uncertainty modeling

By combining uncertainty modeling and medical image adapter, an uncertainty-aware loss function and a semi-supervised pseudo-label strategy are constructed to solve the problems of unstable image quality and insufficient model generalization in fetal ultrasound image segmentation, achieving high-precision, robust fetal structure segmentation and credibility assessment.

CN122244433APending Publication Date: 2026-06-19WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-03-02
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing fetal ultrasound image segmentation methods suffer from problems such as unstable image quality, insufficient model generalization ability, inaccurate segmentation of ambiguous regions, and lack of reliable predictive quantification, resulting in low clinical diagnostic efficiency.

Method used

By combining uncertainty modeling with a visual basic segmentation model, a medical image adapter module is introduced to construct an uncertainty-aware loss function, and a semi-supervised pseudo-label strategy is adopted to improve segmentation accuracy and robustness.

🎯Benefits of technology

It significantly improves the accuracy, robustness, and interpretability of fetal ultrasound image segmentation, outputs segmentation masks of target fetal structures, and generates uncertainty maps, providing a reference for clinical decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122244433A_ABST
    Figure CN122244433A_ABST
Patent Text Reader

Abstract

This invention proposes a fetal ultrasound image segmentation method and system based on uncertainty modeling. Using the Segment Anything Model (SAM) as the basic framework, it achieves effective transfer of ultrasound domain features by freezing the core encoder and adding a medical image adapter. A cue enhancement mechanism is introduced into the model, generating pixel-level predictive entropy through multiple forward sampling to construct an uncertainty map. Furthermore, an uncertainty-aware loss function is designed to apply strong supervision to high-confidence regions and reduce the weight of high-uncertainty regions, thereby improving the model's segmentation performance under noise interference, blurred boundaries, and complex anatomical structures. In addition, this invention utilizes model-generated pseudo-labels and task prompting mechanisms to achieve semi-supervised training, enabling the acquisition of a segmentation model with good generalization ability even with limited labeled data. Finally, the model can output a segmentation mask of the target fetal structure and simultaneously generate an uncertainty map, providing a reference for clinical decision-making and risk assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image segmentation technology, specifically relating to a method and system for segmenting fetal ultrasound images based on uncertainty modeling. Background Technology

[0002] Fetal ultrasound imaging, as a crucial foundational tool for prenatal examination, has been widely used for fetal development assessment and early screening of structural abnormalities due to its advantages such as real-time operation, lack of radiation, and cost-effectiveness. However, ultrasound imaging is characterized by low signal-to-noise ratio, blurred tissue boundaries, and susceptibility to fetal movement and probe angle, leading to unstable image quality and posing significant challenges to the automatic segmentation and identification of key fetal anatomical structures. Currently, clinical diagnosis typically relies on human experience for interpretation, a time-consuming and subjective process that fails to meet the demands for efficient and accurate prenatal diagnosis. Therefore, developing robust and reliable automatic segmentation methods for fetal ultrasound images has become an important direction for intelligent medical image analysis.

[0003] With the development of deep learning, medical image segmentation technology has made significant progress. Segmentation models based on convolutional neural networks (such as U-Net and its improved structures) can effectively fuse multi-scale features and improve segmentation accuracy; Transformer-based models further enhance the recognition of complex anatomical structures through long-range dependency modeling. Furthermore, large-scale visual pre-trained models (such as the Segment Anything Model, SAM) provide a new technical approach for generalized, few-sample-adaptive segmentation tasks. However, most of these models are trained on natural images, and when directly applied to ultrasound scenes, they are easily affected by modal differences, noise interference, and boundary blurring, resulting in insufficient segmentation stability and generalization performance, especially in fetal ultrasound images.

[0004] In fetal ultrasound image segmentation, factors such as fetal movement, changes in body position, occlusion, and imaging differences lead to complex data distribution, difficult annotation, and limited publicly available data, thus restricting the robustness and clinical usability of deep models. Existing methods often focus on improving model structure or feature extraction capabilities, but they are insufficient in expressing the reliability of segmentation results. When the model makes uncertain predictions in ambiguous regions, noisy regions, or anomalous samples, traditional deterministic segmentation methods cannot identify low-reliability results, limiting their interpretability and risk controllability in clinical diagnosis.

[0005] To address the aforementioned issues, uncertainty modeling has gradually become an important research direction in medical image segmentation. By explicitly estimating the uncertainty in model predictions, high-confidence and low-confidence regions can be distinguished, potential erroneous predictions can be identified, and the robustness of the model in low-quality images can be improved. Existing uncertainty methods include those based on Bayesian deep learning, such as enabling Monte Carlo Dropout during the inference phase, multi-outcome prediction based on generative models, and confidence constraints combined with semi-supervised learning. Recent research has also begun to explore combining uncertainty estimation with large models such as SAM to enhance the reliability of models in medical scenarios.

[0006] In summary, due to the inherent instability of fetal ultrasound images, the insufficient adaptability of deep learning models in medical scenarios, and the higher reliability requirements in clinical practice, introducing uncertainty estimation into deep learning models and explicitly quantifying the predictive uncertainty of the model output can effectively distinguish between high-reliability and low-reliability regions in fetal ultrasound images, thereby improving the robustness and reliability of the model in complex, low-quality images. This approach is of great significance for constructing a reliable and interpretable intelligent interpretation and diagnostic system for prenatal ultrasound. Summary of the Invention

[0007] In view of this, the purpose of this invention is to provide a fetal ultrasound image segmentation method based on uncertainty modeling, to solve the problems of unstable image quality, insufficient model generalization ability, inaccurate segmentation of blurred regions, and lack of predictive reliability quantification in existing fetal ultrasound image segmentation methods. This invention combines uncertainty estimation with a visual basic segmentation model, introduces a medical image adapter module and a cue enhancement mechanism, constructs an uncertainty-aware loss function, and combines it with a semi-supervised pseudo-label strategy, significantly improving the accuracy, robustness, and interpretability of fetal ultrasound image segmentation.

[0008] This invention proposes a fetal ultrasound image segmentation method based on uncertainty modeling. Using the SegmentAnything Model (SAM) as its foundation, it achieves effective transfer of ultrasound domain features by freezing the core encoder and incorporating a medical image adapter. A cue enhancement mechanism is introduced into the model, generating pixel-level predictive entropy through multiple forward sampling to construct an uncertainty map. Furthermore, an uncertainty-aware loss function is designed to apply strong supervision to high-confidence regions and reduce the weight of high-uncertainty regions, thereby improving the model's segmentation performance under noise interference, blurred boundaries, and complex anatomical structures. In addition, this invention utilizes model-generated pseudo-labels and task prompting mechanisms to achieve semi-supervised training, enabling the acquisition of a segmentation model with good generalization ability even with limited labeled data. Finally, the model can output a segmentation mask of the target fetal structure and simultaneously generate an uncertainty map, providing a reference for clinical decision-making and risk assessment.

[0009] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a fetal ultrasound image segmentation method based on uncertainty modeling, comprising the following steps: Step 1: Input fetal ultrasound images, extract features using SAM's encoder, embed a medical image adapter module into the encoder structure, perform domain specialization on the feature extraction process, and enable the encoder to output adapted medical feature maps. Step 2: Randomly perturb the input prompts to generate multiple sets of prompt vectors, and input them together with the adapted medical feature map obtained in Step 1 into the decoder; The decoder performs forward reasoning for each set of prompts to obtain multiple sets of segmentation probability maps. Step 3: Perform pixel-level statistics on the multiple probability maps obtained in Step 2, calculate the prediction entropy, and generate a pixel-level uncertainty map. Step 4: Construct an uncertainty-aware loss function based on the uncertainty graph obtained in Step 3, and use labeled data to supervise the training of the model constructed in Steps 1-2. Step 5: Use the trained model to generate pseudo-labels for inference on unlabeled fetal ultrasound images, and perform semi-supervised training together with real labeled data. Step 6: Input the fetal ultrasound image to be segmented into the finally trained model, output the segmentation mask of the target fetal structure, and generate the corresponding pixel-level uncertainty map to provide clinical segmentation results and their reliability reference.

[0010] Furthermore, in step 1, a medical image adapter is embedded in each Transformer Block of the SAM encoder. The medical image adapter performs lightweight adjustments on the features in both the channel dimension and the spatial dimension. In the channel dimension, global average pooling is performed on the input feature map to obtain a C×1×1 channel description vector. Then, channel compression and restoration are achieved through two linear layers, and the channel weights are obtained through the sigmoid function. These weights are multiplied by the input features and used as the input for the next layer. In the spatial dimension, the input feature map is downsampled by 2 times using convolution, and then deconvolution is used to restore it to the original spatial size while keeping the number of channels unchanged, thereby achieving a moderate adaptive adjustment of the spatial structure; and each adapter uses skip connections.

[0011] Furthermore, the specific implementation of step 2 includes: for each input image, the user provides a cue point or cue box; to construct a cue enhancement mechanism, the original cue is randomly perturbed at the pixel level to generate N sets of cue, and each perturbed cue is compared with the adapted medical features obtained in step 1. Figure 1 Similar to the input decoder, the decoder performs forward inference once for each set of prompts and outputs the corresponding original segmentation score logits, i.e., the segmentation probability map.

[0012] Furthermore, the specific implementation method of step 3 is as follows: Let the probability map of the i-th group be denoted as . For each group of segmentation probability maps, a sigmoid transformation is first performed to obtain the foreground probability. :

[0013] in, It is the activation function sigmoid, and the background probability is expressed as... The average probability of each pixel in each category is obtained by averaging the N predicted probabilities at the pixel level. :

[0014] For binary classification, the category Calculate the prediction entropy based on the average probability:

[0015] The calculation results are standardized to the range [0,1] to obtain the prediction uncertainty value for each pixel. .

[0016] Furthermore, the uncertainty-aware loss function in step 4 includes uncertainty-aware Focal Loss and uncertainty-aware Dice Loss, which are weighted based on the uncertainty graph, with enhanced supervision applied to high-confidence regions and reduced loss contribution to high-uncertainty regions.

[0017] Furthermore, the uncertainty perception Focal Loss is as follows:

[0018] Where m is the number of pixels. Let be the predicted foreground probability of pixel i by the model. For tags, This represents a pixel-level uncertainty value. This is the standard Focal Loss.

[0019] Furthermore, the uncertainty perception Dice Loss is as follows:

[0020] in:

[0021]

[0022] in, This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. The confidence metric for pixel i is... threshold Used to filter high-confidence regions, where m is the number of pixels. Let be the predicted foreground probability of pixel i by the model. For tags, The uncertainty value is at the pixel level; by contributing Dice statistics only to pixels that meet the confidence conditions, the interference of high-uncertainty pixels on the overall similarity measurement is reduced.

[0023] Furthermore, step 5, pseudo-label generation and semi-supervised training, includes: The model trained in step 4 is used to infer unlabeled fetal ultrasound images, generating corresponding segmentation masks. These masks are then directly added to the training set as pseudo-labels, participating in training alongside manually labeled data. In the semi-supervised stage, the model still calculates the uncertainty of pseudo-labeled samples and uses uncertainty weighting in the loss function to automatically suppress the interference of high-uncertainty regions on training. Simultaneously, a task prompting mechanism is introduced, incorporating task prompts into the prompt encoding to distinguish whether a sample uses manually labeled or pseudo-labeled data. During forward inference, the model uses these prompts as additional inputs to adaptively adjust the dependence on labels from different sources during training.

[0024] The present invention also provides a fetal ultrasound image segmentation system based on uncertainty modeling, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the fetal ultrasound image segmentation method based on uncertainty modeling as described above.

[0025] The present invention also provides a computer-readable storage medium, including a readable storage medium on which a computer program is stored, wherein when the computer program is executed, it implements the fetal ultrasound image segmentation method based on uncertainty modeling as described in the above technical solution.

[0026] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention makes full use of the feature extraction capability of the visual basic model SAM and realizes feature transfer through the medical image adapter, which effectively improves the segmentation capability of the model in the field of ultrasound imaging. (2) Multiple sampling inferences are performed through the prompting enhancement mechanism to construct a pixel-level uncertainty map, and an uncertainty-aware loss function is introduced to achieve focused learning of high-confidence regions and suppression of fuzzy regions, effectively improving the stability and robustness of segmentation; (3) This invention utilizes pseudo-labels and semi-supervised mechanisms to effectively alleviate the problem of difficulty in labeling fetal ultrasound data, enabling the model to still have good generalization performance when there is insufficient labeled data; (4) The uncertainty graph output by the model can express the credibility of the prediction results, providing higher interpretability and reference value for the clinical use of fetal structure recognition. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating the implementation of the present invention. Detailed Implementation

[0028] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0029] like Figure 1 As shown, the technical solution adopted in this embodiment of the invention is a fetal ultrasound image segmentation method based on uncertainty modeling, including: (1) In the encoder module, the multi-scale general features of the fetal ultrasound image are extracted using the encoder of SAM and its backbone parameters are frozen; and the features are adapted to the domain by the medical image adapter to make them more consistent with the texture and noise characteristics of the ultrasound image, and used as the input of the subsequent SAM segmentation decoder.

[0030] (2) In the prompt enhancement and decoder module, the input prompt point or box is randomly perturbed and forward inference is performed multiple times. The decoder outputs multiple sets of segmentation results respectively. The pixel probabilities of multiple sets of predictions are statistically analyzed to obtain the final segmentation mask and the corresponding pixel-level uncertainty map.

[0031] (3) Uncertainty-aware loss: The uncertainty map is used to adjust the weight of each pixel in the loss function to construct uncertainty-aware Focal Loss and uncertainty-aware Dice Loss. This strengthens supervision of high-confidence regions and reduces the impact of high-uncertainty regions, thereby improving segmentation stability and accuracy.

[0032] (4) Pseudo-label generation and semi-supervised training: The trained model generates pseudo-labels for unlabeled ultrasound images and trains them together with real labeled data; combined with task prompting mechanism and uncertainty perception loss, semi-supervised optimization is achieved, thereby improving the model's generalization ability in the case of insufficient labeling.

[0033] The specific implementation steps are as follows: Step 1) Input fetal ultrasound images and extract features using the encoder of Segment Anything Model (SAM); embed a medical image adapter module into the encoder structure to perform domain specialization on the feature extraction process, so that the encoder can output adapted medical feature maps.

[0034] Step 2) Randomly perturb the input prompt (point or box) to generate multiple sets of prompt vectors, and input them together with the adapted feature map obtained in Step 1) into the decoder; the decoder performs forward inference for each set of prompts to obtain multiple sets of segmentation probability maps.

[0035] Step 3) Perform pixel-level statistics on the multiple segmentation results obtained in Step 2), calculate the prediction entropy, and generate a pixel-level uncertainty map to reflect the model's prediction stability and confidence level for different regions.

[0036] Step 4) Supervised training is performed using labeled data. Based on the uncertainty map obtained in Step 3), an uncertainty-aware loss function is constructed, including uncertainty-aware Focal Loss and uncertainty-aware Dice Loss. By dynamically adjusting the pixel weights, strong supervision is applied to high-confidence regions, and the loss contribution is reduced to high-uncertainty regions, thereby improving the robustness of the model in fuzzy structures and noisy regions.

[0037] Step 5) The trained model is used to generate pseudo-labels for inference on unlabeled fetal ultrasound images and semi-supervised training is performed together with real labeled data. During the training process, a task prompting mechanism is introduced and uncertainty perception loss is continuously used to further improve the generalization ability and stability of the model when labeled data is insufficient.

[0038] Step 6) Input the fetal ultrasound image to be segmented into the finally trained model, output the segmentation mask of the target fetal structure, and generate the corresponding pixel-level uncertainty map to provide clinical segmentation results and their reliability reference.

[0039] Step 1) involves the implementation of input and encoder adaptation, including: Fetal ultrasound images are used as input to the improved SAM model in this patent. First, basic preprocessing (such as normalization and resizing) is performed on the images, and then they are input into the SAM image encoder with frozen backbone parameters. Medical image adapters are embedded in each Transformer Block of the encoder to incorporate medical domain features into the encoder without requiring extensive updates to the backbone parameters.

[0040] The adapter performs lightweight adjustments to the features in both the channel and spatial dimensions.

[0041] In the channel dimension, global average pooling is performed on the input feature map to obtain a C×1×1 channel description vector. Then, channel compression and restoration are achieved through two linear layers, and the channel weights are obtained through the sigmoid function. These weights are multiplied by the input features and used as the input for the next layer.

[0042] In the spatial dimension, convolution is used to downsample the input feature map by a factor of 2, and then deconvolution is used to restore it to the original spatial size while keeping the number of channels unchanged, thereby achieving a moderate adaptive adjustment of the spatial structure. Each adapter uses skip connections, so that the adapted features can better adapt to the texture and structural characteristics of fetal ultrasound images while retaining the original information.

[0043] Step 2) includes the implementation of enhanced hints and multiple forward inferences, which includes: For each input image, the user can provide a cue point or cue box. To construct a cue enhancement mechanism, the original cue is randomly perturbed at the pixel level to generate N sets of cue. Each perturbed cue, along with the adapted image features obtained in step 1), is input into the decoder. The decoder performs forward inference on each set of cue and outputs the corresponding original segmentation score, logits. Let the logits of the i-th set be denoted as... .

[0044] The uncertainty diagram in step 3) is calculated as follows: For each logits group, first perform a sigmoid transformation to obtain the foreground probability. :

[0045] in, The activation function is sigmoid, and the background probability can be expressed as... The predicted probabilities from the N groups are averaged at the pixel level to obtain the average probability of each pixel in each category (foreground, background). :

[0046] For binary classification (foreground / background), the category When c is the foreground, When c is the background, Prediction based on average probability calculation:

[0047] The calculation results are standardized to the range [0,1] to obtain the prediction uncertainty value for each pixel. .

[0048] Step 4) Construction and training of the uncertainty-aware loss function: During supervised training, a weighted loss based on the uncertainty map u is used, which strengthens the supervision of low-uncertainty pixels and weakly supervises or suppresses the gradient contribution of high-uncertainty pixels. The loss consists of two parts: uncertainty-aware Focal Loss and uncertainty-aware Dice Loss, with a weighting ratio of 20:1; the definitions of each loss are as follows: Uncertainty perception Focal Loss:

[0049] Where m is the number of pixels. Let be the predicted foreground probability of pixel i by the model. For tags, This represents a pixel-level uncertainty value. This is the standard Focal Loss.

[0050] Uncertainty perception Dice Loss:

[0051] in:

[0052]

[0053] in This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. The confidence metric for pixel i (i.e. ), threshold This design is used to filter high-confidence images. The intention behind this design is to contribute Dice statistics only to pixels that meet the confidence criteria, thereby reducing the interference of high-uncertainty pixels on the overall similarity measurement.

[0054] Furthermore, in step 5), pseudo-label generation and semi-supervised joint training are performed: The model trained in step 4) is used to infer from unlabeled fetal ultrasound images, generating a corresponding segmentation mask. This mask is then directly added to the training set as a pseudo-label, participating in training alongside manually labeled data. In the semi-supervised stage, the model still calculates the uncertainty *u* of pseudo-labeled samples and uses uncertainty weighting in the loss function to automatically suppress the interference of high-uncertainty regions on training. Simultaneously, a task prompt mechanism is introduced, incorporating task prompts into the prompt encoding to distinguish whether a sample uses manually labeled or pseudo-labeled data. During forward inference, the model uses this prompt as additional input to adaptively adjust its dependence on labels from different sources during training, thereby enhancing generalization ability and stability under conditions of insufficient labeling.

[0055] To verify the effectiveness of the proposed uncertainty modeling-based fetal ultrasound image segmentation method in medical image segmentation tasks, comparative experiments were conducted under the same dataset, network structure, and training strategy. The dataset used was a fetal ultrasound image segmentation dataset with 15 segments and 30 images per segment. The experiments were set as follows: 1) Do not introduce uncertainty loss; 2) Introduce uncertainty loss; 3) Introduce semi-supervised training, and add the same number of pseudo-labels as manually labeled labels.

[0056] IoU, Dice, and BIoU were used as evaluation metrics to quantitatively analyze the model's segmentation performance. The experimental results are shown in Table 1.

[0057] Table 1. Comparison of the effectiveness of the method of the present invention.

[0058] As can be seen from Table 1, all evaluation indicators have been significantly improved after introducing uncertainty loss, indicating that the proposed uncertainty loss training method can effectively improve the overall segmentation performance of the model.

[0059] Furthermore, in semi-supervised scenarios, the model performance is further improved, indicating that the method of the present invention can effectively utilize unlabeled data and enable the model to still have good generalization performance when labeled data is insufficient.

[0060] Secondly, embodiments of the present invention also provide a fetal ultrasound image segmentation system based on uncertainty modeling, including a processor and a memory, wherein the memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the fetal ultrasound image segmentation method based on uncertainty modeling as described above.

[0061] Thirdly, embodiments of the present invention also provide a computer-readable storage medium, including a readable storage medium on which a computer program is stored, wherein when the computer program is executed, it implements the fetal ultrasound image segmentation method based on uncertainty modeling as described in the above technical solution.

[0062] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art, under the guidance of this invention, can make substitutions or modifications without departing from the scope of protection of the claims of this invention, and all such substitutions or modifications fall within the scope of protection of this invention. The scope of protection of this invention should be determined by the appended claims.

Claims

1. A fetal ultrasound image segmentation method based on uncertainty modeling, characterized in that, Includes the following steps: Step 1: Input fetal ultrasound images, extract features using SAM's encoder, embed a medical image adapter module into the encoder structure, perform domain specialization on the feature extraction process, and enable the encoder to output adapted medical feature maps. Step 2: Randomly perturb the input prompts to generate multiple sets of prompt vectors, and input them together with the adapted medical feature map obtained in Step 1 into the decoder; The decoder performs forward reasoning for each set of prompts to obtain multiple sets of segmentation probability maps; Step 3: Perform pixel-level statistics on the multiple probability maps obtained in Step 2, calculate the prediction entropy, and generate a pixel-level uncertainty map. Step 4: Construct an uncertainty-aware loss function based on the uncertainty graph obtained in Step 3, and use labeled data to supervise the training of the model constructed in Steps 1-2. Step 5: Use the trained model to generate pseudo-labels for inference on unlabeled fetal ultrasound images, and perform semi-supervised training together with real labeled data. Step 6: Input the fetal ultrasound image to be segmented into the finally trained model, output the segmentation mask of the target fetal structure, and generate the corresponding pixel-level uncertainty map to provide clinical segmentation results and their reliability reference.

2. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 1, characterized in that: In step 1, a medical image adapter is embedded in each Transformer Block of the SAM encoder. The medical image adapter performs lightweight adjustments on the features in both the channel dimension and the spatial dimension. In the channel dimension, global average pooling is performed on the input feature map to obtain a C×1×1 channel description vector. Then, channel compression and restoration are achieved through two linear layers, and the channel weights are obtained through the sigmoid function. These weights are multiplied by the input features and used as the input for the next layer. In the spatial dimension, the input feature map is downsampled by 2 times using convolution, and then deconvolution is used to restore it to the original spatial size while keeping the number of channels unchanged, thereby achieving a moderate adaptive adjustment of the spatial structure; and each adapter uses skip connections.

3. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 1, characterized in that: The specific implementation of step 2 includes: for each input image, the user provides a prompt point or prompt box; in order to build a prompt enhancement mechanism, the original prompt is randomly perturbed at the pixel level to generate N sets of prompts, and each set of perturbed prompts and the adapted medical feature map obtained in step 1 are input into the decoder together. The decoder performs forward inference once for each set of prompts and outputs the corresponding original segmentation score logits, i.e., the segmentation probability map.

4. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 1, characterized in that: The specific implementation method of step 3 is as follows: Let the probability map of the i-th group be denoted as . For each group of segmentation probability maps, a sigmoid transformation is first performed to obtain the foreground probability. : in, It is the activation function sigmoid, and the background probability is expressed as... The average probability of each pixel across all categories is obtained by averaging the predicted probabilities at the pixel level. : For binary classification, the category Calculate the prediction entropy based on the average probability: The calculation results are standardized to the range [0,1] to obtain the prediction uncertainty value for each pixel. .

5. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 1, characterized in that: The uncertainty-aware loss function in step 4 includes uncertainty-aware Focal Loss and uncertainty-aware DiceLoss, which are weighted based on the uncertainty graph. Strong supervision is applied to high-confidence regions, and the loss contribution is reduced to high-uncertainty regions.

6. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 5, characterized in that: Uncertainty perception Focal Loss is as follows: Where m is the number of pixels. Let be the predicted foreground probability of pixel i by the model. For tags, This represents a pixel-level uncertainty value. This is the standard Focal Loss.

7. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 5, characterized in that: The uncertainty perception Dice Loss is as follows: in: in, This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. The confidence metric for pixel i is... threshold Used to filter high-confidence regions, where m is the number of pixels. Let be the predicted foreground probability of pixel i by the model. For tags, The uncertainty value is at the pixel level; by contributing Dice statistics only to pixels that meet the confidence conditions, the interference of high-uncertainty pixels on the overall similarity measurement is reduced.

8. The fetal ultrasound image segmentation method based on uncertainty modeling as described in claim 1, characterized in that: Step 5, pseudo-label generation and semi-supervised training, includes: The model trained in step 4 is used to infer unlabeled fetal ultrasound images, generating corresponding segmentation masks. These masks are then directly added to the training set as pseudo-labels, participating in training alongside manually labeled data. In the semi-supervised stage, the model still calculates the uncertainty of pseudo-labeled samples and uses uncertainty weighting in the loss function to automatically suppress the interference of high-uncertainty regions on training. Simultaneously, a task prompting mechanism is introduced, incorporating task prompts into the prompt encoding to distinguish whether a sample uses manually labeled or pseudo-labeled data. During forward inference, the model uses these prompts as additional inputs to adaptively adjust the dependence on labels from different sources during training.

9. A fetal ultrasound image segmentation system based on uncertainty modeling, characterized in that: It includes a processor and a memory, the memory being used to store program instructions, and the processor being used to call the program instructions in the memory to execute the fetal ultrasound image segmentation method based on uncertainty modeling as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The method includes a readable storage medium on which a computer program is stored, which, when executed, implements the fetal ultrasound image segmentation method based on uncertainty modeling as described in any one of claims 1-8.