A lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels
By constructing a DS-ResUNet network and combining it with lightweight 3D attention and feature fusion techniques, the problems of low accuracy and poor segmentation of small blood vessels in lung vessel segmentation are solved, achieving a highly efficient lung vessel segmentation effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO UNIV
- Filing Date
- 2022-11-16
- Publication Date
- 2026-05-26
Smart Images

Figure CN115908804B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, specifically to a segmentation technique for CT images. Background Technology
[0002] In recent years, lung diseases have gradually become one of the diseases with the highest incidence and mortality rates. Traditional methods of examining lung lesions are highly invasive and can only reflect the overall condition of the lungs, making it difficult to detect local lesions and hindering early diagnosis and treatment. With the continuous development of CT technology, CT has unique clinical value in the diagnosis of vascular lesions, pulmonary hypertension, and tumors. Therefore, CT imaging has become a major tool for clinical diagnosis, and lung CT has become one of the main means of evaluating lung function. However, due to the complexity of lung tissues, organs, blood vessels, and nerves, relying solely on manual image interpretation for diagnosis is time-consuming and inefficient. In response, three-dimensional reconstruction technology can provide a clear and intuitive view of the pulmonary vascular structure, avoiding human error and offering higher efficiency. This technology can provide auxiliary diagnostic functions such as surgical planning and postoperative outcome prediction in the diagnosis and treatment of pulmonary nodules, pulmonary embolism, and lung tumors.
[0003] 3D reconstruction of pulmonary vessels requires first marking the pulmonary vessels, and then reconstructing and displaying the marked results. Currently, the data volume generated by computed tomography (CT) scans is large, and the marking of pulmonary vessels usually needs to be done manually by professional physicians. Therefore, pulmonary vessel marking is time-consuming, labor-intensive, and prone to errors. Automated marking of pulmonary vessels using artificial intelligence technology based on CT image segmentation offers advantages over manual marking, including higher efficiency, lower cost, and higher accuracy, and represents a trend in medical imaging development.
[0004] In CT image segmentation, traditional medical image segmentation techniques mainly include thresholding, region growing, and watershed methods. These methods cannot handle the complex nonlinear relationships in medical images, and their segmentation speed and accuracy are relatively low. With the significant improvement in computing power, deep learning has become one of the cutting-edge technologies in artificial intelligence. Its ability to process data with complex nonlinear relationships can effectively solve the problems of low efficiency and accuracy in traditional medical image segmentation techniques. Therefore, more and more researchers are beginning to use deep learning technology to solve the problem of pulmonary vessel segmentation.
[0005] Currently, deep learning-based CT image segmentation algorithms, such as FCN and U-Net, require image downsampling and pooling during feature extraction. This approach suffers from the loss of crucial information, resulting in poor segmentation of small blood vessels. Because lung tissue, nodules, and blood vessels have small image areas and similar shapes, the use of downsampling and pooling significantly impacts the accuracy of blood vessel segmentation. Summary of the Invention
[0006] This invention proposes a lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels, which solves the problems of low accuracy and poor segmentation of small vessels due to loss of key information when using existing technologies for vessel segmentation.
[0007] A lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels, the segmentation method comprising:
[0008] Acquire CT images to be segmented;
[0009] The CT image is labeled and preprocessed to obtain the labeling results and the maximum connected region of the CT image;
[0010] Construct the DS-ResUNet network;
[0011] Training the DS-ResUNet network: Input the preprocessed image into the DS-ResUNet network to obtain the output result. Use the loss function to calculate the error between the output result and the label result. Combine the error with the deep supervision training strategy to update the parameters in the DS-ResUNet network. Save the optimal DS-ResUNet network model to complete the training of the DS-ResUNet network.
[0012] The CT image is input into the trained DS-ResUNet network, and a predicted image is output. The predicted image is the result of dual-path U-Net segmentation of lung CT vessels.
[0013] Preferably, the preprocessing includes:
[0014] The voxel values of the CT images are truncated within the range of [-950, +350].
[0015] The voxel values are linearized and normalized to the range [0, 1].
[0016] Enhance the contrast between blood vessels and other background images;
[0017] Extract the largest connected region from the CT image;
[0018] Using data augmentation, 32 consecutive slices were randomly selected from the CT image sequence.
[0019] Preferably, the enhancement of the contrast between the blood vessels and other background images is achieved through grayscale linear transformation.
[0020] Preferably, the DS-ResUNet network includes an encoder, a decoder, and a bridge.
[0021] Preferably, the encoder has a network depth of four layers, and the decoder has a network depth of four layers.
[0022] Preferably, the loss function is the Dice loss function.
[0023] Preferably, the parameters in the DS-ResUNet network are updated using the Adam optimization algorithm via gradient backpropagation.
[0024] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the aforementioned lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels.
[0025] A computer-readable storage medium for storing a computer program that executes the above-described lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels.
[0026] The present invention also provides a lung CT vessel dual-path U-Net segmentation device based on lightweight 3D attention, the segmentation device comprising:
[0027] Image acquisition unit, used to acquire CT images to be segmented;
[0028] An image processing unit is used to label and preprocess the CT image to obtain the labeling result and the maximum connected region of the CT image.
[0029] Network building blocks, used to build DS-ResUNet networks;
[0030] The network training unit is used to input the preprocessed image into the DS-ResUNet network, obtain the output result, calculate the error between the output result and the labeling result using the loss function, and combine the error with the deep supervision training strategy to update the parameters in the DS-ResUNet network, save the optimal DS-ResUNet network model, and complete the training of the DS-ResUNet network.
[0031] The image segmentation unit is used to input the CT image into the trained DS-ResUNet network and output a predicted image, which is the lung CT vessel dual-path U-Net segmentation result.
[0032] The beneficial effects of this invention are:
[0033] Existing lung CT images often contain multiple volumetric data types, such as 2mm and 5mm volumetric data. The 2mm volumetric data contains a wealth of detailed information about pulmonary vessels, while the 5mm volumetric data exhibits clearer vessel textures and less image noise. Furthermore, since the 3D positions of pulmonary vessels in lung CT data are relatively fixed, a 3D spatial attention mechanism is needed to enhance the spatial weight of vessels. Therefore, to improve the accuracy and efficiency of lung vessel segmentation, this invention adopts the design concept of establishing a fusion model of multiple data types and simplifying the model parameters of the 3D spatial attention mechanism.
[0034] Compared with existing technologies, the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention proposed in this invention has the following advantages:
[0035] The network structure based on ResUNet used in this invention can achieve multi-layer feature reuse, better preserve the features of epidemic area images, retain more important features, especially the features of small target regions, and thus improve the segmentation effect.
[0036] The 3D fusion model based on two types of data proposed in this invention can solve the problems of small target loss and missegmentation of blood vessel-like regions caused by downsampling and pooling processing;
[0037] The lightweight 3D Axial Attention module proposed in this invention can solve the problems of numerous parameters and low algorithm efficiency in 3D attention models. Attached Figure Description
[0038] Figure 1 This is a flowchart of a lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention, as described in Implementation Method 1.
[0039] Figure 2 The diagram shows the DS-ResUNet network structure as described in Embodiment 1 and Embodiment 4. In this diagram, Encoder is the encoder, Decoder is the decoder, Skip connection is the bridge, Axial Attention is the attention module described in Embodiment 1, element-wise sum is a feature fusion method, which is to add pixels one-to-one, Resmodule is the residual module, and Feature Fusion is the feature fusion method.
[0040] Figure 3 This is a schematic diagram of the separable convolution structure described in Implementation 5, where Conv is the convolution operation, Add is the addition operation, Sigmoid is the activation function Sigmoid, and Weighted is the multiplication weighting.
[0041] Figure 4 A flowchart of the encoder described in Implementation Method 4;
[0042] Figure 5 This is a schematic diagram of the feature fusion module described in Implementation Method 4, where Data represents data and concatnate represents merging two feature maps by channel Cat to achieve feature fusion. Detailed Implementation
[0043] Implementation Method 1:
[0044] Reference Figure 1 , Figure 2 This implementation method is described below;
[0045] This embodiment describes a lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention, the method comprising:
[0046] Input CT image;
[0047] The CT image is labeled and preprocessed to obtain the labeling results and the maximum connected region of the CT image;
[0048] Construct the DS-ResUNet network;
[0049] Training the DS-ResUNet network: Input the preprocessed image into the DS-ResUNet network to obtain the output result. Use the loss function to calculate the error between the output result and the label result. Combine the error with the deep supervision training strategy to update the parameters in the DS-ResUNet network. Save the optimal DS-ResUNet network model to complete the training of the DS-ResUNet network.
[0050] The CT image is input into the trained DS-ResUNet network, and a predicted image is output. The predicted image is the result of dual-path U-Net segmentation of lung CT vessels.
[0051] Specifically:
[0052] The labeling result is the labeled CT image; using the labeled image to train the DS-ResUNet network enables the network to learn effectively.
[0053] The optimal DS-ResUNet network model is saved for testing on the CT images.
[0054] This implementation uses DS-ResUNet, a 3D fusion model based on two types of data, which can solve the problems of small target loss and missegmentation of vascular-like regions caused by downsampling and pooling. Simultaneously, a lightweight 3D AxialAttention module is used, addressing the issues of numerous parameters and low algorithm efficiency in traditional 3D attention models. Finally, the DS-ResUNet network is trained using labeled CT images to improve segmentation accuracy.
[0055] Implementation Method Two:
[0056] This embodiment further illustrates the preprocessing described in the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 1.
[0057] The preprocessing described in this embodiment includes:
[0058] The voxel values of the CT images are truncated within the range of [-950, +350].
[0059] The voxel values are linearized and normalized to the range [0, 1].
[0060] Enhance the contrast between blood vessels and other background images;
[0061] Extract the largest connected region from the CT image;
[0062] Using data augmentation, 32 consecutive slices were randomly selected from the CT image sequence.
[0063] Specifically:
[0064] The voxel values of the CT images are truncated within the range of [-950, +350], that is, the voxel values of voxel points less than -950 are set to -950, and the voxel values of voxel points greater than +350 are set to +350.
[0065] Linearize and normalize the voxel values to the range [0,1];
[0066] Enhancing the contrast between blood vessels and other background images improves the blood vessel portion while better suppressing the rest of the background image, laying a good foundation for lung blood vessel segmentation.
[0067] Extract the largest connected region from the image. Besides the region to be segmented (the area to be segmented), there are also irrelevant regions in the image. Therefore, extracting the largest connected region reduces the image resolution, decreases computational load, and improves image segmentation efficiency.
[0068] Data augmentation was used to randomly select 32 consecutive slices from a CT sequence for training.
[0069] Unlike natural scene images, CT data voxel values are represented by HU values ranging from [-1000, +3000], requiring image preprocessing to remove irrelevant information from the CT data.
[0070] Because the raw CT sequence data is in DICOM format, it contains file headers and other information, and requires specific software to open. Furthermore, DICOM data is quite large, which slows down computer processing. Therefore, during data preprocessing, DICOM data is often converted to other image formats.
[0071] Implementation Method 3:
[0072] This embodiment is a further example illustrating the enhancement of the contrast between blood vessels and other background images in the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 2.
[0073] The enhanced contrast between blood vessels and other background images described in this embodiment is achieved through grayscale linear transformation.
[0074] Specifically:
[0075] The grayscale linear transformation adjusts the grayscale of the image by establishing a grayscale mapping, which can expand the image contrast, make the image clearer, and make the features more obvious, thereby achieving the purpose of image enhancement.
[0076] Implementation Method Four:
[0077] Reference Figure 2 , Figure 4 , Figure 5 This implementation method is described below;
[0078] This embodiment is a further illustrative example of the DS-ResUNet network described in the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 1.
[0079] The DS-ResUNet network described in this embodiment includes: an encoder, a decoder, and a bridge.
[0080] Specifically:
[0081] like Figure 2As shown, the DS-ResUNet network consists of three parts: an encoder, a decoder, and a skip connection. The encoder and decoder networks are both four-layered, with each layer including three convolutional blocks and one residual block, which are connected sequentially.
[0082] In the encoder path, data is downsampled by performing convolutions with a stride of 2 through each layer to extract high-level semantic features of the image. Therefore, the input image size of each layer is half the size of the previous layer, and the number of channels is twice that of the previous layer. Specifically, the encoder's first layer has 16 convolutional kernels, the second layer has 32, the third layer has 64, and the fourth layer has 128.
[0083] In the decoder path, the decoder and encoder structures are symmetrical. The size of each layer of the image in the decoder and the number of convolution kernels correspond to those in the encoder. High-level semantic features can be mapped to the original size through deconvolution operation with a stride of 2.
[0084] In addition, bridging is a bridge between encoder and decoder for multi-scale fusion. It supplements the downsampled feature information to the corresponding upsampled layer through cascading, thereby realizing feature reuse.
[0085] like Figure 4 As shown, in the encoder, each layer consists of three convolutional blocks, one residual block, and a feature fusion module. The residual block performs three consecutive convolutions on the feature map input to the layer and superimposes the result with the original feature map. The convolutional kernel size used in this embodiment is 3×3×3. This residual unit can effectively extract the detailed texture features of blood vessels in 2mm volumetric data. CT image data includes 2mm and 5mm volumetric data. The 2mm volumetric data has clear fine structures and can accurately identify lung lesions. The 5mm volumetric data is sub-thin slice CT scan data, which has less CT image noise and clear overall vascular structure, and can accurately identify the outline of lung vessels.
[0086] Each layer of the DS-ResUNet network's decoder also includes a classification layer. That is, during the DS-ResUNet upsampling process, the feature maps of each layer are directly mapped to the ground truth size, thereby supervising the training of the parameters of each layer. Finally, the losses of each layer are added together with different weights to obtain the total loss used in the network training process.
[0087] Therefore, by comprehensively utilizing the advantages of both types of volumetric data, the accuracy of vascular feature extraction can be improved. To this end, this embodiment designs a feature fusion module that can fuse both 2mm and 5mm volumetric data. For example... Figure 5 As shown, the feature fusion module concatenates the features of the 5mm data with the features of the 2mm data after passing through the residual unit, and uses this as the result of feature fusion. In this embodiment, convolutional layers with a kernel size of 3×3×3 and a stride of 2 connect the structural blocks in the 5mm path. Furthermore, to improve model convergence speed and avoid gradient vanishing, this implementation uses PReLU as the activation function after each convolution operation.
[0088] When performing skip connections on low-level features, DS-ResUNet employs a spatial attention mechanism to strengthen the weight of blood vessel location factors, thus avoiding the semantic gap problem caused by directly using skip connections.
[0089] Implementation Method 5:
[0090] Reference Figure 3 This implementation method is described below;
[0091] This embodiment is a further illustrative example of the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 1.
[0092] This implementation uses separable convolution instead of conventional convolution to calculate 3D Axial Attention, and its specific structure is as follows: Figure 3 As shown.
[0093] When calculating Spatial Attention for 3D CT image data using separable convolution, the calculation order of Spatial Attention needs to be considered from the x-axis, y-axis, and z-axis directions. If the calculation order of the separable convolution is x, y, z, the required convolution order is 1×k×1, k×1×1, 1×1×k. Therefore, when calculating Spatial Attention for 3D CT image data using separable convolution, there are 6 possible arrangements based on the x-axis, y-axis, and z-axis order. To avoid the influence of the calculation order, the sum of the output results of the 6 arrangements can be used as the Spatial Attention. The SA calculation is as follows:
[0094] C1 = conv3(conv2(conv1(X)))
[0095] C2 = conv2(conv3(conv1(X)))
[0096] C3 = conv3(conv1(conv2(X)))
[0097] C4 = conv1(conv3(conv2(X)))
[0098] C s =conv2(conv1(conv3(X)))
[0099] C6 = conv1(conv2(conv3(X)))
[0100] SA=σ(C1+C2+C3+C4+C S +C6)
[0101]
[0102] Where σ is the activation function Sigmoid, and conv1, conv2, and conv3 represent convolution functions with kernels of 1×k×1, k×1×1, and 1×1×k, respectively. In this embodiment, the kernel parameter k is 9.
[0103] Separable convolution can perform convolution in three directions separately, which can greatly reduce the number of parameters and improve the model inference speed while ensuring segmentation accuracy.
[0104] Implementation Method Six:
[0105] This embodiment is a further illustrative example of the loss function described in the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 1.
[0106] The loss function described in this embodiment is the Dice loss function.
[0107] Specifically:
[0108] During training, the error between the output and the labeled result of each layer is calculated using the Dice loss function, and the losses of each layer are summed using different weights for subsequent training. Simultaneously, the parameters in the network are updated using the Adam optimization algorithm via gradient backpropagation to obtain the trained DS-ResUNet network.
[0109] In this implementation, the initial weight of the deep supervised loss is set to 0.4, and then the weight is multiplied by 0.8 every 30 iterations of training.
[0110] The expression for the Dice loss function is as follows:
[0111]
[0112] Where C is the total number of categories, c is the number of categories, and P is the output of the DS-ResUNet network. This is the one-hot encoded real image of the annotation results, where 1 represents the target to be segmented and 0 represents the image background.
[0113] Implementation Method Seven:
[0114] This embodiment is a further illustrative example of the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 1.
[0115] This embodiment describes a lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels. The method uses a trained DS-ResUNet network model to predict the class probability of each pixel in a test sample, which is the CT image. The class with the highest probability value is the predicted result for that pixel. With this method, each pixel in each slice of the CT sequence has one and only one predicted class. Finally, based on the prediction results, a three-dimensional reconstruction technique is used to establish a three-dimensional vascular structure for clinical diagnosis.
[0116] Implementation Method Eight:
[0117] This embodiment is a further illustrative example of the lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention described in Embodiment 1.
[0118] This embodiment employs a lightweight 3D attention-based dual-path U-Net segmentation method for lung CT vessels, as described in Embodiment 1, to segment the arteries and veins of the lungs. This embodiment uses raw CT images from 109 patients at a hospital to evaluate the DS-ResUNet model. The images were generated by scanning the lungs from the apex to the base using a high-speed spiral CT scanner, obtaining data at 2mm and 5mm intervals, respectively, in DICOM format. To ensure the accuracy of the experimental data used for training, all data used in this embodiment were individually labeled under the guidance of a professional physician, with two categories (veins and arteries). After experimental data preprocessing, this invention uses 70% of all data as the training set and 30% as the validation set, ensuring sufficient training and validation sets in the experiment and avoiding overfitting or underfitting.
[0119] During preprocessing, the largest connected region is first extracted from each sample to minimize surrounding black areas. Before training, a data augmentation strategy is used to randomly select 32 consecutive slices from the CT sequence for training. During training, the error is calculated using the Dice loss function, and the parameters in the DS-ResUNet network are updated accordingly. The segmentation performance of the method can be evaluated using the Dice coefficient. The Dice coefficient represents a measure of similarity between the segmented result and the true result; a higher coefficient indicates a more similar segmented result and a better segmentation result.
[0120] Table 1 compares this embodiment with existing U-Net and ResUNet segmentation methods. The data in the table clearly shows that this embodiment exhibits better performance, thus indicating that the method described in this embodiment solves the problem of small blood vessel information loss and improves the segmentation effect of the network.
[0121] Table 1: Comparison of experimental results between this method and 3D U-Net and 3D ResUNet
[0122]
[0123] In summary, the segmentation method described in this embodiment has better segmentation results and obvious advantages compared with existing similar methods.
[0124] Implementation Method Nine:
[0125] This embodiment describes a lightweight 3D attention-based dual-path U-Net segmentation device for lung CT vessels, the segmentation device comprising:
[0126] The image acquisition unit is used to acquire the image to be segmented;
[0127] Image processing unit, used for labeling and preprocessing images;
[0128] Network building blocks, used to build DS-ResUNet networks;
[0129] Network training unit, used to train the DS-ResUNet network;
[0130] An image segmentation unit is used to segment the image to be segmented.
Claims
1. A lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention, characterized in that, The segmentation method includes: Acquire CT images to be segmented; The CT image is labeled and preprocessed to obtain the labeling results and the maximum connected region of the CT image; Construct the DS-ResUNet network; Training the DS-ResUNet network: Input the preprocessed image into the DS-ResUNet network to obtain the output result. Use the loss function to calculate the error between the output result and the label result. Combine the error with the deep supervision training strategy to update the parameters in the DS-ResUNet network. Save the optimal DS-ResUNet network model to complete the training of the DS-ResUNet network. The CT image is input into the trained DS-ResUNet network, and a predicted image is output. The predicted image is the lung CT vessel dual-path U-Net segmentation result. The DS-ResUNet network includes an encoder, a decoder, and a bridge; the encoder has a network depth of four layers, and the decoder has a network depth of four layers. In the encoder path, the data is downsampled by convolution with a stride of 2 through each layer to extract high-level semantic features of the image; the input image size of each layer block is half the size of the previous layer block, and the number of channels is twice that of the previous layer block; the first layer of the encoder has 16 convolutional kernels, the second layer has 32 convolutional kernels, the third layer has 64 convolutional kernels, and the fourth layer has 128 convolutional kernels. In the decoder path, the decoder and encoder structures are symmetrical. The size of each layer of the image in the decoder and the number of convolution kernels correspond to those in the encoder. High-level semantic features are mapped to the original size through a deconvolution operation with a stride of 2. In the encoder, each layer consists of three convolutional blocks, one residual block, and a feature fusion module. The residual block performs three consecutive convolutions on the feature map input to the layer and superimposes the result with the original feature map. The residual unit extracts the vascular detail texture features from the 2mm volume data. CT image data contains 2mm and 5mm volume data. The 2mm volume data has clear and fine structures, while the 5mm volume data is sub-thin slice CT scan data. The feature fusion module concatenates the features of the 5mm data with the features of the 2mm data after passing through the residual unit, and uses them together as the result of feature fusion; the structural blocks in the 5mm path are connected by a convolutional layer with a kernel size of 3×3×3 and a stride of 2; PReLU is used as the activation function after each convolution operation; DS-ResUNet employs a spatial attention mechanism when making skip connections to low-level features to enhance the weight of vascular location factors.
2. The lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention according to claim 1, characterized in that, The preprocessing includes: The voxel values of the CT images are truncated within the range of [-950, +350]. The voxel values are linearized and normalized to the range [0, 1]. Enhance the contrast between blood vessels and other background images; Extract the largest connected region from the CT image; Using data augmentation, 32 consecutive slices were randomly selected from the CT image sequence.
3. The lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention according to claim 2, characterized in that, The enhancement of the contrast between the blood vessels and other background images is achieved through grayscale linear transformation.
4. The lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention according to claim 1, characterized in that, The loss function is the Dice loss function.
5. The lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention according to claim 1, characterized in that, The parameters in the DS-ResUNet network are updated using the gradient backpropagation method and the Adam optimization algorithm.
6. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes a lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that executes a lung CT vessel dual-path U-Net segmentation method based on lightweight 3D attention as described in any one of claims 1-5.
8. A lightweight 3D attention-based dual-path U-Net segmentation device for lung CT vessels, characterized in that, The segmentation device includes: Image acquisition unit, used to acquire CT images to be segmented; An image processing unit is used to label and preprocess the CT image to obtain the labeling result and the maximum connected region of the CT image. Network building blocks, used to build DS-ResUNet networks; The network training unit is used to input the preprocessed image into the DS-ResUNet network, obtain the output result, calculate the error between the output result and the labeling result using the loss function, and combine the error with the deep supervision training strategy to update the parameters in the DS-ResUNet network, save the optimal DS-ResUNet network model, and complete the training of the DS-ResUNet network. The image segmentation unit is used to input the CT image into the trained DS-ResUNet network and output a predicted image, which is the lung CT vessel dual-path U-Net segmentation result; The DS-ResUNet network includes an encoder, a decoder, and a bridge; the encoder has a network depth of four layers, and the decoder has a network depth of four layers. In the encoder path, the data is downsampled by convolution with a stride of 2 through each layer to extract high-level semantic features of the image; the input image size of each layer block is half the size of the previous layer block, and the number of channels is twice that of the previous layer block; the first layer of the encoder has 16 convolutional kernels, the second layer has 32 convolutional kernels, the third layer has 64 convolutional kernels, and the fourth layer has 128 convolutional kernels. In the decoder path, the decoder and encoder structures are symmetrical. The size of each layer of the image in the decoder and the number of convolution kernels correspond to those in the encoder. High-level semantic features are mapped to the original size through a deconvolution operation with a stride of 2. In the encoder, each layer consists of three convolutional blocks, one residual block, and a feature fusion module. The residual block performs three consecutive convolutions on the feature map input to the layer and superimposes the result with the original feature map. The residual unit extracts the vascular detail texture features from the 2mm volume data. CT image data contains 2mm and 5mm volume data. The 2mm volume data has clear and fine structures, while the 5mm volume data is sub-thin slice CT scan data. The feature fusion module concatenates the features of the 5mm data with the features of the 2mm data after passing through the residual unit, and uses them together as the result of feature fusion; the structural blocks in the 5mm path are connected by a convolutional layer with a kernel size of 3×3×3 and a stride of 2; PReLU is used as the activation function after each convolution operation; DS-ResUNet employs a spatial attention mechanism when making skip connections to low-level features to enhance the weight of vascular location factors.