SP-CTA image coronary artery segmentation method and device based on feature alignment domain
Through the feature alignment domain method, the problem of insufficient data annotation and domain distribution differences in coronary artery segmentation in SP-CTA images is solved, more reliable prediction and feature extraction are achieved, and the robustness and segmentation performance of the network are improved.
Patent Information
- Application Number
- CN202210758622.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-06-29
AI Technical Summary
Coronary artery segmentation in SP-CTA images faces the problems of insufficient data annotation, serious artifacts, and differences in domain distribution, which makes it difficult for the network to converge and limits the effectiveness of feature learning.
Adopt a method based on feature alignment domain, through image preprocessing, feature sharing, adversarial loss function and discriminator, scale the image, use domain-specific BN layer and convolutional network, extract domain invariant features, and reduce through adversarial learning Small domain distribution differences.
It improves the prediction reliability of unlabeled target domain data, reduces domain distribution differences, and enhances the network's robustness and feature learning effect.
Smart Images

Figure CN115063384B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to a SP-CTA image coronary artery segmentation method based on a feature alignment domain, and a SP-CTA image coronary artery segmentation device based on a feature alignment domain. Background Art
[0002] CT examination is widely used in clinical practice. CT has some advantages due to its fast scanning speed and sensitivity to bones and calcification. CTA is CT vascular imaging, which is a very important part of CT clinical application. Due to the poor natural contrast between blood vessels and their background soft tissues, conventional CT plain scans often have difficulty in displaying blood vessels. When performing CTA examinations, contrast agents need to be introduced to change the image contrast between blood vessels and background tissues, thereby highlighting blood vessels. CTA is widely used in head and neck blood vessels, coronary arteries, pulmonary arteries and veins, thoracic aorta, abdominal aorta, and lower limb arteries and veins.
[0003] The current problems faced by coronary artery segmentation in SP-CTA images are as follows:
[0004] 1. There are few annotated SP-CTA images and a lack of data sets for training the network. If SP-CTA data is used directly to train the network, it may cause the network to be difficult to converge, and the robustness of the model and the effectiveness of the learned features will also be limited; 2. Compared with general CTA images, SP-CTA images have more serious artifacts, more blurred vascular structures, and it is difficult to manually annotate and segment images; 3. Generally, SP-CTA will have paired CTA data, but due to differences in imaging equipment and imaging methods, the physical information between CTA and SP-CTA is basically different (including image layers, spatial spacing, origin, image grayscale distribution and other information related to the segmentation task). Therefore, if you want to use feature alignment methods to share the features of the source domain CTA image with SP-CTA, you must first preprocess the image to try to match the physical information of the two. Summary of the invention
[0005] In order to overcome the defects of the prior art, the technical problem to be solved by the present invention is to provide a SP-CTA image coronary artery segmentation method based on feature alignment domain, which can give a more reliable prediction for unlabeled target domain data, thereby reducing domain distribution differences.
[0006] The technical solution of the present invention is: the SP-CTA image coronary artery segmentation method based on feature alignment domain comprises the following steps:
[0007] (1) Image preprocessing: Scale the source domain image and its annotation data so that the CTA image and SP-CTA image of the same patient have the same size;
[0008] (2) In the feature extraction stage, feature sharing is used to enable SP-CTA images to effectively utilize the knowledge learned in CTA image space, thereby accelerating the convergence of the network; domain-specific BN layers are used in convolutional networks;
[0009] (3) In the training phase, CTA images and SP-CTA images are loaded with batch-size and simultaneously input into the coronary segmentation network. The network uses shared convolution kernels and different BN layers to obtain the vascular prediction probability map of the two domain input images;
[0010] (4) An adversarial loss function is introduced in the vascular prediction space, and two discriminators are added to the network to discriminate the corresponding modes of the predicted probability map and the predicted entropy map output by the segmentation network;
[0011] (5) The segmentation network uses three downsampling and three upsampling. The convolution block consists of two convolutional layers with a kernel size of 3×3×3, a BN layer, and a LeakyReLU activation function. The number of channels of the convolutional layer is set to 16, 32, 64, and 128, respectively. After extracting the features, downsampling is performed using maximum pooling. A 3D deconvolution operation is used in the upsampling stage to restore the feature map of the same size as the original image by learning related parameters. In order to restore some of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the vascular probabilities of different domains.
[0012] The feature extractor parameters of the network of the present invention are shared by the source domain and the target domain, and the purpose is to extract domain-invariant features related to the coronary artery segmentation task; since the overall grayscale distribution of the data in the source domain and the target domain has certain differences, the feature extractor will use a domain-specific normalization layer; since the source domain data has annotation information, a fully supervised method is used in the training process to enable the network to learn features related to coronary vessel segmentation; since the target domain has no labeled data to supervise the learning of the network, in order to enable the network to better learn the effective features of the SP-CTA image, an adversarial learning method is adopted to achieve the goal that the network's prediction results for the target domain data are similar to the distribution of the prediction results for the source domain data; by adding a discriminator to supervise the similar distribution of the prediction results of the two domains, it is ensured that the features learned by the feature extractor have domain invariance; since the source domain data has the most direct supervision method compared to the target domain data, the network will have a higher confidence in the prediction of the coronary artery in the CTA image and a lower confidence in the prediction results of the SP-CTA, and by aligning the entropy graphs of the prediction results of the two domains, the network can give a more reliable prediction for the unlabeled target domain data, thereby reducing the domain distribution difference.
[0013] Also provided is a SP-CTA image coronary artery segmentation device based on feature alignment domain, which includes:
[0014] An image preprocessing module configured to scale the source domain image and its annotation data so that the CTA image and the SP-CTA image of the same patient have the same size;
[0015] The feature extraction module is configured to use feature sharing to enable SP-CTA images to effectively utilize the knowledge learned in CTA image space during the feature extraction phase, thereby accelerating the convergence of the network; and to use domain-specific BN layers in the convolutional network;
[0016] The training module is configured such that during the training phase, CTA images and SP-CTA images are loaded in batch-size and simultaneously input into the coronary segmentation network. The network uses shared convolution kernels and different BN layers to obtain the vascular prediction probability map of the two domain input images.
[0017] The loss introduction module is configured to introduce an adversarial loss function in the vascular prediction space. Two discriminators are added to the network to discriminate the corresponding modes of the predicted probability map and the predicted entropy map output by the segmentation network respectively.
[0018] The segmentation network module is configured with three downsampling and three upsampling. The convolution block consists of two convolutional layers with a kernel size of 3×3×3, a BN layer, and a LeakyReLU activation function. The number of channels of the convolutional layer is set to 16, 32, 64, and 128, respectively. After extracting the features, downsampling is performed using maximum pooling. In the upsampling stage, a 3D deconvolution operation is used to restore the feature map of the same size as the original image by learning related parameters. In order to restore some of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the vascular probabilities of different domains. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of the SP-CTA image coronary artery segmentation method based on feature alignment domain according to the present invention. DETAILED DESCRIPTION
[0020] like Figure 1 As shown, the SP-CTA image coronary artery segmentation method based on feature alignment domain includes the following steps:
[0021] (1) Image preprocessing: Scale the source domain image and its annotation data so that the CTA image and SP-CTA image of the same patient have the same size;
[0022] (2) In the feature extraction stage, feature sharing is used to enable SP-CTA images to effectively utilize the knowledge learned in CTA image space, thereby accelerating the convergence of the network; domain-specific BN layers are used in convolutional networks;
[0023] (3) In the training phase, CTA images and SP-CTA images are loaded with batch-size and simultaneously input into the coronary segmentation network. The network uses shared convolution kernels and different BN layers to obtain the vascular prediction probability map of the two domain input images;
[0024] (4) An adversarial loss function is introduced in the vascular prediction space, and two discriminators are added to the network to discriminate the corresponding modes of the predicted probability map and the predicted entropy map output by the segmentation network;
[0025] (5) The segmentation network uses three downsampling and three upsampling. The convolution block consists of two convolutional layers with a kernel size of 3×3×3, a BN layer, and a LeakyReLU activation function. The number of channels of the convolutional layer is set to 16, 32, 64, and 128, respectively. After extracting the features, downsampling is performed using maximum pooling. A 3D deconvolution operation is used in the upsampling stage to restore the feature map of the same size as the original image by learning related parameters. In order to restore some of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the vascular probabilities of different domains.
[0026] The feature extractor parameters of the network of the present invention are shared by the source domain and the target domain, and the purpose is to extract domain-invariant features related to the coronary artery segmentation task; since the overall grayscale distribution of the data in the source domain and the target domain has certain differences, the feature extractor will use a domain-specific normalization layer; since the source domain data has annotation information, a fully supervised method is used in the training process to enable the network to learn features related to coronary vessel segmentation; since the target domain has no labeled data to supervise the learning of the network, in order to enable the network to better learn the effective features of the SP-CTA image, an adversarial learning method is adopted to achieve the goal that the network's prediction results for the target domain data are similar to the distribution of the prediction results for the source domain data; by adding a discriminator to supervise the similar distribution of the prediction results of the two domains, it is ensured that the features learned by the feature extractor have domain invariance; since the source domain data has the most direct supervision method compared to the target domain data, the network will have a higher confidence in the prediction of the coronary artery in the CTA image and a lower confidence in the prediction results of the SP-CTA, and by aligning the entropy graphs of the prediction results of the two domains, the network can give a more reliable prediction for the unlabeled target domain data, thereby reducing the domain distribution difference.
[0027] Preferably, in step (1), resampling is achieved by performing an interpolation operation on the image by adjusting the spacing in the z-axis direction of the image. The interpolation operation first calculates the correspondence between the pixels of the two images according to the sizes of the target image and the original image. The coordinate transformation calculation formula is:
[0028]
[0029] Among them, (X src ,Y src ,Z src ) is the spatial coordinate of a pixel point m in the original image, (X dst ,Y dst ,Z dst ) is the coordinate of the pixel point in the interpolated image corresponding to the original image point m, W src ,H src ,L src is the width, height and length of the original image, W dst ,H dst ,L dst is the width, height and length of the transformed image;
[0030] The segmentation gold standard uses the nearest neighbor interpolation sampling method, where m(x, y) is the pixel in the xth row and yth column of the original image. Assume that a pixel point in the resampled image is mapped to point P in the original image through formula (1). Since the coordinate value of point P is a decimal, it is different from the rounding of the nearest neighbor interpolation method. The distance between point P and its four neighboring points with known pixel values is calculated, and then the grayscale values of the four points are superimposed with the distance as the weight to calculate the pixel value of point P. The calculation formula is expressed as:
[0031] P=u*v*Src(x,y)+u*(1-v)*Src(x+1,y)+(1-u)*v*Src(x,y+1)+(1-u)*(1-v)*Src(x+1,y+1) (2).
[0032] Preferably, in the step (1), after the source domain image is resampled, the data of the two domains are standardized, a 3D convolutional neural network is used, and a shearing method along the z-axis is adopted. The number of slices in the experiment is 8.
[0033] Preferably, in step (3), it is assumed that there are k channels in a certain layer, and a mini-batch of data in a certain channel is represented by B = {x 1 ,x 2 ,x 3 ,…,x m}, firstly, the mean and variance of the channel data are calculated by formula (3) and (4), then all the data are standardized according to the mean and variance and formula (5), and finally the transformed data are translated and scaled to restore the feature distribution that the network initially wants to learn. The calculation formula is shown in formula (6):
[0034]
[0035]
[0036]
[0037]
[0038] The mean and variance of all training data are used. The mean and variance calculation formulas are as follows (7) and (8)
[0039] As shown, in the training phase, the moving average method will be used to obtain global statistics
[0040] E[x]=E Β [μ B ] (7)
[0041]
[0042] The data distribution after BN layer processing in the test phase is shown in formula (9):
[0043]
[0044] Preferably, in step (4), given the annotated source domain coronary CTA dataset Compared with the unlabeled target domain SP-CTA dataset Where N s With N t Represent the number of training samples in the source domain and the target domain respectively, The images of the two domains are segmented and the corresponding blood vessel prediction probability maps are obtained. and Where C represents the number of segmentation categories, C = 2, including blood vessels and background categories; due to the annotation information in the source domain space, the network will learn CTA images in a supervised manner by minimizing the hybrid loss The supervised network learns the features related to coronary arteries in CTA images, and the segmentation loss is defined as shown in formula (10):
[0045]
[0046] Among them, the first item of the mixed loss is the cross entropy loss, and the second item is the Dice loss.
[0047] The objective function of optimizing the overall segmentation network is expressed as
[0048]
[0049] Among them, λ 1 With λ 2 is a hyperparameter that balances the loss function terms of the optimized network with different meanings.
[0050] Preferably, in step (5), the discriminator D p With D e Both use the PatchGAN structure, which maps the input image into an N*N matrix through 5 convolution blocks. Each pixel output by the network corresponds to a patch of the receptive field size in the input image.
[0051] The size of the convolution kernel used in the 3D convolution operation in PatchGAN is 4×4×4, the convolution step size of the first three layers is set to 2, and the convolution step size of the last two layers is 1. The number of feature map channels is 64, 128, 256, 512, and 1 respectively; the size of the input image is 512×512×8, and the receptive field of the entire network is 70×70×8; the first four convolution blocks are composed of convolution layers, instancenormalization layers, and leakyReLU activation functions. Instance normalization refers to the normalization operation of a single channel of a single image. The leakyReLU activation function is an improved version of the ReLU function. The definitions of the two functions are
[0052] ReLU(x)=max(0,x) (20)
[0053]
[0054] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes the steps of the above-mentioned embodiment method, and the storage medium can be: ROM / RAM, disk, CD, memory card, etc. Therefore, corresponding to the method of the present invention, the present invention also includes a coronary segmentation device for SP-CTA images based on feature alignment domain. Figure 1 As shown, the device comprises:
[0055] An image preprocessing module configured to scale the source domain image and its annotation data so that the CTA image and the SP-CTA image of the same patient have the same size;
[0056] The feature extraction module is configured to use feature sharing to enable SP-CTA images to effectively utilize the knowledge learned in CTA image space during the feature extraction phase, thereby accelerating the convergence of the network; and to use domain-specific BN layers in the convolutional network;
[0057] The training module is configured such that during the training phase, CTA images and SP-CTA images are loaded in batch-size and simultaneously input into the coronary segmentation network. The network uses shared convolution kernels and different BN layers to obtain the vascular prediction probability map of the two domain input images.
[0058] The loss introduction module is configured to introduce an adversarial loss function in the vascular prediction space. Two discriminators are added to the network to discriminate the corresponding modes of the predicted probability map and the predicted entropy map output by the segmentation network respectively.
[0059] The segmentation network module is configured with three downsampling and three upsampling. The convolution block consists of two convolutional layers with a kernel size of 3×3×3, a BN layer, and a LeakyReLU activation function. The number of channels of the convolutional layer is set to 16, 32, 64, and 128, respectively. After extracting the features, downsampling is performed using maximum pooling. In the upsampling stage, a 3D deconvolution operation is used to restore the feature map of the same size as the original image by learning related parameters. In order to restore some of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the vascular probabilities of different domains.
[0060] Preferably, in the image preprocessing module, resampling is achieved by performing an interpolation operation on the image by adjusting the spacing in the z-axis direction of the image. The interpolation operation first calculates the correspondence between the pixels of the two images according to the size of the target image and the original image. The coordinate transformation calculation formula is:
[0061]
[0062] Among them, (X src ,Y src ,Z src ) is the spatial coordinate of a pixel point m in the original image, (X dst ,Y dst ,Z dst ) is the coordinate of the pixel point in the interpolated image corresponding to the original image point m, W src ,H src ,L src is the width, height and length of the original image, W dst ,H dst ,L dst is the width, height and length of the transformed image;
[0063] The segmentation gold standard uses the nearest neighbor interpolation sampling method, where m(x, y) is the pixel in the xth row and yth column of the original image. Assume that a pixel point in the resampled image is mapped to point P in the original image through formula (1). Since the coordinate value of point P is a decimal, it is different from the rounding of the nearest neighbor interpolation method. The distance between point P and its four neighboring points with known pixel values is calculated, and then the grayscale values of the four points are superimposed with the distance as the weight to calculate the pixel value of point P. The calculation formula is expressed as:
[0064] P=u*v*Src(x,y)+u*(1-v)*Src(x+1,y)+(1-u)*v*Src(x,y+1)+(1-u)*(1-v)*Src(x+1,y+1) (2).
[0065] Preferably, in the image preprocessing module, after the source domain image is resampled, the data of the two domains are standardized, a 3D convolutional neural network is used, and a shearing method along the z-axis is adopted. The number of slices in the experiment is 8.
[0066] Preferably, in the training module, it is assumed that there are k channels in a certain layer, wherein a mini-batch of data in a certain channel is represented as B={x 1 ,x 2 ,x 3 ,…,x m}, firstly, the mean and variance of the channel data are calculated by formula (3) and (4), then all the data are standardized according to the mean and variance and formula (5), and finally the transformed data are translated and scaled to restore the feature distribution that the network initially wants to learn. The calculation formula is shown in formula (6):
[0067]
[0068]
[0069]
[0070]
[0071] The mean and variance of all training data are used. The mean and variance calculation formulas are shown in (7) and (8). During the training phase, the moving average method is used to obtain global statistics.
[0072] E[x]=E Β [μ B ] (7)
[0073]
[0074] The data distribution after BN layer processing in the test phase is shown in formula (9):
[0075]
[0076] The specific embodiments of the present invention are described in more detail below.
[0077] The method of the present invention comprises the steps of:
[0078] 1. Image preprocessing
[0079] Since the diagnosis of coronary artery stenosis in clinical practice is generally carried out by CTA imaging, myocardial blood perfusion imaging is performed when analyzing blood flow changes caused by stenosis, so the collected CTA and SP-CTA images are often paired. However, due to differences in imaging equipment and imaging methods, the physical information of CTA and SP-CTA images is basically different, including image spacing and image layers related to segmentation tasks. Since the data space layers of the same patient corresponding to the two domains are different, single-frame images cannot be well paired. Therefore, the source domain image and its annotated data are first scaled so that the CTA image and SP-CTA image of the same patient have the same size. The size of each slice of the two domain images is the same, only the number of slices is different. This chapter resamples the image by adjusting the spacing in the z-axis direction of the image and performing interpolation operations on the image. The interpolation operation first calculates the corresponding relationship between the pixels of the two images according to the size of the target image and the original image. The specific coordinate transformation calculation formula is shown in formula (1).
[0080]
[0081] Among them, (X src ,Y src ,Z src ) is the spatial coordinate of a pixel point m in the original image, (X dst ,Y dst ,Z dst ) is the coordinate of the pixel point in the interpolated image corresponding to the original image point m. src ,H src ,L src is the width, height and length of the original image, W dst ,H dst ,L dst is the width, height and length of the transformed image. However, the original image coordinate values mapped by the formula are often decimals, while the image coordinates are all positive numbers, so it is impossible to find clear corresponding points. Different approximation methods determine the differences in the final interpolated images.
[0082] The simplest approximation method is to round off the coordinate values mapped to the original image, and then map the pixel values of the approximated coordinates to the target image, which is called the nearest neighbor interpolation method. Since the width and height of the original image and the target image are the same, only the z-axis direction needs to be interpolated, and there will be no area with slowly changing grayscale at the edge, which may cause jaggedness in the sampled image. However, for binary images, there is no need for gradual grayscale changes, so the near interpolation method is suitable for resampling binary images. The gold standard for segmentation in this article uses the nearest neighbor interpolation sampling method.
[0083] The approximate method of the nearest neighbor interpolation method has a large error for grayscale images. The linear interpolation method is an interpolation method that considers multiple pixel points with distance as weight. The pixel value mapping is more reasonable and more accurate. The specific calculation process is described using two-dimensional space as an example. m(x, y) is the pixel in the xth row and yth column of the original image. Assume that a pixel point in the resampled image is mapped to point P in the original image through formula (1). Since the coordinate value of point P is a decimal, it is different from the rounding of the nearest neighbor interpolation method. By calculating the distance between point P and its four neighboring points with known pixel values, the grayscale values of the four points are used to superimpose and calculate the pixel value of point P in a distance-weighted manner. The calculation formula can be expressed as:
[0084] P=u*v*Src(x,y)+u*(1-v)*Src(x+1,y)+(1-u)*v*Src(x,y+1)+(1-u)*(1-v)*Src(x+1,y+1) (2)
[0085] The linear interpolation method takes into account the influence of multiple points and follows the image grayscale distribution law that the closer the points are, the greater the influence is. It can effectively avoid the appearance of jagged shapes. Therefore, the linear interpolation method is used to resample the original image.
[0086] After the source domain image is resampled, the data of the two domains are standardized in the same way as the normalization method in the image preprocessing in the previous chapter. Since the processed image is three-dimensional, the learning of spatial information is very important. Therefore, this paper adopts a 3D convolutional neural network. However, the volume of 3D images is large. Due to the size of the video memory, the input of the network can only be the patch of the original image. The randomly cut patch is likely to destroy the structure of the blood vessel itself, and the relative position information of the blood vessel may also be damaged. Therefore, this paper adopts the method of shearing along the z-axis, and the number of slices in the experiment is 8.
[0087] 2. Feature sharing and independent normalization
[0088] Since there is no labeled information in the target domain space, in order to enable the network to effectively extract features related to the coronary artery structure in the image, CTA images will be used to assist the learning of SP-CTA. Limited by the lack of labeled images, if learning is started from scratch in the target domain, it will be difficult for the network to converge, and the validity and robustness of the learned features will be difficult to guarantee. More importantly, CTA images and SP-CTA images have many obviously similar feature structures, such as vascular structure, spatial distribution, background structure, etc. Therefore, in the feature extraction stage, feature sharing is used to enable SP-CTA images to effectively utilize the knowledge learned in CTA image space, thereby accelerating the convergence of the network. Another very important reason for using feature sharing is that the shared feature extractor can enable the network to extract domain-invariant features related to both domains, which can improve the robustness of the network and exclude the learning of some features that are not related to the segmentation task. However, due to the difference in grayscale distribution between the source domain image and the target domain image, using the same BN layer will mislead the network's preparation and memory of specific spatial data distribution. Therefore, domain-specific BN layers will be used in convolutional networks.
[0089] Batch normalization has been widely used in the field of convolutional neural networks. The BN layer speeds up the training and convergence of the network by making the data distribution of each layer of the network consistent. In addition, the introduction of the BN layer can prevent the network gradient explosion and gradient disappearance to a certain extent, and it has been experimentally verified that it can also effectively prevent the network from overfitting. The main way of normalization of the BN layer is to calculate the mean and standard deviation of the data along the channel dimension of the input data for whitening preprocessing, and then introduce learnable parameters γ and β to perform affine transformation on the standardized features to restore the feature distribution itself. Assume that there are k channels in a specific layer, and a mini-batch of data in a specific channel can be expressed as Β={x 1 ,x 2 ,x 3 ,…,x m}, firstly, the mean and variance of the channel data are calculated by formula (3) and (4) respectively, then all the data are standardized according to the mean and variance and formula (5), and finally the transformed data are translated and scaled to restore the feature distribution that the network initially wants to learn, as shown in formula (6).
[0090]
[0091]
[0092]
[0093]
[0094] The ∈ in (5) is very small to avoid learning collapse when the standard deviation is 0. Since the test phase often predicts a single sample and there is no concept of batch, the mean and variance of all training data will be used. The mean and variance calculation formulas are shown in (7) and (8). Therefore, the moving average method will be used to obtain global statistics during the training phase.
[0095] E[x]=E Β [μ B ] (7)
[0096]
[0097] The data distribution after processing by the BN layer in the test phase is shown in formula (9).
[0098]
[0099] Due to the difference in data distribution between CTA images and SP-CTA images, the network designed in this paper uses a separate BN layer for each modality. If the same BN layer is used, it is likely to cause significant interference to the features learned by the two domains themselves, and ultimately make it difficult for the convolutional layer to learn universal and robust features. In addition, in the test phase, the BN layer needs to use the mean and variance of all training data. Directly applying the mean and variance of the two domain data to the target domain will cause data distribution shift, resulting in degradation of network segmentation performance. For example, if the data distribution of the source domain and the target domain input in a certain layer satisfies μ CTA =μ SP-CTA , the overall average of the two domain data is 0, in which case the BN layer is meaningless. Therefore, using a domain-specific BN layer can effectively avoid such problems in multimodal learning.
[0100] During the training phase, CTA images and SP-CTA images are loaded with batch-size and simultaneously input into the coronary segmentation network. The network uses shared convolution kernels and different BN layers to finally obtain the vascular prediction probability map of the two domain input images.
[0101] 3. Adversarial learning based on probability and entropy
[0102] Given annotated source domain coronary CTA dataset Compared with the unlabeled target domain SP-CTA dataset Where N s With N t Represent the number of training samples in the source domain and the target domain respectively, The images of the two domains are segmented and the corresponding blood vessel prediction probability maps are obtained. and Where C represents the number of segmentation categories. In this chapter, C = 2, which includes two categories: blood vessels and background. Since there is annotation information in the source domain space, the network will learn CTA images in a supervised manner. By minimizing the hybrid loss The supervised network learns the features related to coronary arteries in CTA images, and the segmentation loss is defined as shown in formula (10).
[0103]
[0104] Among them, the first term of the mixed loss is the cross entropy loss, and the second term is the Dice loss. The specific calculation methods of the two losses are shown in formula (11) and formula (12), respectively. Represents the set of all pixels of the source domain training samples. Dice loss is widely used in the field of medical image processing and can effectively solve the problem of class imbalance, but there may be instability during training. Adding cross entropy loss can maintain the stability of network training and make the entropy of the prediction graph smaller.
[0105]
[0106]
[0107] In order to make the segmentation network extract domain-invariant features, this paper uses an adversarial learning-based method to achieve feature alignment between the source domain and the target domain. Generally, the most direct way to achieve feature alignment between different domains is to use adversarial learning in the feature space so that the discriminator cannot distinguish which spatial domain the extracted features come from. However, it is difficult to achieve alignment in high-dimensional feature spaces. This chapter enhances the domain invariance of feature distribution through adversarial learning in low-dimensional space. Specifically, an adversarial loss function is introduced in the vascular prediction space. Two discriminators are added to the network to discriminate the corresponding modes of the predicted probability map and predicted entropy map output by the segmentation network.
[0108] Since the coronary artery structures to be segmented in the source and target domain images are very similar, the source domain has better supervised structure extraction results due to the annotation information. Therefore, when the network's prediction graph for the target domain is highly similar to the source domain, it proves that the network's prediction result for the target domain is also relatively ideal. In this chapter's task, the discriminator D is introduced. p In order to distinguish whether the probability map is a prediction of the source domain data or the target domain data, the segmentation network and the discriminator are in an adversarial relationship during the training phase, thus prompting the segmentation network to generate a probability distribution map in the target domain that is similar to the prediction result in the source domain. The output of the discriminator is binary, and the output is 1 when the probability map of the predicted input comes from the source domain, and the output is 0 when the prediction is the target domain. The discriminator D is optimized by minimizing the cross entropy loss. p , the loss function is shown in formula (13).
[0109]
[0110] The network generator and discriminator based on adversarial learning are trained separately. When training the segmentation network, the target domain affects the optimization of the network through adversarial loss. The calculation of adversarial loss is shown in formula (14).
[0111]
[0112] Since vascular segmentation faces a serious class imbalance problem, the results obtained by adversarial learning based on the predicted probability map may be seriously over-segmented or under-segmented, because the under-segmented or over-segmented vascular response map is also very similar to the distribution of the results predicted by the source domain. This problem can be solved to a certain extent by improving the confidence of the network prediction. Since the source domain has the supervision of annotated images, the network has a high confidence in the prediction results of the source domain, so the entropy of the probability map is small. However, since the target domain does not have direct coronary artery annotation supervision, the network has a low confidence in the prediction of the target domain, resulting in a large entropy of the probability map. Therefore, the network introduces another discriminator D e Aligning the predicted entropy maps of the source and target domains encourages the segmentation model to make reliable predictions for the unlabeled target domain data, thereby reducing the distribution difference between the domains and ultimately achieving good segmentation performance on the target domain. The entropy maps of the source and target domains are calculated based on the predicted probability maps using equations (15) and (16).
[0113]
[0114]
[0115] Discriminator D e The training objective function of also adopts cross entropy loss, and the discriminator is updated and optimized by minimizing the loss function. The loss function is shown in formula (17).
[0116]
[0117] When the input entropy map comes from the source domain, z=0. Conversely, if the input is the entropy map of the target domain, z=1.
[0118] In training the discriminator D e At the same time, the segmentation network will also learn to generate prediction images with similar confidence to deceive the discriminator. The adversarial objective function of the segmentation network is
[0119]
[0120] Therefore, through the above description and analysis, the objective function of optimizing the overall segmentation network can be expressed as
[0121]
[0122] Among them, λ 1 With λ 2 is a hyperparameter that balances the loss function terms of the optimized network with different meanings.
[0123] 4. Network construction
[0124] The network structure of this paper mainly consists of three parts: segmentation network S, discriminator D based on prediction probability map p and the discriminator D based on the prediction entropy map e . In order to process three-dimensional images more effectively, the calculations of the network in this chapter all use 3D operations. The segmentation network uses the 3D Unet framework, a classic encoder-decoder and skip connection structure. The encoder is used to extract domain-invariant features related to the target task, and the decoder is used to upsample the high-dimensional features to restore the original resolution of the image, and finally obtain the predicted probability map of the image. Due to the large variation in blood vessel scales and the small radius of the end of the blood vessel and the small blood vessels, if too many downsampling operations are used, the small blood vessel information will be lost in the high-dimensional feature space, and it is difficult to recover in the decoding stage. Therefore, the segmentation network uses three downsampling and three upsampling. The convolution block consists of two convolutional layers with a convolution kernel size of 3×3×3, a BN layer and a LeakyReLU activation function. The number of channels of the convolutional layer is set to 16, 32, 64, and 128 respectively. After extracting features, the maximum pooling is used for downsampling. The upsampling stage uses 3D deconvolution operations to better restore the feature map of the same size as the original image by learning related parameters. In order to restore some of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the vessel probabilities of different domains.
[0125] Discriminator D p With D e Both use the PatchGAN structure, which maps the input image into an N*N matrix through 5 convolution blocks. Each pixel output by the network corresponds to a patch of the receptive field size in the input image. The discriminator of the original GAN outputs an evaluation value for the entire input image. In this case, the network pays more attention to global similarities and ignores the detailed features of the image. In contrast, PatchGAN can focus on richer local areas and can prompt the segmentation network to generate more accurate details. Since the blood vessel pixels account for a small proportion of the image space and belong to the detailed information in the entire image, the introduction of the PatchGAN structure is very important for the discriminant optimization of the blood vessel probability map and its entropy map.
[0126] The size of the convolution kernel used in the 3D convolution operation in PatchGAN is 4×4×4. The convolution step size of the first three layers is set to 2, and the convolution step size of the last two layers is 1. The number of feature map channels is 64, 128, 256, 512, and 1 respectively. The size of the input image is 512×512×8, and the receptive field of the entire network is 70×70×8. The first four convolution blocks consist of a convolution layer, an instancenormalization layer, and a leakyReLU activation function. Instance normalization refers to the normalization operation of a single channel of a single image. It is widely used in adversarial generative networks because the network focuses on the generated image instances and is not suitable for normalization operations between multiple images. The leakyReLU activation function is an improved version of the ReLU function. The definitions of the two functions are shown in equations (20) and (21).
[0127] ReLU(x)=max(0,x) (20)
[0128]
[0129] The ReLU function is linear in the part greater than 0, and the calculation speed is fast. ReLU can make the output of some neurons 0, which enhances the sparsity of the network and can avoid overfitting to a certain extent. However, when the output of the network is less than 0, the neuron will never be activated. LeakyReLU is proposed to solve this problem. The gradient a is introduced in the negative half area, and a in PatchGAN is set to 0.2.
[0130] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the protection scope of the technical solution of the present invention.
Claims
1. A coronary artery segmentation method for SP-CTA images based on feature alignment domain, characterized by: It includes the following steps: (1) Image preprocessing: Scale the source domain image and its annotation data so that the CTA image and SP-CTA image of the same patient have the same size; (2) In the feature extraction stage, feature sharing is used to enable SP-CTA images to effectively utilize the knowledge learned in CTA image space, thereby accelerating the convergence of the network; the BN layer of the feature alignment domain is used in the convolutional network; (3) In the training phase, CTA images and SP-CTA images are loaded with batch-size and simultaneously input into the coronary segmentation network. The network uses shared convolution kernels and different BN layers to obtain the vascular prediction probability map of the two domain input images; (4) Introducing adversarial loss function in the vascular prediction space, adding two discriminators to the network, The predicted probability map and predicted entropy map output by the segmentation network are respectively judged according to the corresponding modes; (5) The segmentation network uses three downsampling and three upsampling. The convolution block consists of two convolutional layers with a kernel size of 3×3×3, a BN layer, and a LeakyReLU activation function. The number of channels of the convolutional layer is set to 16, 32, 64, and 128 respectively. After extracting features, downsampling is performed using maximum pooling. In the upsampling stage, a 3D deconvolution operation is used to restore a feature map of the same size as the original image by learning related parameters. In order to restore part of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the vascular probabilities of different domains. In the step (1), the image is resampled by adjusting the spacing in the z-axis direction of the image. The interpolation operation first calculates the correspondence between the pixels of the two images according to the size of the target image and the original image. The coordinate transformation calculation formula is: Among them, (X src ,Y src ,Z src ) is the spatial coordinate of a pixel point m in the original image, (X dst ,Y dst ,Z dst ) is the coordinate of the pixel point in the interpolated image corresponding to the original image point m, W src ,H src ,L src is the width, height and length of the original image, W dst ,H dst ,L dst is the width, height and length of the transformed image; The segmentation gold standard uses the nearest neighbor interpolation sampling method, where m(x, y) is the pixel in the xth row and yth column of the original image. Assume that a pixel point in the resampled image is mapped to point P in the original image through formula (1). Since the coordinate value of point P is a decimal, it is different from the rounding of the nearest neighbor interpolation method. The distance between point P and its four neighboring points with known pixel values is calculated, and then the grayscale values of the four points are superimposed with the distance as the weight to calculate the pixel value of point P. The calculation formula is expressed as: P=u*v*Src(x,y)+u*(1-v)*Src(x+1,y)+(1-u)*v*Src(x,y+1)+(1-u)*(1-v)*Src(x+1,y+1) (2); In the step (1), after the source domain image is resampled, the data of the two domains are standardized, a 3D convolutional neural network is used, and a shearing method along the z-axis is adopted. The number of slices in the experiment is 8; In step (3), it is assumed that there are k channels in a certain layer, and a mini-batch of data in a certain channel is represented by B = {x1, x2, x3, ..., x m }, firstly, the mean and variance of the channel data are calculated by formula (3) and (4), then all the data are standardized according to the mean and variance and formula (5), and finally the transformed data are translated and scaled to restore the feature distribution that the network initially wants to learn. The calculation formula is shown in formula (6): β is a learnable parameter in the deep learning network, ∈ is a very small constant to avoid learning collapse when the standard deviation is 0. The mean and variance of all training data are used. The mean and variance calculation formulas are shown in (7) and (8). In the training stage, the moving average method is used to obtain the global statistics. E[x]=E Β [μ B ] (7) The data distribution after BN layer processing in the test phase is shown in formula (9): In step (4), given the labeled source domain coronary CTA dataset Compared with the unlabeled target domain SP-CTA dataset Where N s With N t Represent the number of training samples in the source domain and the target domain respectively, The images of the two domains are segmented and the corresponding blood vessel prediction probability maps are obtained. and Where C represents the number of segmentation categories, C = 2, including blood vessels and background categories; due to the annotation information in the source domain space, the network will learn CTA images in a supervised manner by minimizing the hybrid loss The supervised network learns the features related to coronary arteries in CTA images, and the segmentation loss is defined as shown in formula (10): Among them, the first term of the mixed loss is the cross entropy loss, the second term is the Dice loss, and the objective function of optimizing the overall segmentation network is expressed as Among them, λ1 and λ2 are hyperparameters, balancing the loss function terms of the optimization network with different meanings; in the step (5), the discriminator D p With D e Both use the PatchGAN structure, which maps the input image into an N*N matrix through 5 convolution blocks. Each pixel output by the network corresponds to a patch of the receptive field size in the input image. The size of the convolution kernel used in the 3D convolution operation in PatchGAN is 4×4×4, the convolution step size of the first three layers is set to 2, and the convolution step size of the last two layers is 1. The number of feature map channels is 64, 128, 256, 512, and 1 respectively; the size of the input image is 512×512×8, and the receptive field of the entire network is 70×70×8; the first four convolution blocks are composed of convolution layers, instance normalization layers, and leakyReLU activation functions. Instance normalization refers to the normalization operation of a single channel of a single image. The LeakyReLU activation function is an improved version of the ReLU function. The definitions of the two functions are ReLU(x)=max(0,x) (20) 2. A coronary artery segmentation device for SP-CTA images based on feature alignment domain, characterized in that: It is used to perform the method according to claim 1 and comprises: An image preprocessing module configured to scale the source domain image and its annotation data so that the CTA image and the SP-CTA image of the same patient have the same size; A feature extraction module is configured to use feature sharing in the feature extraction stage so that the SP-CTA image can effectively use the knowledge learned in the CTA image space, thereby accelerating the convergence of the network; a BN layer of the feature alignment domain is used in the convolutional network; a training module is configured to load the CTA image and the SP-CTA image in batch-size and simultaneously input them into the coronary segmentation network in the training stage, and the network uses shared convolution kernels and different BN layers to obtain the vascular prediction probability map of the two domain input images; a loss introduction module is configured to introduce an adversarial loss function in the vascular prediction space, and two discriminators are added to the network to discriminate the corresponding modalities of the prediction probability map and the prediction entropy map output by the segmentation network; The segmentation network module is configured with three downsampling and three upsampling. The convolution block consists of two convolution layers with a kernel size of 3×3×3, a BN layer, and a LeakyReLU activation function. The number of channels of the convolution layer is set to 16, 32, 64, and 128 respectively. After extracting features, downsampling is performed using maximum pooling. In the upsampling stage, 3D deconvolution operation is used to restore the feature map of the same size as the original image by learning related parameters. In order to restore some of the information lost by downsampling, low-dimensional features are fused through skip connections in the decoding stage. In the final prediction stage, two different convolution operations are used to predict the probability of blood vessels in different domains. In the image preprocessing module, the image is interpolated and resampled by adjusting the spacing in the z-axis direction of the image. The interpolation operation first calculates the corresponding relationship between the pixels of the two images according to the size of the target image and the original image. The coordinate transformation calculation formula is: Among them, (X src ,Y src ,Z src ) is the spatial coordinate of a pixel point m in the original image, (X dst ,Y dst ,Z dst ) is the coordinate of the pixel point in the interpolated image corresponding to the original image point m, W src ,H src ,L src is the width, height and length of the original image, W dst ,H dst ,L dst is the width, height and length of the transformed image; The segmentation gold standard uses the nearest neighbor interpolation sampling method, where m(x, y) is the pixel in the xth row and yth column of the original image. Assume that a pixel point in the resampled image is mapped to point P in the original image through formula (1). Since the coordinate value of point P is a decimal, it is different from the rounding of the nearest neighbor interpolation method. The distance between point P and its four neighboring points with known pixel values is calculated, and then the grayscale values of the four points are superimposed with the distance as the weight to calculate the pixel value of point P. The calculation formula is expressed as: P=u*v*Src(x,y)+u*(1-v)*Src(x+1,y)+(1-u)*v*Src(x,y+1)+(1-u)*(1-v)*Src(x+1,y+1) (2); In the image preprocessing module, after the source domain image is resampled, the data of the two domains are standardized, a 3D convolutional neural network is used, and a shearing method along the z-axis is adopted. The number of slices in the experiment is 8; In the training module, it is assumed that there are k channels in a certain layer, and a mini-batch of data in a certain channel is represented by B = {x1, x2, x3, ..., x m }, firstly, the mean and variance of the channel data are calculated by formula (3) and (4), then all the data are standardized according to the mean and variance and formula (5), and finally the transformed data are translated and scaled to restore the feature distribution that the network initially wants to learn. The calculation formula is shown in formula (6): β is a learnable parameter in the deep learning network, ∈ is a very small constant to avoid learning collapse when the standard deviation is 0. The mean and variance of all training data are used. The mean and variance calculation formulas are shown in (7) and (8). In the training stage, the moving average method is used to obtain the global statistics. E[x]=E Β [μ B ] (7) The data distribution after BN layer processing in the test phase is shown in formula (9):
