Human body internal hemorrhage position detection method and system based on ultrasonic image
Through improved neighborhood attention converter model and feature processing technology, the accuracy and efficiency of bleeding point detection in ultrasound images are solved, and higher detection accuracy and noise robustness are achieved. It is suitable for bleeding locations in humans in the wild Intelligent detection.
Patent Information
- Application Number
- CN202411337779.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The prior art lacks deep learning models for bleeding point detection tasks in ultrasound images, resulting in insufficient accuracy and efficiency when detecting bleeding position in humans in the wild.
Using an improved neighborhood attention converter model, deep learning networks for ultrasonic image bleeding point detection are constructed and trained through feature convolution processing, expansion convolution processing and upsampling processing.
It improves the quality and detection accuracy of ultrasound images, reduces artificial interference, achieves higher detection rate and noise robustness, and is suitable for intelligent detection of bleeding locations in humans in the field.
Smart Images

Figure CN119417890A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ultrasonic detection technology, and in particular to a method and system for detecting bleeding positions in a human body based on ultrasonic images. Background Art
[0002] Currently, ultrasound imaging is one of the most widely used technologies in the field of medical imaging, and the results of ultrasound imaging can provide important guidance in the clinical diagnosis process. For the detection of bleeding in the human body, other methods such as endoscopy will cause invasive damage to the human body and require relatively strict clinical conditions, which is not convenient for diagnosing and treating the wounded in the field. Therefore, the use of non-invasive and convenient ultrasound imaging to detect the location of bleeding in the human body has a strong practical significance for field diagnosis and timely treatment.
[0003] The task of using ultrasound imaging to detect the location of bleeding is usually completed by ultrasound imaging equipment (system) to assist doctors. In the actual clinical diagnosis process, the accurate determination of whether there is internal bleeding and the location of the bleeding point is closely related to subjective factors such as the physician's clinical experience. Diagnosis and treatment of internal bleeding in a large number of casualties in the field is a heavy burden on doctors and is prone to misjudgment. There is an urgent need for intelligent diagnostic systems to assist doctors in providing diagnostic opinions.
[0004] In the bleeding point detection task, the current bleeding point detection tasks using deep learning are mostly based on endoscopic images and bleeding point detection based on fundus images. There is currently a lack of relevant deep learning models for bleeding point detection in ultrasound images. In general, the bleeding point detection task can be regarded as a special target detection task. The target detection network can be used and targeted improvements can be made on its basis. In 2023, Ali Hassani et al. proposed the Neighborhood Attention Transformer (NA Transformer), which is used in computer vision tasks including target detection and has achieved good results. Its model structure is as follows: Figure 3-Figure 5 shown.
[0005] Currently, there is no network designed for the task of bleeding point detection in ultrasound images. Compared with object detection in the field of computer vision, bleeding point detection only requires the location of bleeding points and does not require additional classification. Considering the small sample size of the current ultrasound image bleeding point detection dataset, the NA Transformer is appropriately modified to achieve intelligent detection of bleeding point locations in ultrasound images.
[0006] The traditional method of bleeding point detection adopts the method of machine learning, which includes two parts: manual feature extraction and feature classifier. In feature extraction, it mainly starts from texture features, color space features, etc., and uses statistical machine learning methods to perform feature statistical analysis. Traditional machine learning methods require manual feature design and manual selection of classifiers. This method is cumbersome, relies on the experience of engineers, and has high uncertainty. Compared with traditional machine learning methods, the present invention applies the improved neighborhood attention converter method to ultrasound image bleeding point detection, aiming to provide bleeding point detection results with less subjective interference and simple process.
[0007] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0008] In view of this, the present invention provides a method and system for detecting bleeding locations in the human body based on ultrasound images to solve the above-mentioned problems.
[0009] In order to solve the above problems, the specific technical solutions adopted by the present invention are as follows:
[0010] According to one aspect of the present invention, a method for detecting a bleeding position in a human body based on an ultrasound image is provided. The method for detecting a bleeding position in a human body based on an ultrasound image comprises the following steps:
[0011] S1, constructing an image data set using the collected ultrasound images containing bleeding points;
[0012] S2. Build and train an improved neighborhood attention transformer model based on the image dataset.
[0013] S3, obtaining an ultrasound image to be detected, and using the trained improved neighborhood attention converter model to detect the bleeding position to obtain a detection result;
[0014] S4. Use visualization tools to visualize the test results.
[0015] Preferably, constructing an image data set using collected ultrasound images containing bleeding spots comprises the following steps:
[0016] S11, collecting multiple frames of continuous ultrasound images containing bleeding points, and extracting semantic features through feature convolution processing;
[0017] S12, using different expansion rates to perform dilation convolution processing on the extracted semantic features, and performing fusion analysis on the processing results to obtain fusion features;
[0018] S13, performing up-sampling processing on the fused features to obtain a clear image of the current frame ultrasound image;
[0019] S14. Using a labeling tool, labeling the bleeding points on the cleared image of the ultrasound image to obtain an image data set.
[0020] Preferably, collecting multiple continuous frames of ultrasound images containing bleeding points and extracting semantic features through feature convolution processing comprises the following steps:
[0021] S111, performing image preprocessing on the collected continuous multiple-frame ultrasound images containing bleeding points, the preprocessing including noise removal, contrast adjustment and image normalization;
[0022] S112, converting the format of the preprocessed ultrasound image to obtain a standard ultrasound image;
[0023] S113. Using the data processing layer in the pre-set neural network model, convolution is performed on the ultrasound standard image of the current frame to extract semantic features corresponding to the ultrasound standard image of the current frame.
[0024] Preferably, performing dilation convolution processing on the extracted semantic features using different dilation rates, and performing fusion analysis on the processing results to obtain fusion features includes the following steps:
[0025] S121, processing the semantic features by using dilated convolutions with different dilation rates to obtain a semantic feature dilation map;
[0026] S122, performing dimension reduction and activation function mapping on the semantic feature expansion map to obtain an attention feature map;
[0027] S123, concatenating all the attention feature maps to obtain a secondary attention feature map;
[0028] S124. Multiply the secondary attention feature map and the ultrasound standard image semantic feature to obtain a fusion feature.
[0029] Preferably, performing upsampling processing on the fused features to obtain a clear image of the current frame ultrasound image includes the following steps:
[0030] S131, upsampling the fused features using a nearest neighbor interpolation method to obtain a primary upsampled image;
[0031] S132, performing a convolution operation on the primary up-sampled image to obtain a convolution enhanced image;
[0032] S133, performing upsampling processing on the convolution enhanced image to obtain a secondary upsampling image;
[0033] S134: Perform a convolution operation on the secondary up-sampled image to obtain a cleared image of the current frame ultrasound image.
[0034] Preferably, based on the image dataset, constructing and training an improved neighborhood attention converter model comprises the following steps:
[0035] S21, dividing the image data set into a training set and a test set;
[0036] S22. According to the improved neighborhood attention converter structure, an improved neighborhood attention converter model is constructed;
[0037] S23. Use the training set to train the improved neighborhood attention converter model, and continuously adjust the model parameters through the back propagation algorithm and gradient descent method to minimize the loss function;
[0038] S24. After the training is completed, the performance of the improved neighborhood attention converter model is evaluated using the test set, and the model structure is adjusted based on the evaluation results to obtain the final improved neighborhood attention converter model.
[0039] Preferably, the improved neighborhood attention converter structure includes: an input layer, an overlapping word segmenter, a neighborhood attention block, an overlapping downsampler, a fully connected layer, and an output layer;
[0040] The size feature maps output by the neighborhood attention block are H / 4×W / 4 and H / 8×W / 8.
[0041] Preferably, training the improved neighborhood attention converter model using the training set and continuously adjusting the model parameters by back propagation algorithm and gradient descent method comprises the following steps:
[0042] S231. Initialize the weights and biases of all structural layers according to the improved neighborhood attention converter structure;
[0043] S232, based on forward propagation, input the training set into the improved neighborhood attention converter model, and generate the prediction results of bleeding points through processing at each layer of the structure;
[0044] S233, using the loss function to evaluate the difference between the model prediction result and the true annotation, and obtaining the loss gradient;
[0045] S234. According to the loss gradient, based on back propagation, the weights and biases of the improved neighborhood attention converter model are updated by gradient descent method.
[0046] Preferably, the loss function is a normalized Weiss distance loss function.
[0047] According to another aspect of the present invention, a human body bleeding position detection system based on ultrasound images is provided, the human body bleeding position detection system based on ultrasound images comprises: a data set construction module, a model construction module, a bleeding position detection module and a visualization display module;
[0048] A data set construction module, used to construct an image data set using the collected ultrasound images containing bleeding points;
[0049] Model building module, used to build and train an improved neighborhood attention transformer model based on image datasets;
[0050] A bleeding position detection module is used to obtain an ultrasound image to be detected, and use the trained improved neighborhood attention converter model to detect the bleeding position to obtain a detection result;
[0051] The visualization module is used to visualize the detection results using visualization tools.
[0052] The beneficial effects of the present invention are:
[0053] 1. The present invention applies deep learning networks to the detection of bleeding points in ultrasound images. With the support of data sets, the deep learning networks can obtain higher detection accuracy and better noise robustness than traditional algorithms. Traditional detection methods can often only extract a few features and there is strong human interference. The present invention adopts deep learning networks, and there is no need for manual feature selection. The network can automatically extract features at multiple different levels. For the small target detection task of bleeding points, special optimization is made at the network design level, which can achieve a better detection rate.
[0054] 2. The present invention can effectively improve the quality of ultrasonic images through feature convolution processing, dilated convolution processing and upsampling processing, making them clearer and making it easier to identify bleeding points. By using different dilation rates to perform dilated convolution processing on semantic features and performing fusion analysis on the processing results, richer feature information can be obtained, which is helpful for the subsequent accurate detection of bleeding points. The bleeding points are marked on the clarified ultrasonic images. Since the image quality is improved, the accuracy of the marking will also be improved accordingly. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0056] Figure 1 is a flow chart of a method for detecting bleeding locations in a human body based on ultrasound images according to an embodiment of the present invention;
[0057] Figure 2is a principle block diagram of a system for detecting bleeding positions in a human body based on ultrasound images according to an embodiment of the present invention;
[0058] Figure 3 is a schematic diagram of the principle of a neighborhood attention block before improvement in a method for detecting bleeding locations in a human body based on ultrasound images according to an embodiment of the present invention;
[0059] Figure 4 is an overall structural diagram before improvement of a neighborhood attention converter in a method for detecting a bleeding position in a human body based on an ultrasound image according to an embodiment of the present invention;
[0060] Figure 5 is a structural diagram of a neighborhood attention block before improvement in a method for detecting a bleeding position in a human body based on an ultrasound image according to an embodiment of the present invention;
[0061] Figure 6 It is a structural schematic diagram of an improved neighborhood attention converter in a method for detecting bleeding locations in a human body based on ultrasound images according to an embodiment of the present invention.
[0062] In the figure:
[0063] 1. Dataset construction module; 2. Model construction module; 3. Bleeding location detection module; 4. Visualization display module. DETAILED DESCRIPTION
[0064] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0065] According to an embodiment of the present invention, a method and system for detecting bleeding positions in a human body based on ultrasound images are provided.
[0066] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to one embodiment of the present invention, a method for detecting a bleeding position in a human body based on an ultrasound image is provided. The method for detecting a bleeding position in a human body based on an ultrasound image comprises the following steps:
[0067] S1, constructing an image data set using the collected ultrasound images containing bleeding points;
[0068] As a preferred embodiment, constructing an image data set using collected ultrasound images containing bleeding points includes the following steps:
[0069] S11, collecting multiple frames of continuous ultrasound images containing bleeding points, and extracting semantic features through feature convolution processing;
[0070] As a preferred embodiment, collecting multiple continuous frames of ultrasound images containing bleeding points and extracting semantic features through feature convolution processing includes the following steps:
[0071] S111, performing image preprocessing on the collected continuous multiple-frame ultrasound images containing bleeding points, the preprocessing including noise removal, contrast adjustment and image normalization;
[0072] It should be noted that noise removal can be performed on the collected continuous multi-frame ultrasound images containing bleeding points to reduce the interference information in the image. Contrast adjustment can enhance the contrast between the bleeding points and other tissues in the image, which is convenient for subsequent feature extraction. Image normalization is performed to scale the image data to a uniform numerical range to improve the stability and generalization ability of the model.
[0073] S112, converting the format of the preprocessed ultrasound image to obtain a standard ultrasound image;
[0074] The preprocessed ultrasound image is format converted to ensure that the image data meets the input requirements of subsequent processing steps and obtain a standard ultrasound image.
[0075] S113. Using the data processing layer in the pre-set neural network model, convolution is performed on the ultrasound standard image of the current frame to extract semantic features corresponding to the ultrasound standard image of the current frame.
[0076] Specifically, pre-set neural network models are designed and trained for specific tasks, such as the detection of bleeding locations in the human body in ultrasound images. Such models usually contain multiple layers to automatically extract useful features from input data and perform complex pattern recognition.
[0077] S12, using different expansion rates to perform dilation convolution processing on the extracted semantic features, and performing fusion analysis on the processing results to obtain fusion features;
[0078] As a preferred implementation, the extracted semantic features are subjected to dilation convolution processing using different dilation rates, and the processing results are subjected to fusion analysis to obtain fusion features, including the following steps:
[0079] S121, processing the semantic features by using dilated convolutions with different dilation rates to obtain a semantic feature dilation map;
[0080] It should be noted that the dilated convolution increases the receptive field by inserting holes in the convolution kernel (i.e. skipping certain input features) without increasing the number of parameters or the amount of computation.
[0081] Using multiple convolution kernels with different dilation rates can capture contextual information of different scales.
[0082] The output of each dilated convolution is stacked or concatenated to obtain a semantic feature dilation map containing multi-scale information.
[0083] S122, performing dimension reduction and activation function mapping on the semantic feature expansion map to obtain an attention feature map;
[0084] The semantic feature expansion map may contain a large number of feature channels and high dimensions. Directly processing these high-dimensional data will increase the computational burden and may lead to overfitting. Through dimensionality reduction operations, such as using 1x1 convolutional layers or pooling layers, the number of channels of the feature map can be reduced, thereby reducing its dimension.
[0085] The activation function is an important part of deep learning. It introduces nonlinear factors and enables the model to learn more complex mapping relationships. Applying activation functions (such as ReLU, Sigmoid, or Tanh) on the feature map after dimensionality reduction can increase the nonlinear expression ability of the model.
[0086] S123, concatenating all the attention feature maps to obtain a secondary attention feature map;
[0087] Specifically, the connection process is to merge all attention feature maps in the channel dimension.
[0088] Assume that there are N attention feature maps, and the size of each feature map is [H, W, Ci], where H and W are the height and width of the feature map, and Ci is the number of channels of the i-th feature map.
[0089] The size of the concatenated secondary attention feature map will be [H, W, C], where C is the sum of the number of channels of all attention feature maps, that is, C = C1 + C2 + ... + CN.
[0090] The feature map obtained by concatenation is called the secondary attention feature map.
[0091] S124. Multiply the secondary attention feature map and the ultrasound standard image semantic feature to obtain a fusion feature.
[0092] It should be noted that the secondary attention feature map and the ultrasound standard image semantic features are multiplied element by element. This operation is equivalent to weighting the ultrasound standard image semantic features, and the weights are provided by the secondary attention feature map. The multiplication operation enables the fused feature to contain the information of the original semantic features and be affected by the weighted attention mechanism, thereby enhancing the representation ability of the features. The feature map obtained by the multiplication operation is called the fused feature. It integrates the information of the secondary attention feature map and the ultrasound standard image semantic features, and has stronger representation ability and better task adaptability.
[0093] S13, performing up-sampling processing on the fused features to obtain a clear image of the current frame ultrasound image;
[0094] As a preferred implementation, upsampling the fused features to obtain a clear image of the current frame ultrasound image includes the following steps:
[0095] S131, upsampling the fused features using a nearest neighbor interpolation method to obtain a primary upsampled image;
[0096] S132, performing a convolution operation on the primary up-sampled image to obtain a convolution enhanced image;
[0097] S133, performing upsampling processing on the convolution enhanced image to obtain a secondary upsampling image;
[0098] S134: Perform a convolution operation on the secondary up-sampled image to obtain a cleared image of the current frame ultrasound image.
[0099] It should be noted that the core idea of upsampling the fused features using the nearest neighbor interpolation method to obtain the primary upsampled image is to assign the closest pixel value to the new pixel, thereby expanding the image size. The specific steps are as follows:
[0100] Determine the upsampling ratio: First, you need to determine the upsampling ratio, that is, how many times you want to enlarge the image size. This ratio will determine which area of the original image each pixel in the new image corresponds to.
[0101] Calculate the position of the new pixel: According to the upsampling ratio, calculate the corresponding position of each pixel in the new image in the original image. This position may be a non-integer coordinate because the size of the upsampled image is usually not an integer multiple of the original image size.
[0102] Assign pixel values: For each pixel in the new image, find the pixel closest to its corresponding position in the original image and assign the value of that pixel to the new pixel. This is what "nearest neighbor" means.
[0103] Generate primary upsampled image: Repeat the above steps until all pixels of the new image are assigned values. In this way, the primary upsampled image is obtained.
[0104] S14. Using a labeling tool, labeling the bleeding points on the cleared image of the ultrasound image to obtain an image data set.
[0105] Specifically, a dataset is created and annotated based on the collected ultrasound images containing bleeding spots. The annotation software uses labelimg. labelimg is an open source image annotation tool based on Qt. Labels can be used for classification and target detection. In the labelimg toolbox, select "PascalVOC" for the annotation data type and "Create RectBox" for the annotation method. The location of the bleeding spots in each ultrasound image is annotated with a rectangular box. The rectangular box should be as small as possible while ensuring that the bleeding spots are covered. Under the guidance of the ultrasound physician, the labelimg toolbox is used to annotate the images one by one in the above manner. The toolbox will automatically generate a .txt annotation file with the same name as the image after each annotation. The format of the annotation file is VOC format. Only datasets annotated in VOC format can be read normally by the network. On this basis, a dataset is constructed. Each data in the dataset consists of an ultrasound image and its corresponding annotation. After obtaining the total dataset, the dataset is divided into a training set, a validation set, and a test set. The label format is the VOC format commonly used in the field of target detection.
[0106] S2. Build and train an improved neighborhood attention transformer model based on the image dataset.
[0107] As a preferred embodiment, based on the image dataset, constructing and training an improved neighborhood attention converter model includes the following steps:
[0108] S21, dividing the image data set into a training set and a test set;
[0109] Specifically, the ratio of the training set to the test set is set. Common division ratios include 70% / 30%, 80% / 20%, etc., in which the training set usually accounts for a higher proportion.
[0110] S22. According to the improved neighborhood attention converter structure, an improved neighborhood attention converter model is constructed;
[0111] As a preferred embodiment, the improved neighborhood attention converter structure includes: an input layer, an overlapping word segmenter, a neighborhood attention block, an overlapping downsampler, a fully connected layer and an output layer;
[0112] S23. Use the training set to train the improved neighborhood attention converter model, and continuously adjust the model parameters through the back propagation algorithm and gradient descent method to minimize the loss function;
[0113] As a preferred implementation, training the improved neighborhood attention converter model using the training set and continuously adjusting the model parameters by back propagation algorithm and gradient descent method include the following steps:
[0114] S231. Initialize the weights and biases of all structural layers according to the improved neighborhood attention converter structure;
[0115] S232, based on forward propagation, input the training set into the improved neighborhood attention converter model, and generate the prediction results of bleeding points through processing at each layer of the structure;
[0116] S233, using the loss function to evaluate the difference between the model prediction result and the true annotation, and obtaining the loss gradient;
[0117] S234. According to the loss gradient, based on back propagation, the weights and biases of the improved neighborhood attention converter model are updated by gradient descent method.
[0118] S24. After the training is completed, the performance of the improved neighborhood attention converter model is evaluated using the test set, and the model structure is adjusted based on the evaluation results to obtain the final improved neighborhood attention converter model.
[0119] It should be understood that if Figure 6 As shown in the figure, an improved neighborhood attention converter is built, and training is performed based on the constructed data set. The gradient feedback of the loss function to different parameters of the network is used to continuously adjust the weight of the network, update the structural parameters (each round of network training will follow the chain derivation rule, starting from the loss function, reversely traverse the gradient of the network weight with respect to the loss function and update the corresponding parameters to make the loss function smaller), and the optimal global parameter matrix is obtained and saved. Among them, the improved neighborhood attention converter structure is as follows Figure 6As shown in the figure. In view of the fact that ultrasound image bleeding point detection is a small target detection and the sample size of the data set is small, the improved network discards the two neighborhood attention blocks that generate feature maps of size H / 16×W / 16 and H / 32×W / 32, and only uses the two neighborhood attention blocks of H / 4×W / 4 and H / 8×W / 8. Doing so, on the one hand, limits the number of parameters and prevents overfitting. More importantly, feature maps of larger sizes lose relatively less semantic information of small targets. Too high a downsampling rate will cause a large loss of semantic information of small targets, which will ultimately make detection difficult. Another important improvement is to use NWD Loss (Normalized Wasserstein Distance Loss) to train the network (that is, use the normalized Wasserstein distance loss function as the loss function when training the network to update the network weights). It is a loss function for small target detection tasks in the field of target detection. Compared with the general IoU (Intersection over Union)-based loss function, it has the advantages of scale invariance, smoothness of position deviation, and better ability to measure the similarity between non-overlapping or mutually contained bounding boxes. In each round of training, the network will calculate the specific value of the loss function of the validation set image based on the current weight, record the loss function value on the validation set during the entire training process, and save the network weight corresponding to the round when the loss function value is the smallest as the weight with the best performance on the validation set.
[0120] By loading the saved weights into the network and inputting the test data into the network, the corresponding test set images will be processed by the network under the weights to obtain the detected image results (the test result image contains a rectangular box that frames the bleeding point position and the confidence probability that the location is a bleeding point) and indicator results (including precision, detection rate, etc.). The bleeding point detection effect is quantitatively evaluated based on the precision and detection rate. The larger the indicator, the better the corresponding detection effect.
[0121] S3, obtaining an ultrasound image to be detected, and using the trained improved neighborhood attention converter model to detect the bleeding position to obtain a detection result;
[0122] It should be noted that for the ultrasound images to be detected, necessary preprocessing is required before the images are input into the model, including adjusting the image size, normalizing the pixel values, etc., to ensure that they match the data format used in model training.
[0123] Feed the preprocessed ultrasound image into your model and run the model for hemorrhage location detection. The model will output a prediction about the location of the hemorrhage in the image.
[0124] S4. Use visualization tools to visualize the test results.
[0125] Specifically, commonly used visualization tools include Matplotlib, OpenCV, and PIL (Python Imaging Library). Using visualization tools, write code to mark the bleeding locations on the original image. Different colors, shapes, and labels can be used to highlight the detection results. As needed, adjust the visualization parameters to improve the visualization effect. For example, the size, color, transparency, etc. of the markers can be adjusted to ensure that they are clearly visible on the image.
[0126] like Figure 2 As shown, according to one embodiment of the present invention, a human body bleeding position detection system based on ultrasound images is provided, and the human body bleeding position detection system based on ultrasound images includes: a data set construction module 1, a model construction module 2, a bleeding position detection module 3 and a visualization display module 4;
[0127] A data set construction module 1 is used to construct an image data set using the collected ultrasound images containing bleeding points;
[0128] Model building module 2, used to build and train an improved neighborhood attention converter model based on an image dataset;
[0129] The bleeding position detection module 3 is used to obtain the ultrasound image to be detected, and use the trained improved neighborhood attention converter model to detect the bleeding position to obtain the detection result;
[0130] The visualization module 4 is used to visualize the detection results using visualization tools.
[0131] In summary, with the help of the above technical solution of the present invention, the present invention applies the deep learning network to the detection of bleeding points in ultrasound images. With the support of the data set, the deep learning network can obtain higher detection accuracy and better noise robustness than the traditional algorithm. The traditional detection method can often only extract a few features, and there is strong human interference. The present invention adopts a deep learning network, and there is no need to manually select features. The network can automatically extract multiple different levels of features. For the small target detection task of bleeding points, the network design level is specially optimized, and a better detection rate can be obtained. The present invention can effectively improve the quality of ultrasound images through feature convolution processing, dilation convolution processing and upsampling processing, making it clearer, so that bleeding points can be more easily identified. Different dilation rates are used to perform dilation convolution processing on semantic features, and the processing results are fused and analyzed, so that more abundant feature information can be obtained, which is helpful for the accurate detection of subsequent bleeding points. The bleeding point annotation processing is performed on the cleared ultrasound image. Since the image quality is improved, the accuracy of the annotation will also be improved accordingly.
[0132] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.
[0133] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for detecting bleeding locations in the human body based on ultrasound images, characterized in that: The method for detecting bleeding positions in a human body based on ultrasound images comprises the following steps: S1, constructing an image data set using the collected ultrasound images containing bleeding points; S2. Build and train an improved neighborhood attention transformer model based on the image dataset. S3, obtaining an ultrasound image to be detected, and using the trained improved neighborhood attention converter model to detect the bleeding position to obtain a detection result; S4. Use visualization tools to visualize the test results.
2. The method for detecting bleeding locations in the human body based on ultrasound images according to claim 1, characterized in that: The method of constructing an image data set using the collected ultrasound images containing bleeding spots comprises the following steps: S11, collecting multiple frames of continuous ultrasound images containing bleeding points, and extracting semantic features through feature convolution processing; S12, using different expansion rates to perform dilation convolution processing on the extracted semantic features, and performing fusion analysis on the processing results to obtain fusion features; S13, performing up-sampling processing on the fused features to obtain a clear image of the current frame ultrasound image; S14. Using a labeling tool, labeling the bleeding points on the cleared image of the ultrasound image to obtain an image data set.
3. The method for detecting bleeding location in the human body based on ultrasound images according to claim 2, characterized in that: The method of collecting multiple continuous frames of ultrasound images containing bleeding spots and extracting semantic features through feature convolution processing comprises the following steps: S111, performing image preprocessing on the collected continuous multiple-frame ultrasound images containing bleeding points, wherein the preprocessing includes noise removal, contrast adjustment and image normalization; S112, converting the format of the preprocessed ultrasound image to obtain a standard ultrasound image; S113. Using the data processing layer in the pre-set neural network model, convolution is performed on the ultrasound standard image of the current frame to extract semantic features corresponding to the ultrasound standard image of the current frame.
4. The method for detecting bleeding position in the human body based on ultrasonic images according to claim 2, characterized in that: The method of performing dilation convolution processing on the extracted semantic features using different dilation rates and performing fusion analysis on the processing results to obtain fusion features includes the following steps: S121, processing the semantic features by using dilated convolutions with different dilation rates to obtain a semantic feature dilation map; S122, performing dimension reduction and activation function mapping on the semantic feature expansion map to obtain an attention feature map; S123, concatenating all the attention feature maps to obtain a secondary attention feature map; S124. Multiply the secondary attention feature map and the ultrasound standard image semantic feature to obtain a fusion feature.
5. The method for detecting bleeding location in the human body based on ultrasonic images according to claim 2, characterized in that: The up-sampling process of the fused features to obtain a clear image of the current frame ultrasound image comprises the following steps: S131, upsampling the fused features using a nearest neighbor interpolation method to obtain a primary upsampled image; S132, performing a convolution operation on the primary up-sampled image to obtain a convolution enhanced image; S133, performing upsampling processing on the convolution enhanced image to obtain a secondary upsampling image; S134: Perform a convolution operation on the secondary up-sampled image to obtain a cleared image of the current frame ultrasound image.
6. The method for detecting bleeding locations in the human body based on ultrasound images according to claim 1, characterized in that: The method of constructing and training an improved neighborhood attention converter model based on an image dataset includes the following steps: S21, dividing the image data set into a training set and a test set; S22. According to the improved neighborhood attention converter structure, an improved neighborhood attention converter model is constructed; S23. Use the training set to train the improved neighborhood attention converter model, and continuously adjust the model parameters through the back propagation algorithm and gradient descent method to minimize the loss function; S24. After the training is completed, the performance of the improved neighborhood attention converter model is evaluated using the test set, and the model structure is adjusted based on the evaluation results to obtain the final improved neighborhood attention converter model.
7. The method for detecting bleeding locations in the human body based on ultrasonic images according to claim 6, characterized in that: The improved neighborhood attention converter structure includes: an input layer, an overlapping word segmenter, a neighborhood attention block, an overlapping downsampler, a fully connected layer and an output layer; The size feature maps output by the neighborhood attention block are H / 4×W / 4 and H / 8×W / 8.
8. The method for detecting bleeding locations in the human body based on ultrasound images according to claim 6, characterized in that: The method of training the improved neighborhood attention converter model using the training set and continuously adjusting the model parameters by back propagation algorithm and gradient descent method includes the following steps: S231. Initialize the weights and biases of all structural layers according to the improved neighborhood attention converter structure; S232, based on forward propagation, input the training set into the improved neighborhood attention converter model, and generate the prediction results of bleeding points through processing at each layer of the structure; S233, using the loss function to evaluate the difference between the model prediction result and the true annotation, and obtaining the loss gradient; S234. According to the loss gradient, based on back propagation, the weights and biases of the improved neighborhood attention converter model are updated by gradient descent method.
9. The method for detecting bleeding position in the human body based on ultrasonic images according to claim 1, characterized in that: The loss function is a normalized Weiss distance loss function.
10. A human body internal bleeding position detection system based on ultrasound images, used to implement the human body internal bleeding position detection method based on ultrasound images as claimed in any one of claims 1 to 9, characterized in that: The human body bleeding position detection system based on ultrasound images includes: a data set construction module, a model construction module, a bleeding position detection module and a visualization display module; The data set construction module is used to construct an image data set using the collected ultrasound images containing bleeding points; The model building module is used to build and train an improved neighborhood attention converter model based on an image dataset; The bleeding position detection module is used to obtain an ultrasound image to be detected, and use the trained improved neighborhood attention converter model to detect the bleeding position to obtain a detection result; The visualization display module is used to visualize the detection results using visualization tools.
Citation Information
Patent Citations
Liver pathological image segmentation model establishment and segmentation method based on attention mechanism
CN112017191A
Communication parallel distributed random gradient descent method, system and device
CN112686383A
Ultrasonic thyroid nodule recognition device, method and equipment and storage medium
CN115641486A
Retinal blood vessel image segmentation method based on large kernel convolution
CN117830325A
Two-dimensional echocardiography left ventricular ejection fraction evaluation algorithm based on deep learning
CN118537317A