A lung blood vessel CT image segmentation method and system based on semi-supervised learning, a terminal and a storage medium
By constructing a deep image segmentation model with a U-shaped network architecture and a semi-supervised training framework, the problems of pseudo-label noise interference and boundary blurring in blood vessel segmentation are solved, achieving high-precision segmentation of pulmonary vascular CT images, especially significantly improving the recognition and segmentation effect on small branches.
Patent Information
- Application Number
- CN202610188178.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-05
- Estimated Expiration
- 2046-02-10
AI Technical Summary
Existing technologies for blood vessel segmentation suffer from problems such as pseudo-label noise interference, ambiguous boundary judgment, missed segmentation of distal branches, and poor cross-domain generalization ability. Furthermore, existing loss functions ignore the topological structure of blood vessels, leading to incorrect segmentation results.
A deep image segmentation model based on a U-shaped network architecture is constructed. An improved encoder, skip connection layer and decoder are adopted. Combined with a semi-supervised training framework and a multi-dimensional composite loss function, pseudo-labels are generated by the teacher model and feature fusion training is performed. The improved encoder and decoder are used for cascaded downsampling and upsampling to achieve enhancement and segmentation of blood vessel features.
It significantly improves the segmentation accuracy of pulmonary vascular CT images, especially in the identification and segmentation of distal small branches, reduces noise interference, and improves the model's cross-domain adaptability and the accuracy of segmentation results.
Smart Images

Figure CN121685538B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, system, terminal, and computer-readable storage medium for pulmonary vascular CT image segmentation based on semi-supervised learning. Background Technology
[0002] Vascular segmentation is a fundamental and core issue in the field of medical image analysis. Precise vascular segmentation can help doctors quantify the degree of pulmonary artery stenosis, the location and extent of embolism, and develop a precise surgical path for percutaneous pulmonary balloon angioplasty (BPA), shorten the target vessel locating time, reduce the amount of contrast agent used and the risk of patient radiation exposure, and significantly improve surgical safety and long-term prognosis.
[0003] However, existing technologies have many shortcomings in blood vessel segmentation. For example, the quality of pseudo-label generation is inconsistent and prone to noise interference; the model's ability to capture the features of fine branches of blood vessels is insufficient, often resulting in blurred boundary judgments and missed segmentation of distal branches; and its cross-domain generalization ability is poor, with poor adaptability to different blood vessel datasets. In addition, some existing enhancement modules have insufficient adaptability, such as high module computational cost and limited gain for local tubular structures of lung blood vessels; linear attention modules are prone to losing weak features of fine blood vessels; and time series feature extraction modules are mismatched with the segmentation requirements of lung blood vessel spatial structure, failing to address the core pain points. Existing loss functions mostly rely on Dice loss or cross-entropy loss, focusing only on region overlap and ignoring the constraints of blood vessel topology, leading to topological errors in the segmentation results.
[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0005] The main objective of this invention is to provide a method, system, terminal, and storage medium for lung vascular CT image segmentation based on semi-supervised learning. This invention aims to solve the problems in the prior art where existing pseudo-labels are prone to noise interference, and the image processing suffers from blurred boundary judgment and missed segmentation of distal branches, resulting in insufficient segmentation accuracy of lung vascular CT images.
[0006] To achieve the above objectives, the present invention provides a lung vascular CT image segmentation method based on semi-supervised learning, which includes the following steps:
[0007] A deep image segmentation model based on a U-shaped network architecture is constructed, which includes an improved encoder, an improved skip connection layer, and a decoder.
[0008] Based on a semi-supervised training framework, a multi-dimensional composite loss function is used to train the deep image segmentation model to obtain the target image segmentation model.
[0009] A CT image of the lung vessels to be processed is acquired. The CT image of the lung vessels is input into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement to obtain an enhanced feature map of each level. The enhanced feature map of each level is then residually superimposed with the upsampled feature map of the corresponding level of the decoder through the improved skip connection layer until the decoder completes upsampling and outputs the segmentation result of the CT image of the lung vessels.
[0010] Optionally, the semi-supervised learning-based pulmonary vascular CT image segmentation method, wherein the semi-supervised training framework, which uses a multi-dimensional composite loss function to train the depth image segmentation model to obtain the target image segmentation model, further includes:
[0011] Obtain raw medical image scan data and corresponding raw label data stored in NIFTI format. The raw label data includes three types of annotations: background, arteries, and veins.
[0012] The original label data is transformed into two categories: background and blood vessel labels, to obtain the transformed image scan data.
[0013] The converted image scanning data is preprocessed with voxel intensity. The voxel intensity values of the converted image scanning data are cropped to a preset range and normalized based on the mean and variance of the non-zero voxel intensities in the scan to obtain the voxel-processed scanning data.
[0014] The voxel-processed scan data is spatially standardized to obtain standardized data, and the standardized data is resampled according to the target spacing to obtain labeled and unlabeled data for semi-supervised training.
[0015] Optionally, the lung vascular CT image segmentation method based on semi-supervised learning, wherein the semi-supervised training framework includes a teacher model and a student model with identical structures and asynchronously updated parameters, and the training includes a pre-training phase and a self-training phase;
[0016] The semi-supervised training framework employs a multi-dimensional composite loss function to train the deep image segmentation model, resulting in a target image segmentation model, specifically including:
[0017] During the pre-training phase, the student model is trained using labeled data, and the parameters of the teacher model are initialized using an exponential moving average mechanism.
[0018] During the self-training phase, for unlabeled data, pseudo-labeled data with topological constraints is generated through the teacher model, and the labeled data and the pseudo-labeled data are constructed into a hybrid sample pair through a feature fusion strategy.
[0019] Based on the mixed sample pairs, the student model is trained and its parameters are updated using a multi-dimensional composite loss function, and based on the updated student model, the parameters of the teacher model are updated using an exponential moving average mechanism.
[0020] The multi-dimensional composite loss function includes: supervised loss calculated based on mixed samples and real labels, unsupervised loss calculated based on student model output and pseudo labels, and topological consistency loss calculated based on vascular skeleton similarity.
[0021] Once the updated student model reaches the preset stop training condition, the updated student model is used as the trained target image segmentation model and output.
[0022] Optionally, in the semi-supervised learning-based pulmonary vascular CT image segmentation method, both the supervised loss and the unsupervised loss are obtained through a composite loss function. calculate:
[0023] ;
[0024] in, Represents cross-entropy loss, This represents the Dice similarity coefficient loss. This represents the topological constraint loss based on the similarity of the vascular center skeleton. The lambda_topo parameter represents the weight coefficients in the topological constraint loss.
[0025] Optionally, in the semi-supervised learning-based lung vascular CT image segmentation method, the real label in the supervised loss calculation is the real vascular label of the labeled data, and the real label in the unsupervised loss calculation is the pseudo label generated by the teacher model.
[0026] The topological consistency loss is obtained by calculating the similarity between two vascular skeletons predicted by the student model after different enhancements to the same unlabeled data.
[0027] Optionally, the lung vascular CT image segmentation method based on semi-supervised learning, wherein the step of inputting the lung vascular CT image into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement to obtain enhanced feature maps at each level specifically includes:
[0028] The CT image of the lung vessels is input into the improved encoder of the target image segmentation model, and then passed through five cascaded downsampling stages in sequence.
[0029] In the first four downsampling stages, each stage is processed sequentially through a residual convolutional block and a blood vessel feature enhancement module, while the fifth downsampling stage is processed sequentially through a residual convolutional block and a multi-scale temporal convolutional 3D module.
[0030] After each downsampling stage is completed, the enhanced feature map of the current stage is output. After all five downsampling stages are completed, the deepest feature map obtained is enhanced and purified by the backbone enhancement module to obtain the bottom enhanced feature map.
[0031] The bottom enhanced feature map and the enhanced feature maps output from the first four downsampling stages are respectively transmitted to the improved skip connection layer.
[0032] Optionally, the lung vascular CT image segmentation method based on semi-supervised learning, wherein the improved skip connection layer performs residual superposition of the enhanced feature map of each level with the upsampled feature map of the corresponding level of the decoder until the decoder completes upsampling and outputs the segmentation result of the lung vascular CT image, specifically includes:
[0033] The bottom enhancement feature map is input into the decoder and processed through five cascaded upsampling stages, wherein each upsampling stage includes a transposed convolutional upsampling unit and a residual convolutional block in sequence.
[0034] In the first upsampling stage, the bottom enhancement feature map is upsampled by the transposed convolutional upsampling unit to obtain an upsampled feature map. The upsampled feature map is then residually superimposed with the enhancement feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a fused feature map. The fused feature map is then processed by the residual convolutional block to obtain an output feature map.
[0035] In the remaining four upsampling stages, the output feature map of the previous upsampling stage is upsampled by the transposed convolutional upsampling unit to obtain a new upsampled feature map. The new upsampled feature map is then residually superimposed with the enhanced feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a new fused feature map. The new fused feature map is then processed by the residual convolutional block to obtain the output feature map of the current upsampling stage.
[0036] The output feature map of the last upsampling stage is used as the final feature map. The final feature map is then passed through a 1×1 convolutional layer to adjust the number of channels, resulting in the final segmentation result.
[0037] Furthermore, to achieve the above objectives, the present invention also provides a pulmonary vascular CT image segmentation system based on semi-supervised learning, wherein the pulmonary vascular CT image segmentation system based on semi-supervised learning includes:
[0038] The model building module is used to build a deep image segmentation model based on a U-shaped network architecture. The deep image segmentation model includes an improved encoder, an improved skip connection layer, and a decoder.
[0039] The semi-supervised training module is used to train the deep image segmentation model based on the semi-supervised training framework and using a multi-dimensional composite loss function to obtain the target image segmentation model.
[0040] The model application module is used to acquire the CT image of the lung vessels to be processed, input the CT image of the lung vessels into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement, to obtain the enhanced feature map of each level, and through the improved skip connection layer, the enhanced feature map of each level is residually superimposed with the upsampled feature map of the corresponding level of the decoder until the decoder completes upsampling, and outputs the segmentation result of the CT image of the lung vessels.
[0041] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a lung vascular CT image segmentation program based on semi-supervised learning stored in the memory and executable on the processor, wherein when the lung vascular CT image segmentation program based on semi-supervised learning is executed by the processor, it implements the steps of the lung vascular CT image segmentation method based on semi-supervised learning as described above.
[0042] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a lung vascular CT image segmentation program based on semi-supervised learning, and the lung vascular CT image segmentation program based on semi-supervised learning, when executed by a processor, implements the steps of the lung vascular CT image segmentation method based on semi-supervised learning as described above.
[0043] In this invention, a deep image segmentation model based on a U-shaped network architecture is constructed. The deep image segmentation model includes an improved encoder, an improved skip connection layer, and a decoder.
[0044] The improved encoder comprises five cascaded downsampling stages. The bottom layer of the improved encoder includes a backbone enhancement module, while the remaining four downsampling stages each include a vascular feature enhancement module. The feature map output from each stage of the improved encoder is enhanced by the vascular feature enhancement module, and then residuals are superimposed between the feature map of the corresponding stage of the decoder based on the improved skip connection layer. A semi-supervised training framework is used to train the deep image segmentation model using a multi-dimensional composite loss function to obtain the target image segmentation model. A CT image of the lung vessels to be processed is acquired and input into the target image segmentation model for segmentation, outputting the segmentation result of the lung vessel CT image. This invention effectively improves the model's segmentation performance for lung vessel images, especially significantly improving the recognition and segmentation accuracy of distal, small branches. Attached Figure Description
[0045] Figure 1 This is a flowchart of a preferred embodiment of the lung vascular CT image segmentation method based on semi-supervised learning of the present invention;
[0046] Figure 2 This is an overall architecture diagram of the depth image segmentation model in the semi-supervised learning-based lung vascular CT image segmentation method of the present invention;
[0047] Figure 3 This is an architecture diagram of the trunk enhancement module in the lung vessel CT image segmentation method based on semi-supervised learning of the present invention;
[0048] Figure 4 This is an architecture diagram of the vascular feature enhancement module in the lung vascular CT image segmentation method based on semi-supervised learning of the present invention;
[0049] Figure 5 This is a structural diagram of a preferred embodiment of the lung vascular CT image segmentation system based on semi-supervised learning of the present invention;
[0050] Figure 6 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation
[0051] This application provides a method, system, and terminal for lung vessel CT image segmentation based on semi-supervised learning. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0053] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0054] The preferred embodiment of the pulmonary vascular CT image segmentation method based on semi-supervised learning described in this invention, such as... Figure 1 As shown, the lung vascular CT image segmentation method based on semi-supervised learning includes the following steps:
[0055] Step S10: Construct a deep image segmentation model based on a U-shaped network architecture, wherein the deep image segmentation model includes an improved encoder, an improved skip connection layer, and a decoder.
[0056] The improved encoder's processing includes five cascaded downsampling stages. The bottom downsampling stage of the improved encoder is equipped with a backbone enhancement module, and the remaining first four downsampling stages are equipped with vascular feature enhancement modules. The feature maps output from the first four downsampling stages of the improved encoder are enhanced by the vascular feature enhancement modules, and then residual superposition is performed between the feature maps of the corresponding level of the decoder and the improved skip connection layer.
[0057] like Figure 2As shown, this invention designs a dedicated 3D lung vessel segmentation model, VFE-UNet (Vessel Feature Enhancement Module UNet), which is a deep image segmentation model. Its core innovation lies in adding a backbone enhancement module at the bottom layer of the encoder to perform preliminary enhancement and purification of basic features, providing high-quality input for subsequent feature processing. Simultaneously, a vascular feature enhancement module (VFE) is embedded in the encoder downsampling stage, and the feature fusion mechanism of skip connections is optimized. The VFE module, through multi-scale dilated convolution and channel refinement, accurately focuses on the axial extension characteristics and multi-scale distribution features of blood vessels, effectively enhancing the extraction efficiency of key features such as small branches and blurred boundaries, solving the pain point of insufficient capture ability of traditional models for thin tubular blood vessels. Skip connections adopt a "cross-layer feature residual superposition" mechanism. After the encoder output features are initialized by backbone enhancement, refined and filtered by VFE, they are directly added to the upsampled features, suppressing background noise interference and ensuring the continuity of weak feature cross-layer transmission, avoiding the feature redundancy problem caused by traditional splicing fusion. This model architecture retains both the global semantic information of deep networks and the local details of shallow networks, significantly improving the ability to identify complex branches and fine structures of 3D pulmonary vessels, reducing the phenomenon of missing segments of distal vessels, and making the segmentation results more consistent with clinical anatomical structures.
[0058] It should be noted that the deep image segmentation model has strong scalability and can be improved by selecting other modules with multimodal feature fusion capabilities. For example, the VSS module of SAM or DeepLab (both image segmentation models) can be improved to replace the VFE module, or other lightweight backbone enhancement structures can be used to replace the existing cascaded structure. This flexibility allows developers to choose the most suitable module combination according to specific needs and technological advancements to adapt to specific tasks and data, thereby improving segmentation results. Furthermore, this invention is not only applicable to lung vessel segmentation but can also be extended to other fields, such as abdominal multi-organ segmentation. It can be applied to other 3D multimodal medical images.
[0059] Specifically, the depth image segmentation model includes an input layer, an improved encoder, an improved skip connection layer, and a decoder.
[0060] The input layer uses basic residual convolutional blocks as core feature initialization units. For single-channel medical image data (default input channel count is 1), a dual feature processing path is constructed: the convolutional path completes feature extraction through a single round of 3D convolution, and expands the input channel dimension to 16 channels by combining a configurable normalization strategy and the ReLU activation function; the residual connection path simultaneously completes channel dimension matching through 1×1 convolution, and finally accumulates and activates the two output features. This design achieves channel dimension expansion while preserving the anatomical structure information of the original image through residual connections, avoiding the loss of fine blood vessel information during deep network training, and providing pure and complete initial features for subsequent vascular feature enhancement.
[0061] The improved encoder consists of five cascaded downsampling stages. The bottom layer uses a backbone enhancement module, employing a concatenated structure of Conv3d, BatchNorm3d, and ReLU to initially enhance and refine the input features, laying a high-quality foundation for subsequent feature extraction. The input image is progressively scaled layer by layer using downsampling convolutional blocks, gradually reducing the initial 112×112×80 feature map to 7×7×5, and expanding the number of channels from 16 to 256. The first four stages employ a combined architecture of "residual convolutional block + vascular feature enhancement module (VFE)": the residual convolutional block is responsible for extracting and enhancing basic semantic features, while the VFE module includes three stages of processing logic: spatiotemporal continuity branching, multi-scale dilated convolution, and channel refinement, specifically focusing on the axial extension characteristics and multi-scale distribution features of blood vessels. The fifth stage, after processing with the residual convolutional block, additionally overlays a multi-scale temporal convolution 3D module (MSTC), using a multi-dilation rate convolutional kernel design to enhance the global spatiotemporal correlation of the deepest features, addressing the problem of weakened features of small blood vessels at large scales. Additionally, a dropout layer can be configured in the encoder to further enhance the model's generalization ability.
[0062] like Figure 3 As shown, the vascular feature enhancement module further employs a parallel multi-branch structure for multi-scale vascular feature extraction and adaptive fusion. The specific processing procedure is as follows:
[0063] 1. Multi-scale dilated convolution feature extraction: Six parallel branches are set up, each using a 3D convolution kernel with a dilation rate of 1 to 5, and a standard convolution branch (dilation=1) to perform convolution operations on the input feature map. Each branch sequentially performs: 3×3 3D dilated convolution, batch normalization, ReLU activation function, global average pooling, and 1×1 3D convolution to obtain vascular feature maps under different receptive fields.
[0064] 2. Feature stitching and dimensionality reduction: The feature maps output from the six branches are stitched together along the channel dimension to form multi-scale fused features.
[0065] 3. Channel attention weight generation: The dimensions of the concatenated features are adjusted, and global information at the channel level is obtained through global average pooling. Then, through one-dimensional convolution and non-linear transformation (Sigmoid function), adaptive attention weights for each channel are generated.
[0066] 4. Feature reweighting and output: The generated attention weights are multiplied with the original multi-scale fusion features channel by channel to complete channel refinement, and finally the enhanced vascular feature map is output.
[0067] The above process covers the changes in blood vessel thickness through multi-scale dilated convolution and adaptively enhances key channel features through an attention mechanism, specifically optimizing the slender morphology and multi-scale distribution characteristics of pulmonary blood vessels.
[0068] like Figure 4 As shown, the core innovation of the deep image segmentation model lies in the addition of a backbone enhancement module at the bottom of the encoder. This backbone enhancement module is a lightweight feature enhancement network that processes sequentially, consisting of two identical processing units connected in series. Each unit sequentially includes: a 3D convolutional layer (using a small 3×3×3 convolutional kernel to extract local spatial features), a 3D batch normalization layer (standardizing the feature map output by the convolution to accelerate training convergence and improve model stability), and a ReLU activation function (introducing a nonlinear transformation to enhance the model's expressive power).
[0069] The data processing procedure of the deep image segmentation model is as follows: First, it receives the feature map output from the fifth (and last) downsampling stage of the encoder. This feature map represents the deepest and most abstract semantic features extracted by the network, but it may contain redundant information or noise. Next, the feature map undergoes preliminary feature transformation and filtering through the first "convolution-normalization-activation" unit. Then, the result of the feature transformation and filtering is passed through a second identical unit for secondary refinement and enhancement. Finally, a deep basic feature map with the same size as the input (smallest spatial size, most channels) but enhanced and purified is output. This output feature map has higher quality and focuses on the essential structural information of blood vessels. It can be seen that the backbone enhancement module, through simple two-stage cascaded convolutional units, achieves the enhancement and purification of deep features, providing high-quality basic features for the entire segmentation network.
[0070] Furthermore, the improved skip connection layer adopts a "cross-layer feature residual superposition" mechanism to replace the traditional splicing fusion method. The feature map output by each level of the encoder is directly accumulated and fused with the corresponding upsampled features during the decoding stage. Before fusion, the encoder output features are first refined by the VFE module, and the core information related to blood vessels is filtered out by the ECA (Efficient Channel Attention) attention mechanism, effectively suppressing background noise interference. The residual superposition structure ensures the continuity of feature flow and significantly improves the retention efficiency of weak features such as blood vessel branches and small blood vessels in the cross-layer transmission process.
[0071] Furthermore, the decoder consists of five cascaded upsampling stages, each employing a symmetrical architecture of "transposed convolutional upsampling + residual convolutional blocks": the upsampling module restores the feature map size layer by layer through transposed 3D convolution operations, while the residual convolutional blocks maintain structural consistency with the corresponding modules in the encoder, ensuring the symmetry and compatibility of feature processing. During decoding, the output of each upsampling stage is first residually superimposed with the refined features of the corresponding stage in the encoder, then optimized by the residual convolutional blocks before being passed to the next stage; finally, a 1×1 convolution restores the 256-channel feature map to the target number of channels, restoring the output feature map size to 112×112×80, perfectly matching the spatial dimensions of the input image and segmentation labels, achieving end-to-end blood vessel segmentation results. Dropout layers can also be configured in the decoder to further reduce the risk of overfitting.
[0072] Step S20: Based on the semi-supervised training framework, the deep image segmentation model is trained using a multi-dimensional composite loss function to obtain the target image segmentation model.
[0073] The semi-supervised training framework employs a multi-dimensional composite loss function to train the deep image segmentation model, resulting in the target image segmentation model. Prior to this, the training also includes:
[0074] Obtain raw medical image scan data and corresponding raw label data stored in NIFTI format. The raw label data includes three types of annotations: background, arteries, and veins.
[0075] The original label data is transformed into two categories: background and blood vessel labels, to obtain the transformed image scan data.
[0076] The converted image scanning data is preprocessed with voxel intensity. The voxel intensity values of the converted image scanning data are cropped to a preset range and normalized based on the mean and variance of the non-zero voxel intensities in the scan to obtain the voxel-processed scanning data.
[0077] The voxel-processed scan data is spatially standardized to obtain standardized data, and the standardized data is resampled according to the target spacing to obtain labeled and unlabeled data for semi-supervised training.
[0078] Understandably, preprocessing of the training data is necessary before training the model. This embodiment uses the HiPaS dataset for experiments. Images in this dataset contain three labels: 0, 1, and 2. Label 0 represents background, label 1 represents artery, and label 2 represents vein. The raw data is stored in NIFTI format and converted to HDF5 format after preprocessing. The data preprocessing stage includes the following six steps:
[0079] Label conversion: Since the experiment focuses on the overall vascular structure segmentation rather than arteriovenous subdivision, the original three-class composite labels are uniformly converted into two-class labels, namely label 0 for background and label 1 for vessel. They are stored together as an h5 file, which simplifies the complexity of the task and facilitates the quantitative evaluation of subsequent segmentation results.
[0080] Voxel intensity cropping and normalization: The voxel intensity of each image is cropped to between the 5th and 95th percentiles to effectively filter out outliers and noise interference; then the mean and variance of non-zero voxel intensity are calculated, and the voxel intensity is normalized to the range of [0, 1] by using (voxel intensity value – mean of non-zero voxel intensity value) / variance of non-zero voxel intensity value, which facilitates subsequent image processing and model input.
[0081] Spatial standardization: To address the issue of inconsistent dataset size and spacing, all data was cropped to a uniform size of 112×112×80. If the original data size was smaller than the target size, zero padding was applied first. Simultaneously, the spatial spacing was adjusted proportionally. Image information was resampled using linear interpolation, and label information was resampled using nearest-neighbor interpolation to ensure the integrity of the vascular spatial topology. The processed data was loaded into a dataset class and read from a text file used to store training data.
[0082] Data augmentation: To further improve the generalization of the present invention and avoid overfitting, the training data images are rotated, flipped, offset, and Gaussian noise is added. In semi-supervised training, labeled data and unlabeled data are mixed by masking to expand the diversity of samples. Through this series of operations, new training images will be generated.
[0083] Storage Format Conversion: ToTensor() is a core data preprocessing transformation function provided by the torchvision.transforms module in PyTorch (an open-source deep learning framework). It is primarily used to convert image data (such as PIL Image or numpy.ndarray) into PyTorch tensors. ToTensor() reshapes image data into a (1, D, H, W) channel format, converting it to a PyTorch tensor, while label data is simultaneously converted to a long type tensor. During training, balanced sampling of labeled and unlabeled data is used, and batch loading is implemented through DataLoader (a core tool in PyTorch for efficient data loading and processing). A random seed is set to ensure enhanced randomness and improve training throughput.
[0084] Post-label processing: In the self-training stage, pseudo-labels are generated by predicting unlabeled data using the EMA model and generating pseudo-labels using the corresponding function; in the model inference and pseudo-label generation stages, the maximum connected region is extracted by using the correlation function to retain the maximum connected region, remove small noise regions, and optimize the accuracy of the segmentation results.
[0085] As can be seen, this invention designs a complete preprocessing scheme adapted to 3D pulmonary vascular CT (Computed Tomography) images. Through six major steps—label conversion, voxel intensity cropping and normalization, spatial standardization, data augmentation, format conversion, and label post-processing—it provides high-quality input data for model training. Label conversion simplifies the three-class annotation to two classes, reducing task complexity; voxel intensity processing filters outliers and noise, improving image contrast; spatial standardization unifies data size and spacing, ensuring the integrity of vascular topology; data augmentation expands sample diversity through operations such as rotation and flipping, reducing overfitting; and label post-processing removes pseudo-label noise through maximum connected component extraction. This preprocessing workflow accurately solves problems such as strong heterogeneity, high noise interference, and inconsistent annotation formats in medical image data, laying a solid foundation for subsequent model training and inference. It further amplifies the technical advantages of the model architecture, loss function, and training framework, ensuring the reliability and clinical applicability of the segmentation results.
[0086] Furthermore, this invention employs a BCP semi-supervised learning strategy, using a hybrid approach of supervised and unsupervised datasets to train the model. This reduces the model's dependence on supervised datasets and further improves its ability and accuracy in blood vessel segmentation. It is understood that the semi-supervised training framework is based on bidirectional copy-paste, comprising a teacher model and a student model with identical structures and asynchronously updated parameters. The training includes a pre-training phase and a self-training phase.
[0087] In this embodiment, to address the pain point of scarce 3D lung vessel annotation data, this invention employs a BCP (Bidirecional Copy Paste) semi-supervised training framework. This framework maximizes the utilization of both labeled and unlabeled data through dual-model collaborative training and hierarchical data fusion strategies. The framework consists of two phases: pre-training and self-training. In the pre-training phase, only labeled data is used to train the student model, while the teacher model parameters are initialized and updated simultaneously via an EMA mechanism. In the self-training phase, labeled and unlabeled data are mixed. The teacher model generates high-quality pseudo-labels with topological constraints, and a feature fusion strategy is used to construct mixed sample pairs and mixed labels. The loss function includes supervised loss, unsupervised loss, and topological consistency loss, achieving joint learning of supervised information and unsupervised topological features. This framework effectively alleviates the problem of limited model generalization ability caused by insufficient labeled data, enabling the model to accurately learn vascular features even in small-sample scenarios. It significantly improves cross-domain adaptability and segmentation performance stability. Compared to traditional deep learning methods that rely on large-scale labeled data, it achieves improved segmentation accuracy while reducing annotation costs.
[0088] Furthermore, the method of training the deep image segmentation model using a multi-dimensional composite loss function based on a semi-supervised training framework to obtain the target image segmentation model specifically includes:
[0089] During the pre-training phase, the student model is trained using labeled data, and the parameters of the teacher model are initialized using an exponential moving average mechanism.
[0090] During the self-training phase, for unlabeled data, pseudo-labeled data with topological constraints is generated through the teacher model, and the labeled data and the pseudo-labeled data are constructed into a hybrid sample pair through a feature fusion strategy.
[0091] Based on the mixed sample pairs, the student model is trained and its parameters are updated using a multi-dimensional composite loss function, and based on the updated student model, the parameters of the teacher model are updated using an exponential moving average mechanism.
[0092] The multi-dimensional composite loss function includes: supervised loss calculated based on mixed samples and real labels, unsupervised loss calculated based on student model output and pseudo labels, and topological consistency loss calculated based on vascular skeleton similarity.
[0093] Once the updated student model reaches the preset stop training condition, the updated student model is used as the trained target image segmentation model and output.
[0094] Furthermore, both the supervised loss and the unsupervised loss are processed through a composite loss function. calculate:
[0095] ;
[0096] in, Represents cross-entropy loss, This represents the Dice similarity coefficient loss. This represents the topological constraint loss based on the similarity of the vascular center skeleton. The lambda_topo parameter represents the weight coefficients in the topological constraint loss.
[0097] Furthermore, the calculation process for the Dice similarity coefficient loss and the topological constraint loss is as follows:
[0098] ;
[0099] ;
[0100] in, Represents the ordinal number of the pixel. This indicates the smoothing term (default value is 1e-6). This represents the intersection of the predicted result and the true label. This represents the total number of blood vessel pixels in the actual label. This represents the sum of the total probabilities of blood vessel pixels in the prediction results. This indicates the accuracy of the vascular skeleton prediction, used to measure the coverage of the predicted results to the actual vascular skeleton. Indicates skeleton sensitivity, used to measure the coverage of the true label by the predicted vascular skeleton. , , This indicates a soft skeletonization operation, which extracts the central skeleton of blood vessels from the input labels or prediction results. This represents the skeleton feature map of the real label after it has been soft-skeletonized. This represents the skeleton feature map after the prediction result has been soft-skeletonized.
[0101] It is understood that the true label in the supervised loss calculation is the real blood vessel label of the labeled data, while the true label in the unsupervised loss calculation is the pseudo label generated by the teacher model. The topological consistency loss is obtained by calculating the similarity between two vascular skeletons predicted by the student model after different augmentations of the same unlabeled data.
[0102] Specifically, in order to enable the model to better learn the topological continuity and multi-scale morphological features of pulmonary vessels and improve the model's segmentation accuracy of 3D pulmonary vessels, this embodiment designs and adopts the following during the training process: A weighted combination of the clDice loss and the clDice loss is used as the loss function (where the weights of the clDice loss are controlled by the lambda_topo parameter), and the model parameters are updated via gradient backpropagation. During training, the model with the best Dice evaluation metric is saved on the validation set. The training process uses iterations as the basic loop unit, with a maximum of 5000 pre-training iterations and 15000 self-training iterations. Overfitting is prevented by periodically evaluating model performance on the validation set and saving the optimal model. On a 3090 graphics card with 24GB of VRAM, the batch size is 8, with a labeled data batch size of 4. The optimizer used is SGD (momentum 0.9, weight decay 0.0001), and a piecewise decay strategy is used to dynamically adjust the learning rate (the learning rate decays to 0.1 times its original value every 2500 iterations).
[0103] It should be noted that the loss function used in this invention is proposed based on the specific task characteristics of blood vessel segmentation, and can effectively optimize the model's ability to segment slender structures. Therefore, developers can define the loss function according to the specific task, improve the specific indicators of the loss function, change the weights of different sub-losses of the composite loss according to the importance of the segmentation target, and even set the algorithm to dynamically adjust the weights, which can effectively guide the model to optimize in the correct direction during training. These settings according to the actual situation are all within the protection scope of this invention.
[0104] Step S30: Obtain the CT image of the lung vessels to be processed, input the CT image of the lung vessels into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement, obtain the enhanced feature map of each level, and perform residual superposition of the enhanced feature map of each level with the upsampled feature map of the corresponding level of the decoder through the improved skip connection layer, until the decoder completes upsampling, and outputs the segmentation result of the CT image of the lung vessels.
[0105] Specifically, the target image segmentation model that performed best on the validation set during the training phase is read from the storage medium. The model is loaded into a computing device (such as a GPU), and functions used only for training, such as Dropout and BatchNorm statistic updates, are disabled to ensure the determinism and consistency of the prediction results. The CT images of the lung vessels to be processed (usually preprocessed according to the same procedures as the training data, such as intensity normalization and spatial normalization) are then input into the initialized model. The dimensions of the input data are typically (1, D, H, W), representing a three-dimensional image volume.
[0106] Furthermore, the CT images of the lung vessels are sequentially passed through the model's improved encoder, improved skip connection, and decoder.
[0107] The encoder progressively downsamples to extract multi-scale deep semantic features. Skip connections fuse the features from each stage of the encoder with the corresponding features from the decoder (e.g., residual stacking). The decoder progressively upsamples, ultimately outputting an original segmentation prediction map with the same spatial size as the input image. Each voxel location in this prediction map typically contains a probability value (ranging from 0 to 1), representing the confidence that the location belongs to the blood vessel category.
[0108] Further, the step of inputting the pulmonary vascular CT image into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement to obtain the enhanced feature map of each level specifically includes:
[0109] The CT image of the lung vessels is input into the improved encoder of the target image segmentation model, and then passed through five cascaded downsampling stages in sequence.
[0110] In the first four downsampling stages, each stage is processed sequentially through a residual convolutional block and a blood vessel feature enhancement module, while the fifth downsampling stage is processed sequentially through a residual convolutional block and a multi-scale temporal convolutional 3D module.
[0111] After each downsampling stage is completed, the enhanced feature map of the current stage is output. After all five downsampling stages are completed, the deepest feature map obtained is enhanced and purified by the backbone enhancement module to obtain the bottom enhanced feature map.
[0112] The bottom enhanced feature map and the enhanced feature maps output from the first four downsampling stages are respectively transmitted to the improved skip connection layer.
[0113] Understandably, the core principle of this invention lies in constructing a feature extraction pipeline that combines progressive downsampling with targeted enhancement. It progressively compresses spatial dimensions and expands the number of channels through five downsampling stages to aggregate multi-scale contextual information. Innovatively, a vascular feature enhancement module is introduced in the first four stages, utilizing its multi-scale dilated convolution and channel attention mechanisms to specifically enhance the morphological and textural features of slender vascular branches. After obtaining the deepest abstract semantic features, a secondary purification is performed through the underlying backbone enhancement module to filter out noise and solidify the basic vascular representation. Ultimately, this design achieves multi-level feature output from local details to global semantics, with specific optimization, providing the decoder with a fusion foundation that combines rich details (shallow features) and pure semantics (deep enhanced features).
[0114] Furthermore, the improved skip connection layer performs residual superposition of the enhanced feature map of each level with the upsampled feature map of the corresponding level of the decoder until the decoder completes upsampling, and outputs the segmentation result of the pulmonary vascular CT image, specifically including:
[0115] The bottom enhancement feature map is input into the decoder and processed through five cascaded upsampling stages, wherein each upsampling stage includes a transposed convolutional upsampling unit and a residual convolutional block in sequence.
[0116] In the first upsampling stage, the bottom enhancement feature map is upsampled by the transposed convolutional upsampling unit to obtain an upsampled feature map. The upsampled feature map is then residually superimposed with the enhancement feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a fused feature map. The fused feature map is then processed by the residual convolutional block to obtain an output feature map.
[0117] In the remaining four upsampling stages, the output feature map of the previous upsampling stage is upsampled by the transposed convolutional upsampling unit to obtain a new upsampled feature map. The new upsampled feature map is then residually superimposed with the enhanced feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a new fused feature map. The new fused feature map is then processed by the residual convolutional block to obtain the output feature map of the current upsampling stage.
[0118] The output feature map of the last upsampling stage is used as the final feature map. The final feature map is then passed through a 1×1 convolutional layer to adjust the number of channels, resulting in the final segmentation result.
[0119] Understandably, this embodiment defines the decoder's workflow, which is based on constructing a symmetrical, progressive upsampling and multi-scale feature fusion path. The spatial dimensions of the feature map are gradually restored through transposed convolutions. Simultaneously, at each scale, the decoder's upsampled features are fused with the same-scale features refined by the VFE module from the corresponding layer of the encoder through a residual stacking mechanism. This design achieves accurate and efficient complementarity between global semantic information (from deep layers) and local detail information (from shallow layers). The final 1×1 convolutional layer acts as a classifier, mapping high-dimensional features to the final segmentation category. This significantly improves the detail restoration capability of the segmentation results, especially the reconstruction of small blood vessel branches and blurred boundaries, effectively solving the problem of missing segments at distant points.
[0120] Furthermore, the final segmentation result (binary mask) can be converted into a standard medical image file format. This format preserves the spatial coordinates, orientation, and scale information of the original image, ensuring that the segmentation result can be accurately aligned and visualized with the original CT image in clinical software for direct use by doctors.
[0121] Furthermore, such as Figure 5 As shown, based on the above-mentioned semi-supervised learning-based pulmonary vascular CT image segmentation method, the present invention also provides a semi-supervised learning-based pulmonary vascular CT image segmentation system, wherein the semi-supervised learning-based pulmonary vascular CT image segmentation system includes:
[0122] The model building module 51 is used to build a deep image segmentation model based on a U-shaped network architecture. The deep image segmentation model includes an improved encoder, an improved skip connection layer, and a decoder.
[0123] The semi-supervised training module 52 is used to train the deep image segmentation model based on the semi-supervised training framework and using a multi-dimensional composite loss function to obtain the target image segmentation model.
[0124] The model application module 53 is used to acquire the CT image of the lung vessels to be processed, input the CT image of the lung vessels into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement, obtain the enhanced feature map of each level, and perform residual superposition of the enhanced feature map of each level with the upsampled feature map of the corresponding level of the decoder through the improved skip connection layer, until the decoder completes upsampling, and outputs the segmentation result of the CT image of the lung vessels.
[0125] Furthermore, such as Figure 6 As shown, based on the above-mentioned semi-supervised learning-based pulmonary vascular CT image segmentation method and system, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 6 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0126] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a semi-supervised learning-based pulmonary vascular CT image segmentation program 40, which can be executed by the processor 10 to implement the semi-supervised learning-based pulmonary vascular CT image segmentation method of this application.
[0127] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the lung vascular CT image segmentation method based on semi-supervised learning.
[0128] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visualized patient interface. The components of the terminal communicate with each other via a system bus.
[0129] In one embodiment, when the processor 10 executes the semi-supervised learning-based pulmonary vascular CT image segmentation program 40 in the memory 20, the following steps are performed:
[0130] A deep image segmentation model based on a U-shaped network architecture is constructed, which includes an improved encoder, an improved skip connection layer, and a decoder.
[0131] Based on a semi-supervised training framework, a multi-dimensional composite loss function is used to train the deep image segmentation model to obtain the target image segmentation model.
[0132] A CT image of the lung vessels to be processed is acquired. The CT image of the lung vessels is input into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement to obtain an enhanced feature map of each level. The enhanced feature map of each level is then residually superimposed with the upsampled feature map of the corresponding level of the decoder through the improved skip connection layer until the decoder completes upsampling and outputs the segmentation result of the CT image of the lung vessels.
[0133] The process of training the deep image segmentation model using a multi-dimensional composite loss function based on a semi-supervised training framework to obtain the target image segmentation model also includes the following prior steps:
[0134] Obtain raw medical image scan data and corresponding raw label data stored in NIFTI format. The raw label data includes three types of annotations: background, arteries, and veins.
[0135] The original label data is transformed into two categories: background and blood vessel labels, to obtain the transformed image scan data.
[0136] The converted image scanning data is preprocessed with voxel intensity. The voxel intensity values of the converted image scanning data are cropped to a preset range and normalized based on the mean and variance of the non-zero voxel intensities in the scan to obtain the voxel-processed scanning data.
[0137] The voxel-processed scan data is spatially standardized to obtain standardized data, and the standardized data is resampled according to the target spacing to obtain labeled and unlabeled data for semi-supervised training.
[0138] The semi-supervised training framework includes a teacher model and a student model with identical structures and asynchronously updated parameters, and the training includes a pre-training phase and a self-training phase.
[0139] The semi-supervised training framework employs a multi-dimensional composite loss function to train the deep image segmentation model, resulting in a target image segmentation model, specifically including:
[0140] During the pre-training phase, the student model is trained using labeled data, and the parameters of the teacher model are initialized using an exponential moving average mechanism.
[0141] During the self-training phase, for unlabeled data, pseudo-labeled data with topological constraints is generated through the teacher model, and the labeled data and the pseudo-labeled data are constructed into a hybrid sample pair through a feature fusion strategy.
[0142] Based on the mixed sample pairs, the student model is trained and its parameters are updated using a multi-dimensional composite loss function, and based on the updated student model, the parameters of the teacher model are updated using an exponential moving average mechanism.
[0143] The multi-dimensional composite loss function includes: supervised loss calculated based on mixed samples and real labels, unsupervised loss calculated based on student model output and pseudo labels, and topological consistency loss calculated based on vascular skeleton similarity.
[0144] Once the updated student model reaches the preset stop training condition, the updated student model is used as the trained target image segmentation model and output.
[0145] Both the supervised loss and the unsupervised loss are obtained through a composite loss function. calculate:
[0146] ;
[0147] in, Represents cross-entropy loss, This represents the Dice similarity coefficient loss. This represents the topological constraint loss based on the similarity of the vascular center skeleton. The lambda_topo parameter represents the weight coefficients in the topological constraint loss.
[0148] In the calculation of supervised loss, the real label is the real blood vessel label of the labeled data, and in the calculation of unsupervised loss, the real label is the pseudo label generated by the teacher model.
[0149] The topological consistency loss is obtained by calculating the similarity between two vascular skeletons predicted by the student model after different enhancements to the same unlabeled data.
[0150] Specifically, the step of inputting the pulmonary vascular CT image into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement to obtain the enhanced feature map of each level includes:
[0151] The CT image of the lung vessels is input into the improved encoder of the target image segmentation model, and then passed through five cascaded downsampling stages in sequence.
[0152] In the first four downsampling stages, each stage is processed sequentially through a residual convolutional block and a blood vessel feature enhancement module, while the fifth downsampling stage is processed sequentially through a residual convolutional block and a multi-scale temporal convolutional 3D module.
[0153] After each downsampling stage is completed, the enhanced feature map of the current stage is output. After all five downsampling stages are completed, the deepest feature map obtained is enhanced and purified by the backbone enhancement module to obtain the bottom enhanced feature map.
[0154] The bottom enhanced feature map and the enhanced feature maps output from the first four downsampling stages are respectively transmitted to the improved skip connection layer.
[0155] Specifically, the improved skip connection layer performs residual superposition of the enhanced feature map of each level with the upsampled feature map of the corresponding level of the decoder until the decoder completes upsampling, and outputs the segmentation result of the pulmonary vascular CT image, including:
[0156] The bottom enhancement feature map is input into the decoder and processed through five cascaded upsampling stages, wherein each upsampling stage includes a transposed convolutional upsampling unit and a residual convolutional block in sequence.
[0157] In the first upsampling stage, the bottom enhancement feature map is upsampled by the transposed convolutional upsampling unit to obtain an upsampled feature map. The upsampled feature map is then residually superimposed with the enhancement feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a fused feature map. The fused feature map is then processed by the residual convolutional block to obtain an output feature map.
[0158] In the remaining four upsampling stages, the output feature map of the previous upsampling stage is upsampled by the transposed convolutional upsampling unit to obtain a new upsampled feature map. The new upsampled feature map is then residually superimposed with the enhanced feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a new fused feature map. The new fused feature map is then processed by the residual convolutional block to obtain the output feature map of the current upsampling stage.
[0159] The output feature map of the last upsampling stage is used as the final feature map. The final feature map is then passed through a 1×1 convolutional layer to adjust the number of channels, resulting in the final segmentation result.
[0160] In summary, this invention proposes a method, system, terminal, and storage medium for lung vessel CT image segmentation based on semi-supervised learning. The method includes: constructing a deep image segmentation model based on a U-shaped network architecture, comprising an improved encoder, an improved skip connection layer, and a decoder. The improved encoder includes five cascaded downsampling stages. The bottom layer of the improved encoder has a backbone enhancement module, and the remaining four downsampling stages each have a vascular feature enhancement module. The feature map output from each stage of the improved encoder is enhanced by the vascular feature enhancement module, and then residuals are superimposed between the feature maps of the corresponding stages of the decoder based on the improved skip connection layer. Based on a semi-supervised training framework, the deep image segmentation model is trained using a multi-dimensional composite loss function to obtain a target image segmentation model. A lung vessel CT image to be processed is acquired, and the lung vessel CT image is input into the target image segmentation model for segmentation, outputting the segmentation result of the lung vessel CT image. This invention effectively improves the model's segmentation performance for lung vessel images, especially significantly improving the recognition and segmentation accuracy of distal small branches.
[0161] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0162] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0163] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for segmenting pulmonary blood vessels in CT images based on semi-supervised learning, characterized in that, The semi-supervised learning-based pulmonary vascular CT image segmentation method includes: A deep image segmentation model based on a U-shaped network architecture is constructed, which includes an improved encoder, an improved skip connection layer, and a decoder. Based on a semi-supervised training framework, a multi-dimensional composite loss function is used to train the deep image segmentation model to obtain the target image segmentation model. A CT image of the lung vessels to be processed is acquired. The CT image of the lung vessels is input into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement to obtain the enhanced feature map of each level. The enhanced feature map of each level is then residually superimposed with the upsampled feature map of the corresponding level of the decoder through the improved skip connection layer until the decoder completes upsampling and outputs the segmentation result of the CT image of the lung vessels. The improved encoder of the target image segmentation model, which inputs the pulmonary vascular CT image into the target image segmentation model, performs cascaded downsampling and feature enhancement to obtain enhanced feature maps at each level, specifically including: The CT image of the lung vessels is input into the improved encoder of the target image segmentation model, and then passed through five cascaded downsampling stages in sequence. In the first four downsampling stages, each stage is processed sequentially through a residual convolutional block and a blood vessel feature enhancement module, while the fifth downsampling stage is processed sequentially through a residual convolutional block and a multi-scale temporal convolutional 3D module. After each downsampling stage is completed, the enhanced feature map of the current stage is output. After all five downsampling stages are completed, the deepest feature map is enhanced and purified by the backbone enhancement module to obtain the bottom enhanced feature map. The bottom enhanced feature map and the enhanced feature maps output from the first four downsampling stages are respectively transmitted to the improved skip connection layer.
2. The lung vascular CT image segmentation method based on semi-supervised learning according to claim 1, characterized in that, The semi-supervised training framework employs a multi-dimensional composite loss function to train the deep image segmentation model, resulting in the target image segmentation model. Prior to this, the training also includes: Obtain raw medical image scan data and corresponding raw label data stored in NIFTI format. The raw label data includes three types of annotations: background, arteries, and veins. The original label data is transformed into two categories: background and blood vessel labels, to obtain the transformed image scan data. The converted image scanning data is preprocessed with voxel intensity. The voxel intensity values of the converted image scanning data are cropped to a preset range and normalized based on the mean and variance of the non-zero voxel intensities in the scan to obtain the voxel-processed scanning data. The voxel-processed scan data is spatially standardized to obtain standardized data, and the standardized data is resampled according to the target spacing to obtain labeled and unlabeled data for semi-supervised training.
3. The lung vascular CT image segmentation method based on semi-supervised learning according to claim 2, characterized in that, The semi-supervised training framework includes a teacher model and a student model with identical structures and asynchronously updated parameters. The training includes a pre-training phase and a self-training phase. The semi-supervised training framework employs a multi-dimensional composite loss function to train the deep image segmentation model, resulting in a target image segmentation model, specifically including: During the pre-training phase, the student model is trained using labeled data, and the parameters of the teacher model are initialized using an exponential moving average mechanism. During the self-training phase, for unlabeled data, pseudo-labeled data with topological constraints is generated through the teacher model, and the labeled data and the pseudo-labeled data are constructed into a hybrid sample pair through a feature fusion strategy. Based on the mixed sample pairs, the student model is trained and its parameters are updated using a multi-dimensional composite loss function, and based on the updated student model, the parameters of the teacher model are updated using an exponential moving average mechanism. The multi-dimensional composite loss function includes: supervised loss calculated based on mixed samples and real labels, unsupervised loss calculated based on student model output and pseudo labels, and topological consistency loss calculated based on vascular skeleton similarity. Once the updated student model reaches the preset stop training condition, the updated student model is used as the trained target image segmentation model and output.
4. The lung vascular CT image segmentation method based on semi-supervised learning according to claim 3, characterized in that, Both the supervised loss and the unsupervised loss are obtained through a composite loss function. calculate: ; in, Represents cross-entropy loss, This represents the Dice similarity coefficient loss. This represents the topological constraint loss based on the similarity of the vascular center skeleton. The lambda_topo parameter represents the weight coefficients in the topological constraint loss.
5. The lung vascular CT image segmentation method based on semi-supervised learning according to claim 4, characterized in that, The real label in the supervised loss calculation is the real blood vessel label of the labeled data, while the real label in the unsupervised loss calculation is the pseudo label generated by the teacher model. The topological consistency loss is obtained by calculating the similarity between two vascular skeletons predicted by the student model after different enhancements to the same unlabeled data.
6. The lung vascular CT image segmentation method based on semi-supervised learning according to claim 1, characterized in that, The improved skip connection layer performs residual superposition of the enhanced feature map of each level with the upsampled feature map of the corresponding level of the decoder until the decoder completes upsampling, and outputs the segmentation result of the pulmonary vascular CT image, specifically including: The bottom enhancement feature map is input into the decoder and processed through five cascaded upsampling stages, wherein each upsampling stage includes a transposed convolutional upsampling unit and a residual convolutional block in sequence. In the first upsampling stage, the bottom enhancement feature map is upsampled by the transposed convolutional upsampling unit to obtain an upsampled feature map. The upsampled feature map is then residually superimposed with the enhancement feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a fused feature map. The fused feature map is then processed by the residual convolutional block to obtain an output feature map. In the remaining four upsampling stages, the output feature map of the previous upsampling stage is upsampled by the transposed convolutional upsampling unit to obtain a new upsampled feature map. The new upsampled feature map is then residually superimposed with the enhanced feature map of the corresponding level encoder passed through the improved skip connection layer to obtain a new fused feature map. The new fused feature map is then processed by the residual convolutional block to obtain the output feature map of the current upsampling stage. The output feature map of the last upsampling stage is used as the final feature map. The final feature map is then passed through a 1×1 convolutional layer to adjust the number of channels, resulting in the final segmentation result.
7. A pulmonary vascular CT image segmentation system based on semi-supervised learning, characterized in that, The semi-supervised learning-based pulmonary vascular CT image segmentation system is used to implement the semi-supervised learning-based pulmonary vascular CT image segmentation method according to any one of claims 1-6, wherein the semi-supervised learning-based pulmonary vascular CT image segmentation system comprises: The model building module is used to build a deep image segmentation model based on a U-shaped network architecture. The deep image segmentation model includes an improved encoder, an improved skip connection layer, and a decoder. The semi-supervised training module is used to train the deep image segmentation model based on the semi-supervised training framework and using a multi-dimensional composite loss function to obtain the target image segmentation model. The model application module is used to acquire the CT image of the lung vessels to be processed, input the CT image of the lung vessels into the improved encoder of the target image segmentation model for cascaded downsampling and feature enhancement, to obtain the enhanced feature map of each level, and through the improved skip connection layer, the enhanced feature map of each level is residually superimposed with the upsampled feature map of the corresponding level of the decoder until the decoder completes upsampling, and outputs the segmentation result of the CT image of the lung vessels.
8. A terminal, characterized in that, The terminal includes: a memory, a processor, and a pulmonary vascular CT image segmentation program based on semi-supervised learning stored in the memory and executable on the processor. When the pulmonary vascular CT image segmentation program based on semi-supervised learning is executed by the processor, it implements the steps of the pulmonary vascular CT image segmentation method based on semi-supervised learning as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a pulmonary vascular CT image segmentation program based on semi-supervised learning, which, when executed by a processor, implements the steps of the pulmonary vascular CT image segmentation method based on semi-supervised learning as described in any one of claims 1-6.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method based on data enhancement strategy
CN117710681A
Infrared image small target segmentation method based on space channel attention network
CN119418056A