Ultrasonic image segmentation method and system based on SAM
By adopting SAM-based methods in ultrasonic image segmentation, fusing local and global features, and replacing manual annotation with auxiliary masks, the problems of performance degradation and high dependence on manual annotation in ultrasonic image segmentation are solved, and diagnostic efficiency and segmentation accuracy are improved .
Patent Information
- Application Number
- CN202411668540.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems of performance degradation and high dependence on manual annotation in ultrasonic image segmentation, resulting in low diagnostic efficiency.
Using SAM-based ultrasound image segmentation method, local features of ultrasound images are acquired and extracted, combined with multi-head attention mechanism and cross-attention mechanism, local and global features are fused, segmentation results are generated, and manual annotation is replaced by auxiliary masks.
It improves the performance and clinical diagnostic efficiency of ultrasound image segmentation, reduces manual intervention, enhances the model's understanding of image semantics, and is suitable for lesion areas of different morphology.
Smart Images

Figure CN119445123A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and in particular to a SAM-based ultrasound image segmentation method and system. Background Art
[0002] With the continuous development of computer technology, computer-assisted diagnosis and treatment has gradually become an important means of clinical examination and treatment. Ultrasound medical imaging is a non-invasive way to evaluate the structural characteristics and functional morphology of various tissues, which is of great significance for cancer diagnosis. The goal of the ultrasound image segmentation task is to accurately annotate the lesion area in the image at the pixel level and divide the ultrasound image into lesion area and non-lesion area. However, the tumor area of ultrasound imaging has irregular morphology, fuzzy boundary features, and is severely interfered by noise, which makes it highly challenging to automatically identify and segment the lesion area.
[0003] Segment Anything Model (SAM) is a general image segmentation model that can segment corresponding objects according to the prompts provided by the user, including points, boxes or coarse masks. It breaks the limitation that general segmentation image models need to be customized for specific objects and has great potential. Due to the significant differences between medical images and natural images, the application of SAM in the field of ultrasound imaging will face the problem of performance degradation. In addition, SAM usually relies on precise manual annotation of prompt points. In clinical use, radiologists still need to manually prompt and annotate the lesion area, which is not only time-consuming in actual operation, but also reduces work efficiency. Therefore, how to improve the performance of SAM in ultrasound images, especially the segmentation accuracy of lesion areas, and reduce manual intervention, is a technical problem that needs to be solved urgently.
[0004] In order to overcome these defects, the present application proposes a SAM-based ultrasound image segmentation method and system to improve the segmentation performance of ultrasound images and the efficiency of clinical diagnosis. Summary of the invention
[0005] The purpose of this application is to provide a SAM-based ultrasound image segmentation method and system, aiming to solve the limitations of the existing technology in medical image segmentation.
[0006] To achieve the above objectives, this application provides the following technical solutions:
[0007] The present application provides an ultrasound image segmentation method based on SAM, comprising:
[0008] Acquire an ultrasonic image, and extract local features of the ultrasonic image;
[0009] Preprocessing the ultrasound image by segmenting the model to obtain an image embedding, and inputting the image embedding into the adapter for fine-tuning;
[0010] The acquired position embedding is input into the position adapter for fine-tuning, and the fine-tuned position embedding is combined with the image embedding to obtain the global feature;
[0011] The segmentation model is used to fuse the local features and the global features, and output fused features;
[0012] Segmenting the fused features into an auxiliary mask, and extracting point prompt information in the auxiliary mask;
[0013] A segmentation result is generated according to the point prompt information and the fusion feature.
[0014] Furthermore, the segmentation model includes an encoder and a decoder;
[0015] The encoder includes an upsampling layer and a convolution block; the decoder includes an auxiliary decoder, a hint decoder, and a mask decoder;
[0016] The auxiliary decoder generates an auxiliary mask by processing the fusion features; the prompt encoder is used to extract point prompt information in the auxiliary mask; the mask decoder generates a segmentation result based on the point prompt information of the prompt encoder and the fusion features, and the segmentation result is the lesion area in the ultrasound image.
[0017] Furthermore, in the step of adopting the segmentation model to fuse the local features and the global features and outputting the fused features, the following steps are specifically included:
[0018] normalizing and adding the global features;
[0019] Through the multi-head attention mechanism and the cross attention mechanism, the local features and the global features are cross-fused and then normalized and added;
[0020] The normalized and summed features are fed into the feature adapter for fine-tuning;
[0021] A feed-forward network is used to integrate the features output by the feature adapter to obtain fused features.
[0022] Furthermore, the segmentation model further includes: optimizing and training the segmentation model through a loss function; specifically:
[0023] The Dice loss and boundary loss between the predicted mask and the marked mask of the segmentation model are calculated; the Dice loss is the pixel-level similarity between the predicted mask and the marked mask, and the boundary loss is the gradient amplitude difference between the predicted mask and the marked mask.
[0024] Furthermore, the loss function Lall Includes: Prediction Mask Pixel-level Dice loss Loss with the labeled mask M dice And boundary loss Loss edge ;
[0025] L all =αLoss dice +βLoss edge
[0026] Among them, α and β are hyperparameters greater than 0, representing the weights of Dice loss and boundary loss;
[0027] The calculation formula of the Dice loss is:
[0028]
[0029] Furthermore, the calculation of the boundary loss defines the Sobel operator S x and S y Used to calculate the horizontal and vertical gradients:
[0030]
[0031] For the prediction mask And mark the mask M, use the Sobel operator to calculate the horizontal gradient G x and the vertical gradient G y :
[0032] Compute prediction mask and the gradient magnitude G of the marking mask M mag :
[0033]
[0034] Normalize the gradient magnitude:
[0035]
[0036] Compute prediction mask and the boundary loss Loss of the marking mask M edge :
[0037]
[0038] Where N is the total number of pixels in the ultrasound image, and i is the index of each pixel.
[0039] Furthermore, the local features are extracted by convolutional neural network branches.
[0040] This application proposes an ultrasound image segmentation system based on SAM, comprising:
[0041] Acquisition and extraction module: acquires an ultrasonic image and extracts local features of the ultrasonic image;
[0042] Fine-tuning module: pre-processing the ultrasound image by segmenting all models to obtain image embedding, and embedding the image into the adapter for fine-tuning; embedding the acquired position into the position adapter for fine-tuning, combining the fine-tuned position embedding and image embedding to obtain global features;
[0043] Processing module: using the segmentation model to fuse the local features and the global features, and outputting fused features;
[0044] Segmentation and output module: segment the fused features into auxiliary masks, extract point prompt information in the auxiliary masks; generate segmentation results according to the point prompt information and the fused features.
[0045] The present application provides a device, which includes a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing a SAM-based ultrasound image segmentation method; the processor is used to execute the program instructions stored in the memory to implement a SAM-based ultrasound image segmentation method.
[0046] The present application provides a storage medium storing program instructions executable by a processor, wherein the program instructions are used to execute an ultrasound image segmentation method based on SAM.
[0047] The present application provides a method and system for ultrasound image segmentation based on SAM, which has the following beneficial effects:
[0048] (1) The auxiliary mask is used as an automatic cue point for the lesion area, eliminating the need for manual annotation and improving the diagnostic efficiency in clinical applications;
[0049] (2) Combining the loss functions of Dice loss and boundary loss, the segmentation model focuses on the feature extraction of the tumor edge in the ultrasound image, thereby improving the segmentation accuracy of the lesion area; at the same time, through adapters, position embedding and multi-head attention mechanisms, the model's attention to the global and local information of the image is enhanced, improving SAM's ability to understand the image semantics, making the segmentation of ultrasound images more efficient.
[0050] (3) This application is applicable to lesion areas of different shapes, and also has a good segmentation effect on tumor areas with irregular shapes and blurred boundary features in ultrasound imaging; it provides a new solution for the automatic segmentation of medical images and has broad clinical application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a flow chart of an ultrasound image segmentation method based on SAM according to Example 1 of the present application;
[0052] Figure 2 A schematic diagram of a framework of an ultrasound image segmentation method based on SAM according to Example 1 of the present application;
[0053] Figure 3 This is a schematic structural diagram of an ultrasound image segmentation system based on SAM according to Example 2 of the present application;
[0054] Figure 4 This is a schematic diagram of the device structure of Example 3 of the present application;
[0055] Figure 5 This is a schematic diagram of the storage medium structure of Example 4 of the present application. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] The following is an analysis of the solutions in the prior art in combination with related technologies.
[0058] The most similar method to the present application is the end-to-end ultrasound image segmentation based on automatic prompting [1]. Based on the segmentation model, this method combines parallel convolutional layer branches, cross-branch attention and auto prompting generator (APG) to optimize the application in medical ultrasound images. The model is mainly divided into a trainable part and a frozen part. The structural parameters of some ViT branches, prompt encoders and mask decoders of the segmentation model are frozen, and these parameters remain unchanged during training. The network accepts medical images as input, and passes through the convolutional layer branches and the image encoder of the original segmentation model respectively. The convolutional layer branches are used to extract local features of the image, and the global features are extracted through the image encoder of the original segmentation model. In order to adapt to the characteristics of medical images, the image encoder introduces an adapter to adjust the input size to reduce the consumption of computing resources. Then, the cross-attention module is used to establish a global dependency relationship between the convolutional layer branches and the features extracted by the image encoder. At the same time, in order to avoid the need for manual precise annotation of cue points, this model proposes an automatic cue generator that receives the output from the mask decoder and the image embedding from the image encoder as input. Finally, the mask decoder decodes the features extracted by the overall image encoder plus the point cue features given by the cue encoder to predict a reasonable segmentation mask.
[0059] [1]Lin
[0060] Since the segmentation accuracy of the segmentation-everything model is highly dependent on prompts such as points or boxes, in the application of medical imaging, manual annotation prompts greatly reduce the efficiency of clinical diagnosis. Therefore, a reasonable method for automatically generating segmentation prompts is very important. Although the existing end-to-end ultrasound image segmentation model attempts to replace manual annotation prompts with an automatic prompt generator, its design has obvious limitations. Specifically, 1) The automatic prompt generator proposed in this model uses the frozen parameters extracted from the mask decoder as the output tag and the output of the image encoder as the input, and introduces a learnable task tag for automatically generating prompts. Although this design can reduce manual intervention, the frozen mask decoder parameters cannot provide sufficient representativeness without specific task prompts, resulting in insufficient prompt accuracy. 2) The automatic prompt generator uses a method that combines multi-layer perceptrons and complex attention mechanisms to couple task tags and output tags. Although the flexibility of automatic prompt generation is increased, the training complexity of the model is also significantly increased. At the same time, since the automatic prompt generator of this model relies on the accuracy of the task labeling, and the frozen mask decoder parameters are likely to be not representative enough without specific task prompts, if the task labeling is not accurate enough, the effect of the entire segmentation process will be significantly affected, resulting in a decrease in the overall performance of the model.
[0061] In view of the above shortcomings of the prior art, this application designs a more effective prompt generation mechanism to eliminate the need for manual annotation of prompts, thereby improving the diagnostic efficiency in clinical applications. An auxiliary segmentation head is also proposed to generate auxiliary masks to provide more accurate and reasonable prompts. The limitation of the existing automatic prompt generator relying on the frozen mask decoder parameters is avoided, and the accuracy of the prompt is improved.
[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0063] Example 1
[0064] See also Figure 1 , is a flow chart of a SAM-based ultrasound image segmentation method according to Example 1 of the present application; the steps include:
[0065] S1: Acquire an ultrasonic image and extract local features of the ultrasonic image.
[0066] In this embodiment, since the ultrasound image may be affected by factors such as noise, artifacts and contrast changes, the image needs to be preprocessed to enhance its quality, including denoising, contrast adjustment and other steps. Subsequently, local features are extracted by a convolutional neural network, where the CNN includes multiple convolutional layers, each layer uses convolution kernels of different numbers and sizes to capture different features in the ultrasound image. The convolution kernel slides on the ultrasound image, multiplies and sums point by point with the local area of the image to generate a feature map; after the convolution layer, a nonlinear activation function such as ReLU is usually used to increase the nonlinear ability of the network. In order to extract a variety of local features of the ultrasound image, a branch structure is designed in the CNN, and each branch uses different convolution kernels and pooling strategies to capture different features in the image.
[0067] S2: Preprocess the ultrasound image by segmenting the model to obtain image embedding, and input the image embedding into the adapter for fine-tuning.
[0068] In this embodiment, the ultrasound image is input into the encoder of SAM to extract features and generate image embedding. Image embedding is a high-dimensional feature representation that captures important information in the image.
[0069] Create a dataset containing ultrasound images and corresponding segmentation masks, and use the dataset to train the adapter to enable it to accurately segment ultrasound images. Use the image embedding generated by the encoder as the input of the adapter, and set the adapter's network structure and training parameters, such as learning rate, batch size, etc. During the training process, the adapter learns how to generate accurate segmentation masks based on the image embedding.
[0070] S3: The acquired position embedding is input into the position adapter for fine-tuning, and the fine-tuned position embedding is combined with the image embedding to obtain the global feature.
[0071] In this embodiment, the position embedding input position adapter is fine-tuned to ensure that the position features and the features of the ultrasound image can work together, and then the image embedding is combined with the position embedding to improve the utilization of spatial information.
[0072] S4: using the segmentation model to fuse the local features and the global features, and outputting fused features.
[0073] In this embodiment, the global features are standardized and added; the multi-head attention mechanism is used to further enhance the model's attention to the global and local information of the image. Furthermore, the local features extracted by the convolutional neural network are cross-fused with the global features, and fine-tuned using the feature adapter after standardized addition. Finally, the features output by the feature adapter are integrated using a feedforward network to obtain fused features, thereby enhancing the model's understanding of the image semantics.
[0074] Specifically, the encoder gradually restores the spatial resolution of the feature map through multiple upsampling and convolution modules. First, it passes through a bilinear interpolation upsampling layer to double the spatial size; then it is processed through a convolution block, which consists of a 3×3 convolution layer, a batch normalization layer, and an activation function; this process not only improves the resolution of the feature map, but also reduces the number of channels. This upsampling and convolution operation is repeated three times, and the spatial dimension of the feature map will continue to increase after each upsampling, recovering to one-quarter, one-half, and the original resolution of the original image, respectively. Finally, through the convolution operation, the number of channels is reduced to the number of channels required for the output mask (usually 1 or more classes of channels). This design ensures that the model can gradually integrate high-resolution spatial features and generate a segmentation mask that matches the resolution of the input image. This layer-by-layer upsampling method can not only retain rich spatial information, but also effectively restore features with fewer parameters, avoiding overly complex network structures, thus helping to prevent overfitting.
[0075] S5: Segment the fused features into an auxiliary mask, and extract point prompt information in the auxiliary mask.
[0076] In this embodiment, the SAM decoder is used to convert the fused features output by the encoder into the final segmentation result. The decoder is composed of an auxiliary decoder, a prompt encoder, and a mask decoder. The auxiliary decoder further processes the input fused features to generate an auxiliary mask, and the prompt encoder extracts point prompt information from the auxiliary mask.
[0077] S6: Generate a segmentation result according to the point prompt information and the fusion feature.
[0078] In this embodiment, the mask decoder generates a final segmentation result based on the point prompt information provided by the prompt encoder and the fusion features output by the encoder, and accurately segments the lesion area in the ultrasound image.
[0079] Furthermore, this application improves segmentation accuracy by combining Dice loss and boundary loss. The loss function includes the predicted mask And the pixel-level Dice loss Loss of the marked mask M dice and boundary loss Lossedge ; Where α and β are hyperparameters greater than 0, which measure the weights of the two losses and are set to 1 and 2 in this embodiment.
[0080] L all =αLoss dice +βLoss edge
[0081] The Dice loss calculation formula is:
[0082]
[0083] For boundary loss calculation, first define the Sobel operator S x and S y Used to calculate the horizontal and vertical gradients:
[0084]
[0085] For the prediction mask And mark the mask M, use the Sobel operator to calculate its horizontal gradient G x and the vertical gradient G y :
[0086]
[0087] Compute prediction mask and the gradient magnitude G of the marking mask M mag :
[0088]
[0089] Normalize the gradient magnitude:
[0090]
[0091] Compute prediction mask and the boundary loss Loss of the label mask M edge :
[0092]
[0093] Wherein, N is the total number of pixels in the ultrasound image, and i is the index of each pixel.
[0094] To summarize, this embodiment 1 extracts image features through the segmentation model and convolutional neural network branches, and enhances feature expression through adapters, position embedding and multi-head attention mechanisms; then combines the auxiliary decoder, prompt encoder and mask decoder to segment out auxiliary masks, which replace the manually marked point prompts, and finally generate accurate segmentation results; not only the segmentation efficiency is improved, but also the segmentation accuracy is enhanced, so that SAM can better adapt to complex lesion areas in ultrasound images, and improve the segmentation performance and clinical diagnosis efficiency of ultrasound images.
[0095] Example 2
[0096] See also Figure 3 , is a structural diagram of an ultrasound image segmentation system based on SAM according to Example 2 of the present application; the specific contents include:
[0097] Acquisition and extraction module: acquires an ultrasonic image and extracts local features of the ultrasonic image;
[0098] Fine-tuning module: pre-processing the ultrasound image by segmenting all models to obtain image embedding, and embedding the image into the adapter for fine-tuning; embedding the acquired position into the position adapter for fine-tuning, combining the fine-tuned position embedding and image embedding to obtain global features;
[0099] Processing module: using the segmentation model to fuse the local features and the global features, and outputting fused features;
[0100] Segmentation and output module: segmenting the fused features into auxiliary masks, extracting point prompt information in the auxiliary masks; generating segmentation results according to the point prompt information and the fused features.
[0101] In this embodiment, the public breast ultrasound image dataset BUSI (Breast Ultrasound Images Dataset) is used as an example, which contains 780 images (133 normal images, 437 benign images, and 210 malignant images. In addition to the Dice parameter representing the accuracy, three convincing indicator parameters are used to calculate the experimental results, namely: Jaccard, Accuracy, and Recall.
[0102] Dice Jaccard Accuracy Recall This application 77.55±0.28 70.15±1.01 96.60±0.13 77.41±0.37
[0103] After experimental verification, the experimental results show that this application has achieved good segmentation results.
[0104] Example 3
[0105] See also Figure 4, is a schematic diagram of the device structure of Embodiment 3 of the present application. The device 50 includes a processor 51 and a memory 52 coupled to the processor 51 .
[0106] The memory 52 stores program instructions for implementing the above-mentioned SAM-based ultrasound image segmentation method.
[0107] The processor 51 is used to execute program instructions stored in the memory 52 to implement an ultrasound image segmentation based on SAM.
[0108] The processor 51 may also be referred to as a CPU (Central Processing Unit).
[0109] The processor 51 may be an integrated circuit chip with signal processing capabilities. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0110] Example 4
[0111] See also Figure 5 , which is a schematic diagram of the structure of the storage medium of Example 4 of the present application. The storage medium of the embodiment of the present application stores a program file 61 that can implement all the above methods, wherein the program file 61 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or a computer, a server, a mobile phone, a tablet, and other devices.
[0112] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0113] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
[0114] Although the embodiments of the present application have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the appended claims and their equivalents.
[0115] Of course, the present invention may have many other implementations. Based on this implementation, other implementations obtained by ordinary technicians in this field without any creative work are all within the scope of protection of the present invention.
Claims
1. A method for ultrasonic image segmentation based on SAM, characterized in that: include: Acquire an ultrasonic image, and extract local features of the ultrasonic image; Preprocessing the ultrasound image by segmenting the model to obtain an image embedding, and inputting the image embedding into the adapter for fine-tuning; The acquired position embedding is input into the position adapter for fine-tuning, and the fine-tuned position embedding is combined with the image embedding to obtain the global feature; The segmentation model is used to fuse the local features and the global features, and output fused features; Segmenting the fused features into an auxiliary mask, and extracting point prompt information in the auxiliary mask; A segmentation result is generated according to the point prompt information and the fusion feature.
2. The method for ultrasonic image segmentation based on SAM according to claim 1, characterized in that: The split everything model includes an encoder and a decoder; The encoder includes an upsampling layer and a convolution block; the decoder includes an auxiliary decoder, a hint decoder, and a mask decoder; The auxiliary decoder generates an auxiliary mask by processing the fused features; The hint encoder is used to extract the point hint information in the auxiliary mask; The mask decoder generates a segmentation result according to the point prompt information of the prompt encoder and the fusion feature, and the segmentation result is the lesion area in the ultrasound image.
3. The method for ultrasonic image segmentation based on SAM according to claim 1, characterized in that: In the step of adopting the segmentation model to fuse the local features and the global features and outputting the fused features, the following steps are specifically included: normalizing and adding the global features; Through the multi-head attention mechanism and the cross attention mechanism, the local features and the global features are cross-fused and then normalized and added; The normalized and summed features are fed into the feature adapter for fine-tuning; A feed-forward network is used to integrate the features output by the feature adapter to obtain fused features.
4. The method for ultrasonic image segmentation based on SAM according to claim 1, characterized in that: The segmentation model further includes: optimizing and training the segmentation model through a loss function; specifically: The Dice loss and boundary loss between the predicted mask and the marked mask of the segmentation model are calculated; the Dice loss is the pixel-level similarity between the predicted mask and the marked mask, and the boundary loss is the gradient amplitude difference between the predicted mask and the marked mask.
5. The method for ultrasonic image segmentation based on SAM according to claim 4, characterized in that: The loss function L all Includes: Prediction Mask Pixel-level Dice loss Loss with the labeled mask M dice And boundary loss Loss edge ; L all =αLoss dice +βLoss edge Among them, α and β are hyperparameters greater than 0, representing the weights of Dice loss and boundary loss; The calculation formula of the Dice loss is:
6. The method for ultrasonic image segmentation based on SAM according to claim 5, characterized in that: The calculation of the boundary loss is to define the Sobel operator S x and S y Used to calculate the horizontal and vertical gradients: For the prediction mask And mark the mask M, use the Sobel operator to calculate the horizontal gradient G x and the vertical gradient G y : Compute prediction mask and the gradient magnitude G of the marking mask M mag : Normalize the gradient magnitude: Compute prediction mask and the boundary loss Loss of the marking mask M edge : Where N is the total number of pixels in the ultrasound image, and i is the index of each pixel.
7. The method for ultrasonic image segmentation based on SAM according to claim 1, characterized in that: The local features are extracted through convolutional neural network branches.
8. A system for an ultrasound image segmentation method based on SAM according to claim 1, characterized in that: include: Acquisition and extraction module: acquires an ultrasonic image and extracts local features of the ultrasonic image; Fine-tuning module: pre-processing the ultrasound image by segmenting all models to obtain image embedding, and embedding the image into the adapter for fine-tuning; embedding the acquired position into the position adapter for fine-tuning, combining the fine-tuned position embedding and image embedding to obtain global features; Processing module: using the segmentation model to fuse the local features and the global features, and outputting fused features; Segmentation and output module: segmenting the fused features into auxiliary masks, extracting point prompt information in the auxiliary masks; generating segmentation results according to the point prompt information and the fused features.
9. A device, characterized in that: The device includes a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing a SAM-based ultrasound image segmentation method as described in any one of claims 1-7; and the processor is used to execute the program instructions stored in the memory to implement a SAM-based ultrasound image segmentation method.
10. A storage medium, characterized in that: Program instructions executable by a processor are stored, and the program instructions are used to execute the SAM-based ultrasound image segmentation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
SAM-based cross-modal domain generalization medical image segmentation method
CN117808834A