A method, apparatus, and system for segmenting ultrasound images of a puncture needle.
By combining CNN and ViT, a parallel interactive module of local window self-attention and convolution is constructed, which solves the problem of accurate detection in existing ultrasound image segmentation methods for puncture needles, and achieves higher segmentation accuracy and detection effect.
Patent Information
- Application Number
- CN202310326364.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-03-30
AI Technical Summary
Existing deep learning-based ultrasound image segmentation methods for puncture needles are difficult to accurately detect puncture needles, mainly because CNNs cannot effectively extract global features of the image.
By combining CNN and ViT, a parallel interactive module of local window self-attention and convolution is constructed to enhance channel-space modeling capabilities. Feature learning is performed through the interactive module to achieve accurate detection of puncture needles.
The accuracy and detection performance of ultrasound image segmentation for puncture needles have been improved. Through the parallel interaction of local window self-attention and depth convolution modules, better feature fusion and accurate detection have been achieved.
Smart Images

Figure CN116152266B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ultrasound image segmentation technology, and more specifically, relates to a method, apparatus and system for segmenting ultrasound images of a puncture needle. Background Technology
[0002] In ultrasound-guided puncture procedures, precise needle localization is crucial for improving the safety and accuracy of the procedure. Analyzing and processing the ultrasound image of the puncture needle to segment and label a clearer shape can significantly improve the accuracy and safety of the puncture. However, precise needle segmentation is a challenging problem, mainly for two reasons: firstly, the inherent speckle noise and low image contrast of ultrasound images make it difficult to identify the needle boundaries; secondly, while the puncture needle appears as a high-brightness linear structure in the ultrasound image, similar linear structures exist as interference in the image.
[0003] Numerous algorithms have been proposed to identify puncture needles in ultrasound images. Traditional algorithms include Principal Component Analysis (PCA), Hough Transform (HT), HT fuzzy enhancement combination, Parallel Integral Projection (PIP), and learning-based algorithms such as Random Sample Consensus (RANSAC) and Computer-Aided Segmentation (CASPER). However, due to the poor quality of ultrasound images, these techniques cannot accurately detect needles or meet the needs of real-time puncture. Deep learning (DL) networks outperform traditional techniques in image classification, object detection, segmentation, and registration, and have been widely applied in medical image analysis in recent years. DL methods have been widely used in puncture needle detection and localization research, and deep learning frameworks such as convolutional neural networks (CNN) and fully convolutional neural networks (FCNN) have achieved good results in puncture needle segmentation and localization research. For example, a method using an adaptive moment estimation optimizer in a CNN architecture has been used to identify and segment puncture needles in two-dimensional ultrasound images; a large-margin mask RCNN network framework has also been used to achieve automatic multi-needle localization in two-dimensional ultrasound images, and has been applied in ultrasound-guided prostate brachytherapy.
[0004] However, existing deep learning-based segmentation methods generally rely on CNNs, which cannot effectively extract global features of an image, making it difficult to accurately detect puncture needles. Summary of the Invention
[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method, apparatus, and system for segmenting ultrasound images of puncture needles. Its purpose is to combine CNN and ViT to provide a parallel interactive module based on local window self-attention and convolution, used to construct a segmentation network for ultrasound images of puncture needles. This network segments the puncture needles in the ultrasound images, enhancing channel-space modeling capabilities and achieving better feature learning, thereby ensuring accurate detection of the puncture needle. This solves the technical problem that existing deep learning-based segmentation methods struggle to accurately detect puncture needles.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for segmenting ultrasound images of a puncture needle is provided, comprising:
[0007] S1: Construct an initial image segmentation network including an encoder and a decoder; the encoder includes an interaction module, a first convolution module, and a max pooling module; the decoder includes an upsampling module, a first convolution module, and a second convolution module; the interaction module is used to perform depthwise convolution on the input image features, and then perform channel interaction and spatial interaction respectively, and concatenate the obtained channel attention features and spatial attention features.
[0008] S2: Train the initial image neural network using a set of historical puncture needle ultrasound images, and adjust the network parameters of the encoder and decoder to obtain a puncture needle ultrasound image segmentation network.
[0009] S3: Input the original ultrasound image corresponding to the current puncture needle into the ultrasound image segmentation network of the puncture needle to segment the needle axis image of the current puncture needle from the original ultrasound image;
[0010] S4: The needle shaft image and the original ultrasound image are fused to obtain a target display image; the target display image displays the position information of the current puncture needle.
[0011] The original ultrasound image is input into the ultrasound image segmentation network of the puncture needle, whereby the interaction module in the encoder processes it to obtain a first feature. The first feature is then compressed by the max pooling module to obtain a second feature. The second feature is input into the first convolution module for feature extraction according to a first size to obtain a third feature. This third feature is then input into the interaction module to obtain an interactive feature. The third feature is then input into the max pooling module to obtain a new second feature. This new second feature is again input into the first convolution module to obtain a new third feature. This new third feature is then input into the interaction module to obtain another interactive feature. Finally, the new third feature is input into the max pooling module to update the second feature. The second feature is iterated repeatedly until the number of output channels corresponding to the updated second feature output by the max pooling module reaches a first threshold. The final updated second feature is then sequentially input into the first convolution module and the interaction module to obtain the encoded feature. The encoded feature is input into the decoder so that the upsampling module upsamples the encoded feature. The obtained sampled feature is superimposed with an interaction feature and input into the first convolution module for feature extraction to obtain the decoded feature. The decoded feature repeats the processing of the encoded feature until the number of output channels corresponding to the final decoded feature reaches a second threshold. The final decoded feature is then input into the second convolution module to perform feature extraction according to the second size to obtain the needle axis image.
[0012] In one embodiment, the interaction module includes: a local window self-attention branch and a depthwise convolution branch for bidirectional parallel interaction;
[0013] The channel and spatial interactions between parallel branches can provide complementary clues for the two parallel branches; the information in the deep convolution branch flows to the local window self-attention branch through channel interaction, and the information in the local window self-attention branch flows to the deep convolution branch through spatial interaction.
[0014] The outputs of the local window self-attention branch and the depth convolution branch are normalized through different normalization layers and then merged by concatenation; the merged features are input into the feedforward network to generate the final output features.
[0015] In one embodiment, the channel interaction includes: a global average pooling layer, two consecutive convolutional layers and a sigmoid layer; normalization and activation are performed between the two convolutional layers, and then the sigmoid layer is used to generate attention features in the channel dimension.
[0016] In one embodiment, the spatial interaction includes two convolutional layers and a sigmoid layer, with normalized BN and GELU activation performed between the two convolutional layers; after passing through the two convolutional layers, the number of channels is reduced, and then the sigmoid layer is used to generate spatial attention features.
[0017] In one embodiment, the loss function for training the initial image neural network is constructed using cross-entropy loss and Dess loss.
[0018] In one embodiment, the loss function for training the initial image neural network is:
[0019] CE is the cross-entropy loss, and Dice is the Dice loss, defined as follows:
[0020]
[0021] Among them, y k It is a truth value. This is the actual output of the network, where n is the total number of pixels.
[0022] In one embodiment, S3 includes:
[0023] The original ultrasound image corresponding to the current puncture needle is input into the ultrasound image segmentation network of the puncture needle so that it outputs a binary image of the current puncture needle.
[0024] Obtain the positions (i1,j1), (i2,j2), ..., (i...j1) of each pixel of the current puncture needle from the binary image. n ,j n ), where n is the number of pixels; multiple pixels are fitted into a line, and the needle angle and needle length are calculated to obtain the needle axis image.
[0025] According to another aspect of the present invention, a method for segmenting ultrasound images of a puncture needle is provided, comprising:
[0026] A construction module is used to construct an initial image segmentation network including an encoder and a decoder; the decoder includes an interaction module, a first convolution module, and a max pooling module; the encoder includes an upsampling module, a first convolution module, and a second convolution module; the interaction module is used to perform depthwise convolution on the input image features, and then perform channel interaction and spatial interaction respectively, and concatenate the obtained channel attention features and spatial attention features.
[0027] The training module is used to train the initial image neural network using a set of historical puncture needle ultrasound images, and to adjust the network parameters of the encoder and decoder to obtain a puncture needle ultrasound image segmentation network.
[0028] The segmentation module is used to input the original ultrasound image corresponding to the current puncture needle into the ultrasound image segmentation network of the puncture needle, so as to segment the needle axis image of the current puncture needle from the original ultrasound image;
[0029] The fusion module is used to fuse the needle shaft image and the original ultrasound image to obtain a target display image; the target display image displays the position information of the current puncture needle.
[0030] According to another aspect of the present invention, a segmentation system for ultrasound images of a puncture needle is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0032] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:
[0033] (1) This invention provides a segmentation method for ultrasound images of puncture needles, wherein a parallel interactive module based on local window self-attention and convolution is designed to construct a segmentation network for ultrasound images of puncture needles, which segments the puncture needles in the ultrasound images, thereby enhancing the channel-space modeling capability and achieving better feature learning, thus ensuring accurate detection of puncture needles, thereby solving the technical problem that existing deep learning-based segmentation methods are difficult to accurately detect puncture needles.
[0034] (2) Introducing a parallel interaction module of local window self-attention and depth convolution module, the feature maps of each layer after the parallel interaction structure in the encoder are quickly connected to the decoder for superposition through skip connections. The bidirectional interaction consists of channel and spatial interaction between parallel branches, which can provide complementary clues between the two parallel branches. It makes full use of the information of image space and channel to better achieve feature fusion of different sizes and improve the accuracy of segmentation network. Attached Figure Description
[0035] Figure 1 This is a flowchart of a method for segmenting ultrasound images of a puncture needle, provided in Embodiment 1 of the present invention.
[0036] Figure 2 This is a structural model diagram of the ultrasound image segmentation network for puncture needles provided in Embodiment 3 of the present invention.
[0037] Figures 3a-3dThis is an analysis diagram of the experimental results of Example 7 of the present invention, tested on two sets of historical puncture needle ultrasound images.
[0038] Figure 4 This is a comparison diagram of the segmentation results on a partial set of historical puncture needle ultrasound images in Embodiment 7 of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0040] Example 1
[0041] like Figure 1 As shown, a method for segmenting ultrasound images of a puncture needle is provided, including:
[0042] S1: Construct an initial image segmentation network including an encoder and a decoder; the decoder includes an interaction module, a first convolution module, and a max pooling module; the encoder includes an upsampling module, a first convolution module, and a second convolution module; the interaction module is used to perform depth convolution on the input image features, and then perform channel interaction and spatial interaction respectively, and concatenate the obtained channel attention features and spatial attention features.
[0043] S2: Train the initial image neural network using a set of historical puncture needle ultrasound images, adjust the network parameters of the encoder and decoder, and obtain the puncture needle ultrasound image segmentation network.
[0044] S3: Input the original ultrasound image corresponding to the current puncture needle into the puncture needle ultrasound image segmentation network to segment the needle axis image of the current puncture needle from the original ultrasound image.
[0045] S4: Feature fusion is performed between the needle shaft image and the original ultrasound image to obtain the target display image; the target display image shows the current position information of the puncture needle.
[0046] Among them, such as Figure 2As shown, the original ultrasound image is input into the ultrasound image segmentation network for puncture needle insertion, where the interactive module in the encoder processes it to obtain a first feature. The first feature is then compressed by the max pooling module to obtain a second feature. The second feature is input into the first convolution module for feature extraction according to the first size to obtain a third feature. The third feature is then input into the interactive module to obtain an interactive feature, and then into the max pooling module to obtain a new second feature. The new second feature is then input into the first convolution module again to obtain a new third feature, which is then input into the interactive module to obtain another interactive feature. Finally, the new third feature is input into the max pooling module to update the second feature. The updated second feature... The feature iteration is repeated until the number of output channels corresponding to the updated second feature output by the max pooling module reaches the first threshold. The final updated second feature is then sequentially input into the first convolution module and the interaction module to obtain the encoded feature. The encoded feature is input into the decoder so that the upsampling module upsamples the encoded feature. The obtained sampled feature is superimposed with an interaction feature and input into the first convolution module for feature extraction to obtain the decoded feature. The decoding feature repeats the processing of the encoded feature until the number of output channels corresponding to the final decoded feature reaches the second threshold. The final decoded feature is then input into the second convolution module to extract features according to the second size to obtain the needle axis image.
[0047] Specifically, in the encoder part, the first convolutional module has a kernel size of 3×3 and a stride of 1 for each dimension. The first convolutional module also includes a Rectified Linear Unit (ReLU) and a BN layer, and is pooled through a 2×2 max pooling layer.
[0048] In the decoder section, each upsampling first enlarges the feature map size through a convolutional layer in the first convolutional module with a stride of 2, while simultaneously reducing the number of channels by half. Then, the feature map size is restored to the input image size and convolved through a 3×3 first convolutional module, followed by a Rectified Linear Unit (ReLU) and a Batch Normalization (BN) layer. In the final layer of the decoder, a 1×1 convolutional kernel in the second convolutional module is used to expand and map the feature map to the output layer.
[0049] To better integrate global information and improve network performance, skip connections are used between the encoder and decoder. An interaction module consisting of local window self-attention and depthwise convolution is introduced before the skip connections. Each feature map layer in the encoder is fused and superimposed with the feature map in the decoder via the skip connections after passing through the interaction module. This fully utilizes information from the image space and channels, better achieving feature fusion of different sizes and improving the accuracy of the segmentation network.
[0050] Example 2
[0051] The interaction module includes: a local window self-attention branch for bidirectional parallel interaction and a depthwise convolution branch;
[0052] The interaction between channels and spaces between parallel branches can provide complementary clues for the two parallel branches; information in the deep convolution branch flows to the local window self-attention branch through channel interaction, and information in the local window self-attention branch flows to the deep convolution branch through spatial interaction.
[0053] The outputs of the local window self-attention branch and the depthwise convolution branch are normalized through different normalization layers and then merged by concatenation; the merged features are input into the feedforward network to generate the final output features.
[0054] Specifically, in the interaction module, local window self-attention and deep convolution lie on two parallel paths, expanding the receptive field by simultaneously modeling intra-window and cross-window relationships. Their outputs are normalized through different normalization layers and then merged via concatenation. The merged features are input into a feedforward neural network (FFN) to blend the learned relationships across channels, generating the final output features. The bidirectional interaction consists of channel and spatial interactions between parallel branches, providing complementary cues between them. Information from the deep convolution branch flows to the other branch through channel interactions, while information from the local window self-attention branch flows to the other branch through spatial interactions.
[0055] Example 3
[0056] Channel interaction includes: a global average pooling layer, two consecutive convolutional layers and a sigmoid layer; normalization and activation are performed between the two convolutional layers, and then the sigmoid layer is used to generate attention features in the channel dimension.
[0057] Specifically, the channel interaction consists of a global average pooling layer, followed by two consecutive 1×1 convolutional layers with normalization and activation between them; finally, an attention map is generated in the channel dimension using a sigmoid function.
[0058] Example 4
[0059] Spatial interaction consists of two convolutional layers and a sigmoid layer. Normalized BN and GELU activation are performed between the two convolutional layers. After passing through the two convolutional layers, the number of channels is reduced, and then the sigmoid layer is used to generate spatial attention features.
[0060] Specifically, the spatial interaction design also consists of two 1×1 convolutional layers, with normalized batch normalization (BN) and GELU activation applied between the two layers. After these two layers, the number of channels is reduced to one, and finally, a sigmoid layer is used to generate the spatial attention map.
[0061] Example 5
[0062] We construct the loss function for training the initial image neural network using cross-entropy loss and Dess loss.
[0063] Example 6
[0064] The loss function for initial image neural network training is:
[0065] CE is the cross-entropy loss, and Dice is the Dice loss, defined as follows:
[0066]
[0067] Among them, y k It is a truth value. This is the actual output of the network, where n is the total number of pixels.
[0068] Specifically, two-dimensional ultrasound image data containing the puncture needle were collected for the puncture surgery experiment. The dataset samples were divided into training set and test set at a ratio of 9:1. The training set data and the labeled data were input into the corresponding network, the optimal network parameters were selected, and iterative optimization was performed to minimize the loss of each batch.
[0069] During training, based on the characteristics of the two-dimensional ultrasound image of the puncture needle, functions constructed from cross-entropy (CE) loss and Dice loss were selected as the loss functions. Their function expressions are shown below: Total loss function: The cross-entropy loss function CE and the Dice loss function are defined as follows:
[0070]
[0071]
[0072] Among them, y k It is a truth value. This is the actual output of the network, where n is the total number of pixels.
[0073] The network's output is processed by the SoftMax function to form a probability distribution. Then, the loss function calculates the difference between the predicted results and the true values, allowing the network to determine the direction of gradient descent. Through repeated iterations of the training process, the network is trained and optimized.
[0074] Example 7
[0075] S3 includes:
[0076] The original ultrasound image corresponding to the current puncture needle is input into the puncture needle ultrasound image segmentation network so that it outputs a binary image of the current puncture needle.
[0077] Obtain the positions of each pixel of the current puncture needle from the binary image: (i1, j1), (i2, j2), ..., (i... n ,j n ), where n is the number of pixels; multiple pixels are fitted into a line, and the needle angle and needle length are calculated to obtain the needle axis image.
[0078] Specifically, the input is an ultrasound image to be segmented, and the automatic segmentation outputs a binary image, which can be a binary image composed of a white background, black pixels, and some noise. After a thinning and iterative process, the binary image output by the segmentation network obtains the pixel positions (row and column coordinates) representing the needle in the image as (i1,j1), (i2,j2), ..., (i...j1)... n ,j n ), where n is the number of pixels. These coordinates are stored as arrays of row and column coordinates. They can then be passed to a regression algorithm to estimate the parameters m and c in the regression model by minimizing the sum of squared residuals, thereby fitting a line over the data points.
[0079]
[0080] Among them, i t and j t These are the row and column coordinates of the given point, respectively. and These are the average row and column coordinates of all pixels forming the needle in the image. After obtaining the best-fitting straight line, the pixels of the straight line are set to red and superimposed on the original ultrasound image to form a visualized segmented image of the puncture needle.
[0081] The segmentation results of applying the five network models to the test dataset are as follows: Figure 3a , Figure 3b , 3c , Figure 3d As shown in Table 1, when the Dice similarity coefficients (DSC) of the segments are not significantly different, the average length error of the needle shaft segmented using the network in this embodiment (TransMixnet) achieved the best results, and the average angle error differed from the best index among the five network models by 0.0021. Figure 4 This is a comparison of the segmentation results on a subset of historical ultrasound images of puncture needles in this embodiment. In summary, the segmentation network based on parallel interaction of local window self-attention and depthwise convolution provided by this invention can help improve the segmentation performance of two-dimensional ultrasound images of puncture needles.
[0082] Table 1 Experimental Results
[0083]
[0084] Example 8
[0085] According to another aspect of the present invention, a method for segmenting ultrasound images of a puncture needle is provided, comprising:
[0086] The building module is used to construct an initial image segmentation network including an encoder and a decoder; the decoder includes an interaction module, a first convolution module, and a max pooling module; the encoder includes an upsampling module, a first convolution module, and a second convolution module; the interaction module is used to perform depth convolution on the input image features, and then perform channel interaction and spatial interaction respectively, and concatenate the obtained channel attention features and spatial attention features.
[0087] The training module is used to train the initial image neural network using a set of historical puncture needle ultrasound images, and to adjust the network parameters of the encoder and decoder to obtain the puncture needle ultrasound image segmentation network.
[0088] The segmentation module is used to input the original ultrasound image corresponding to the current puncture needle into the puncture needle ultrasound image segmentation network to segment the needle axis image of the current puncture needle from the original ultrasound image.
[0089] The fusion module is used to fuse the needle shaft image and the original ultrasound image to obtain the target display image; the target display image shows the current position information of the puncture needle.
[0090] Example 9
[0091] According to another aspect of the present invention, a segmentation system for ultrasound images of a puncture needle is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0092] Example 10
[0093] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0094] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for segmenting ultrasound images of a puncture needle, characterized in that, include: S1: Construct an initial image segmentation network including an encoder and a decoder; the encoder includes an interaction module, a first convolution module, and a max pooling module; the decoder includes an upsampling module, a first convolution module, and a second convolution module; the interaction module is used to perform depthwise convolution on the input image features, and then perform channel interaction and spatial interaction respectively, and concatenate the obtained channel attention features and spatial attention features. S2: Train the initial image neural network using a set of historical puncture needle ultrasound images, and adjust the network parameters of the encoder and decoder to obtain a puncture needle ultrasound image segmentation network. S3: Input the original ultrasound image corresponding to the current puncture needle into the ultrasound image segmentation network of the puncture needle to segment the needle axis image of the current puncture needle from the original ultrasound image; S4: The needle shaft image and the original ultrasound image are fused to obtain a target display image; the target display image displays the position information of the current puncture needle. The original ultrasound image is input into the ultrasound image segmentation network of the puncture needle, whereby the interaction module in the encoder processes it to obtain a first feature. The first feature is then compressed by the max pooling module to obtain a second feature. The second feature is input into the first convolution module for feature extraction according to a first size to obtain a third feature. This third feature is then input into the interaction module to obtain an interactive feature. The third feature is then input into the max pooling module to obtain a new second feature. This new second feature is again input into the first convolution module to obtain a new third feature. This new third feature is then input into the interaction module to obtain another interactive feature. Finally, the new third feature is input into the max pooling module to update the second feature. The second feature is iterated repeatedly until the number of output channels corresponding to the updated second feature output by the max pooling module reaches a first threshold. The final updated second feature is then sequentially input into the first convolution module and the interaction module to obtain the encoded feature. The encoded feature is input into the decoder so that the upsampling module upsamples the encoded feature. The obtained sampled feature is superimposed with an interaction feature and input into the first convolution module for feature extraction to obtain the decoded feature. The decoded feature repeats the processing of the encoded feature until the number of output channels corresponding to the final decoded feature reaches a second threshold. The final decoded feature is then input into the second convolution module to perform feature extraction according to the second size to obtain the needle axis image.
2. The method for segmenting ultrasound images of a puncture needle as described in claim 1, characterized in that, The interaction module includes: a local window self-attention branch and a depthwise convolution branch for bidirectional parallel interaction; The channel and spatial interactions between parallel branches can provide complementary clues for the two parallel branches; the information in the deep convolution branch flows to the local window self-attention branch through channel interaction, and the information in the local window self-attention branch flows to the deep convolution branch through spatial interaction. The outputs of the local window self-attention branch and the depth convolution branch are normalized through different normalization layers and then merged by concatenation; the merged features are input into the feedforward network to generate the final output features.
3. The method for segmenting ultrasound images of a puncture needle as described in claim 2, characterized in that, The channel interaction includes: a global average pooling layer, two consecutive convolutional layers and a sigmoid layer; normalization and activation are performed between the two convolutional layers, and then the sigmoid layer is used to generate attention features in the channel dimension.
4. The method for segmenting ultrasound images of a puncture needle as described in claim 2, characterized in that, The spatial interaction includes two convolutional layers and a sigmoid layer. Normalized BN and GELU activation are performed between the two convolutional layers. After passing through the two convolutional layers, the number of channels is reduced, and then the sigmoid layer is used to generate spatial attention features.
5. The method for segmenting ultrasound images of a puncture needle as described in claim 1, characterized in that, The loss function for training the initial image neural network is constructed using cross-entropy loss and Dess loss.
6. The method for segmenting ultrasound images of a puncture needle as described in claim 5, characterized in that, The loss function for training the initial image neural network is: CE is the cross-entropy loss, and Dice is the Dice loss, defined as follows: Among them, y k It is a truth value. This is the actual output of the network, where n is the total number of pixels.
7. The method for segmenting ultrasound images of a puncture needle as described in claim 1, characterized in that, S3 includes: The original ultrasound image corresponding to the current puncture needle is input into the ultrasound image segmentation network of the puncture needle so that it outputs a binary image of the current puncture needle. Obtain the positions (i1,j1), (i2,j2), ..., (i...j1) of each pixel of the current puncture needle from the binary image. n ,j n ), where n is the number of pixels; The needle axis image is obtained by fitting multiple pixels into a line and calculating the needle angle and needle length.
8. A segmentation device for ultrasound images of a puncture needle, characterized in that, A method for segmenting ultrasound images of a puncture needle according to any one of claims 1-7, comprising: A construction module is used to construct an initial image segmentation network including an encoder and a decoder; the encoder includes an interaction module, a first convolution module, and a max pooling module; the decoder includes an upsampling module, a first convolution module, and a second convolution module; the interaction module is used to perform depthwise convolution on the input image features, and then perform channel interaction and spatial interaction respectively, and concatenate the obtained channel attention features and spatial attention features. The training module is used to train the initial image neural network using a set of historical puncture needle ultrasound images, and to adjust the network parameters of the encoder and decoder to obtain a puncture needle ultrasound image segmentation network. The segmentation module is used to input the original ultrasound image corresponding to the current puncture needle into the ultrasound image segmentation network of the puncture needle, so as to segment the needle axis image of the current puncture needle from the original ultrasound image; The fusion module is used to fuse the needle shaft image and the original ultrasound image to obtain a target display image; the target display image displays the position information of the current puncture needle.
9. A segmentation system for ultrasound images of a puncture needle, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Vein blood vessel identifying and positioning method and system based on near-infrared imaging
CN114176514A
Ultrasound system with an artificial neural network for guided liver imaging
US20210177373A1