Ultrasonic guided puncture needle accurate positioning method and device based on image recognition
By processing ultrasound images using a multi-scale feature fusion network and an adaptive graph convolutional network, the problem of inaccurate needle positioning in obese patients was solved, achieving precise needle positioning and safe guidance, and reducing surgical risks.
Patent Information
- Application Number
- CN202511238410.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-12-12
AI Technical Summary
In ultrasound images of obese patients, the significantly increased thickness of the subcutaneous fat layer leads to severe attenuation of the echo signal of the puncture needle, resulting in extremely low image signal-to-noise ratio and contrast. Traditional algorithms struggle to accurately identify the characteristics of the needle body and tip, leading to an increased failure rate in localization, prolonged surgical time, and potential complications such as vascular injury and hematoma.
An image recognition-based ultrasound-guided puncture needle precision positioning method is adopted. The ultrasound image is processed by a multi-scale feature fusion network and an adaptive graph convolutional network to construct and optimize the initial graph structure. The threshold is dynamically calculated by combining the gradient intensity distribution to determine the needle tip coordinates, generate the motion trajectory of the puncture needle, and display it in real time.
It improves the positioning accuracy of the puncture needle, reduces the positioning failure rate, reduces the risk of prolonged operation time and complications such as vascular damage and hematoma, and enhances the accuracy and safety of ultrasound-guided puncture operation.
Smart Images

Figure CN121120774A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology, and in particular relates to a method and device for precise positioning of ultrasound-guided puncture needles based on image recognition. Background Technology
[0002] With the development of medical ultrasound imaging and image recognition technologies, ultrasound-guided puncture techniques have emerged. This technique, characterized by its real-time, non-invasive nature and ability to dynamically observe tissue structures, has become an important auxiliary tool in clinical puncture procedures. By displaying the position and direction of the puncture needle in real time through ultrasound images, doctors can more accurately perform high-precision procedures such as central venous catheterization and nerve block anesthesia.
[0003] Traditional techniques often employ image segmentation algorithms to extract and locate the puncture needle in ultrasound images. However, in ultrasound images of obese patients, the significantly increased thickness of the subcutaneous fat layer severely attenuates the echo signal of the puncture needle, resulting in extremely low signal-to-noise ratio and contrast. Traditional algorithms struggle to accurately identify the needle body and tip features. Although current research attempts to improve image quality through image enhancement or edge detection methods, these methods still fail to effectively extract the puncture needle contour under conditions of strong noise interference and weak features, leading to a significantly increased localization failure rate. This not only prolongs the operation time but may also cause serious complications such as vascular injury and hematoma. Summary of the Invention
[0004] Therefore, it is necessary to provide an image recognition-based ultrasound-guided precise positioning method and device for puncture needles, which can improve the positioning accuracy of puncture needles, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for precise positioning of an ultrasound-guided puncture needle based on image recognition, comprising:
[0006] The original ultrasound image is acquired and then denoised and enhanced to obtain the denoised and enhanced ultrasound image.
[0007] Based on a pre-defined multi-scale feature fusion network, the denoised and enhanced ultrasound image is segmented by the puncture needle to obtain the initial segmentation mask of the puncture needle.
[0008] Based on the initial segmentation mask, construct the graph structure of the initial segmentation mask to obtain the initial graph structure;
[0009] Based on a pre-defined adaptive graph convolutional network, the initial graph structure is optimized to obtain the optimized puncture needle segmentation result; the puncture needle segmentation result is used to characterize the geometric shape and spatial position of the puncture needle.
[0010] Based on the segmentation results of the puncture needle, the needle tip coordinates are obtained;
[0011] Based on the needle tip coordinates and the location of the target blood vessel, the trajectory of the puncture needle is obtained;
[0012] Based on the superimposed display parameters of the motion trajectory and the target blood vessel position, a real-time ultrasound image of the puncture needle is obtained and sent to the guiding display device; the guiding display device is used to guide the puncture operation.
[0013] In one embodiment, based on a preset multi-scale feature fusion network, the denoised and enhanced ultrasound image is segmented using a puncture needle to obtain an initial segmentation mask for the puncture needle, including:
[0014] The denoised and enhanced ultrasound image is input into a multi-scale feature fusion network, and features at different scales are extracted through convolutional layers of different scales to obtain the first-scale feature map, the second-scale feature map, and the third-scale feature map.
[0015] Feature fusion is performed on the first-scale feature map, the second-scale feature map, and the third-scale feature map to obtain a fused feature map;
[0016] Upsampling is performed on the fused feature map to obtain a feature map of the same size as the original ultrasound image;
[0017] Binarize the feature maps of the same size to obtain the initial segmentation mask for the puncture needle.
[0018] In one embodiment, constructing an initial graph structure of the initial segmentation mask based on the initial segmentation mask includes:
[0019] The initial segmentation mask is binarized to obtain a standardized binary image;
[0020] Extract the skeleton of the puncture needle from the binary image to obtain the centerline structure of the puncture needle;
[0021] The curvature of the nodes in the centerline structure is detected to obtain a node detection set; the node detection set is used to characterize the shape of the needle body.
[0022] Spatial proximity analysis is performed on the node detection set to obtain node analysis results; the node analysis results are used to characterize the connection relationships between nodes.
[0023] The node analysis results are weighted to obtain the initial edge weight matrix;
[0024] Based on the node detection set, node analysis results, and edge weight matrix, the initial graph structure is obtained.
[0025] In one embodiment, the initial graph structure is optimized based on a preset adaptive graph convolutional network to obtain an optimized puncture needle segmentation result, including:
[0026] Based on an adaptive graph convolutional network, an adaptive graph convolution operation is performed on the initial graph structure, and the updated features of each node are calculated using the following formula:
[0027]
[0028] Among them, H (l+1) The updated node features are represented by σ, where σ is the activation function. To add a self-loop to the adjacency matrix, H is the degree matrix. (l) For the features of the l-th layer nodes, W (l) This is the weight matrix;
[0029] Based on the updated node features, an optimized segmentation mask is generated;
[0030] Based on the optimized segmentation mask, the optimized segmentation result of the puncture needle is obtained;
[0031] The optimized segmentation mask is post-processed to remove noise points, resulting in the optimized puncture needle segmentation result.
[0032] In one embodiment, the needle tip coordinates are obtained based on the puncture needle segmentation results, including:
[0033] The segmentation results of the puncture needle are binarized to obtain a binary image of the needle body region. The skeleton of the puncture needle is extracted from the binary image of the needle body region to obtain the centerline structure of the puncture needle.
[0034] Based on the centerline structure, the gradient intensity of each pixel is calculated to obtain a gradient intensity map, and the gradient intensity map is projected along the centerline direction to obtain the gradient intensity distribution;
[0035] Based on the gradient intensity distribution, the dynamically set threshold is calculated using the following formula:
[0036] T=μ+k·σ
[0037] Where T is the dynamically set threshold, μ is the mean of the gradient intensity, σ is the standard deviation, and k is the adjustment coefficient;
[0038] The needle tip coordinates are obtained by dynamically setting the threshold and gradient intensity distribution.
[0039] In one embodiment, the needle tip coordinates are obtained based on a dynamically set threshold and gradient intensity distribution, including:
[0040] Based on a dynamically set threshold, the gradient intensity distribution is segmented to obtain candidate regions for the needle tip;
[0041] The skeleton line endpoints are extracted from the candidate region of the needle tip to obtain the skeleton line endpoint set; the skeleton line endpoint set is used to represent the pixel set of the puncture needle.
[0042] Based on the set of endpoints of the skeleton line, the distance from each endpoint to the center of the puncture needle is calculated to obtain the set of candidate needle tip points;
[0043] Neighborhood grayscale verification is performed on the set of candidate needle points to obtain the neighborhood verification result; the neighborhood verification result is used to characterize that the neighborhood gradient change of a certain candidate needle point is the largest in the set of candidate needle points;
[0044] When the domain validation result shows that the domain gradient change of the candidate point is the largest among all candidate points, the candidate point is taken as the candidate point and the position of the candidate point is determined.
[0045] The needle tip position is mapped back to the original ultrasound image to obtain the needle tip coordinates.
[0046] In one embodiment, a raw ultrasound image is acquired, and the raw ultrasound image is subjected to denoising and enhancement processing to obtain a denoised and enhanced ultrasound image, including:
[0047] Acquire raw ultrasound images;
[0048] Gaussian filtering is applied to the original ultrasound image to obtain a smoothed image;
[0049] Histogram equalization is performed on the smoothed image to obtain an image with enhanced contrast;
[0050] Adaptive thresholding is performed on the contrast-enhanced image to obtain a binarized image;
[0051] Morphological closing operations are performed on the binarized image to obtain a denoised and enhanced ultrasound image.
[0052] Secondly, this application also provides an image recognition-based ultrasound-guided puncture needle precision positioning device, comprising:
[0053] The ultrasound image preprocessing module is used to acquire the original ultrasound image and perform denoising and enhancement processing on the original ultrasound image to obtain the denoised and enhanced ultrasound image.
[0054] The puncture needle segmentation mask module is used to segment the puncture needle in the denoised and enhanced ultrasound image based on a preset multi-scale feature fusion network to obtain the initial segmentation mask of the puncture needle.
[0055] The initial graph structure module is used to construct the initial graph structure of the initial segmentation mask based on the initial segmentation mask;
[0056] The puncture needle segmentation result module is used to optimize the initial graph structure based on a preset adaptive graph convolutional network to obtain the optimized puncture needle segmentation result; the puncture needle segmentation result is used to characterize the geometric shape and spatial position of the puncture needle.
[0057] The needle tip determination module is used to obtain the needle tip coordinates based on the puncture needle segmentation results;
[0058] The puncture needle motion trajectory module is used to obtain the motion trajectory of the puncture needle based on the needle tip coordinates and the target blood vessel position;
[0059] The puncture guidance module is used to obtain a real-time ultrasound image of the puncture needle based on the superimposed display parameters of the motion trajectory and the target blood vessel position, and to send the real-time ultrasound image of the puncture needle to the guidance display device; the guidance display device is used to guide the puncture operation.
[0060] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0061] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0062] The aforementioned method and device for precise positioning of ultrasound-guided puncture needles based on image recognition effectively improves the low signal-to-noise ratio and low contrast caused by echo signal attenuation in scenarios such as obese patients by denoising and enhancing the original ultrasound image, providing high-quality images for subsequent processing. It utilizes a multi-scale feature fusion network to extract and fuse features at different scales, enabling more comprehensive capture of puncture needle features and overcoming the shortcomings of traditional algorithms in identifying weak features. A graph structure is constructed and optimized through an adaptive graph convolutional network to accurately represent the geometric shape and spatial position of the puncture needle, improving segmentation accuracy. The threshold is dynamically calculated based on gradient intensity distribution to determine the needle tip coordinates, improving needle tip positioning accuracy. A motion trajectory is generated based on the needle tip coordinates and the target blood vessel position and displayed in real time, providing intuitive guidance for doctors, reducing the positioning failure rate, minimizing surgical time and the risk of complications such as vascular injury and hematoma, and improving the precision and safety of ultrasound-guided puncture operations. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram illustrating the application environment of an image recognition-based ultrasound-guided precise positioning method for puncture needles in one embodiment.
[0065] Figure 2 This is a flowchart illustrating an image recognition-based ultrasound-guided puncture needle precision positioning method in one embodiment.
[0066] Figure 3 This is a schematic diagram of an image recognition-based ultrasound-guided puncture needle precision positioning device in one embodiment;
[0067] Figure 4 This is a schematic diagram of a computer device in one embodiment. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0069] This application provides an image recognition-based method for precise positioning of ultrasound-guided puncture needles, which can be applied to, for example... Figure 1 In the application environment shown, the puncture guidance terminal 101 communicates with the display device terminal 102 via the Internet. The puncture guidance terminal 101 may include, but is not limited to, an ultrasound imaging device, which may include, but is not limited to, a desktop ultrasound device or a handheld ultrasound device. The display device terminal 102 may include, but is not limited to, a mobile device terminal, which may include, but is not limited to, a tablet computer or a smartphone. In an exemplary embodiment, as... Figure 2 As shown, an image recognition-based method for precise positioning of ultrasound-guided puncture needles is provided, which is then applied to... Figure 1 The following explanation uses the puncture-guided terminal as an example, including steps S1 to S7:
[0070] S1. Acquire the original ultrasound image and perform denoising and enhancement processing on the original ultrasound image to obtain the denoised and enhanced ultrasound image.
[0071] For example, an ultrasound device acquires raw ultrasound images and transmits them to a puncture guidance terminal. These raw ultrasound images reflect the internal structures of human tissue and the location of the puncture needle. Due to the nature of ultrasound imaging, the images often contain noise, affecting puncture needle identification. The terminal employs denoising and enhancement processing to improve image quality. This denoising and enhancement processing is based on image processing algorithms, such as Gaussian filtering to smooth the image and remove high-frequency noise, and histogram equalization to adjust image contrast, making the puncture needle clearer. After denoising and enhancement processing, a denoised and enhanced ultrasound image is obtained, providing a clearer image basis for subsequent puncture needle identification and localization.
[0072] S2, based on a preset multi-scale feature fusion network, performs puncture needle segmentation on the denoised and enhanced ultrasound image to obtain the initial segmentation mask of the puncture needle.
[0073] For example, the puncture guidance terminal uses a pre-defined multi-scale feature fusion network to process the denoised and enhanced ultrasound image, obtaining low-scale, mid-scale, and high-scale feature maps. The low-scale feature map contains rich detail information, such as the potential location of the needle tip and the fine edges of the needle body, but may also contain a lot of noise and irrelevant details; the mid-scale feature map outlines the linear structure of the needle body and suppresses some noise, but may lose the finest needle tip details; the high-scale feature map provides the position, orientation, and relationship of the needle body to the surrounding large structures in the overall image, but has lower spatial resolution and loses most details. The multi-scale feature fusion network fuses the three feature maps of different scales to generate a fused feature map, which is then upsampled and binarized to obtain the initial segmentation mask for the puncture needle. The initial segmentation mask is a binary image, with the puncture needle region as the foreground and the background region as the background, initially identifying the puncture needle position. The multi-scale feature fusion network can be U-Net and its variants, or it can be a feature pyramid network.
[0074] S3. Based on the initial segmentation mask, construct the graph structure of the initial segmentation mask to obtain the initial graph structure.
[0075] For example, the puncture guidance terminal first binarizes the initial segmentation mask to ensure the image is binary. Then, it extracts the skeleton of the puncture needle, i.e., the centerline structure, which concisely represents the shape and orientation of the puncture needle. Based on the centerline structure, node curvature is detected to form a node detection set, which represents the key points of the puncture needle morphology. The spatial proximity relationships between nodes are analyzed to determine node connections, edge weights are calculated, and finally, an initial graph structure is constructed. A graph structure is a data structure composed of nodes and edges used to represent the morphology and spatial relationships of the puncture needle.
[0076] S4. Based on a preset adaptive graph convolutional network, the initial graph structure is optimized to obtain the optimized puncture needle segmentation result.
[0077] The puncture needle segmentation results are used to characterize the geometric shape and spatial position of the puncture needle.
[0078] For example, the puncture guidance terminal uses a pre-defined adaptive graph convolutional network to optimize the initial graph structure. Adaptive graph convolutional networks are an advanced deep learning method that optimizes node features in a graph structure by adaptively adjusting convolutional kernel parameters. The adaptive graph convolutional network uses parameters such as adjacency matrix, degree matrix, and weight matrix to update the features of each node in the initial graph structure. The updated node features more accurately reflect the morphology and spatial position of the puncture needle. Based on the updated node features, an optimized segmentation mask is generated, resulting in an optimized puncture needle segmentation result. The optimized segmentation result more accurately represents the geometric shape and spatial position of the puncture needle.
[0079] S5. Based on the puncture needle segmentation results, obtain the needle tip coordinates.
[0080] For example, the puncture guidance terminal first binarizes the segmentation result of the puncture needle to ensure that the image is a binary image. Then, it extracts the skeleton of the puncture needle to obtain the centerline structure. Based on the centerline structure, it calculates the gradient intensity of each pixel, generates a gradient intensity map, and projects it along the centerline direction to obtain the gradient intensity distribution. According to the gradient intensity distribution, a threshold is dynamically set to segment the candidate region of the needle tip. The endpoints of the skeleton line are extracted within the candidate region, and the distance from each endpoint to the center of the puncture needle is calculated to obtain a set of candidate points for the needle tip. Neighborhood grayscale verification is performed on the candidate point set to determine the position of the needle tip. Finally, the position of the needle tip is mapped back to the original ultrasound image to obtain the needle tip coordinates, providing an accurate reference for the precise positioning of the puncture needle.
[0081] S6. Based on the needle tip coordinates and the target blood vessel location, the trajectory of the puncture needle is obtained.
[0082] For example, the puncture guidance terminal uses vessel segmentation and recognition technology on the ultrasound image to obtain the location of the target vessel. The terminal combines the needle tip coordinates and the target vessel location, and uses a path planning algorithm to calculate the optimal path for the puncture needle from its current position to the target vessel location. The path planning algorithm considers obstacles and tissue structures along the puncture path to ensure that the puncture needle can safely and accurately reach the target location.
[0083] S7. Based on the superimposed display parameters of the motion trajectory and the target blood vessel position, a real-time ultrasound image of the puncture needle is obtained, and the real-time ultrasound image of the puncture needle is sent to the guiding display device.
[0084] Specifically, the puncture guidance terminal integrates the superimposed display parameters of the needle's movement trajectory and the target vessel location to generate a real-time ultrasound image of the puncture needle. This real-time ultrasound image visually displays the needle's current position, movement trajectory, and the target vessel location, providing the operator with real-time visual feedback. The terminal sends the real-time ultrasound image to the guidance display device, allowing the operator to better control the needle's movement by viewing the image on the guidance display device.
[0085] In the aforementioned image recognition-based ultrasound-guided precise positioning method for puncture needles, after acquiring the original ultrasound image, denoising and enhancement processing is performed to improve image quality and lay the foundation for subsequent analysis. A multi-scale feature fusion network extracts and fuses features at different scales to accurately segment the puncture needle, obtaining an initial mask. A graph structure is constructed and optimized, and an adaptive graph convolutional network is used to refine the segmentation results, more accurately representing the geometric shape and spatial position of the puncture needle. Based on gradient distribution, a threshold is dynamically calculated to determine the needle tip coordinates, and a motion trajectory is generated by combining it with the target blood vessel location. This trajectory is then superimposed with the blood vessel location to generate a real-time ultrasound image for guidance. This process effectively solves the problems of image quality interference, incomplete feature extraction, and inaccurate needle tip and trajectory determination in traditional puncture positioning, improving the segmentation and positioning accuracy of the puncture needle, providing clearer and more precise guidance for puncture operations, and reducing the risk of puncture errors.
[0086] In an optional embodiment, based on a preset multi-scale feature fusion network, the denoised and enhanced ultrasound image is segmented using a puncture needle to obtain an initial segmentation mask for the puncture needle, including the following steps:
[0087] S11, the denoised and enhanced ultrasound image is input into the multi-scale feature fusion network, and features of different scales are extracted through convolutional layers of different scales to obtain the first scale feature map, the second scale feature map and the third scale feature map.
[0088] For example, the puncture guidance terminal inputs the denoised and enhanced ultrasound image into a multi-scale feature fusion network. Different scale convolutional layers in the multi-scale feature fusion network extract the first-scale feature map, the second-scale feature map, and the third-scale feature map of the image, respectively. This multi-scale feature extraction process effectively improves the accuracy and robustness of puncture needle segmentation.
[0089] S12, perform feature fusion on the first scale feature map, the second scale feature map and the third scale feature map to obtain the fused feature map.
[0090] Specifically, the puncture guidance terminal fuses the first-scale, second-scale, and third-scale feature maps using a specific fusion strategy to obtain a fused feature map. This fused feature map better represents the characteristics of the puncture needle while retaining useful information from different scale feature maps. Feature fusion methods can include simple weighted summation, feature concatenation, or more complex deep learning fusion strategies. By fusing feature maps from different scales, more accurate feature input can be provided for subsequent segmentation operations, improving the accuracy of puncture needle segmentation.
[0091] S13, upsample the fused feature map to obtain a feature map of the same size as the original ultrasound image.
[0092] For example, the puncture-guided terminal upsamples the fused feature map to make its resolution the same as the original ultrasound image. Upsampling is an image processing technique that aims to enlarge a low-resolution image to a high-resolution image while preserving as much detail as possible. Common upsampling methods include nearest neighbor interpolation, bilinear interpolation, and transposed convolution. By upsampling, a feature map of the same size as the original ultrasound image is obtained, providing a basis for subsequent binarization and segmentation operations.
[0093] S14. Binarize the feature maps of the same size to obtain the initial segmentation mask for the puncture needle.
[0094] For example, the puncture guidance terminal binarizes the upsampled feature map to obtain an initial segmentation mask for the puncture needle. Binarization methods include global thresholding and adaptive thresholding. Through binarization, the puncture needle region in the feature map is labeled as the foreground, and the background region is labeled as the background. The initial segmentation mask can preliminarily characterize the position and shape of the puncture needle, providing a foundation for subsequent graph structure construction and optimization.
[0095] In an optional embodiment, constructing an initial graph structure of the initial segmentation mask based on the initial segmentation mask includes the following steps:
[0096] S21, perform binarization on the initial segmentation mask to obtain a standardized binary image.
[0097] Specifically, before constructing the graph structure, the puncture guidance terminal binarizes the initial segmentation mask to obtain a standardized binary image. The purpose of binarization is to convert the grayscale image in the initial segmentation mask into a binary image, where the puncture needle region is labeled as foreground (usually 1) and the background region is labeled as background (usually 0). Binarization allows for a clearer representation of the puncture needle's outline and shape. Binarization methods include global thresholding and adaptive thresholding.
[0098] S22, extract the skeleton of the puncture needle from the binary image to obtain the centerline structure of the puncture needle.
[0099] For example, the puncture guidance terminal extracts the skeleton of the puncture needle from a binary image. The purpose of skeleton extraction is to transform the two-dimensional contour of the puncture needle into a one-dimensional centerline structure, thereby representing the shape and orientation of the puncture needle more concisely. Commonly used skeleton extraction methods include Medial Axis Transform (MAT) and iterative thinning algorithms. Medial Axis Transform is a distance-transform-based skeleton extraction method that can generate the centerline structure of the puncture needle while preserving its topological information. Iterative thinning algorithms obtain the skeleton of the puncture needle by progressively removing boundary pixels from the image. The step of obtaining the centerline structure through skeleton extraction can clearly represent the shape and orientation of the puncture needle, providing a foundation for subsequent node detection and graph structure construction.
[0100] S23, perform node curvature detection on the centerline structure to obtain a node detection set.
[0101] Among them, the node detection set is the set of nodes used to characterize the shape of the needle.
[0102] For example, the puncture guide terminal performs node curvature detection on the centerline structure to obtain a node detection set. Node curvature detection identifies nodes with significant curvature changes within the centerline structure of the puncture needle. These nodes typically correspond to bending or turning points of the puncture needle, providing a better characterization of its morphological features. Node curvature detection is achieved by calculating the curvature of each point on the centerline structure. Curvature is a geometric quantity describing the degree of curvature of a curve; calculating curvature allows for the identification of key points within the centerline structure. The node detection set contains information on all detected nodes for subsequent spatial proximity analysis and graph structure construction.
[0103] S24, Perform spatial proximity analysis on the node detection set to obtain the node analysis results.
[0104] The node analysis results are used to characterize the connection relationships between nodes.
[0105] Specifically, after obtaining the node detection set, the puncture guidance terminal performs spatial proximity analysis on these nodes to determine the connections between them. The purpose of spatial proximity analysis is to identify which nodes have direct connections, thereby constructing the graph structure of the puncture needle. Analysis methods can be based on Euclidean distance, nearest neighbor search, or connection algorithms in graph theory. By calculating the distance or similarity between nodes, the connections between them can be determined, and node analysis results are generated. The node analysis results are used to characterize the connections between nodes; accurate spatial proximity analysis ensures the correctness of the graph structure and the accurate representation of the puncture needle morphology.
[0106] S25, calculate the weights of the node analysis results to obtain the initial edge weight matrix.
[0107] For example, the puncture-guided terminal performs weight calculations on the node analysis results to obtain an initial edge weight matrix. The edge weight matrix represents the connection strength or similarity between nodes. Weight calculation methods can be based on distance, angle, or feature similarity between nodes. For instance, shorter distances between nodes may result in larger weights, indicating a tighter connection; smaller angles between nodes may also result in larger weights, indicating consistency in connection direction. Through weight calculation, a weight value can be assigned to each edge in the graph structure; these weight values are used for subsequent graph optimization and segmentation result generation.
[0108] S26. Based on the node detection set, node analysis results, and edge weight matrix, the initial graph structure is obtained.
[0109] For example, the puncture guidance terminal constructs an initial graph structure based on a node detection set, node analysis results, and an edge weight matrix. The initial graph structure is a mathematical model used to represent the morphology and spatial relationships of the puncture needle. The graph structure consists of a node set representing the key points of the puncture needle, and an edge set representing the connections between nodes. The node detection set determines the node positions in the graph structure, the node analysis results determine the connections between nodes, and the edge weight matrix determines the weight value of each edge. The initial graph structure clearly represents the morphology and spatial position of the puncture needle, providing a foundation for subsequent graph optimization and segmentation result generation.
[0110] In an optional embodiment, the initial graph structure is optimized based on a preset adaptive graph convolutional network to obtain an optimized puncture needle segmentation result, including the following steps:
[0111] S31, based on an adaptive graph convolutional network, performs adaptive graph convolution operations on the initial graph structure, and calculates the updated features of each node using the following formula:
[0112]
[0113] Among them, H (l+1) The updated node features are represented by σ, where σ is the activation function. To add a self-loop to the adjacency matrix, H is the degree matrix. (l) For the features of the l-th layer nodes, W (l) This is the weight matrix.
[0114] Specifically, adaptive graph convolutional networks (CCNNs) are a deep learning technique for optimizing graph structures. Their core lies in updating and optimizing node features within a graph structure through adaptive graph convolution operations. Adaptive graph convolution operations dynamically adjust the parameters of the convolution kernel based on the graph's topological information and node features, thereby extracting node feature information more effectively. Specifically, parameters such as the adjacency matrix, degree matrix, and weight matrix are used to update the features of each node in the initial graph structure. After completing the adaptive graph convolution operation, the updated node features more accurately represent the morphology and spatial location of the puncture needle.
[0115] In the update formula for the above nodes, H (l+1) The updated node features, after passing through a graph convolutional layer, carry information about each node (such as the shape and connection relationships of the corresponding node positions in the puncture needle graph structure), which is the core output of the network's forward propagation; σ is the activation function, which introduces non-linearity into the network, allowing the model to fit more complex feature relationships. For example, ReLU sets negative features to 0 and retains positive features, helping the network to filter effective information. To add a self-loop to the adjacency matrix, the original adjacency matrix only records the connections between nodes. Adding a self-loop involves filling the diagonal of the matrix with 1s, allowing nodes to connect to themselves, preserving their original characteristics, and avoiding information loss during transmission. The degree matrix is used to normalize the adjacency matrix, preventing nodes from being over-amplified or under-amplified during feature propagation due to the number of edges they have; H (l) For the features of nodes in layer l, before the graph convolution operation, the information originally carried by the nodes is the output of the previous layer of the network; W (l) The weight matrix represents the parameters learned during network training. It performs linear transformations on node features (such as changing feature dimensions or enhancing key features), allowing the network to adapt to different tasks.
[0116] S32 generates an optimized segmentation mask based on the updated node features.
[0117] For example, the terminal can generate an optimized segmentation mask based on these updated node features. A segmentation mask is a binary image used to represent the position and shape of the puncture needle in an image. The process of generating the segmentation mask can be implemented through a specific decoder network that maps the updated node features to the segmentation mask. The optimized segmentation mask can more accurately segment the puncture needle region while removing noise points and other interfering factors.
[0118] S33, Based on the optimized segmentation mask, the optimized segmentation result of the puncture needle is obtained.
[0119] For example, the puncture guidance terminal extracts the geometric parameters (such as length and bending angle) and spatial coordinate information of the puncture needle from the optimized segmentation mask. Through the conversion relationship between pixel coordinates and physical coordinates, the mask information is transformed into quantifiable puncture needle morphology and position data, forming the optimized puncture needle segmentation result. The segmentation result is typically represented as a binary image, where the puncture needle region is labeled as the foreground and the background region as the background. The optimized segmentation result can more accurately characterize the geometric shape and spatial position of the puncture needle, providing an important basis for precise puncture needle positioning.
[0120] S34. Post-process the optimized segmentation mask to remove noise points and obtain the optimized puncture needle segmentation result.
[0121] For example, the puncture guidance terminal performs connected component analysis on the optimized segmentation mask. Connected component analysis (a method for identifying and labeling independent pixel regions) filters out connected components with an area greater than a preset threshold, removing isolated noise points with too small an area, thus obtaining the puncture needle segmentation result. The purpose of post-processing is to remove noise points and other interfering factors from the segmentation mask, thereby obtaining a more accurate puncture needle segmentation result. Commonly used post-processing methods include morphological operations (such as opening and closing operations), small region removal, and boundary smoothing. Through these post-processing steps, noise points in the segmentation mask can be effectively removed, segmentation boundaries smoothed, and the segmentation result made clearer and more accurate.
[0122] In an optional embodiment, the needle tip coordinates are obtained based on the puncture needle segmentation results, including the following steps:
[0123] S41, the segmentation result of the puncture needle is binarized to obtain a binary image of the needle body region, and the skeleton of the puncture needle is extracted from the binary image of the needle body region to obtain the centerline structure of the puncture needle.
[0124] For example, before extracting the needle tip coordinates, the terminal binarizes the segmentation result of the puncture needle to obtain a binary image of the needle body region. The purpose of binarization is to convert the grayscale image in the segmentation result into a binary image, where the puncture needle region is marked as foreground (usually 1) and the background region is marked as background (usually 0). Through binarization, the outline and shape of the puncture needle can be represented more clearly. Next, skeleton extraction is performed on the binary image of the needle body region to obtain the centerline structure of the puncture needle. The purpose of skeleton extraction is to convert the two-dimensional outline of the puncture needle into a one-dimensional centerline structure, thereby representing the shape and orientation of the puncture needle more concisely. Commonly used skeleton extraction methods include Medial Axis Transform (MAT) and iterative thinning algorithms. The centerline structure can clearly represent the shape and orientation of the puncture needle, providing a foundation for subsequent gradient intensity calculation and needle tip coordinate extraction.
[0125] S42, based on the centerline structure, calculates the gradient intensity of each pixel to obtain a gradient intensity map, and projects the gradient intensity map along the centerline direction to obtain the gradient intensity distribution.
[0126] For example, the terminal calculates the gradient intensity of each pixel based on the centerline structure, thus obtaining a gradient intensity map. Gradient intensity is a quantity describing the rate of change of grayscale values of pixels in an image, typically obtained by calculating the image's gradient. The gradient intensity map clearly represents the intensity changes at the edge of the puncture needle, providing crucial information for needle tip coordinate extraction. Next, the gradient intensity map is projected along the centerline direction to obtain the gradient intensity distribution. The purpose of projection is to convert the two-dimensional gradient intensity map into a one-dimensional gradient intensity distribution, thereby more intuitively representing the intensity changes at the edge of the puncture needle. Obtaining the gradient intensity distribution helps determine candidate needle tip regions, providing a foundation for subsequent needle tip coordinate extraction.
[0127] S43, Based on the gradient intensity distribution, the dynamically set threshold is calculated using the following formula:
[0128] T=μ+k·σ
[0129] Where T is the dynamically set threshold, μ is the mean of the gradient intensity, σ is the standard deviation, and k is the adjustment coefficient.
[0130] Specifically, dynamically setting the threshold is a crucial parameter in tip coordinate extraction. Its purpose is to adaptively determine the threshold for the tip candidate region based on the gradient intensity distribution. The calculation method for dynamically setting the threshold can adaptively adjust the threshold according to the statistical characteristics of the gradient intensity distribution, thereby segmenting the tip candidate region more accurately. The accuracy of dynamically setting the threshold directly affects the segmentation effect of the tip candidate region and the precision of tip coordinate extraction.
[0131] In the above formula for dynamically setting the threshold, T is the dynamically set threshold used to segment the gradient intensity distribution and filter out possible needle tip regions. For example, gradient values exceeding T will be judged as needle tip features; μ is the mean of the gradient intensity, which is the average level of the gradient intensity along the center line of the puncture needle, reflecting the overall gradient magnitude; σ is the standard deviation, which measures the dispersion of gradient values. A larger standard deviation indicates a more dispersed gradient distribution (the difference between needle tip and non-needle tip regions may be more obvious); k is an adjustment coefficient used to flexibly adjust the sensitivity of the threshold to the gradient distribution. The larger k is, the higher T is, and the stricter the screening (reducing false positives, but may miss needle tips with weak gradients); the smaller k is, the lower T is, and the more lenient the detection (covering more candidate regions, but may introduce interference).
[0132] S44, based on the dynamically set threshold and gradient intensity distribution, obtains the needle tip coordinates.
[0133] Specifically, the terminal segments the gradient intensity distribution based on a dynamically set threshold to obtain candidate needle tip regions. These candidate regions are areas with gradient intensities greater than the dynamically set threshold, and these regions may be the location of the needle tip. Next, skeleton line endpoints are extracted from the candidate needle tip regions to obtain a skeleton line endpoint set. This skeleton line endpoint set represents the set of pixels of the puncture needle, containing potential candidate needle tip points. Based on the skeleton line endpoint set, the distance from each endpoint to the center of the puncture needle is calculated to obtain a set of candidate needle tip points. Neighborhood grayscale validation is performed on the candidate needle tip point set to obtain the neighborhood validation result. The neighborhood validation result indicates that the gradient change in the neighborhood of a candidate needle tip point is the largest among all candidate needle tip points. When the neighborhood validation result shows that the gradient change in the neighborhood of a candidate needle tip point is the largest among all candidate needle tip points, that candidate needle tip point is taken as the needle tip point, and the needle tip location is determined. Finally, the needle tip location is mapped back to the original ultrasound image to obtain the needle tip coordinates.
[0134] In an optional embodiment, the needle tip coordinates are obtained based on a dynamically set threshold and gradient intensity distribution, including the following steps:
[0135] S51, based on a dynamically set threshold, the gradient intensity distribution is segmented to obtain the needle tip candidate region.
[0136] For example, the terminal segments the gradient intensity distribution based on a dynamically set threshold to obtain candidate tip regions. The dynamically set threshold adaptively adjusts the threshold according to the statistical characteristics of the gradient intensity distribution, thereby segmenting the candidate tip regions more accurately. Specifically, regions in the gradient intensity distribution that are greater than the dynamically set threshold are marked as candidate tip regions. These regions may be the locations of the needle tips, but further verification is needed. The segmentation effect of the candidate tip regions directly affects the accuracy of subsequent candidate tip point extraction and needle tip coordinate determination.
[0137] S52, extract the skeleton line endpoints from the candidate region of the needle tip to obtain the skeleton line endpoint set.
[0138] For example, the terminal extracts skeleton line endpoints from the candidate needle tip region to obtain a skeleton line endpoint set. Skeleton line endpoints refer to the endpoint portions of the skeleton line; these points typically correspond to the tip of the puncture needle. The purpose of extracting skeleton line endpoints is to further narrow down the range of candidate needle tip points, providing a more accurate set of candidate points for subsequent needle tip coordinate extraction. Commonly used skeleton line endpoint extraction methods include endpoint extraction algorithms based on morphological operations and edge detection algorithms based on image processing. The skeleton line endpoint set represents the set of pixels of the puncture needle, containing possible candidate needle tip points.
[0139] S53, based on the set of endpoints of the skeleton line, calculate the distance from each endpoint to the center of the puncture needle to obtain the set of candidate needle tip points.
[0140] For example, after obtaining the set of skeleton line endpoints, the terminal calculates the distance from each endpoint to the center of the puncture needle. The center of the puncture needle can be determined by the centerline structure of the puncture needle or the geometric center in the segmentation result. The purpose of calculating the distance from each endpoint to the center of the puncture needle is to further filter out possible candidate needle tip points. Typically, candidate needle tip points are the endpoints farthest from the center of the puncture needle, because the needle tip is usually located at the farthest end of the puncture needle. By calculating the distances, a set of candidate needle tip points can be obtained, which are potential locations for needle tip coordinate extraction.
[0141] S54, perform neighborhood grayscale verification on the set of candidate needle points to obtain the neighborhood verification result.
[0142] For example, after obtaining the set of candidate needle points, the terminal performs neighborhood grayscale verification on these candidate points. The purpose of neighborhood grayscale verification is to further determine the validity of the candidate needle points by examining the grayscale changes within their neighborhoods. Specifically, the grayscale changes within the neighborhood of each candidate point are calculated. If the neighborhood grayscale change of a candidate point is the largest, it indicates that the candidate point is most likely a needle point. The neighborhood grayscale verification result is used to characterize whether the neighborhood gradient change of a candidate needle point is the largest in the set of candidate needle points. The accuracy of neighborhood grayscale verification directly affects the accuracy of needle point coordinate extraction.
[0143] S55, when the domain verification result shows that the domain gradient change of the candidate point is the largest among all candidate points, the candidate point is taken as the tip point and the tip position is determined.
[0144] Specifically, after completing the neighborhood grayscale verification, if the gradient change in the neighborhood of a candidate needle tip is the largest among all candidate needle tips, it indicates that this candidate tip is most likely the needle tip. Therefore, this candidate needle tip is taken as the needle tip point to determine the needle tip position. This step is the final confirmation step for needle tip coordinate extraction, ensuring that the extracted needle tip coordinates are accurate.
[0145] S56 maps the needle tip position back to the original ultrasound image to obtain the needle tip coordinates.
[0146] For example, the puncture guidance terminal maps the determined needle tip position back to the original ultrasound image. A coordinate transformation algorithm converts the coordinates of the needle tip in the processed image to coordinates in the original image coordinate system, ensuring a spatial correspondence between the needle tip coordinates and the original ultrasound image. The purpose of this step is to transform the needle tip position from the segmentation result or centerline structure back to the coordinate system of the original ultrasound image, facilitating subsequent needle positioning and puncture procedures.
[0147] In an optional embodiment, the original ultrasound image is acquired, and the original ultrasound image is subjected to denoising and enhancement processing to obtain a denoised and enhanced ultrasound image, including the following steps:
[0148] S61, acquire the raw ultrasound image.
[0149] For example, in the process of precise positioning of an ultrasound-guided puncture needle, it is first necessary to acquire raw ultrasound images. Ultrasound images are typically acquired using an ultrasound probe, which can display the internal tissue structures of the human body and the position of the puncture needle in real time. The quality of the raw ultrasound images directly affects the effectiveness of subsequent image processing and analysis. In practice, it is necessary to ensure the correct placement and operation of the ultrasound probe to obtain clear and accurate ultrasound images.
[0150] S62 performs Gaussian filtering on the original ultrasound image to obtain a smoothed image.
[0151] For example, the puncture guidance terminal performs Gaussian filtering on the original ultrasound image (a weighted average filtering method based on Gaussian function). The image is convolved by a preset Gaussian kernel (a weight matrix that conforms to a Gaussian distribution), so that each pixel value is replaced by the weighted average of its neighboring pixels. This effectively suppresses high-frequency noise in the image while preserving the main structural information of the puncture needle, resulting in a smoothed image.
[0152] S63 performs histogram equalization on the smoothed image to obtain an image with enhanced contrast.
[0153] For example, the puncture guidance terminal performs histogram equalization (a method for adjusting the grayscale distribution of an image) on the smoothed image. By calculating the grayscale histogram of the image, the original grayscale range is mapped to a more uniform distribution range, expanding the dynamic range of the image and improving the contrast between the originally blurred puncture needle area and the surrounding tissue, thus generating an image with enhanced contrast.
[0154] S64 performs adaptive thresholding on the contrast-enhanced image to obtain a binarized image.
[0155] Specifically, the terminal uses adaptive thresholding segmentation to binarize the contrast-enhanced image. Adaptive thresholding segmentation is a commonly used binarization technique that dynamically adjusts the threshold based on the local characteristics of the image. Compared to global thresholding segmentation, adaptive thresholding segmentation can better handle uneven illumination and noise interference in the image. Through adaptive thresholding segmentation, a binarized image is obtained, where the puncture needle region is marked as foreground (usually 1), and the background region is marked as background (usually 0). The binarized image clearly represents the outline and shape of the puncture needle, providing a foundation for subsequent image processing and analysis.
[0156] S65 performs a morphological closing operation on the binarized image to obtain a denoised and enhanced ultrasound image.
[0157] For example, the puncture guidance terminal performs morphological closing operations (a morphological operation of dilation followed by erosion) on the binarized image, selects appropriate structuring elements (geometric shapes used for morphological operations) to process the binarized image, fills the small holes in the puncture needle area of the binarized image, connects the broken needle body parts, eliminates isolated noise points, and finally obtains a denoised and enhanced ultrasound image.
[0158] In the aforementioned image recognition-based ultrasound-guided puncture needle precision positioning method, denoising and enhancement processing optimizes the quality of the original ultrasound image, laying a clear foundation for subsequent analysis and solving the problems of image noise and insufficient contrast. A multi-scale feature fusion network comprehensively extracts puncture needle features, improving the accuracy of the initial segmentation mask and adapting to different needle shapes. Graph structure construction and adaptive graph convolutional network optimization deeply mine needle structure information, enhancing the accuracy and robustness of the segmentation results. Dynamic thresholding combined with gradient analysis precisely locates the needle tip, overcoming the limitations of traditional thresholding. Motion trajectory generation and real-time image overlay provide intuitive and precise guidance for puncture operations, improving the accuracy and reliability of ultrasound-guided puncture needle positioning and enhancing puncture safety and success rate.
[0159] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0160] Based on the same inventive concept, this application also provides an image recognition-based ultrasound-guided puncture needle precise positioning device for implementing the above-mentioned image recognition-based ultrasound-guided puncture needle precise positioning method. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of one or more image recognition-based ultrasound-guided puncture needle precise positioning device embodiments provided below can be found in the above-described limitations of the image recognition-based ultrasound-guided puncture needle precise positioning method, and will not be repeated here.
[0161] In one exemplary embodiment, such as Figure 3 As shown, an image recognition-based ultrasound-guided puncture needle precision positioning device 200 is provided, comprising:
[0162] The ultrasound image preprocessing module 201 is used to acquire the original ultrasound image and perform denoising and enhancement processing on the original ultrasound image to obtain the denoised and enhanced ultrasound image.
[0163] The puncture needle segmentation mask module 202 is used to segment the puncture needle in the denoised and enhanced ultrasound image based on a preset multi-scale feature fusion network to obtain the initial segmentation mask of the puncture needle.
[0164] The initial graph structure module 203 is used to construct the initial graph structure of the initial segmentation mask based on the initial segmentation mask;
[0165] The puncture needle segmentation result module 204 is used to optimize the initial graph structure based on a preset adaptive graph convolutional network to obtain the optimized puncture needle segmentation result; the puncture needle segmentation result is used to characterize the geometric shape and spatial position of the puncture needle.
[0166] The needle tip determination module 205 is used to obtain the needle tip coordinates based on the puncture needle segmentation results;
[0167] The puncture needle motion trajectory module 206 is used to obtain the motion trajectory of the puncture needle based on the needle tip coordinates and the target blood vessel position.
[0168] The puncture guidance module 207 is used to obtain a real-time ultrasound image of the puncture needle based on the superimposed display parameters of the motion trajectory and the target blood vessel position, and to send the real-time ultrasound image of the puncture needle to the guidance display device; the guidance display device is used to guide the puncture operation.
[0169] Furthermore, the puncture needle segmentation mask module 202 is also used for:
[0170] The denoised and enhanced ultrasound image is input into a multi-scale feature fusion network, and features at different scales are extracted through convolutional layers of different scales to obtain the first-scale feature map, the second-scale feature map, and the third-scale feature map.
[0171] Feature fusion is performed on the first-scale feature map, the second-scale feature map, and the third-scale feature map to obtain a fused feature map;
[0172] Upsampling is performed on the fused feature map to obtain a feature map of the same size as the original ultrasound image;
[0173] Binarize the feature maps of the same size to obtain the initial segmentation mask for the puncture needle.
[0174] Furthermore, the initial graph structure module 203 is also used for:
[0175] The initial segmentation mask is binarized to obtain a standardized binary image;
[0176] Extract the skeleton of the puncture needle from the binary image to obtain the centerline structure of the puncture needle;
[0177] The curvature of the nodes in the centerline structure is detected to obtain a node detection set; the node detection set is used to characterize the shape of the needle body.
[0178] Spatial proximity analysis is performed on the node detection set to obtain node analysis results; the node analysis results are used to characterize the connection relationships between nodes.
[0179] The node analysis results are weighted to obtain the initial edge weight matrix;
[0180] Based on the node detection set, node analysis results, and edge weight matrix, the initial graph structure is obtained.
[0181] Furthermore, the puncture needle segmentation result module 204 is also used for:
[0182] Based on an adaptive graph convolutional network, an adaptive graph convolution operation is performed on the initial graph structure, and the updated features of each node are calculated using the following formula:
[0183]
[0184] Among them, H (l+1) The updated node features are represented by σ, where σ is the activation function. To add a self-loop to the adjacency matrix, H is the degree matrix. (l) For the features of the l-th layer nodes, W (l) This is the weight matrix;
[0185] Based on the updated node features, an optimized segmentation mask is generated;
[0186] Based on the optimized segmentation mask, the optimized segmentation result of the puncture needle is obtained;
[0187] The optimized segmentation mask is post-processed to remove noise points, resulting in the optimized puncture needle segmentation result.
[0188] Furthermore, the tip determination module 205 includes:
[0189] The skeleton extraction subunit is used to binarize the puncture needle segmentation results to obtain a binary image of the needle body region, and to extract the skeleton of the puncture needle from the binary image of the needle body region to obtain the centerline structure of the puncture needle.
[0190] The gradient intensity subunit is used to calculate the gradient intensity of each pixel based on the centerline structure, obtain the gradient intensity map, and project the gradient intensity map along the centerline direction to obtain the gradient intensity distribution;
[0191] The dynamic threshold subunit is used to calculate the dynamically set threshold based on the gradient intensity distribution using the following formula:
[0192] T=μ+k·σ
[0193] Where T is the dynamically set threshold, μ is the mean of the gradient intensity, σ is the standard deviation, and k is the adjustment coefficient;
[0194] The tip coordinate sub-unit is used to obtain the tip coordinates based on dynamically set thresholds and gradient intensity distribution.
[0195] Furthermore, the needle-tip coordinate sub-unit is also used for:
[0196] Based on a dynamically set threshold, the gradient intensity distribution is segmented to obtain candidate regions for the needle tip;
[0197] The skeleton line endpoints are extracted from the candidate region of the needle tip to obtain the skeleton line endpoint set; the skeleton line endpoint set is used to represent the pixel set of the puncture needle.
[0198] Based on the set of endpoints of the skeleton line, the distance from each endpoint to the center of the puncture needle is calculated to obtain the set of candidate needle tip points;
[0199] Neighborhood grayscale verification is performed on the set of candidate needle points to obtain the neighborhood verification result; the neighborhood verification result is used to characterize that the neighborhood gradient change of a certain candidate needle point is the largest in the set of candidate needle points;
[0200] When the domain validation result shows that the domain gradient change of the candidate point is the largest among all candidate points, the candidate point is taken as the candidate point and the position of the candidate point is determined.
[0201] The needle tip position is mapped back to the original ultrasound image to obtain the needle tip coordinates.
[0202] Furthermore, the ultrasound image preprocessing module 201 is also used for:
[0203] Acquire raw ultrasound images;
[0204] Gaussian filtering is applied to the original ultrasound image to obtain a smoothed image;
[0205] Histogram equalization is performed on the smoothed image to obtain an image with enhanced contrast;
[0206] Adaptive thresholding is performed on the contrast-enhanced image to obtain a binarized image;
[0207] Morphological closing operations are performed on the binarized image to obtain a denoised and enhanced ultrasound image.
[0208] In one embodiment, such as Figure 4 A computer device 300 is provided, comprising:
[0209] At least one processor 301, and at least one memory 302 communicatively connected to said processor 301; said memory stores application code executable by said processor, said application code being executed by said processor to enable said processor to perform the steps of an image recognition-based ultrasound-guided puncture needle precision positioning method as described above;
[0210] The computer device may also include: sensor 303;
[0211] The processor 301, memory 301, and sensor 303 can be connected via bus 304 or other means; the diagram shows an example using bus 304. Figure 3 The character is represented by a single thick line, but this does not mean that there is only one bus or a type of bus.
[0212] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0213] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0214] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. An image recognition-based accurate positioning method for an ultrasound-guided puncture needle, characterized in that, The method includes: The original ultrasound image is acquired, and the original ultrasound image is denoised and enhanced to obtain a denoised and enhanced ultrasound image. Based on a preset multi-scale feature fusion network, the denoised and enhanced ultrasound image is segmented by the puncture needle to obtain an initial segmentation mask for the puncture needle. Based on the initial segmentation mask, construct the initial graph structure of the initial segmentation mask; Based on a preset adaptive graph convolutional network, the initial graph structure is optimized to obtain an optimized puncture needle segmentation result; the puncture needle segmentation result is used to characterize the geometric shape and spatial position of the puncture needle. Based on the segmentation results of the puncture needle, the needle tip coordinates are obtained; Based on the needle tip coordinates and the target blood vessel location, the movement trajectory of the puncture needle is obtained; Based on the superimposed display parameters of the motion trajectory and the target blood vessel position, a real-time ultrasound image of the puncture needle is obtained, and the real-time ultrasound image of the puncture needle is sent to a guiding display device; the guiding display device is used to guide the puncture operation.
2. The method of claim 1, wherein, The preset multi-scale feature fusion network performs puncture needle segmentation on the denoised and enhanced ultrasound image to obtain an initial segmentation mask for the puncture needle, including: The denoised and enhanced ultrasound image is input into the multi-scale feature fusion network, and features of different scales are extracted through convolutional layers of different scales to obtain a first-scale feature map, a second-scale feature map, and a third-scale feature map. The first-scale feature map, the second-scale feature map, and the third-scale feature map are fused to obtain a fused feature map. The fused feature map is upsampled to obtain a feature map of the same size as the original ultrasound image; The feature maps of the same size are binarized to obtain the initial segmentation mask of the puncture needle.
3. The method of claim 1, wherein, The step of constructing the initial graph structure of the initial segmentation mask based on the initial segmentation mask includes: The initial segmentation mask is binarized to obtain a standardized binary image; The skeleton of the puncture needle is extracted from the binary image to obtain the centerline structure of the puncture needle; The node curvature of the centerline structure is detected to obtain a node detection set; the node detection set is used to characterize the morphology of the needle body. Spatial proximity analysis is performed on the node detection set to obtain node analysis results; the node analysis results are used to characterize the connection relationships between nodes. The node analysis results are weighted to obtain an initial edge weight matrix; Based on the node detection set, node analysis results, and edge weight matrix, an initial graph structure is obtained.
4. The method of claim 1, wherein, The preset adaptive graph convolutional network optimizes the initial graph structure to obtain optimized puncture needle segmentation results, including: Based on the adaptive graph convolutional network, an adaptive graph convolution operation is performed on the initial graph structure, and the updated features of each node are calculated using the following formula: wherein H (l+1) is the updated node feature, σ is an activation function, is the adjacency matrix with self-loops, is the degree matrix, H (l) is the node feature of the l-th layer, W (l) is the weight matrix; Based on the updated node features, an optimized segmentation mask is generated; Based on the optimized segmentation mask, the optimized segmentation result of the puncture needle is obtained; The optimized segmentation mask is post-processed to remove noise points, resulting in the optimized puncture needle segmentation result.
5. The method according to claim 1, characterized in that, The step of obtaining the needle tip coordinates based on the segmentation result of the puncture needle includes: The segmentation result of the puncture needle is binarized to obtain a binary image of the needle body region. The skeleton of the puncture needle is extracted from the binary image of the needle body region to obtain the centerline structure of the puncture needle. Based on the centerline structure, the gradient intensity of each pixel is calculated to obtain a gradient intensity map, and the gradient intensity map is projected along the centerline direction to obtain the gradient intensity distribution. Based on the gradient intensity distribution, the dynamically set threshold is calculated using the following formula: T=μ+k·σ Where T is the dynamically set threshold, μ is the mean of the gradient intensity, σ is the standard deviation, and k is the adjustment coefficient; The needle tip coordinates are obtained based on the dynamically set threshold and the gradient intensity distribution.
6. The method according to claim 5, characterized in that, The step of obtaining the needle tip coordinates based on the dynamically set threshold and the gradient intensity distribution includes: Based on the dynamically set threshold, the gradient intensity distribution is segmented to obtain the needle tip candidate region; The skeleton line endpoints are extracted from the candidate region of the needle tip to obtain a skeleton line endpoint set; the skeleton line endpoint set is used to characterize the pixel set of the puncture needle. Based on the set of endpoints of the skeleton line, the distance from each endpoint to the center of the puncture needle is calculated to obtain a set of candidate needle tip points; The neighborhood grayscale verification is performed on the set of candidate needle points to obtain the neighborhood verification result; the neighborhood verification result is used to characterize that the neighborhood gradient change of a certain candidate needle point is the largest in the set of candidate needle points; When the domain verification result shows that the domain gradient change of the candidate needle point is the largest among all candidate needle points, the candidate needle point is taken as the needle point, and the needle point position is determined. The needle tip position is mapped back to the original ultrasound image to obtain the needle tip coordinates.
7. The method according to claim 1, characterized in that, The process of acquiring the original ultrasound image and performing denoising and enhancement processing on the original ultrasound image to obtain a denoised and enhanced ultrasound image includes: Acquire raw ultrasound images; The original ultrasound image is subjected to Gaussian filtering to obtain a smoothed image; Histogram equalization is performed on the smoothed image to obtain a contrast-enhanced image. The contrast-enhanced image is subjected to adaptive threshold segmentation to obtain a binarized image; A morphological closing operation is performed on the binarized image to obtain a denoised and enhanced ultrasound image.
8. A device for precise positioning of an ultrasound-guided puncture needle based on image recognition, characterized in that, The device includes: An ultrasound image preprocessing module is used to acquire the original ultrasound image and perform denoising and enhancement processing on the original ultrasound image to obtain a denoised and enhanced ultrasound image. The puncture needle segmentation mask module is used to segment the denoised and enhanced ultrasound image based on a preset multi-scale feature fusion network to obtain the initial segmentation mask of the puncture needle. An initial graph structure module is used to construct an initial graph structure of the initial segmentation mask based on the initial segmentation mask; The puncture needle segmentation result module is used to optimize the initial graph structure based on a preset adaptive graph convolutional network to obtain an optimized puncture needle segmentation result; the puncture needle segmentation result is used to characterize the geometric shape and spatial position of the puncture needle. The needle tip determination module is used to obtain the needle tip coordinates based on the puncture needle segmentation results; The puncture needle motion trajectory module is used to obtain the motion trajectory of the puncture needle based on the needle tip coordinates and the target blood vessel position; The puncture guidance module is used to obtain a real-time ultrasound image of the puncture needle based on the superimposed display parameters of the motion trajectory and the target blood vessel position, and to send the real-time ultrasound image of the puncture needle to the guidance display device; the guidance display device is used to guide the puncture operation.
9. A computer device 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 method of 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 method of any one of claims 1 to 7.