A contraceptive device ultrasound image segmentation method and model construction method thereof
By constructing a multi-scale feature enhancement module, an adaptive fine-grained feature extraction and segmentation module and a domain generalized image segmentation module, the problem of low accuracy in ultrasonic image segmentation of the domain is solved, and more efficient and accurate image segmentation is achieved, which enhances the robustness and generalization ability of the model.
Patent Information
- Application Number
- CN202510250150.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The prior art is difficult to deal with a diverse injury type and complex scanning environment in the segmentation of ultrasound images of the IUD, resulting in low segmentation accuracy, especially poor performance when dealing with subtle injuries and cross-domain data.
Using a multi-scale feature enhancement module, an adaptive fine-grained feature extraction and segmentation module and a domain generalized image segmentation module, the feature enhancement unit and cross-level feature fusion unit of the multi-channel convolution layer and the pooling layer are combined with the spatial attention mechanism and the Dropout layer, and the self-attention feature fusion and domain segmentation, the ultrasonic image segmentation model of the IUD is further constructed through self-attention feature fusion and domain segmentation.
It improves the accuracy and efficiency of ultrasonic image segmentation of the IUD, reduces artificial errors, enhances the robustness and generalization capabilities of the model, and can show strong segmentation capabilities under different equipment and environmental conditions.
Smart Images

Figure CN119741316B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image segmentation based on computer vision, and in particular relates to a method for segmenting an ultrasound image of a contraceptive device and a model construction method thereof. Background Art
[0002] As a common long-term contraceptive tool, intrauterine devices (IUDs) are widely used around the world. However, as the use time increases, IUDs may have various problems that affect their effectiveness and safety, such as breakage, dislocation, deformation, downward movement, inversion, and even ectopic problems. These damages not only affect the service life of the IUD, but may also pose potential risks to women's health. Traditional methods for detecting IUD damage rely on manual inspection, which is not only time-consuming and labor-intensive, but also subjective and error-prone. With the development of medical imaging technology, ultrasound imaging has become an important auxiliary means for doctors to identify IUD damage and position changes, but how to quickly and accurately detect subtle damage and position changes in ultrasound images remains a difficult point. Therefore, it is particularly important to develop an IUD ultrasound image segmentation method based on deep learning. Detection and early warning of high-degree damage to the local IUD can also prevent further changes in the shape mechanical structure that cause breakage, dislocation, and deformation. This method can improve the accuracy and efficiency of IUD ultrasound image segmentation, reduce manual errors, and provide doctors with fast and accurate decision support, thereby protecting the health of users.
[0003] At present, there are several problems in the research on IUD image segmentation, such as traditional image processing methods: Traditional IUD image segmentation methods mainly rely on image processing techniques, such as edge detection and morphological analysis. Edge detection algorithms such as the Canny operator can extract the contour of the IUD to achieve segmentation; morphological operations achieve segmentation of the IUD damaged area and background area through expansion and corrosion operations; template matching and geometric constraints are widely used to detect abnormal positions of IUDs, using predefined IUD templates to compare with the IUD in the image to determine whether it is displaced or abnormally positioned. The main disadvantages of these methods are that they are sensitive to noise and have low accuracy when dealing with complex backgrounds.
[0004] Existing technologies face multiple challenges in IUD ultrasound image segmentation. Traditional methods often have difficulty coping with diverse injury types and complex scanning environments, resulting in low segmentation accuracy, especially when dealing with subtle injuries and cross-domain data. In addition, existing technologies are insufficient in dealing with device differences, noise interference, and robustness and generalization capabilities in different industry application scenarios. Summary of the invention
[0005] In view of the above problems, the first aspect of the present invention provides a method for constructing an IUD ultrasound image segmentation model, comprising the following process:
[0006] Step 1, collecting and acquiring different types of IUD ultrasound image datasets;
[0007] Step 2, preprocessing the image dataset and dividing it into a source domain dataset and a target domain dataset; the source domain dataset is the standardized source domain image and its corresponding label information, and the label information includes the IUD damage pixel label and the background pixel label;
[0008] Step 3, constructing an IUD ultrasound image segmentation model, which includes a multi-scale feature enhancement module, an adaptive fine-grained feature extraction and segmentation module, and a domain generalization image segmentation module;
[0009] The multi-scale feature enhancement module is used to enhance the ultrasound image of the IUD to highlight the difference between the IUD damage features and the features of other tissues;
[0010] The adaptive fine-grained feature extraction and segmentation module includes a spatial attention layer, a dropout layer, a convolution layer, and a self-attention feature fusion mechanism. First, the spatial attention layer is used to perform adaptive fine-grained feature extraction and segmentation on the hierarchical features output after enhancement, and the attention weights of different spatial positions of multi-scale features are calculated. The fine-grained feature extraction and segmentation are performed, and the result of the previous segmentation is used as the input of the next extraction to obtain the first The result of sub-fine-grained feature extraction and segmentation; then convolution kernels of different sizes are used to further extract and fuse multi-scale features; finally, the fine-grained features of different levels are fused through the self-attention mechanism to output fine-grained IUD damage feature representation and background feature representation;
[0011] The domain generalization image segmentation module uses the fine-grained feature representation as input to obtain the IUD ultrasound image segmentation result;
[0012] Step 4, using the source domain dataset and the target domain dataset to train and optimize the model to obtain the final IUD ultrasound image segmentation model;
[0013] Preferably, the preprocessing in step 2 includes image filtering, standardization processing and label processing of the source domain image;
[0014] Gaussian filter is used to perform denoising on the collected source domain and target domain IUD ultrasound images respectively;
[0015] After that, the filtered and denoised image is standardized, and the standardization process is as follows:
[0016] ;
[0017] in, and are the mean and standard deviation of the filtered image respectively; The standardized image is at position The value at ; The image after filtering and denoising is at position The values at the source and target domains after standardization are and ;
[0018] The labels of the source domain image are the pixel position information of the IUD damaged area and its background pixel position information and pixel type ; It includes calibrating the pixel position of the IUD damaged area and the background pixel position in the image; It includes IUD damaged pixel categories and background pixel categories. The IUD damaged pixel categories include breakage damage, detachment damage and deformation damage; the background pixel categories include the undamaged area of the IUD, uterus, ovary, fallopian tube, vascular tissue, fat tissue and muscle tissue.
[0019] Preferably, the multi-scale feature enhancement module combines the feature enhancement unit FEU of the multi-channel convolution layer and the pooling layer with the cross-level feature fusion unit CIL, specifically:
[0020] First, the input image is upsampled, downsampled, and processed using the convolution kernel Conv1, and three different levels of feature expressions are obtained;
[0021] Then, two feature enhancement units (FEUs) are used to perform multi-scale feature enhancement on the features of three different levels. To ensure effective communication and sharing between features at different levels, the cross-level feature fusion unit (CIL) fuses features from different levels.
[0022] The fused hierarchical features are input into convolution kernels of different sizes and FEU for further multi-scale feature extraction and enhancement. At the same time, FEU further enhances the features of different scales to improve their expressiveness in the segmentation process. Then, CIL is used to perform cross-level feature fusion again to ensure that the features between different levels are fully shared and integrated.
[0023] Finally, the features at different levels are processed through the maximum pooling layer and the ReLU activation function respectively to further highlight the key features of IUD damage, and the feature expression ability is improved through the nonlinear activation function to obtain enhanced multi-scale features.
[0024] Preferably, the feature enhancement unit FEU is specifically:
[0025] Firstly, the multi-scale features in the IUD ultrasound image are extracted by using convolution kernels Conv7, Conv5 and Conv3 of different sizes. The convolution kernel Conv7 is used to capture the global structural information, while the convolution kernel Conv3 focuses on extracting the detail features in the image. Next, the average pooling layer Avgpool is used to pool and integrate the features of different scales to reduce the redundancy of information and improve the expressiveness of features. To ensure that the features of different scales can maintain the same dimension, the maximum pooling layer Maxpool and the convolution kernels Conv5 and Conv3 of different sizes are further used to extract the features. Subsequently, the ReLU activation function is used to improve the nonlinear expression ability of the model. Finally, the features extracted at different scales are merged through the Concat channel splicing operation.
[0026] Preferably, the cross-level feature fusion unit CIL is specifically:
[0027] First, features are integrated through the global average pooling layer to compress features of different levels into a global representation; then, ReLU activation function and Sigmoid activation function are applied to improve the mapping ability and nonlinear expression ability of feature fusion; the CIL unit introduces residual connection, so that features of different levels can be effectively optimized and stably fused during cross-level transmission; finally, features from different levels are merged through channel splicing operation, and the convolutional layer Conv1 is used to compress the spliced features to ensure that the fused features can be smoothly transmitted and seamlessly connected with the features of adjacent levels.
[0028] Preferably, the adaptive fine-grained feature extraction and segmentation module is specifically:
[0029] First, the spatial attention layer is used to perform adaptive fine-grained feature extraction and segmentation on the three hierarchical features output from the multi-scale feature enhancement module. The spatial attention mechanism calculates the attention weights of different spatial positions of the multi-scale features to focus on the key details of the IUD damage area and suppress irrelevant background noise. The processing process of the spatial attention layer is as follows:
[0030] ;
[0031] in, is the multi-scale feature of the input, including , and , is the learned spatial attention weight, is the attention core, is the bias term, is the Sigmoid activation function, represents the convolution operation, is the feature extracted by spatial attention for the first time, Represents the spatial attention layer processing function;
[0032] The module introduces the Dropout layer to reduce the complexity of the model and enhance the generalization ability. The probability of Dropout is ;
[0033] After that, follow the process The fine-grained feature extraction and segmentation based on spatial attention are performed again, and the result of the previous segmentation is used as the input of the next extraction, and finally the first The result of sub-fine-grained feature extraction and segmentation is ;
[0034] Afterwards, convolution kernels Conv1, Conv3, and Conv5 of different sizes are used to further extract and fuse multi-scale features to improve the segmentation capability of IUD micro-lesions and ensure that the three levels of features after processing have the same data dimension. The Sigmoid activation function is used for nonlinear processing. The process is expressed as:
[0035] ;
[0036] in, Represents the convolution operation, including three convolution kernels: Conv1, Conv3 and Conv5. represents the Sigmoid activation function, It is the feature after convolution, which contains three levels of features;
[0037] Finally, the fine-grained features at different levels are fused through the self-attention mechanism; the fusion process is:
[0038] ;
[0039] in, is the standardized coefficient, represents the softmax function; , and Respectively represent the characteristics The query, key and value matrices are linearly transformed and finally output as fine-grained feature representation .
[0040] Preferably, the domain generalization image segmentation module is specifically:
[0041] First, the fine-grained feature representation obtained from the adaptive fine-grained feature extraction and segmentation module Input to the feature enhancement unit FEU for feature integration; after FEU processing, the features will be processed nonlinearly through the convolution layer Conv3 and the ReLU activation function. The process is:
[0042] ;
[0043] in, is the FEU unit processing function, is the convolution operation, is the ReLU activation function; is the final feature after mapping;
[0044] After processing Input image segmentation network, First, the pixel position features of the IUD damaged area are further extracted through the Conv1 convolution layer; then, the features are processed through the fully connected layer, and the Sigmoid activation function is used to obtain the segmentation result, and finally the pixel coordinates of the IUD damaged area and the background area are accurately determined, that is:
[0045] ;
[0046] in, The convolution kernel is 1*1 in size; is the fully connected layer, are the pixel coordinates of the IUD damage area and the pixel coordinates of the background area, and , is the coordinate of the pixel point;
[0047] Through The Conv1 convolution operation is performed to further reduce the features, and then processed through the fully connected layer, and finally the Softmax activation function is applied to obtain the probability distribution of the category to which the pixel coordinate belongs:
[0048] ;
[0049] ;
[0050] in, It is the category information of all pixels in the ultrasound image of the IUD; and Together they constitute the IUD ultrasound image segmentation result;
[0051] At the same time, a domain segmenter is designed to help the model have better generalization performance in a multi-domain environment by learning the segmentation training between the source domain and the target domain. Perform convolution processing, then classify through the fully connected layer and Softmax function, and output the corresponding domain segmentation result; that is:
[0052] ;
[0053] in, The domain segmentation result.
[0054] Preferably, in the model training process of step 4, corresponding loss functions are designed for the two tasks of pixel-level segmentation of the IUD damage position and background information in the IUD ultrasound image and domain segmentation:
[0055] ;
[0056] in, , and They are pixel position loss function, pixel category loss function and domain segmentation loss function respectively; and They are the image segmentation result position parameters and the real pixel position parameters respectively; Indicates that the pixel category prediction result is The probability of Indicates that the pixel is The true labels of the categories, and is the total number of pixel categories, including ten categories: IUD breakage damage, IUD detachment damage, IUD deformation damage, IUD undamaged area, uterus, ovary, fallopian tube, vascular tissue, fat tissue and muscle tissue; and are the domain segmentation results and the true results respectively; therefore, the overall loss function is:
[0057] ;
[0058] During the model training phase, source domain datasets and target domain datasets are used for training. A contrastive learning strategy is adopted during the training process to enhance the generalization ability of the model. The training data is trained end-to-end through a multi-scale feature enhancement module, a fine-grained feature extraction and segmentation module, and a domain generalization image segmentation module to optimize the model parameters and make them converge.
[0059] Preferably, a particle swarm algorithm is used to optimize the number of spatial attention layers and dropout layers in the fine-grained feature extraction and segmentation module, and the specific steps include:
[0060] S1, initialize particle swarm: randomly generate particles, and each particle corresponds to the number of spatial attention layers and Dropout layers, that is, the particle swarm is initialized as: ;
[0061] S2, calculate the adaptability of each particle: iterate according to the number of spatial attention layers and Dropout layers corresponding to each particle, and calculate the adaptability of each particle Loss value, the calculation result is the adaptability of the corresponding particle;
[0062] S3: The number of spatial attention layers and Dropout layers corresponding to the particle with the smallest adaptability is taken as the current optimal number. ;
[0063] S4, update each particle:
[0064] ;
[0065] in, is a random number generator whose result is an interval A random number; is the update speed weight, and ; and Before and after the update particles, and ;
[0066] S5, repeat steps S2 to S4 until the preset number of iterations is reached, and the global optimal particle output from the last iteration is The corresponding parameters are rounded as the optimal number of spatial attention layers and Dropout layers.
[0067] The second aspect of the present invention provides a method for segmenting an ultrasound image of an IUD, wherein the ultrasound image segmentation model of the IUD constructed by the construction method described in the first aspect is deployed on the back end of a medical server, and includes the following process:
[0068] S1, scans the ultrasound image of the IUD, obtains the original image data through the device, and performs image filtering and standardization processing to convert it into a standard input image format that meets the requirements of the system;
[0069] S2, input the standardized image into the IUD ultrasound image segmentation model, firstly, the multi-scale feature enhancement module is used to perform multi-scale feature enhancement to enhance the details and structural information of the image; then, the enhanced features are extracted more accurately through the adaptive fine-grained feature extraction and segmentation module to weaken the background information in the image, and the IUD damage area and the background area are segmented through the domain generalization image segmentation module, and finally the position information of each pixel in the image and its predicted segmentation category are output as the segmentation result;
[0070] S3, the doctor analyzes and makes decisions based on the IUD ultrasound image segmentation results provided by the system and combined with clinical experience.
[0071] Compared with the prior art, the present invention has the following beneficial effects:
[0072] (1) Multi-scale feature enhancement module design: Through the design of feature enhancement unit (FEU) and cross-level feature fusion unit (CIL) combining multi-channel convolutional layer and pooling layer, the present invention effectively enhances the detail features in the ultrasound image of the IUD, enabling the model to better capture damage information from different scales and improve the expression ability of image features;
[0073] (2) Adaptive fine-grained feature extraction and segmentation module: The adaptive fine-grained feature extraction and segmentation module introduces the spatial attention mechanism and the Dropout layer, which enables the model to dynamically adjust the focus area, effectively suppress background noise and enhance sensitivity to minor damage, ultimately improving the segmentation accuracy of IUD images;
[0074] (3) Domain generalization image segmentation module combined with domain segmentation: By combining the domain segmenter, the model can show strong generalization ability under different equipment and environmental conditions. In addition, by constructing source domain and target domain datasets and performing comparative learning training, the performance degradation problem in cross-domain scenarios is effectively solved, thereby enhancing the robustness and generalization ability of IUD image segmentation.
[0075] (4) Particle swarm algorithm optimizes the adaptive fine-grained feature extraction and segmentation module: By optimizing the configuration of the spatial attention layer and Dropout through the particle swarm algorithm, the adaptive fine-grained feature extraction and segmentation module of the present invention can automatically select the optimal network structure, so that the segmentation accuracy and stability of the model in complex environments are further enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 The figure is an overall flow chart of the method for auxiliary diagnosis of abnormality of IUD of the present invention.
[0077] Figure 2 This is a network structure diagram of the multi-scale feature enhancement module of the present invention.
[0078] Figure 3 This is a network structure diagram of the FEU feature enhancement unit of the present invention.
[0079] Figure 4 This is the CIL cross-level feature fusion network structure diagram of the present invention.
[0080] Figure 5 This is the network structure diagram of the fine-grained feature extraction and segmentation module of the present invention.
[0081] Figure 6This is the network structure diagram of the domain generalized image segmentation module of the present invention.
[0082] Figure 7 The figure is a comparison chart of the experimental results of the present invention and other methods. DETAILED DESCRIPTION
[0083] The overall technical route of the present invention is as follows Figure 1 As shown:
[0084] Construction of IUD ultrasound image segmentation dataset: including the construction of source domain dataset and target domain dataset. The source domain dataset includes IUD ultrasound images and pixel labels in the images, while the target domain dataset only contains IUD ultrasound images.
[0085] Design of multi-scale feature enhancement module: Based on the multi-channel convolution layer and the pooling layer, the FEU feature enhancement unit and the CIL cross-level feature fusion unit are designed, and a multi-scale feature enhancement module is constructed to enhance the ultrasound image of the IUD, highlighting the feature differences between the IUD damage and other irrelevant backgrounds;
[0086] Constructing an adaptive fine-grained feature extraction and segmentation module: Based on the spatial attention layer, an adaptive fine-grained feature extraction and segmentation module is constructed. The model inputs the enhanced features into the module to obtain the fine-grained features of the segmented IUD image, capture the detailed features of IUD damage, and suppress background features.
[0087] A domain generalization image segmentation module is constructed, and fine-grained features are input into the module to obtain segmentation results. The module also integrates the domain segmenter to generalize the IUD ultrasound image segmentation model, thereby ensuring the robustness of the segmentation results.
[0088] Model training and optimization: design the loss function and contrastive learning training strategy for model training, and use the constructed source domain dataset and target domain dataset to train and optimize the model; in addition, use the particle swarm algorithm to optimize the number of spatial attention layers and dropout in the adaptive fine-grained feature extraction and segmentation module , thus obtaining the optimal adaptive fine-grained feature extraction and segmentation module network model;
[0089] Finally, the trained and optimized multi-scale feature enhancement module, optimal adaptive fine-grained feature extraction and segmentation module and domain generalization image segmentation module are deployed on the server backend to assist doctors in making decisions.
[0090] The present invention will be further described below in conjunction with the embodiments.
[0091] 1. Construction of IUD Ultrasound Image Segmentation Dataset
[0092] Since the distribution of IUD ultrasound images under different hospitals, equipment or patient conditions may be significantly different, the directly trained model is likely to have poor generalization performance. Therefore, in order to ensure accurate segmentation of IUD ultrasound images under different equipment and acquisition environments, the present invention constructs source domain and target domain IUD ultrasound image segmentation datasets, and improves the generalization ability and robustness of the model through comparative learning in the subsequent training process. The specific contents of the source domain and target domain dataset construction include:
[0093] Source domain ultrasound image data acquisition: Source domain data acquisition uses a fixed model of ultrasound equipment to ensure the consistency and accuracy of image quality; and the equipment settings, scanning angles and other parameters remain stable. The acquisition process is carried out in a controlled environment to minimize the impact of external factors on image quality; operators scan according to a unified process to ensure that the features of the IUD are clearly identifiable, and ultimately a large amount of high-quality source domain ultrasound image acquisition data is collected ;
[0094] Target domain image data collection: The target domain data collection aims to enhance the generalization ability of the model and simulate the diversity in actual applications. Therefore, the target data comes from ultrasound equipment of different brands and models. Different scanning angles, patient positions and other factors are considered during the collection process to ensure that the image has a variety of changes and noise. Finally, a large amount of target domain ultrasound image acquisition data is obtained. ;
[0095] Image filtering and standardization: Gaussian filters are used to perform denoising on the collected source domain and target domain IUD ultrasound images to reduce the impact of noise on subsequent analysis. The specific denoising process is as follows:
[0096] ;
[0097] in, is the original image at position The pixel value at is the Gaussian kernel function, is the window size of Gaussian filtering, The filtered image at position Therefore, the source domain and target domain images after Gaussian filtering are and ;
[0098] After that, the filtered and denoised images are standardized to further improve the training effect of the model. The standardization process is:
[0099] ;
[0100] in, and are the mean and standard deviation of the filtered image respectively; The standardized image is at position Therefore, the standardized source domain and target domain images are and ;
[0101] Source domain data labeling: Use professional image labeling software LabelImg to label the source domain ultrasound image; the operator needs to label the pixels of the IUD damage area and all background areas in the image. and type annotations ,in Including breakage damage, detachment damage and deformation damage; background pixel categories include undamaged areas of the IUD, uterus, ovaries, fallopian tubes, vascular tissue, adipose tissue and muscle tissue; In addition, pixel annotation should be accurate and clear to avoid inconsistent labels due to human errors;
[0102] Therefore, the source domain dataset is the standardized source domain image And its corresponding label information ; The target domain dataset is the standardized target domain image .
[0103] 2. Multi-scale feature enhancement module design
[0104] The present invention designs a feature enhancement unit (FEU) and a cross-level feature fusion unit (CIL) based on a multi-channel convolutional layer and a pooling layer, and combines the two to construct a multi-scale feature enhancement module for enhancing the ultrasound image of the IUD; the network structure of the multi-scale feature enhancement module is as follows Figure 2 As shown in the figure, the ultrasound image is used as input to finally obtain the enhanced multi-scale features, which specifically includes the following processes:
[0105] (1) Since the angle and distance of the actual scanned ultrasound image are relatively flexible, the image size standard may be inconsistent, which will eventually affect the stability of the IUD ultrasound image segmentation; therefore, the multi-scale feature enhancement module of the present invention first upsamples, downsamples and uses a convolution kernel (Conv1) to process the input image, thereby improving the model's feature extraction capability for images of different sizes and obtaining three different levels of feature expressions;
[0106] (2) After that, two feature enhancement units (FEUs) are used to perform multi-scale feature enhancement on the features at three different levels. Specifically, the network structure of the FEU unit is as follows: Figure 3 As shown;
[0107] First, the multi-scale features in the IUD ultrasound image are extracted by using convolution kernels of different sizes (including Conv7, Conv5 and Conv3), where larger convolution kernels (such as Conv7) are used to capture global structural information, while smaller convolution kernels (such as Conv3) focus on extracting detailed features in the image; Next, the average pooling layer (Avgpool) is used to pool and integrate the features of different scales to reduce information redundancy and improve the expressiveness of the features; In order to ensure that the features of different scales can maintain consistent dimensions, the maximum pooling layer (Maxpool) and convolution kernels of different sizes (including Conv5 and Conv3) are further used to extract features to ensure the consistency and effectiveness of the features; Subsequently, the ReLU activation function is used to improve the nonlinear expression ability of the model, and finally the features extracted at different scales are merged through the Concat channel splicing operation. Through this multi-scale feature enhancement method, the FEU unit can effectively extract and fuse the deep features obtained from different scales in the IUD ultrasound image, thereby providing a richer and more detailed feature expression for the subsequent segmentation of the IUD damage area and the background area;
[0108] (3) To ensure effective communication and sharing between features at different levels, a cross-level feature fusion (CIL) unit is designed. The main function of the CIL unit is to fuse features from different levels to enhance the information flow and the synergy of multi-level features. Specifically, the network structure of the CIL unit is as follows: Figure 4 As shown;
[0109] First, features are integrated through the global average pooling layer to compress features from different levels into a global representation. Next, the ReLU activation function and the Sigmoid activation function are applied to improve the mapping ability and nonlinear expression ability of feature fusion. These two activation functions can help the model better capture the complex relationship between cross-level features. In order to further ensure the stability and consistency of feature sharing, the CIL unit introduces a residual connection, so that features from different levels can be effectively optimized and stably fused during cross-level transmission. Finally, features from different levels are merged through the channel splicing operation, and the convolutional layer (Conv1) is used to compress the spliced features, thereby ensuring that the fused features can be smoothly transmitted and seamlessly connected with the features of adjacent levels. The CIL unit enables the model to share and fuse information between different levels, which helps to improve the final segmentation accuracy and robustness.
[0110] (4) The fused hierarchical features are input into the convolution kernel (including Conv5 and Conv1) and FEU unit for further multi-scale feature extraction and enhancement; through convolution kernels of different sizes, the model can capture the information of global structure and detail features, thereby ensuring that the features of IUD damage can be fully expressed. At the same time, the FEU unit further enhances the features of different scales and improves its expressiveness in the segmentation process; then, the CIL unit is used to perform cross-level feature fusion again to ensure that the features between different levels are fully shared and integrated. Through this cross-scale and cross-level fusion and enhancement, the model can better perceive and express the diverse features of IUD damage and provide richer and more efficient feature representation;
[0111] (5) Finally, the features at different levels are processed through the maximum pooling layer and the ReLU activation function to further highlight the key features of IUD damage, weaken the background features, and improve the feature expression ability through the nonlinear activation function, thereby obtaining enhanced multi-scale features;
[0112] Therefore, the processing process of the multi-scale feature enhancement module is defined as:
[0113] ;
[0114] in, Represents the input ultrasound image to be enhanced, including the standardized source domain image and the target domain image ; represents the multi-scale feature enhancement function, and its processing process is the above overall processing process; is the multi-scale feature after feature enhancement, and It includes three levels of features, namely:
[0115] ;
[0116] in, , and Represent three levels of multi-scale features respectively.
[0117] 3. Design of Adaptive Fine-Grained Feature Extraction and Segmentation Module
[0118] In order to improve the segmentation accuracy of the IUD damaged area and the background area, the present invention designs an adaptive fine-grained feature extraction and segmentation module (hereinafter referred to as the fine-grained feature extraction and segmentation module), which is constructed based on the spatial attention layer, the Dropout layer, the convolution layer (including Conv1, Conv3 and Conv5) and the self-attention feature fusion mechanism. The fine-grained feature extraction and segmentation module aims to further improve the segmentation effect by capturing the tiny details of the IUD damage and weakening the background features. The network structure of the fine-grained feature extraction and segmentation module is as follows: Figure 5 The specific processing steps include:
[0119] (1) First, the spatial attention layer is used to adaptively extract and segment the three levels of features output from the multi-scale feature enhancement module (S2). The spatial attention mechanism calculates the attention weights of different spatial positions of multi-scale features to focus on the key details of the damaged area and suppress irrelevant background noise. This mechanism can effectively improve the model's sensitivity to subtle damage features. Therefore, the processing process of the spatial attention layer is:
[0120] ;
[0121] in, is the multi-scale feature of the input, including , and , is the learned spatial attention weight, is the attention core, is the bias term, is the Sigmoid activation function, represents the convolution operation, is the feature extracted by spatial attention for the first time, Represents the spatial attention layer processing function;
[0122] To avoid overfitting, the module introduces a Dropout layer to reduce the complexity of the model and enhance generalization ability. The probability of Dropout is , the process is expressed as:
[0123] ;
[0124] in, is the Dropout processing function, This is the feature extraction result after the first processing by the Dropout layer;
[0125] After that, follow the process The fine-grained feature extraction and segmentation based on spatial attention are performed again, and the result of the previous segmentation is used as the input of the next extraction, and finally the first The result of sub-fine-grained feature extraction and segmentation is (This feature contains three levels of extraction results);
[0126] Afterwards, convolution kernels of different sizes (Conv1, Conv3, and Conv5) are used to further extract and fuse multi-scale features, thereby improving the segmentation capability of IUD micro-lesions and ensuring that the three levels of features after processing have the same data dimension, and nonlinear processing is performed through the Sigmoid activation function; the process is expressed as:
[0127] ;
[0128] in, Represents the convolution operation, including three convolution kernels: Conv1, Conv3 and Conv5. represents the Sigmoid activation function, It is the feature after convolution (including three levels of features);
[0129] Finally, the fine-grained features at different levels are fused through the self-attention mechanism; the self-attention mechanism strengthens the interaction between features by calculating global dependencies and effectively fuses multi-level fine-grained features, thereby capturing the complex details of IUD damage and suppressing background information. The feature fusion process based on self-attention is:
[0130] ;
[0131] in, is the standardized coefficient, represents the softmax function, It is the result of fine-grained feature extraction and segmentation; , and Respectively represent the characteristics The query, key, and value matrices obtained by linear transformation are:
[0132] ;
[0133] ;
[0134] ;
[0135] in, , and Represent three different learnable weight matrices respectively; therefore, through self-attention feature fusion, the fine-grained feature extraction and segmentation module can integrate fine-grained features of different levels and scales, enhance the model's perception of IUD damage, and finally output fine-grained feature representation .
[0136] 4. Design of generalized image segmentation module
[0137] The domain generalization image segmentation module designed by the present invention converts fine-grained features into Input this module to obtain the IUD ultrasound image segmentation result; and by designing a domain classifier, the robustness of the model in cross-domain scenarios is enhanced, and the segmentation accuracy and generalization ability are improved. The network structure of the domain generalization image segmentation module is as follows: Figure 6 As shown, specifically including:
[0138] (1) First, the fine-grained feature representation obtained from the adaptive fine-grained feature extraction and segmentation module (S3) Input to the feature enhancement unit (FEU) for further feature integration. The role of FEU is to enhance the fine-grained features of multiple scales to ensure that the model can extract effective information from damage features of different scales. After FEU processing, the features will be processed nonlinearly through the convolution layer (Conv3) and the ReLU activation function to improve the model's expression ability and nonlinear mapping ability; the process is:
[0139] ;
[0140] in, is the FEU unit processing function, is the convolution operation, is the ReLU activation function; is the final feature after mapping;
[0141] (2) The processed features Enter the image segmentation network, whose purpose is to segment the specific location of IUD damage in the image. First, the pixel position features of the IUD damaged area are further extracted through the Conv1 convolution layer; then, the features are processed through the fully connected layer, and the Sigmoid activation function is used to obtain the segmentation result, and finally the pixel coordinates of the IUD damaged area and the background area are accurately determined, that is:
[0142] ;
[0143] in, The convolution kernel is 1*1 in size; is the fully connected layer, are the pixel coordinates of the IUD damage area and the pixel coordinates of the background area, and , is the coordinate of the pixel point;
[0144] (3) The pixel classification network is used to determine the type of pixel points in the IUD ultrasound image; The Conv1 convolution operation is performed to further reduce the features, and the fully connected layer is processed. Finally, the Softmax activation function is applied to obtain the probability distribution of the category to which the pixel coordinates belong. This process effectively identifies the pixels in the IUD damage area and ensures the accuracy of the pixel classification in the segmentation result. That is, the pixel classification result is:
[0145] ;
[0146] in, It is the category information of all pixels in the ultrasound image of the IUD; and Together they constitute the IUD ultrasound image segmentation result;
[0147] (4) In order to improve the generalization ability of the model, the present invention additionally designs a domain segmenter. The segmenter helps the model to have better generalization performance in a multi-domain environment by learning the segmentation training between the source domain and the target domain, thereby improving the robustness and adaptability in practical applications. Perform convolution processing (such as Conv3), then classify pixels through the fully connected layer and Softmax function, and output the corresponding domain segmentation results; that is:
[0148] ;
[0149] in, is the domain pixel classification result.
[0150] 5. Model training and optimization process
[0151] The model training and optimization process in this invention includes two main tasks: pixel-level segmentation of the IUD damage location and background information in the IUD ultrasound image and domain segmentation. A corresponding loss function is designed for each task, and the model is trained using an optimizer; in addition, the number of spatial attention layers and dropout layers in the adaptive fine-grained feature extraction and segmentation module is optimized using a particle swarm algorithm. , thus obtaining the optimal adaptive fine-grained feature extraction and segmentation module network model. The specific steps of this process include:
[0152] (1) Loss function design. In the segmentation of IUD ultrasound images, it is first necessary to accurately segment IUD damage and irrelevant background information. The MSE loss can effectively guide the model to improve the accuracy of position prediction by measuring the difference between the position predicted by the model and the actual annotation. Therefore, the MSE loss is used as the loss function for image segmentation pixel position prediction. For pixel category prediction and domain segmentation, the cross entropy loss is used as the standard method to measure model performance in classification tasks. Therefore, the loss function is designed as:
[0153] ;
[0154] in, , and They are pixel position loss function, pixel category loss function and domain segmentation loss function respectively; and They are the image segmentation result position parameters and the real pixel position parameters respectively; Indicates that the pixel category prediction result is The probability of Indicates that the pixel is The true labels of the categories, and is the total number of pixel categories, including ten categories: IUD breakage damage, IUD detachment damage, IUD deformation damage, IUD undamaged area, uterus, ovary, fallopian tube, vascular tissue, fat tissue and muscle tissue; and are the domain segmentation results and the true results respectively; therefore, the overall loss function is:
[0155] ;
[0156] (2) In the model training phase, source domain datasets and target domain datasets are used for training. During the training process, a contrastive learning strategy is adopted to enhance the generalization ability of the model. After the training data is standardized and denoised, end-to-end training is performed through a multi-scale feature enhancement module, a fine-grained feature extraction and segmentation module, and a domain generalization image segmentation module to optimize the model parameters and make them converge. The Adam optimization algorithm is used during the training process, and the early stopping technique is used to prevent overfitting, thereby ensuring the stability and accuracy of the model.
[0157] (3) In order to further improve the performance of the adaptive fine-grained feature extraction and segmentation module, the present invention uses a particle swarm algorithm to optimize the number of spatial attention layers and dropout layers in the module. The specific steps include:
[0158] S1, initialize particle swarm: randomly generate particles, and each particle corresponds to the number of spatial attention layers and Dropout layers, that is, the particle swarm is initialized as: ;
[0159] S2, calculate the adaptability of each particle: iterate according to the number of spatial attention layers and Dropout layers corresponding to each particle, and calculate the adaptability of each particle Loss value, the calculation result is the adaptability of the corresponding particle;
[0160] S3: The number of spatial attention layers and Dropout layers corresponding to the particle with the smallest adaptability is taken as the current optimal number. ;
[0161] S4, update each particle:
[0162] ;
[0163] in, is a random number generator whose result is an interval A random number; is the update speed weight, and ; and Before and after the update particles, and ;
[0164] S5 repeats steps S2 to S4 until the preset number of iterations is reached. The present invention sets the number of iterations to 50, and the global optimal particle output from the last iteration is The corresponding parameters are rounded as the optimal number of spatial attention layers and Dropout layers;
[0165] Therefore, the particle swarm optimization algorithm is used to adaptively adjust the number of spatial attention layers and dropout layers, thereby optimizing the fine-grained feature extraction and segmentation module; this optimization process can automatically obtain the optimal feature extraction results in the IUD image segmentation task, ultimately improving the segmentation accuracy and generalization ability of the model;
[0166] (4) Finally, the trained and optimized module is used to segment the ultrasound image of the IUD; the ultrasound image to be segmented is input, and the method proposed in the present invention can first obtain the position of each pixel in the image. and type , the segmentation result directly reflects the surface defects of the IUD; in addition, the position of the IUD , and the location of the cervix It can also be segmented out. According to the segmentation result, the pixel coordinates of the center position of the IUD are: ; The length and width of the IUD are ,Width , the pixel position of the center of the cervical os ; Therefore, the horizontal displacement and vertical displacement of the IUD are calculated as:
[0167] ;
[0168] in, is the horizontal displacement, is the vertical displacement; then determine whether the displacement exceeds the displacement threshold:
[0169] ;
[0170] in, and are the horizontal and vertical displacement factors respectively, and their values are adjusted according to the range of medical standards; if Satisfy the above formula or If the above formula is satisfied, it means that the IUD has horizontal or vertical displacement problem. The doctor makes a diagnosis and decision based on the abnormal position data of the IUD.
[0171] 6. Model deployment and application
[0172] Deploy the optimized multi-scale feature enhancement module, adaptive fine-grained feature extraction and segmentation module, and domain generalization image segmentation module to the server backend to ensure that each module runs in an efficient and stable environment, and perform necessary system debugging and performance optimization;
[0173] Scan the ultrasound image of the IUD, obtain the original image data through special equipment, and perform image filtering and standardization processing to convert it into a standard input image format that meets the requirements of the system;
[0174] The standardized image is input into the multi-scale feature enhancement module for multi-scale feature enhancement to improve the details and structural information of the image; then, the enhanced features are extracted more accurately through the adaptive fine-grained feature extraction and segmentation module, and the IUD damage area and background are segmented through the domain generalization image segmentation module, and the segmentation result is finally output;
[0175] Based on the segmentation results provided by the system and combined with clinical experience, the doctor can quickly and accurately analyze and make decisions to confirm the condition of the IUD and whether further treatment measures are needed.
[0176] The experimental evaluation comparison results of the proposed method and the transfer learning method based on convolutional neural network (CNN) and are shown in the figure. Figure 7As shown, AUC is the abbreviation of sensitivity, and "1-specificity" represents the false positive rate. The model performance is evaluated by AUC, and the larger the AUC result, the higher the accuracy of the segmentation result; this experiment plotted the ROC curve through three groups of experimental score data and evaluated the segmentation performance of transfer learning, CNN and the method of the present invention. The results showed that the AUCs of transfer learning and CNN were 0.806 and 0.701, respectively, while the AUC of the method of the present invention was as high as 0.884, indicating that its segmentation accuracy was significantly better than the other two methods. And according to the ROC curve, it was found that the sensitivity of the method of the present invention at most thresholds was significantly higher than that of transfer learning and CNN, showing a stronger IUD ultrasound image segmentation ability and higher accuracy. This shows that the method of the present invention is superior to existing methods in terms of real-time, accuracy and reliability, and has strong potential for clinical application.
[0177] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0178] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A method for constructing an IUD ultrasound image segmentation model, characterized in that: The process includes: Step 1, collecting and acquiring different types of IUD ultrasound image datasets; Step 2, preprocessing the image dataset and dividing it into a source domain dataset and a target domain dataset; the source domain dataset is the standardized source domain image and its corresponding label information, and the label information includes the IUD damage pixel label and the background pixel label; Step 3, constructing an IUD ultrasound image segmentation model, which includes a multi-scale feature enhancement module, an adaptive fine-grained feature extraction and segmentation module, and a domain generalization image segmentation module; The multi-scale feature enhancement module combines the feature enhancement unit FEU of the multi-channel convolution layer and the pooling layer with the cross-level feature fusion unit CIL, and is used to enhance the ultrasound image of the IUD and highlight the feature differences between the IUD damage features and other tissues; The adaptive fine-grained feature extraction and segmentation module includes a spatial attention layer, a dropout layer, a convolution layer, and a self-attention feature fusion mechanism. First, the spatial attention layer is used to perform adaptive fine-grained feature extraction and segmentation on the hierarchical features output after enhancement, and the attention weights of different spatial positions of multi-scale features are calculated. The fine-grained feature extraction and segmentation are performed, and the result of the previous segmentation is used as the input of the next extraction to obtain the first The result of sub-fine-grained feature extraction and segmentation; then convolutional layers of different sizes are used to further extract and fuse multi-scale features; finally, the fine-grained features of different levels are fused through the self-attention mechanism to output fine-grained IUD damage feature representation and background feature representation; The domain generalization image segmentation module uses the fine-grained feature representation as input to obtain the IUD ultrasound image segmentation result; Step 4: Use the source domain dataset and the target domain dataset to train and optimize the model to obtain the final IUD ultrasound image segmentation model.
2. The method for constructing an IUD ultrasound image segmentation model according to claim 1, characterized in that: The preprocessing in step 2 includes image filtering, standardization processing and label processing of the source domain image; Gaussian filter is used to denoise the collected source domain and target domain IUD ultrasound images respectively; After that, the filtered and denoised image is standardized, and the standardization process is as follows: in, and are the mean and standard deviation of the filtered image respectively; The standardized image is at position The value at ; The image after filtering and denoising is at position The values at the source and target domains after standardization are and ; The labels of the source domain image are the pixel position information of the IUD damaged area and its background pixel position information and pixel type ; Including calibrating the pixel position of the IUD damaged area and the background pixel position in the image; It includes IUD damaged pixel categories and background pixel categories. The IUD damaged pixel categories include breakage damage, detachment damage and deformation damage; the background pixel categories include the undamaged area of the IUD, uterus, ovary, fallopian tube, vascular tissue, fat tissue and muscle tissue.
3. The method for constructing an IUD ultrasound image segmentation model according to claim 1, characterized in that: The multi-scale feature enhancement module combines the feature enhancement unit FEU of the multi-channel convolution layer and the pooling layer with the cross-level feature fusion unit CIL, specifically: First, the input image is upsampled, downsampled, and processed using the convolution layer Conv1, and three different levels of feature expressions are obtained; Then, two feature enhancement units (FEUs) are used to perform multi-scale feature enhancement on the features of three different levels. To ensure effective communication and sharing between features at different levels, the cross-level feature fusion unit (CIL) fuses features from different levels. The fused hierarchical features are input into convolutional layers of different sizes and FEU for further multi-scale feature extraction and enhancement. At the same time, FEU further enhances the features of different scales to improve their expressiveness in the segmentation process. Then, CIL is used to perform cross-level feature fusion again to ensure that the features between different levels are fully shared and integrated. Finally, the features at different levels are processed through the maximum pooling layer and the ReLU activation function respectively to further highlight the key features of IUD damage, and the feature expression ability is improved through the nonlinear activation function to obtain enhanced multi-scale features.
4. The method for constructing an IUD ultrasound image segmentation model according to claim 3, characterized in that: The feature enhancement unit FEU is specifically: First, through the convolutional layers Conv7, Conv5 and Conv3 of different sizes, the multi-scale features in the IUD ultrasound image are extracted. The convolutional layer Conv7 is used to capture the global structural information, while the convolutional layer Conv3 focuses on extracting the detailed features in the image. Next, the average pooling layer Avgpool is used to pool and integrate the features of different scales to reduce the redundancy of information and improve the expressiveness of features. In order to ensure that the features of different scales can maintain the same dimension, the maximum pooling layer Maxpool and the convolutional layers Conv5 and Conv3 of different sizes are further used to extract features. Subsequently, the ReLU activation function is used to improve the nonlinear expression ability of the model, and finally the features extracted at different scales are merged through the Concat channel splicing operation.
5. The method for constructing an IUD ultrasound image segmentation model according to claim 4, characterized in that: The cross-level feature fusion unit CIL is specifically: First, features are integrated through the global average pooling layer to compress features of different levels into a global representation; then, ReLU activation function and Sigmoid activation function are applied to improve the mapping ability and nonlinear expression ability of feature fusion; the CIL unit introduces residual connection, so that features of different levels can be effectively optimized and stably fused during cross-level transmission; finally, features from different levels are merged through channel splicing operation, and the convolutional layer Conv1 is used to compress the spliced features to ensure that the fused features can be smoothly transmitted and seamlessly connected with the features of adjacent levels.
6. The method for constructing an IUD ultrasound image segmentation model according to claim 3, characterized in that: The adaptive fine-grained feature extraction and segmentation module is specifically: First, the spatial attention layer is used to perform adaptive fine-grained feature extraction and segmentation on the three hierarchical features output from the multi-scale feature enhancement module. The spatial attention mechanism calculates the attention weights of different spatial positions of the multi-scale features to focus on the key details of the IUD damage area and suppress irrelevant background noise. The processing process of the spatial attention layer is as follows: in, is the multi-scale feature of the input, including , and , is the learned spatial attention weight, is the attention core, is the bias term, is the Sigmoid activation function, represents the convolution operation, is the feature extracted by spatial attention for the first time, Represents the spatial attention layer processing function; The module introduces the Dropout layer to reduce the complexity of the model and enhance the generalization ability. The probability of Dropout is ; After that, follow the process The fine-grained feature extraction and segmentation based on spatial attention are performed again, and the result of the previous segmentation is used as the input of the next extraction, and finally the first The result of sub-fine-grained feature extraction and segmentation is ; Afterwards, convolutional layers Conv1, Conv3, and Conv5 of different sizes are used to further extract and fuse multi-scale features to improve the segmentation capability of IUD micro-lesions and ensure that the three levels of features after processing have the same data dimension. The Sigmoid activation function is used for nonlinear processing. The process is expressed as: in, Represents the convolution operation, including three convolution layers: Conv1, Conv3, and Conv5. represents the Sigmoid activation function, It is the feature after convolution, which contains three levels of features; Finally, the fine-grained features at different levels are fused through the self-attention mechanism; the fusion process is: in, is the standardized coefficient, represents the softmax function; , and Respectively represent the characteristics The query, key and value matrices obtained by linear transformation are finally output as fine-grained feature representations. .
7. The method for constructing an IUD ultrasound image segmentation model according to claim 1, characterized in that: The domain generalization image segmentation module is specifically: First, the fine-grained feature representation obtained from the adaptive fine-grained feature extraction and segmentation module Input to the feature enhancement unit FEU for feature integration; After FEU processing, the features will be processed nonlinearly through the convolution layer Conv3 and the ReLU activation function. The process is: in, is the FEU unit processing function, is the convolution operation, is the ReLU activation function; is the final feature after mapping; After processing Input image segmentation network, First, the convolution layer Conv1 is used to further extract the pixel position features of the IUD damaged area; then, the features are processed by the fully connected layer, and the Sigmoid activation function is used to obtain the segmentation result, and finally the pixel coordinates of the IUD damaged area and the background area are accurately determined, that is: in, It is a convolutional layer of size 1*1; is the fully connected layer, are the pixel coordinates of the IUD damage area and the pixel coordinates of the background area, and , is the coordinate of the pixel point; Through The Conv1 convolution operation is performed to further reduce the features, and then processed through the fully connected layer, and finally the Softmax activation function is applied to obtain the probability distribution of the category to which the pixel coordinate belongs: in, It is the category information of all pixels in the ultrasound image of the IUD; and Together they constitute the IUD ultrasound image segmentation result; At the same time, a domain segmenter is designed to help the model have better generalization performance in a multi-domain environment by learning the segmentation training between the source domain and the target domain. Perform convolution processing, then classify through the fully connected layer and Softmax function, and output the corresponding domain segmentation result; that is: in, The domain segmentation result.
8. The method for constructing an IUD ultrasound image segmentation model according to claim 1, characterized in that: In the model training process of step 4, corresponding loss functions are designed for the two tasks of pixel-level segmentation of the IUD damage location and background information in the IUD ultrasound image and domain segmentation: in, , and They are pixel position loss function, pixel category loss function and domain segmentation loss function respectively; and They are the image segmentation result position parameters and the real pixel position parameters respectively; Indicates that the pixel category prediction result is The probability of Indicates that the pixel is The true labels of the categories, and is the total number of pixel categories, including ten categories: IUD breakage damage, IUD detachment damage, IUD deformation damage, IUD undamaged area, uterus, ovary, fallopian tube, vascular tissue, fat tissue and muscle tissue; and are the domain segmentation results and the true results respectively; therefore, the overall loss function is: During the model training phase, source domain datasets and target domain datasets are used for training. A contrastive learning strategy is adopted during the training process to enhance the generalization ability of the model. The training data is trained end-to-end through a multi-scale feature enhancement module, a fine-grained feature extraction and segmentation module, and a domain generalization image segmentation module to optimize the model parameters and make them converge.
9. The method for constructing an IUD ultrasound image segmentation model according to claim 1, characterized in that: The particle swarm algorithm is used to optimize the number of spatial attention layers and dropout layers in the fine-grained feature extraction and segmentation module. The specific steps include: S1, initialize particle swarm: randomly generate particles, and each particle corresponds to the number of spatial attention layers and Dropout layers, that is, the particle swarm is initialized as: ; S2, calculate the adaptability of each particle: iterate according to the number of spatial attention layers and Dropout layers corresponding to each particle, and calculate the adaptability of each particle Loss value, the calculation result is the adaptability of the corresponding particle; S3: The number of spatial attention layers and Dropout layers corresponding to the particle with the smallest adaptability is taken as the current optimal number. ; S4, update each particle: in, is a random number generator whose result is an interval A random number; is the update speed weight, and ; and Before and after the update particles, and ; S5, repeat steps S2 to S4 until the preset number of iterations is reached, and the global optimal particle output from the last iteration is The corresponding parameters are rounded as the optimal number of spatial attention layers and Dropout layers.
10. A method for segmenting an ultrasound image of an IUD, characterized in that: The IUD ultrasound image segmentation model constructed by the construction method according to any one of claims 1 to 9 is deployed on the back end of the medical server, and includes the following process: S1, scans the ultrasound image of the IUD, obtains the original image data, performs image filtering and standardization processing, and converts it into a standard input image format that meets the requirements; S2, input the standardized image into the IUD ultrasound image segmentation model, firstly, the multi-scale feature enhancement module is used to perform multi-scale feature enhancement to enhance the details and structural information of the image; then, the enhanced features are extracted more accurately through the adaptive fine-grained feature extraction and segmentation module to weaken the background information in the image, and the IUD damage area and the background area are segmented through the domain generalization image segmentation module, and finally the position information of each pixel in the image and its predicted segmentation category are output as the segmentation result; S3, the doctor analyzes and makes decisions based on the IUD ultrasound image segmentation results and clinical experience.
Citation Information
Patent Citations
Method and apparatus for recognizing intelligently ultrasound womb contraceptive ring image
CN101161204A
Image segmentation method and device combining feature difference recognition and detail enhancement
CN119339075A