A pulmonary embolism lesion segmentation method based on medical image processing
By using the SSD detection network in the pulmonary embolism CT image processing for preliminary processing and cropping the region of interest, and introducing the Triplet Attention module into the Enet network, the problems of low efficiency and low accuracy of pulmonary embolism image segmentation in the prior art are solved, and more efficient and accurate segmentation of pulmonary embolism lesions are achieved.
Patent Information
- Application Number
- CN202311851023.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The prior art has problems such as long detection time, low segmentation efficiency and unsatisfactory segmentation profiles in the automatic segmentation and diagnosis of pulmonary embolism CT images, especially in the case of small targets and noise interference.
The SSD detection network is used to initially process the images and crop the areas of interest to reduce external noise interference, and a Triplet Attention module is introduced into the downsampling bottleneck module of the Enet network to enhance the sensitivity of the network to information in different dimensions.
The efficiency and accuracy of pulmonary embolism image analysis were significantly improved. Through the test set verification, compared with the original Enet network, the iou and dice coefficients were improved by 7.02% and 6.7% respectively compared with U-Net.
Smart Images

Figure CN117808830B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and in particular to a pulmonary embolism lesion segmentation method based on medical image processing. Background Art
[0002] Pulmonary embolism is a serious medical condition that is usually caused by a blood clot blocking a pulmonary artery or one of its branches. These clots usually come from blood vessels elsewhere in the body, most commonly from blood clots in the deep veins, called deep vein thrombosis. Once these clots break off and travel to the lungs, they can block blood flow in the pulmonary arteries, causing a pulmonary embolism. Common symptoms include shortness of breath, chest pain, coughing, coughing up blood, palpitations, dizziness, and fainting. Severe pulmonary embolism may cause shock and difficulty breathing. Analysis of CT images can be used to assess whether a patient has a pulmonary embolism.
[0003] Traditional image processing methods have been widely used in medical image segmentation, including threshold segmentation, region growing, edge detection and mathematical morphology, which usually rely on rules and feature engineering. These methods have the advantages of fast calculation speed and easy understanding, but they are not satisfactory for complex medical images, such as low contrast, noise and non-uniform brightness.
[0004] Deep learning methods, especially convolutional neural networks (CNNs) such as fully convolutional networks (FCNs) and U-Net, have been widely used in medical image segmentation due to their end-to-end learning, contextual information capture, adaptability and high accuracy. They do not rely on manual rules, can automatically learn features and segmentation targets, and adapt to medical images of different types and sizes. U-Net is a deep learning architecture that is widely used in medical image segmentation. It has a U-shaped network structure, including an encoder and a decoder part, where the encoder is used to capture features in the image and the decoder is used to generate segmentation masks. The advantage of U-Net is that it can handle the segmentation tasks of small objects and complex structures, and has a good ability to capture the contextual information of medical images. However, U-Net still faces some challenges, including high memory and computing resource requirements for large-scale medical images, and the segmentation results may be biased in the presence of class imbalance. In addition, the generalization ability of U-Net is limited by the diversity of training data, and it performs poorly for few samples.
[0005] CT (computed tomography) images of pulmonary embolism present a series of characteristics that pose challenges to medical image segmentation and diagnosis. First, pulmonary embolism usually appears as small blood clots or emboli, which are relatively small in area and often difficult to accurately segment and locate on the image. Second, the characteristics of pulmonary embolism are less obvious compared with other medical images because the density of these lesions is similar to that of the surrounding normal lung tissue. In addition, CT images may be contaminated by noise, which comes from a variety of factors such as radiation dose and scanning conditions, making the identification of small lesions more complicated. Finally, there may be large inter-class differences between different pulmonary embolism lesions, some of which are very small and some are larger, which increases the complexity of the segmentation task. Therefore, the automatic segmentation and diagnosis of pulmonary embolism CT images requires the help of advanced image processing and deep learning techniques to improve accuracy and reliability, which will help doctors diagnose and treat patients with pulmonary embolism more accurately.
[0006] Pulmonary embolism is a serious disease, and its CT images show a series of characteristics, which pose challenges to medical image segmentation and diagnosis. Specifically, the difficulties existing in the existing technologies in dealing with the problem of pulmonary embolism lesion segmentation are summarized as follows:
[0007] 1. Pulmonary embolism lesions are usually small and difficult to accurately segment and locate on images, which makes it difficult to automatically segment pulmonary embolism lesions.
[0008] 2. The characteristics of pulmonary embolism lesions are less obvious because the density of these lesions is similar to that of the surrounding normal lung tissue. This makes the automatic detection and localization of lesions more complicated.
[0009] 3. CT images may be interfered by noise, and the sources of noise are complex, which makes the identification and location of small lesions more difficult.
[0010] 4. There are large inter-class differences between different pulmonary embolism lesions. Some lesions are very small, while others are large, which increases the complexity of the segmentation task.
[0011] 5. Existing methods such as threshold segmentation and region growing have fast calculation speed but poor segmentation effect. Methods such as U-Net can adapt to different types of medical images but have high memory and computing resource requirements and are prone to bias when the categories are unbalanced.
[0012] Existing methods rely on manually designed features, which are computationally intensive and have unstable effects.
[0013] The existing technology has the following defects:
[0014] 1. Traditional image segmentation technology has long detection time, low segmentation efficiency, and unsatisfactory segmentation contours.
[0015] Existing traditional image segmentation techniques based on thresholds, region growing, etc. have fast calculation speed and are easy to understand, but they are not effective for complex medical images, especially in situations of low contrast, noise, and non-uniform brightness. Traditional methods often perform unsatisfactorily, resulting in unsatisfactory segmentation contours, long detection time, and low segmentation efficiency.
[0016] 2. Traditional architectures such as U-Net are limited in processing small object segmentation
[0017] Traditional deep learning architectures such as U-Net have limitations when dealing with small target segmentation. This is because these architectures usually rely on multiple downsampling operations, which may cause spatial detail information to be lost, making the edges of small lesions easily blurred or missed. This leads to inaccurate segmentation in pulmonary embolism images.
[0018] 3. Existing methods rely on manual rules and feature engineering
[0019] Existing deep learning-based methods such as U-Net rely on multiple downsampling operations, which may lead to the loss of spatial detail information. At the same time, these methods also rely on complex manual feature engineering, which increases the amount of calculation and reduces efficiency.
[0020] 4. Existing methods have high requirements for memory and computing resources for large-scale medical images
[0021] Methods such as U-Net have high requirements for memory and computing resources for large-scale medical images and are not suitable for resource-constrained environments such as mobile terminals.
[0022] 5. Existing methods have biases in the case of class imbalance
[0023] Methods such as U-Net are prone to biased segmentation results when the training data categories are unbalanced, and cannot handle situations where there are large differences between categories.
[0024] 6. Existing methods have limited generalization capabilities
[0025] Methods such as U-Net have limited generalization capabilities and perform poorly when dealing with small sample sizes, which is a prominent problem in the diagnosis of small sample diseases such as pulmonary embolism.
[0026] In summary, the existing technology has obvious limitations in solving the technical problem of automatic segmentation and diagnosis of pulmonary embolism CT images, and more advanced image processing and deep learning technologies are needed to improve accuracy and reliability. In view of the shortcomings of these existing technologies, the present invention proposes an innovative pulmonary embolism lesion segmentation method based on medical image processing. Summary of the invention
[0027] The purpose of the present invention is to solve the following technical problems:
[0028] 1. Traditional medical image segmentation technology has problems such as long detection time, low segmentation efficiency, and unsatisfactory segmentation contours;
[0029] 2. Traditional medical image segmentation architectures such as U-Net have limitations when dealing with small object segmentation;
[0030] 3. It is necessary to propose a medical image processing method that integrates multiple technical means to achieve efficient and accurate segmentation of pulmonary embolism lesions.
[0031] To achieve the above purpose, the present invention adopts the following technical means:
[0032] The present invention proposes a pulmonary embolism lesion segmentation method based on medical image processing, which includes the following steps:
[0033] Step 1: Establish a pulmonary embolism medical image segmentation dataset and divide the data into a training set and a test set;
[0034] Step 2: Use the SSD detection network to preliminarily process the image and crop the region of interest, retain the potential pulmonary embolism area, and filter out redundant information;
[0035] Step 3: Build the TA-Enet medical image segmentation model based on Enet. Introduce the Triplet Attention module in the downsampling bottleneck module of Enet. This module includes three different attention gates, which are used for the features of three different dimensional channels respectively.
[0036] The three-channel image data first passes through the initialization module, and then after being processed by it, it passes through the five blocks composed of bottleneck modules in sequence, and finally passes through the full convolution module to obtain the final segmentation result.
[0037] 1. The initialization module performs 3x3 convolution with a step size of 2 on the three-channel input image to extract features, and performs 2x2 maximum pooling with a step size of 2 to reduce the spatial dimension. The convolution and pooling results are then concatenated in the channel dimension, normalized through a batch normalization layer, and finally nonlinearly processed through a modified linear unit activation function to obtain an output tensor containing the abstract feature representation of the input image.
[0038] 2. The output of the initialization module first passes through a downsampling convolution layer to reduce the spatial resolution, and then introduces the Triplet Attention module, which captures global, detailed, and contextual information through three different attention branches to improve the understanding of image features. The bottleneck convolution module that follows extracts and enhances feature representation through two 1x1 convolution layers and one 3x3 convolution layer. This process is repeated in five blocks, where the second and fourth blocks also contain downsampling and upsampling convolution layers, as well as hybrid convolution modules, to further expand the receptive field and enrich feature representation. Finally, after processing these five blocks, the output of the initialization module undergoes a series of downsampling, upsampling, dilated convolution, separable convolution, and 1x1 and 3x3 convolution operations to obtain rich feature representations that can be used for image segmentation tasks, and the final target result is obtained after passing through the full convolution module.
[0039] 3. Through the processing of the full convolution module, the feature maps output by multiple bottleneck modules will be integrated and upsampled to generate the final segmentation result. The spatial resolution of this result will be higher than the input image, and the number of channels will match the number of categories of the task.
[0040] Step 4: Train the TA-Enet medical image segmentation model improved based on Enet;
[0041] Step 5: Use the trained TA-Enet medical image segmentation model to segment the newly input medical image.
[0042] In the above technical solution, the data division in step 1 uses 80% as a training set and 20% as a test set.
[0043] In the above technical solution, step 2 specifically includes the following steps:
[0044] In the training phase, the SSD detection network is trained using part of the training set to learn to identify and locate the region of interest. In the testing phase, the trained SSD detection network is applied to the test set images to identify the target region of interest. By judging the detection effect of the detection network on the test set, it is found that the required key lung regions can be obtained, and the final SSD detection network is obtained.
[0045] During pulmonary embolism image segmentation, the final SSD detection network performs preliminary processing on the pulmonary embolism image and crops the region of interest. After the pulmonary embolism image passes through the SSD detection network, the potential pulmonary embolism area is retained, while other redundant information is filtered out. These retained areas are further used for subsequent segmentation tasks.
[0046] In the above technical solution, the TA-Enet medical image segmentation model improved based on Enet is as follows:
[0047] The specific model structure includes:
[0048] Initialization module: includes a convolution layer, a maximum pooling layer, a batch normalization layer and a rectified linear unit activation function; the initialization module performs a 3x3 convolution with a step size of 2 on the three-channel input image to extract features, and performs a 2x2 maximum pooling with a step size of 2 for spatial dimensionality reduction, then concatenates the convolution and pooling results in the channel dimension, normalizes them through a batch normalization layer, and finally performs nonlinear processing through a rectified linear unit activation function to obtain an output tensor containing the abstract feature representation of the input image.
[0049] Multiple bottleneck modules, including:
[0050] First block:
[0051] Downsampling convolution layer: Reduce the spatial resolution through a downsampling convolution layer.
[0052] Triplet Attention module: Introduces three different attention branches to capture global, detail, and contextual information in the image, thereby improving the model's understanding and representation of image features.
[0053] Bottleneck convolution modules (twice): Each module consists of two 1x1 convolution layers and one 3x3 convolution layer to extract features and enhance representation.
[0054] Second block:
[0055] Downsampling convolution layer: The spatial resolution is reduced again through the downsampling convolution layer.
[0056] Triplet Attention module: Introduces three different attention branches to capture global, detail, and contextual information in the image, thereby improving the model's understanding and representation of image features.
[0057] Hybrid convolution modules (twice): Each module consists of two dilated convolution layers and one separable convolution for obtaining information with a larger receptive field.
[0058] The third block:
[0059] Mixed convolution modules (twice): Continue to use mixed convolution modules, each module consists of two dilated convolution layers and one separable convolution.
[0060] The fourth block:
[0061] Upsampling convolutional layer: The spatial resolution is increased by upsampling convolutional layer.
[0062] Bottleneck convolution modules (twice): Each module consists of two 1x1 convolution layers and one 3x3 convolution layer for further feature processing.
[0063] The fifth block:
[0064] Upsampling convolution layer: The spatial resolution is increased again through an upsampling convolution layer.
[0065] Bottleneck convolution modules (twice): Each module consists of two 1x1 convolutional layers and one 3x3 convolutional layer.
[0066] The output of each block is the processing result of the output of the previous block. Finally, after the processing of these five blocks, the result of the initialization module output is obtained through a series of downsampling, upsampling, dilated convolution, separable convolution, and 1x1 and 3x3 convolution operations. The feature representation can be used for image segmentation, and the target result can be obtained after passing through the full convolution module as input.
[0067] Full convolution module: A full convolution layer converts the final feature map to the required number of output categories. Through the processing of the full convolution module, the feature maps output by multiple bottleneck modules will be integrated and upsampled to generate the final segmentation result. The spatial resolution of this result will be higher than the input image, and the number of channels matches the number of categories of the task.
[0068] In the above technical solution, in step 4, the TA-Enet medical image segmentation model based on Enet improvement is trained, the loss function is Calc loss, the optimizer is Adam, the learning rate scheduler is cosine annealing, and the model is saved after 100 cycles.
[0069] In the above technical solution, the loss function used is Calc loss, which is specifically the sum of BCE loss and Dice loss. The formula is:
[0070] Calc loss=Dice loss+BCE loss
[0071] BCE loss = -w c [y c log p c +(1-y c )log(1-p c )]
[0072]
[0073] Where W c represents the weight of the cth sample, y c represents the true label of the cth sample, p cRepresents the model output of the cth sample. X is the binary segmentation result of the model, Y is the true binary segmentation mask, TP means that the model correctly predicts the positive class sample as the positive class, FP means that the model incorrectly predicts the negative class sample as the positive class, and FN means that the model incorrectly predicts the positive class sample as the negative class.
[0074] The present invention provides a pulmonary embolism lesion segmentation method based on medical image processing. Compared with the traditional medical segmentation method, the present invention has the following beneficial effects, including:
[0075] 1. By using the SSD network in step 2 of the present invention to preliminarily detect the region of interest, crop it and then segment it, the problem of external noise interference in the CT image is solved, and the effect of filtering out external noise interference is achieved. By testing on the validation set, a 2.55% improvement in iou and a 2.45% improvement in the dice index are obtained;
[0076] 2. By modifying the Enet network in step 3 of the present invention, some redundant convolutional layers are removed. This reduces the model size and prevents the model from overfitting due to too many convolutional layers. At the same time, given the dual-channel downsampling method of the Enet network, there are certain differences between different downsamplings, which may lead to the loss of image information during downsampling. By introducing the Triplet Attention mechanism, the network's sensitivity to information of different dimensions is enhanced, the distortion problem caused by image downsampling is alleviated, and the performance of the network is improved. By testing on the validation set, a 2.85% iou improvement and a 2.97% dice indicator improvement were obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for describing the embodiments are briefly introduced below.
[0078] Figure 1 is a schematic diagram of a segmentation method according to an embodiment of the present invention;
[0079] Figure 2 is a system framework diagram of a segmentation method according to an embodiment of the present invention;
[0080] Figure 3 is a schematic diagram of an improved TA-Enet model according to an embodiment of the present invention;
[0081] Figure 4 is a Triplet Attention module of a segmentation method according to an embodiment of the present invention;
[0082] Figure 5 is a bottleneck module of a segmentation method according to an embodiment of the present invention;
[0083] Figure 6 It is an initialization module of the segmentation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the technical problems solved by the present invention, the technical solutions implemented and the beneficial effects thereof clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0085] Unless otherwise noted, the following detailed description is only exemplary and is intended to describe the content of the present application in more detail. All technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art.
[0086] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is that the traditional image segmentation technology has a long detection time, low segmentation efficiency, and unsatisfactory segmentation contour; traditional architectures such as U-Net are limited in processing small target segmentation because they usually rely on multiple downsampling operations, resulting in the loss of spatial details. This makes it easy for U-Net to miss or blur the edge of the lesion in the pulmonary embolism image, reducing the accuracy of segmentation. The present invention provides a pulmonary embolism lesion segmentation method based on medical image processing. By abandoning the artificial feature engineering in the traditional method, our method uses the SSD network for pre-detection, which reduces external noise interference. At the same time, we introduce Triplet Attention in the Enet network, which can better adapt to the particularity of the pulmonary embolism area, including small lesions and unclear features. Our method adopts deep learning technology, has stronger feature learning and representation capabilities, and improves the segmentation efficiency while maintaining high accuracy.
[0087] To achieve the above object, the present invention provides a pulmonary embolism lesion segmentation method based on medical image processing, comprising the following steps:
[0088] Step 1: Establish a pulmonary embolism medical image segmentation dataset and perform data division. Specifically, the dataset is provided by professional doctors in the hospital, and 80% of the data is used as a training set and 20% as a test set. The training dataset is used to train the model, and the test dataset is used to evaluate the performance of the model;
[0089] Step 2: Use the SSD detection network to preliminarily process the image and crop the region of interest. During the training process, first, use the pulmonary embolism training set to train the SSD network so that it can learn to identify and locate the region of interest. In the testing phase, the trained SSD network is applied to new images to identify the target region of interest. When segmenting pulmonary embolism images, we will use the test set as input and perform preliminary processing and cropping of the region of interest through SSD. In this way, SSD has trained the model through the training set and can provide targeted target detection on the test set, which helps the segmentation model to process the region of interest more accurately and improves the accuracy and efficiency of pulmonary embolism image segmentation;
[0090] Step 3: Build the TA-Enet medical image segmentation model based on Enet. Specifically, the Triplet Attention module is introduced into the original downsampling bottleneck module of Enet. This module includes three different attention gates, which are used for the features of three different dimensional channels, respectively, to enhance the information of its region of interest. In addition, the full convolution module converts the final feature map into the required number of output categories;
[0091] Step 4: Train the TA-Enet medical image segmentation model based on the Enet improvement. Use conventional image enhancement methods to randomly rotate, flip and normalize the input image, and then input it into the TA-Enet network for training. This can expand the training data to increase the generalization of the model. The loss function is Calc loss, the optimizer is Adam, and the learning rate scheduler is cosine annealing. Save the model after 100 cycles.
[0092] Step 5: Use the trained TA-Enet medical image segmentation model to segment the newly input medical image. The new pulmonary embolism CT image is first processed by the SSD network and then cropped. After normalization, it is input into the TA-Enet model trained in step 4 to obtain the segmentation result. The specific details are as follows: In a new round of segmentation tasks, the newly input medical image needs to be preprocessed first, including random rotation, flipping and normalization operations to increase the generalization of the model. Then, the preprocessed image is used as input and input into the trained TA-Enet medical image segmentation model based on Enet for segmentation. .
[0093] Through the above steps, the present invention provides a pulmonary embolism lesion segmentation method based on medical image processing, which significantly improves the efficiency and accuracy of pulmonary embolism image analysis by fusing SSD preliminary processing and TA-Enet segmentation model. Through the verification of the test set, compared with the original Enet network, a 4.96% iou improvement and a 4.91% dice index improvement were obtained. Compared with U-Net, the iou and dice coefficients were increased by 7.02% and 6.7%, respectively. This technological innovation has broad application prospects in the field of medical image processing, provides an important tool for the rapid diagnosis and lesion analysis of pulmonary embolism, and is expected to greatly improve the efficiency and accuracy of medical image analysis.
[0094] The specific operations described in step 2 are:
[0095] During the training process, first, the SSD network is trained using part of the pulmonary embolism training set to learn to identify and locate regions of interest. In the testing phase, SSD identifies target regions of interest by applying its trained model to new images. When segmenting pulmonary embolism images, we use the test set as input and perform preliminary processing and cropping of regions of interest through SSD. In this way, after the images of the test set are detected by SSD, potential pulmonary embolism regions are retained, while other redundant information is filtered out, and these retained regions are further used for subsequent segmentation tasks. In this way, SSD is trained on the training set and can provide targeted target detection on the test set, which helps the segmentation model to process regions of interest more accurately and improves the accuracy and efficiency of pulmonary embolism image segmentation.
[0096] Step 3 is specifically improved as follows:
[0097] The Triplet Attemion module is introduced into the original downsampling bottleneck module of Enet. This module includes three different attention gates, which are used for the features of three different dimensional channels respectively, thus strengthening the information of its area of interest.
[0098] The specific model structure includes:
[0099] Initialization module: includes a convolutional layer, a max pooling layer, a batch normalization layer, and a rectified linear unit (ReLU) activation function.
[0100] Multiple bottleneck modules: The first block includes a downsampling convolution layer, and 2 bottleneck convolution modules, each module includes 2 1x1 convolution layers and one 3x3 convolution. The second block includes a downsampling convolution layer, and 2 mixed convolution modules, each module includes two dilated convolution layers and one separable convolution. The third block includes 2 mixed convolution modules, each module includes two dilated convolution layers and one separable convolution. The fourth block includes an upsampling convolution layer, and 2 bottleneck convolution modules, each module includes 2 1x1 convolution layers and one 3x3 convolution. The fifth block includes an upsampling convolution layer, and 2 bottleneck convolution modules, each module includes 2 1x1 convolution layers and one 3x3 convolution.
[0101] Fully convolutional module: A fully convolutional layer that converts the final feature map to the desired number of output categories.
[0102] The three-channel image data first passes through the initialization module, and then after being processed by it, it passes through the five blocks composed of bottleneck modules in sequence, and finally passes through the full convolution module to obtain the final segmentation result.
[0103] Step 4 is as follows:
[0104] Using conventional image enhancement methods, the input image is randomly rotated, flipped and normalized, and then input into the TA-Enet network for training. This can expand the training data to increase the generalization of the model. The loss function is Calc loss, the optimizer is Adam, the learning rate scheduler is cosine annealing, and the model is saved after 100 cycles.
[0105] Step 5 is as follows:
[0106] The new pulmonary embolism CT image is first processed by the SSD network and then cropped. After normalization, it is input into the TA-Enet model trained in step 4 to obtain the segmentation result.
[0107] Example
[0108] The present invention provides the following technical solutions: First, the SSD model is used for preliminary detection to identify the lesion area of interest, and then the cropping technology is used to reduce the area of image processing. Next, we streamlined and improved the Enet network and introduced the Triplet Attention module to better capture the semantic information of medical images, especially when the lesions are small, the features are not obvious, or the noise interference is large. At the same time, the maximum value position is recorded during the downsampling process, and then this position information is used in the upsampling stage, which helps to maintain the spatial details of the image and improve the accuracy of segmentation. In summary, our method combines SSD detection and the improved Enet network to achieve efficient and accurate segmentation of pulmonary embolism lesions, which is suitable for the field of medical image processing. Specifically, it includes the following steps:
[0109] Acquire a pulmonary embolism CT image to be processed, and preprocess the pulmonary embolism CT image to be processed;
[0110] The data is divided into a training set and a test set, where 80% of the data is used as the training set and 20% of the data is used as the test set.
[0111] Train the SSD detection network and select the region of interest for the training set images for SSD network training. Select BCE loss as the loss function and Adam as the optimizer.
[0112] The trained SSD network is used for preliminary detection. After the CT image passes through the SSD network, the region of interest is cropped according to the predicted position.
[0113] Input the training set into Figure 3 The improved TA-Enet model shown in the figure is trained. The image is first randomly rotated, flipped and normalized to improve the generalization of the model. The loss function used is Calc loss, which is the sum of BCE loss and Diceloss. The formula is:
[0114] Calc loss=Dice loss+BCE loss
[0115] BCE loss = -w c [y c log p c +(1-y c )log(1-p c )]
[0116]
[0117] The Adam optimizer is used for iteration, the learning rate is set to 1e-3, the weight decay is set to 1e-3, the batch size is 4, and the training cycle is 100 epochs.
[0118] like Figure 2 As shown in the figure, the trained model is used for testing the test set. The test image is first predicted and cropped by the SSD network. The cropped part is placed in the center of the 256x256 size mask, and then it is normalized and input into the trained improved TA-Enet model for segmentation to obtain the pulmonary embolism segmentation result map.
[0119] In summary, the present invention provides a pulmonary embolism lesion segmentation technology based on medical image processing, which significantly improves the efficiency and accuracy of pulmonary embolism image analysis by integrating SSD preliminary processing and TA-Enet segmentation model. Through the verification of the test set, compared with the original Enet network, a 4.96% iou improvement and a 4.91% dice index improvement were obtained. Compared with U-Net, the iou and dice coefficients were increased by 7.02% and 6.7%, respectively. First, through the SSD detection network, the automatic cropping of the region of interest is realized, avoiding the cumbersome manual region selection; secondly, the introduction of the TA-Enet segmentation model not only efficiently performs segmentation, but also enhances the network's sensitivity to information of different dimensions through the Triplet Attention module, alleviates the distortion problem caused by image downsampling, and improves the performance of the network. In particular, it has excellent adaptability to small lesions and situations where the features are not obvious. This technological innovation has broad application prospects in the field of medical image processing, provides an important tool for the rapid diagnosis and lesion analysis of pulmonary embolism, and is expected to greatly improve the efficiency and accuracy of medical image analysis.
Claims
1. A pulmonary embolism lesion segmentation method based on medical image processing, characterized in that: The steps include: Step 1: Establish a pulmonary embolism medical image segmentation dataset and divide the data into a training set and a test set; Step 2: Use the SSD detection network to preliminarily process the image and crop the region of interest, retain the potential pulmonary embolism area, and filter out redundant information; Step 3: Build the TA-Enet medical image segmentation model based on Enet. Introduce the Triplet Attention module in the downsampling bottleneck module of Enet. The Triplet Attention module includes three different attention gates, which are used for the features of three different dimensional channels respectively. Step 4: Train the TA-Enet medical image segmentation model improved based on Enet; Step 5: Use the trained TA-Enet medical image segmentation model to segment the newly input medical image.
2. The method for segmenting pulmonary embolism lesions based on medical image processing according to claim 1, characterized in that: In step 1, the data is divided into 80% as a training set and 20% as a test set.
3. The method for segmenting pulmonary embolism lesions based on medical image processing according to claim 1, characterized in that: Step 2 specifically includes the following steps: In the training phase, the SSD detection network is trained using part of the training set to learn to identify and locate the region of interest. In the testing phase, the trained SSD detection network is applied to the test set images to identify the target region of interest. By judging the detection effect of the detection network on the test set, the required key lung region is obtained, and the final SSD detection network is obtained. During pulmonary embolism image segmentation, the final SSD detection network performs preliminary processing on the pulmonary embolism image and crops the region of interest. After the pulmonary embolism image passes through the SSD detection network, the potential pulmonary embolism area is retained, while other redundant information is filtered out. These retained areas are further used for subsequent segmentation tasks.
4. The method for segmenting pulmonary embolism lesions based on medical image processing according to claim 1, characterized in that: The TA-Enet medical image segmentation model improved based on Enet is specifically as follows: Initialization module: includes a convolution layer, a maximum pooling layer, a batch normalization layer, and a rectified linear unit activation function; the initialization module performs a 3x3 convolution with a step size of 2 on the three-channel input image to extract features, and performs a 2x2 maximum pooling with a step size of 2 to reduce the spatial dimension, then concatenates the convolution and pooling results in the channel dimension, normalizes them through a batch normalization layer, and finally performs nonlinear processing through a rectified linear unit activation function to obtain an output tensor containing the abstract feature representation of the input image; Multiple bottleneck modules, including: First block: Downsampling convolution layer: The output of the initialization module is passed through a downsampling convolution layer to reduce the spatial resolution; Triplet Attention module: introduces three different attention branches to capture global, detailed, and contextual information in the image, thereby improving the model's understanding and representation of image features; Bottleneck convolution modules: Each module consists of two 1x1 convolution layers and one 3x3 convolution layer for extracting features and enhancing representation; Second block: Downsampling convolution layer: The spatial resolution is reduced again through the downsampling convolution layer; Triplet Attention module: introduces three different attention branches to capture global, detailed, and contextual information in the image, thereby improving the model's understanding and representation of image features; Hybrid convolutional modules: Each module consists of two dilated convolutional layers and one separable convolutional layer for obtaining information with a larger receptive field. The third block: Hybrid convolution module: Continue to use the hybrid convolution module, each module includes two dilated convolution layers and one separable convolution; The fourth block: Upsampling convolution layer: Increase the spatial resolution through upsampling convolution layer; Bottleneck convolution module: Each module includes two 1x1 convolution layers and one 3x3 convolution layer for further feature processing; The fifth block: Upsampling convolution layer: The spatial resolution is increased again through the upsampling convolution layer; Bottleneck convolution module: Each module consists of two 1x1 convolution layers and one 3x3 convolution layer; The output of each block is the processing result of the output of the previous block. Finally, through the processing of these five blocks, the output of the initialization module obtains the feature representation after a series of downsampling, upsampling, dilated convolution, separable convolution, and 1x1 and 3x3 convolution operations. This result is used for image segmentation and can be obtained as the input after passing through the full convolution module. Full convolution module: A full convolution layer converts the final feature map into the required number of output categories. Through the processing of the full convolution module, the feature maps output by multiple bottleneck modules will be integrated and upsampled to generate the final segmentation result. The spatial resolution of this result will be higher than the input image, and the number of channels matches the number of categories of the task.
5. The method for segmenting pulmonary embolism lesions based on medical image processing according to claim 1, characterized in that: In step 4, the TA-Enet medical image segmentation model improved based on Enet is trained. The loss function is Calc loss, the optimizer is Adam, and the learning rate scheduler is cosine annealing. The model is saved after 100 cycles.
6. The method for segmenting pulmonary embolism lesions based on medical image processing according to claim 5, characterized in that: The loss function used is Calc loss, which is the sum of BCE loss and Dice loss. The formula is: Calc loss=Dice loss+BCE loss BCE loss=-w c [y c log p c +(1-y c )log(1-P c )] Where W c represents the weight of the cth sample, y c represents the true label of the cth sample, p c represents the model output of the cth sample, X is the binary segmentation result of the model, Y is the true binary segmentation mask, TP means that the model correctly predicts the positive class sample as the positive class, FP means that the model incorrectly predicts the negative class sample as the positive class, and FN means that the model incorrectly predicts the positive class sample as the negative class.
Citation Information
Patent Citations
Segmentation-network-based CT lung tumor segmentation method, apparatus and device, and medium
WO2020114332A1
Medical image segmentation method and apparatus, and device, system and computer storage medium
WO2022089221A1