Medical image segmentation method and device based on UNet architecture and medium
By introducing hollow spatial convolution pooling pyramid module and spatial convolution attention pyramid module in UNet architecture, the problems of blurred boundaries and irregular regions in pneumonia image segmentation are solved, which significantly improves segmentation accuracy and reliability, which is better than Traditional method.
Patent Information
- Application Number
- CN202411243357.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-31
AI Technical Summary
The existing medical image segmentation method based on convolutional neural networks is low in segmentation accuracy and poor reliability when processing pneumonia images with high noise, irregular lesion infection areas and blurred boundaries.
Using the medical image segmentation method based on UNet architecture, the feature semantic information extraction and edge detail information fusion are performed by introducing the hollow spatial convolution pooling pyramid module and the spatial convolution attention pyramid module between the encoder and the decoder to reduce boundaries Error segmentation to improve segmentation accuracy.
Effectively suppress the extraction of irrelevant information, reduce boundary error segmentation, improve segmentation accuracy and reliability, significantly improve Dice similarity coefficient and intersecting index, which is better than the traditional UNet method.
Smart Images

Figure CN119229113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and in particular to a medical image segmentation method, device and medium based on a UNet architecture. Background Art
[0002] With the development of computer software and hardware technology, the automatic segmentation method of medical images is one of the most widely used technologies in clinical auxiliary diagnosis. It is mainly to automatically segment the lesion area from the medical image for subsequent diagnosis and analysis. In the medical scenario of pneumonia lesion segmentation, computer-aided diagnosis technology is used to diagnose the lung pathology images of infected patients. However, due to the differences in medical imaging equipment, there are large differences between different modality images. Among them, the pneumonia lesion area presents an irregular shape, or the contrast between the segmentation target and the background of the CT image generated by medical scanning imaging is small. Moreover, the size of the lesion area of pneumonia patients varies greatly due to the differences in the body shape of different infected people, which makes it more difficult to quickly and accurately segment the pneumonia lesion infection area in clinical practice. Secondly, the diagnosis of a large number of CT scan images in clinical practice requires manual evaluation, which is a time-consuming task and increases the workload requirements of medical professionals.
[0003] The gradual maturity of deep learning methods has greatly enhanced the application of computer-aided diagnosis in clinical practice. This method can identify lesion infection areas, among which convolutional neural networks are used as an implementation method in the field of deep learning. However, the existing diagnosis methods based on convolutional neural networks have shortcomings such as low segmentation accuracy and poor reliability when segmenting pneumonia images with large noise, irregular lesion infection areas, and blurred boundaries. Summary of the invention
[0004] The purpose of the present invention is to provide a medical image segmentation method, device and medium based on the UNet architecture in order to overcome the defect of low segmentation accuracy in the above-mentioned prior art.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A medical image segmentation method based on UNet architecture, comprising the following steps:
[0007] Obtain the image to be segmented, preprocess the image to be segmented, and input it into the segmentation network based on the UNet architecture to obtain the segmentation result;
[0008] Among them, the segmentation network based on the UNet architecture is: an encoder and decoder based on UNet, a dilated spatial convolution pooling pyramid module and a spatial convolution attention pyramid module are introduced at the encoder-decoder bridge, the encoder extracts feature semantic information of the input image, and the feature semantic information obtained by the last encoding layer in the encoder is input into the dilated spatial convolution pooling pyramid module for weight distribution. The spatial convolution attention pyramid module extracts feature information by expanding the receptive fields of different poolings, and re-weights the feature information with the input image features before outputting the feature information to obtain edge detail information. The decoder uses a double concatenate operation before transposing the convolution to fuse the edge detail information with the feature semantic information.
[0009] Furthermore, the spatial convolutional attention pyramid module includes parallel multi-way branches and an attention branch before the feature information output, and the weights of the multi-way branches are the same.
[0010] Furthermore, the parallel multi-way branches are 4-way, and the expression of the spatial convolution attention pyramid module is:
[0011]
[0012]
[0013]
[0014]
[0015] F OUT = x·sigmoid([F 1 ,F 2 ,F 3 ,F 4 ])
[0016] In the formula, F i represents the i-th branch of the ASAP module, U represents the upsampling operation, Indicates a convolution with a kernel size of 1×1, MAX i×i represents the maximum pooling rate of i×i, AVG i×i represents average pooling with a pooling rate of i×i, GAVG represents convolutional average pooling, x represents the input information to the spatial convolutional attention pyramid module, · represents the element-wise multiplication operation, and [] represents the conocatenate operation.
[0017] Furthermore, the preprocessing includes normalization, image resizing and data enhancement, and the image resizing method is bilinear interpolation.
[0018] Furthermore, the normalized calculation expression is:
[0019] max=max(data)
[0020] min=min(data)
[0021]
[0022] In the formula, data is the original data, max is the maximum value, min is the minimum value, and Normalized_data is the normalized data.
[0023] Furthermore, the loss function of the segmentation network based on the UNet architecture is the mean of the Dice loss and the binary cross entropy loss, and the calculation expression is:
[0024] Loss = mean(Loss dice +Loss bce )
[0025] In the formula, Loss is the loss function, Loss dice Dice loss, Loss bce is the binary cross entropy loss.
[0026] Furthermore, the encoder includes multiple convolution blocks, which are connected by pooling layers, and the decoder includes multiple deconvolution blocks, each deconvolution block includes a first convolution layer and a second convolution layer, and the deconvolution blocks are connected by an upsampling layer. The convolution blocks correspond to the deconvolution blocks one by one, and each convolution block is provided with a first branch and a second branch. The first branch is connected to the first convolution layer of the corresponding deconvolution block, and the second branch is connected to the hole spatial pyramid pooling module and then to the second convolution layer of the corresponding deconvolution block. The output of the last convolution block of the encoder is connected to the spatial convolution attention module, and the output of the spatial convolution attention module is the input of the first deconvolution block of the decoder.
[0027] Furthermore, the evaluation indicators of the segmentation network based on the UNet architecture include Dice similarity coefficient, intersection-over-union ratio, sensitivity, specificity, Hausdorff distance and positive predictive value.
[0028] In a second aspect of the present invention, a medical image segmentation method device based on the UNet architecture includes a memory, a processor, and a program stored in the memory. When the processor executes the program, it implements any of the above medical image segmentation methods based on the UNet architecture.
[0029] A third aspect of the present invention is a storage medium having a program stored thereon, which, when executed, implements any of the above medical image segmentation methods based on the UNet architecture.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] 1) By adding a dilated spatial convolution attention pyramid module and a spatial convolution pooling pyramid module to the UNet network, the present invention can suppress the extraction of irrelevant information in the face of the problems of blurred boundaries and irregular regions in medical images, thereby reducing the proportion of incorrect boundary segmentation and solving the problems of segmentation positioning ambiguity and over-segmentation in UNet.
[0032] 2) The present invention adopts a double concatenate information fusion operation before the transposed convolution on the decoder to enable the decoder to obtain rich fine-grained information and further improve the accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flow chart of the medical image segmentation method based on the UNet architecture.
[0034] Figure 2 This is a model architecture diagram of UNet with a spatial convolutional attention pyramid module.
[0035] Figure 3 This is the structure diagram of the spatial convolutional attention pyramid module (ASAP).
[0036] Figure 4 The figure is a comparison diagram of the segmentation results of the present invention and the existing method. DETAILED DESCRIPTION
[0037] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0038] Example 1
[0039] The present invention is a medical image segmentation method, device and medium based on UNet architecture, such as Figure 1 As shown, taking the pneumonia dataset COVID-19 Lung and Infection Segmention Daraset as an example, a flow chart of the medical image segmentation method based on the UNet architecture of the present invention is used, mainly explaining the method flow of how to complete image segmentation from existing CT images.
[0040] First, the image to be segmented is obtained and preprocessed. The preprocessed image is input into a segmentation network based on the UNet architecture to generate a segmentation result. The segmentation network is based on the UNet architecture and includes an encoder, a decoder, and a dilated spatial convolutional pooling pyramid module and a spatial convolutional attention pyramid module introduced between the encoder and the decoder. The encoder is responsible for extracting the feature semantic information of the input image and inputting the feature semantic information obtained by the last layer of the encoder into the dilated spatial convolutional pooling pyramid module to achieve weight distribution. The spatial convolutional attention pyramid module extracts feature information by expanding the receptive fields of different poolings and reweights it with the input image features before outputting the feature information to enhance the edge detail information. In the decoder, before performing the transposed convolution, the edge detail information is fused with the feature semantic information through a double concatenate operation to improve the segmentation accuracy.
[0041] The specific process is:
[0042] S1: CT data preprocessing was performed on the public pneumonia dataset COVID-19 Lung and Infection Segmention Daraset.
[0043] Download the public dataset, which contains 20 cases, all from patient CT scans, and the CT images are manually annotated by experts for infected areas. The CT slice sizes are 630×630 pixels, 512×512 pixels, and 401×630 pixels, of which the slice area containing lesions accounts for 1.12% of the total area, the area containing lesions accounts for 2.12% of the lesion image area, and the slices with lesions account for 52.86% of the normal slices.
[0044] CT slices with CT image sizes of 630×630 pixels, 512×512 pixels, and 401×630 pixels were cropped respectively. The image size after cropping was unified to 256×256 pixels. The cropping was performed by overlapping the original CT image and the corresponding gold standard annotated image to ensure that the cropped image retained the lesion area of the CT slice.
[0045] Among them, the existing public pneumonia datasets mainly include but are not limited to: COVID-19CT segmentation dataset contains CT scans of 40 patients, a total of 100 CT slices, Segmentation dataset nr.2 dataset contains CT scans of 9 patients, a total of 829 CT slices, COVID-19-CT-Seg dataset contains 3520 CT slices from 20 patients, CC-CCII Segmentation Dataset contains CT scans of 150 patients, a total of 750 CT slices. Under the condition of ensuring sufficient data set samples, the present invention uses 3520 slices of COVID-19-CT-Seg dataset for training, verification and testing. In the preprocessing normalization stage, the present invention adopts maximum-minimum normalization:
[0046] Maximum value: max = max(data)
[0047] Minimum value: min = min(data)
[0048]
[0049] Where data represents the original data, and Normalized_data is the normalized data. Bilinear interpolation is used for resizing the image. The rotation angle range used for data augmentation is [-10°, 10°]. The contrast range is adjusted to: [0.9, 1.1].
[0050] S2: Divide the data set processed in step S1 into a training set, a validation set, and a test set.
[0051] The total data set is randomly divided into 7:2:1 to ensure that the samples in each subset are representative, that is, the number of slices in the training set is 2464, the number of slices in the validation set is 704, and the number of slices in the test set is 352.
[0052] S3: Add the atrous spatial convolution pooling pyramid module and the spatial convolution attention pyramid module based on the UNet architecture.
[0053] After adding, the segmentation network based on the UNet architecture includes: an encoder and decoder based on UNet, a hole spatial convolution pooling pyramid module introduced at the bridge of the encoder and decoder, and a spatial convolution attention pyramid module. The encoder includes multiple convolution blocks, and the convolution blocks are connected by pooling layers. The decoder includes multiple deconvolution blocks, each deconvolution block includes a first convolution layer and a second convolution layer, and the deconvolution blocks are connected by an upsampling layer. The convolution blocks correspond to the deconvolution blocks one by one, and each convolution block is provided with a first branch and a second branch. The first branch is connected to the first convolution layer of the corresponding deconvolution block, and the second branch is connected to the hole spatial pyramid pooling module and then to the second convolution layer of the corresponding deconvolution block. The output of the last convolution block of the encoder is connected to the spatial convolution attention module, and the output of the spatial convolution attention module is the input of the first deconvolution block of the decoder. The encoder extracts feature semantic information from the input image. The feature semantic information obtained by the last encoding layer in the encoder is input into the atrous spatial convolution pooling pyramid module for weight distribution. The spatial convolution attention pyramid module extracts feature information by expanding the receptive fields of different poolings. Before the feature information is output, it is re-weighted with the input image features to obtain edge detail information. The decoder uses a double concatenate operation before transposed convolution to fuse edge detail information with feature semantic information.
[0054] like Figure 2 As shown in the figure, the UNet model architecture diagram with the addition of the dilated spatial convolutional pooling pyramid module and the spatial convolutional attention pyramid module. The model first introduces the dilated spatial convolutional pooling pyramid module at the encoder-decoder bridge to solve the problem of insufficient local feature extraction in UNet. Secondly, by supplementing the spatial convolutional attention pyramid branch, the problem of segmentation deviation caused by the lack of long-distance information transmission mechanism in UNet is corrected. The architecture is mainly based on the encoder-decoder structure of UNet, and integrates the dilated spatial convolutional pooling pyramid and spatial convolutional attention pyramid modules, and uses Concatenate for information fusion in the decoder stage. The encoder extracts the semantic information of the input image features. The feature information of the last encoding layer at the bottom bridge level of the model is input into the spatial convolutional attention pyramid module for attention weight allocation. The spatial convolutional attention pyramid module extracts feature information by expanding the receptive fields of different pooling, and re-weights the edge detail information with the input image information before the feature information is output, thereby obtaining the boundary region of interest and suppressing the erroneous segmentation prediction in the traditional UNet decoder. Feature information is extracted through the spatial convolution attention pyramid module and concatenated with the feature information before the transposed convolution on the decoder, so that the model can show more image feature information and semantic details in the decoding layer.
[0055] S4: Use the training set and validation set of S2 to train the network model obtained in step S3.
[0056] S4.1: Input the data set processed in step S2 into the improved UNet network to obtain a preliminary feature map;
[0057] S4.2: performing a downsampling operation on the preliminary feature map obtained in step S4.1, reducing the CT slice resolution while increasing the number of channels, and obtaining a new feature map;
[0058] S4.3: Repeat downsampling operation on the feature map obtained in step S4.2;
[0059] S4.4: Input the feature map obtained in step S4.1 into the spatial convolutional attention pyramid module, and obtain the output containing the information of the attention weight;
[0060] S4.5: Input the feature map obtained in step S4.2 into the dilated spatial pyramid pooling module.
[0061] S4.6: The dilated spatial pyramid pooling module consists of four dilated convolution blocks with different sampling rates, a convolution kernel size of 3×3, dilation rates of 1, 6, 12, and 18, as well as a 1×1 convolution and a 1×1 pooling. The features input into the dilated spatial pyramid pooling module are processed four times with separate branch feature information, and then concatenated after the information of different pooling scales is extracted to output the final feature information.
[0062] S4.7: The improved segmentation model, e.g. Figure 2 As shown in Figure 2, the main model consists of a symmetrically structured encoder-decoder, an upper branch jump connection, and a lower branch. The size of the preprocessed CT image will be reshaped to F∈R H×W×C , where the H, W, and C of the input image are 256, 256, and 1 respectively. First, the encoder branch extracts feature information through convolution operations and converts F∈R H×W×C The convolution operation is performed on the feature map of the convolution kernel with a size of 3×3, and feature information is extracted twice. Then the output size is F∈R H ×W×32 The feature map of the encoder is used to complete the first stage feature information compression of the encoder; the output feature information map is subjected to maximum pooling, and the output feature dimension is F∈R H / 2×W / 2×32 ; Repeat until the size is F∈R H / 16×W / 16×512 The characteristic information of the image is then decoded by the decoder to restore the characteristic information of the image.
[0063] like Figure 3The figure shows the structure of the spatial convolution attention pyramid module. The module consists of four parallel branches and an attention branch before the feature information output. The spatial convolution attention pyramid module can be expressed as:
[0064]
[0065]
[0066]
[0067]
[0068] F OUT = x·sigmoid([F 1 ,F 2 ,F 3 ,F 4 ])
[0069] In the above formula, F i represents the i-th branch of the ASAP module, U represents the upsampling operation, α represents the convolution with a kernel size of 1×1, and MAX i×i represents the maximum pooling rate of i×i, AVG i×i Represents the average pooling with pooling rate i×i, GAVG represents convolutional average pooling, x represents the input information to the spatial convolution attention pyramid module, · represents the element multiplication operation, and [] represents the Conocatenate operation. The input feature information x∈R H×W×C . F 1 , F 2 , F 3 The multi-scale feature branches are obtained by using average pooling and maximum pooling operations with different kernel sizes. 4 The branch adopts global average pooling (GAP). Then it is combined with F 4 Output fusion makes the output contain more feature information of the receptive field. The 1×1 convolution operation ensures that the information after feature extraction can still maintain the same weight ratio, and then regional interpolation upsampling is performed to enable the information extracted from different features to be fused.
[0070] S4.8: Input the feature information into the branch structure of the model at the same time to extract the attention module features. The structure of the spatial convolution attention pyramid module is as follows: Figure 3As shown in the figure, it contains four parallel pooling branches. Different semantic information can be extracted through different pooling scales. The parallel branches can expand the receptive field of the model while reducing the complexity of the module. The weights are redistributed with the original feature information before output, so that the infected area obtains a larger weight. The semantic information extracted by the encoder is concatenated with the ASAP feature information, so that the model can minimize the loss of semantic information before transposing the convolution on the decoder.
[0071] S4.9: Get the trained weight model.
[0072] When training the improved model, different network hyperparameters were selected through experiments to obtain better performance. The Adam optimizer was used to optimize the network during the training phase, with an initial learning rate of 0.001. The learning rate was decayed every 10 times, with a decay rate of 0.99. The loss function used in network training was a combination of dice and bce.
[0073] Loss = mean(Loss dice +Loss bce )
[0074] The hardware acceleration device used in the experiment is GeForce RTX 2060 12GB. EarlyStopping operation is used on each dataset. Training is stopped after 10 consecutive epochs when the verification loss no longer decreases. When processing CT slices, the batch size is selected as 128.
[0075] S5: Use the test set obtained in step S2 to test the weight model saved in step S4, and save the model weight file with the best segmentation effect.
[0076] In the model evaluation stage, the present invention uses multiple indicators to evaluate the segmentation effect. DSC (Dice similarity coefficient) is used to measure the similarity of two sets. In the present invention, DSC is used to evaluate the similarity between the predicted result and the true label. IOU (intersection over union) is used to measure the overlap between the predicted result and the true result. SEN (sensitivity) represents the model's ability to identify true positive examples, especially in the segmentation of lesion infection areas, SEN represents the model's ability to correctly identify lesion areas. SPE (specificity) is used to evaluate the model's ability to distinguish between positive and negative examples. In the task of the present invention, SPE represents the model's ability to correctly identify non-lesion areas. HD (Hausdorff distance) is used to evaluate the maximum distance between two sets. This indicator is used in the present invention to measure the maximum distance between the predicted result and the true result. The smaller the distance, the closer the predicted result is to the true result. PPV (positive predictive value) is used to measure the accuracy of the model's prediction as a positive example. In the segmentation of lesion infection areas, PPV is used to evaluate the proportion of pixels predicted by the model as lesions that are actually lesions. The specific formulas of the above evaluation indicators are given below:
[0077]
[0078]
[0079]
[0080]
[0081] HD=max{d(a,b),d(b,a)}
[0082]
[0083] Among them, TP is true positive (positive samples that are correctly identified), FN is false negative (samples that are actually positive but are mistakenly identified as negative), TN is true negative (negative samples that are correctly identified), and FP is false positive (samples that are actually negative but are mistakenly identified as positive).
[0084] S6: Load the pneumonia lung CT image to be segmented into S5, perform lesion region segmentation, and obtain a segmented lesion region architecture.
[0085] Table 1 shows the comparison of the segmentation effects of the method of the present invention and various existing methods on the same data set. The results show that the method proposed in the present invention is superior to other comparison methods in both DSC and IOU indicators. Compared with TransUNet, the method of the present invention improves by 0.0011 and 0.0041 in DSC and IOU, respectively. Compared with the UNet++ method using the same architecture, the method of the present invention improves by 0.0085 and 0.0203 in DSC and IOU, respectively. In terms of the HD evaluation index, the method of the present invention is only 0.0042 lower than that of TransUNet. In addition, the method of the present invention performs best in the PPV indicator. The above results show that the spatial convolutional attention pyramid module of the present invention can effectively enhance the model's accurate attention to the lesion infection area while suppressing the interference of irrelevant information. The experimental results further verify the superiority of the method of the present invention in segmentation effect.
[0086] Table 1 Quantitative comparison of segmentation performance between the proposed method and existing methods
[0087]
[0088] Table 2 is a structural parameter table of the method of the present invention and multiple existing methods. FLOPs (Floating-point Operations) is the number of floating-point operations, which is used to evaluate the complexity of the algorithm. Params is the parameter quantity, which is used to evaluate the total number of parameters that need to be trained in model training. From the results in the table, it can be seen that the model parameters of the present invention are only 5.54M in size, and FLOPs are only 49.57G, which has achieved the best performance among the existing comparison methods. This shows that while achieving the same expected segmentation results, our model can perform reasoning and calculation faster and reduce resource utilization. This also fully demonstrates the rationality of the model structure of the method of the present invention.
[0089] Table 2 Parameters of the method of the present invention and different methods
[0090]
[0091] Table 3 shows the detailed implementation details of the specific architecture included in the method of the present invention.
[0092] Table 3 Detailed structural details of the method of the present invention
[0093]
[0094] Figure 4 The segmentation results of the method of the present invention are compared with those of the existing comparative methods. In order to more intuitively demonstrate the segmentation effect of the method proposed in the present invention, Figure 4The visualization results of different methods for segmenting lesions on the same data set are given. From the segmentation effect, it can be observed that, first, UNet has problems of over-segmentation and under-segmentation, and it is difficult to adapt to the complex characteristics of the irregular shape of the infected area. Secondly, the TransUNet method has the problem of being unable to correctly segment the boundary area when dealing with situations where the foreground and background are not much different. Then, UNet++ has the problems of fuzzy segmentation positioning and over-segmentation. The method proposed in the present invention relies on the proposed spatial convolution attention pyramid module to suppress the extraction of irrelevant information, thereby reducing the proportion of incorrect boundary segmentation.
[0095] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0096] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0097] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A medical image segmentation method based on UNet architecture, characterized in that: The following steps are involved: Obtain the image to be segmented, preprocess the image to be segmented, and input it into the segmentation network based on the UNet architecture to obtain the segmentation result; Among them, the segmentation network based on the UNet architecture includes: an encoder and decoder based on UNet, a void spatial convolution pooling pyramid module introduced at the bridge of the encoder and the decoder, and a spatial convolution attention pyramid module. The encoder extracts feature semantic information of the input image, and the feature semantic information obtained by the last encoding layer in the encoder is input into the void spatial convolution pooling pyramid module for weight distribution. The spatial convolution attention pyramid module extracts feature information by expanding different pooling receptive fields, and re-weights the feature information with the input image features before outputting the feature information to obtain edge detail information. The decoder uses a double concatenate operation before transposing the convolution to fuse the edge detail information with the feature semantic information.
2. According to claim 1, a medical image segmentation method based on UNet architecture is characterized in that: The spatial convolution attention pyramid module includes parallel multi-path branches and an attention branch before feature information output, and the weights of the multi-path branches are the same.
3. The medical image segmentation method based on UNet architecture according to claim 2, characterized in that: The parallel multi-path branches are 4-path, and the expression of the spatial convolution attention pyramid module is: F OUT =x·sigmoid([F 1 ,F 2 ,F 3 ,F 4 ]) In the formula, F i represents the i-th branch of the ASAP module, U represents the upsampling operation, Indicates a convolution with a kernel size of 1×1, MAX i×i represents the maximum pooling rate of i×i, AVG i×i represents average pooling with a pooling rate of i×i, GAVG represents convolutional average pooling, x represents the input information to the spatial convolutional attention pyramid module, · represents the element-wise multiplication operation, and [] represents the conocatenate operation.
4. The medical image segmentation method based on UNet architecture according to claim 1, characterized in that: The preprocessing includes normalization, image resizing and data enhancement, and the image resizing method is bilinear interpolation.
5. The medical image segmentation method based on UNet architecture according to claim 4, characterized in that: The normalized calculation expression is: max=max(data) min=min(data) In the formula, data is the original data, max is the maximum value, min is the minimum value, and Normalized_data is the normalized data.
6. The medical image segmentation method based on UNet architecture according to claim 1, characterized in that: The loss function of the segmentation network based on the UNet architecture is the mean of the Dice loss and the binary cross entropy loss, and the calculation expression is: Loss = mean(Lossdice+Lossbce) In the formula, Loss is the loss function, Loss dice Dice loss, Loss bce is the binary cross entropy loss.
7. The medical image segmentation method based on UNet architecture according to claim 1, characterized in that: The encoder includes multiple convolution blocks, which are connected by pooling layers. The decoder includes multiple deconvolution blocks, each of which includes a first convolution layer and a second convolution layer. The deconvolution blocks are connected by upsampling layers. The convolution blocks correspond to the deconvolution blocks one by one. Each convolution block is provided with a first branch and a second branch. The first branch is connected to the first convolution layer of the corresponding deconvolution block, and the second branch is connected to the second convolution layer of the corresponding deconvolution block after being connected to the hole spatial pyramid pooling module. The output of the last convolution block of the encoder is connected to the spatial convolution attention module, and the output of the spatial convolution attention module is the input of the first deconvolution block of the decoder.
8. The medical image segmentation method based on UNet architecture according to claim 1, characterized in that: The evaluation indicators of the segmentation network based on the UNet architecture include Dice similarity coefficient, intersection-over-union ratio, sensitivity, specificity, Hausdorff distance and positive predictive value.
9. A medical image segmentation method and device based on UNet architecture, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, it implements a medical image segmentation method based on the UNet architecture as described in any one of claims 1-8.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, a medical image segmentation method based on the UNet architecture as described in any one of claims 1 to 8 is implemented.
