A blood vessel extraction method combining filtering enhancement and geodesic distance transformation
By combining fusion filter enhancement and geodesic distance transformation techniques in vascular extraction methods, the problems of discontinuous and low contrast in vascular extraction in complex medical images are solved, and better vascular extraction effect is achieved.
Patent Information
- Application Number
- CN202411896332.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The prior art is difficult to effectively extract complete and continuous vascular structures from complex and low-contrast medical images, limiting the improvement of vascular extraction effect.
The vascular extraction method using fusion filter enhancement and geodesic distance transformation is used to enhance the blood vessel structure in the image through filter enhancement technology, suppress background noise, and use geodesic distance transformation method to solve the problem of discontinuous blood vessel extraction.
The complete and continuous vascular structures are extracted from complex medical images, effectively solving the problems of poor contrast and discontinuity of blood vessels, and improving the effect of vascular extraction.
Smart Images

Figure CN119359567B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of computer vision and medical image processing, and in particular to a blood vessel extraction method integrating filtering enhancement and geodesic distance transformation. Background Art
[0002] Medical image processing is the core link in computer-aided diagnosis systems and is crucial to both clinical diagnosis and treatment and scientific research activities. It mainly uses computer vision and image processing technology to analyze images, which can be divided into two categories: traditional technology and deep learning-based methods. Traditional image processing technology, such as thresholding, template matching, and clustering algorithms, is usually used as a preprocessing step for image analysis, aiming to extract key features of the image, thereby improving the efficiency and accuracy of the analysis.
[0003] With the rapid development of deep learning, the field of medical image analysis has ushered in new breakthroughs. Image processing technologies based on deep learning are emerging in an endless stream. These technologies achieve accurate extraction of structures such as blood vessels by automatically extracting and analyzing features. However, relying solely on a single deep learning model is sometimes difficult to fully capture the various characteristic information of blood vessels, which limits the improvement of blood vessel extraction effects.
[0004] Combining traditional image processing technology and deep learning methods can maximize the advantages of both. This fusion strategy has shown great potential in improving the effect of medical image processing. Therefore, the present invention proposes a blood vessel extraction method that integrates filtering enhancement and geodesic distance transformation. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention develops a blood vessel extraction method that integrates filtering enhancement and geodesic distance transformation. The main purpose is to extract complete and continuous blood vessel structures from complex, low-contrast medical images to help doctors diagnose and treat diseases.
[0006] The technical solution to the technical problem of the present invention is a blood vessel extraction method integrating filtering enhancement and geodesic distance transformation, comprising the following steps:
[0007] S1. Select image data from the retinal vascular dataset DRIVE and the fundus image vascular segmentation dataset FIVES to construct a dataset ;
[0008] S2. AHE algorithm is used to analyze the data set Perform cropping, flipping, rotation, and scaling operations to augment the dataset The image data in the dataset is obtained , the data set according to The ratio of the augmented dataset is divided into training sets and test set ;
[0009] S3. Build a blood vessel extraction network model and train the training set The image data is input into the model for training. The blood vessel extraction network model includes three parts: encoder, intermediate structure layer, fusion filter enhancement and geodesic distance transform decoder.
[0010] S4. Calculate the loss function gradient based on the predicted results and the true labels to measure the performance of the blood vessel extraction network model;
[0011] S5, training the model by updating and optimizing the parameters in the blood vessel extraction network model, and saving the optimal parameters during the training process;
[0012] S6. Load the saved optimal parameters into the blood vessel extraction network model and read the test set The blood vessels are extracted from the image data and the results are saved after they are obtained.
[0013] S3 is as follows:
[0014] S3.1, the encoder is a feature extraction part, wherein a first feature extraction unit, a first downsampling layer, a first resampling layer, a second feature extraction unit, a second downsampling layer, a second resampling layer, a third feature extraction unit, a third downsampling layer, a third resampling layer, a fourth feature extraction unit, a fourth downsampling layer, and a fourth resampling layer are sequentially arranged;
[0015] Among them, the pooling windows of the first downsampling layer, the second downsampling layer, the third downsampling layer and the fourth downsampling layer are all set to 2; the first feature extraction unit, the second feature extraction unit, the third feature extraction unit and the fourth feature extraction unit are all composed of two convolution blocks and a residual connection block, and each convolution block is composed of a [3×3] convolution layer, Normalization layer and The activation function is composed of the following calculation formulas for the feature extraction unit:
[0016] ,
[0017] in, represents a convolution operation with a kernel size of [3×3], a stride of 1, and a padding of 1. express Normalized and The activation function operates continuously, represents the input image data, Represents the output feature map.
[0018] The specific process of processing the input image data in the encoder is as follows:
[0019] S3.1.1、Dataset The Image data Input to the first feature extraction unit, output feature map , , Representation dataset
[0020] S3.1.2. The feature map obtained in step S3.1.1 Input to the first downsampling layer and output the feature map ;
[0021] S3.1.3. Dataset The Image data Input to the first resampling layer, the image Resample the image The size is cropped to the same as the feature map Consistent, get the feature map ;
[0022] S3.1.4, the feature map obtained in step S3.1.2 Input to the second feature extraction unit, output feature map ;
[0023] S3.1.5. The feature map obtained in step S3.1.4 Input to the second downsampling layer and output the feature map ;
[0024] S3.1.6. The feature map obtained in step S3.1.3 Input to the second resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, get the feature map ;
[0025] S3.1.7, the feature map obtained in step S3.1.5 Input to the third feature extraction unit, and output the feature map ;
[0026] S3.1.8. The feature map obtained in step S3.1.7 Input to the third downsampling layer and output the feature map ;
[0027] S3.1.9, the feature map obtained in step S3.1.6 Input to the third resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, get the feature map ;
[0028] S3.1.10, the feature map obtained in step S3.1.8 Input to the fourth feature extraction unit, and output the feature map ;
[0029] S3.1.11. The feature map obtained in step S3.1.10 Input to the fourth downsampling layer and output the feature map ;
[0030] S3.1.12. The feature map obtained in step S3.1.9 Input to the fourth resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, the output is the feature map .
[0031] The intermediate structure layer is as follows:
[0032] S3.2, the intermediate structure layer includes two convolution blocks and a residual connection block, where the convolution blocks are composed of a [3×3] convolution layer, a BN normalization layer and a Relu activation function;
[0033] The feature map obtained in step S3.1.11 Input to the intermediate structure layer and output the feature map , the calculation formula is as follows:
[0034] .
[0035] The fusion filter enhancement and geodesic distance transform decoder are as follows:
[0036] S3.3, the fusion filter enhancement and geodesic distance transform decoder part is sequentially provided with a first filter enhancement and geodesic distance transform module, a first decoder module, a second filter enhancement and geodesic distance transform module, a second decoder module, a third filter enhancement and geodesic distance transform module, a third decoder module, a fourth filter enhancement and geodesic distance transform module, and a fourth decoder module;
[0037] The four filter enhancement and geodesic distance transform modules each include an upsampling layer, a filter enhancement layer, a geodesic distance transform layer, a convolution layer, Activation function, The activation function is calculated as follows:
[0038] ,
[0039] ,
[0040] ,
[0041] ,
[0042] in, represents a convolution operation with a convolution kernel size of [1×1], represents the input feature map, represents the operation of the upsampling layer, Represents the feature map of the skip connection. The feature map of the skip connection includes , , and , express Activation function, express Activation function, represents the feature map obtained by the first formula operation, It means taking the point set with the largest pixel value for the feature map. represents the obtained point set, Represents the resampled feature map, the resampled feature map includes , , and , represents the filtering enhancement operation, Indicates the calculation of geodesic distance between the input point set and the feature map. represents the geodesic distance map, represents the product operation, Represents the output feature map of the entire filtering enhancement and geodesic distance transformation module;
[0043] Each of the four decoder modules contains two convolution blocks and one residual connection block, and the calculation formula is:
[0044] ,
[0045] in, represents the feature map output by the decoder module, It represents a convolution operation with a kernel size of [3×3], a stride of 1, and a padding of 1. () indicates BN normalization operation and Relu activation function continuous operation.
[0046] The specific process of fusion filtering enhancement and geodesic distance transform decoder is as follows:
[0047] S3.3.1 The feature map obtained in step S3.2 , the feature map obtained in step S3.1.10 And the feature map obtained in S3.1.12 Input to the first filter enhancement and geodesic distance transformation module, and output the feature map ;
[0048] S3.3.2 The feature map obtained in step S3.3.1 Input to the first decoder module, output feature map ;
[0049] S3.3.3 The feature map obtained in step S3.3.2 and the feature map obtained in step S3.1.7 and the feature map obtained in step S3.1.9 Input to the second filtering enhancement and geodesic distance transformation module, and output the feature map ;
[0050] S3.3.4 The feature map obtained in step S3.3.3 Input to the second decoder module, output feature map ;
[0051] S3.3.5 The feature map in step S3.3.4 , the feature map in step S3.1.4 and the feature maps in S3.1.6 Input to the third filter enhancement and geodesic distance transformation module, and output the feature map ;
[0052] S3.3.6 Convert the feature map in step S3.3.5 Input to the third decoder module and output the feature map ;
[0053] S3.3.7 The feature map in step S3.3.6 , the feature map in step S3.1.1 and the feature maps in S3.1.3 Input to the fourth filter enhancement and geodesic distance transformation module, and output the feature map ;
[0054] S3.3.8 Convert the feature map in step S3.3.7 Input to the fourth decoder module, output feature map , and then After a convolution operation, the final result image is obtained , Specifically, it is a probability map, which records the predicted probability of each element belonging to a blood vessel.
[0055] S4 is as follows:
[0056] The loss function is calculated as follows:
[0057] ,
[0058] ,
[0059] ,
[0060] in, represents the total loss function, Represents binary loss, represents the cross entropy loss, and Respectively represent the weight coefficients used to adjust the contribution of the two losses, Indicates deviation, represents the total number of element samples, Indicates The predicted probability of an element, , Indicates The true label of each element;
[0061] Through the loss function The difference between the network structure prediction results and the true label is measured to obtain the gradient of the loss function with respect to the weights and biases in the blood vessel extraction network model.
[0062] S5 is as follows:
[0063] The vascular extraction network model uses AdamW as the optimizer. The adaptive learning rate of the weights and biases in the vascular extraction network model is calculated by using the moving average of the gradient mean and variance. Then AdamW uses the learning rate and the calculated gradient to update the parameters of the network structure. By repeatedly calculating the gradient and updating the parameters, the loss function value gradually decreases and stops when it reaches the set threshold. The network structure is updated and optimized, and the optimal parameters in the training process are saved. The AdamW parameter update formula is:
[0064] ,
[0065] ,
[0066] ,
[0067] ,
[0068] ,
[0069] ,
[0070] Where t represents the time step, represents the gradient at time t, represents the weight value of weight and bias in the blood vessel extraction network model at time t-1, represents the learning rate obtained by the learning rate decay strategy, , , , , are constants, , They are , The tth power, represents the gradient at time step t, represents the first-order moment estimate of the gradient, represents the second-order moment estimate, represents the first-order moment estimate bias correction, Represents the second-order moment estimation deviation correction, and the above parameters are saved.
[0071] The effects provided in the content of the invention are only the effects of the embodiments, rather than all the effects of the invention. The above technical solution has the following advantages or beneficial effects:
[0072] The present invention provides a blood vessel extraction method integrating filtering enhancement and geodesic distance transformation, combining the traditional mathematical image processing method with the deep learning method, using filtering enhancement in the blood vessel extraction network model to enhance the input image, enhancing the slender blood vessel structure while suppressing background noise, and enhancing the contrast of the image's region of interest; in addition, the network model in the present invention also uses a geodesic distance transformation method, and generates a geodesic distance map by inputting a point set, which can well solve the problem of discontinuity and breakage in blood vessel extraction. Therefore, compared with the traditional network model, the blood vessel extraction network model in the present invention can better extract blood vessels with high complexity, effectively solve the problem of poor contrast, and effectively solve the problem of blood vessel discontinuity, thereby improving the effect of blood vessel extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0074] Figure 1 It is a structural schematic diagram of the blood vessel extraction network model in the present invention.
[0075] Figure 2 It is a schematic diagram of the structure of the filtering enhancement and geodesic distance transformation module in the present invention.
[0076] Figure 3 The extraction result of the fundus image and the comparison result of the label map of the fundus image are shown in Figure 2. Figure 3 (a) is the input fundus image, (b) is the label image of the fundus image, and (c) is the extraction result image obtained by the method of the present invention. DETAILED DESCRIPTION
[0077] In order to clearly illustrate the technical features of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0078] Example 1
[0079] like Figures 1 to 2 As shown in FIG. 1 , a blood vessel extraction method integrating filtering enhancement and geodesic distance transformation is described as follows:
[0080] S1. Select image data from the retinal vascular dataset DRIVE and the fundus image vascular segmentation dataset FIVES to construct a dataset ;
[0081] S2. AHE algorithm is used to analyze the data set Perform cropping, flipping, rotation, and scaling operations to augment the dataset The image data in the dataset is obtained , the data set according to The ratio of the augmented dataset is divided into training sets and test set ;
[0082] S3. Build a blood vessel extraction network model and train the training set The image data is input into the model for training. The blood vessel extraction network model includes three parts: encoder, intermediate structure layer, fusion filter enhancement and geodesic distance transform decoder.
[0083] S4. Calculate the loss function gradient based on the predicted results and the true labels to measure the performance of the blood vessel extraction network model;
[0084] S5, training the model by updating and optimizing the parameters in the blood vessel extraction network model, and saving the optimal parameters during the training process;
[0085] S6. Load the saved optimal parameters into the blood vessel extraction network model and read the test set The blood vessels are extracted from the image data and the results are saved after they are obtained.
[0086] S3 is as follows:
[0087] S3.1, the encoder is a feature extraction part, wherein a first feature extraction unit, a first downsampling layer, a first resampling layer, a second feature extraction unit, a second downsampling layer, a second resampling layer, a third feature extraction unit, a third downsampling layer, a third resampling layer, a fourth feature extraction unit, a fourth downsampling layer, and a fourth resampling layer are sequentially arranged;
[0088] Among them, the pooling windows of the first downsampling layer, the second downsampling layer, the third downsampling layer and the fourth downsampling layer are all set to 2; the first feature extraction unit, the second feature extraction unit, the third feature extraction unit and the fourth feature extraction unit are all composed of two convolution blocks and a residual connection block, and each convolution block is composed of a [3×3] convolution layer, Normalization layer and The activation function is composed of the following calculation formulas for the feature extraction unit:
[0089] ,
[0090] in, represents a convolution operation with a kernel size of [3×3], a stride of 1, and a padding of 1. express Normalized and The activation function operates continuously, represents the input image data, Represents the output feature map.
[0091] The specific process of processing the input image data in the encoder is as follows:
[0092] S3.1.1、Dataset The Image data Input to the first feature extraction unit, output feature map , , Representation dataset
[0093] S3.1.2. The feature map obtained in step S3.1.1 Input to the first downsampling layer and output the feature map ;
[0094] S3.1.3. Dataset The Image data Input to the first resampling layer, the image Resample the image The size is cropped to the same as the feature map Consistent, get the feature map ;
[0095] S3.1.4, the feature map obtained in step S3.1.2 Input to the second feature extraction unit, output feature map ;
[0096] S3.1.5. The feature map obtained in step S3.1.4 Input to the second downsampling layer and output the feature map ;
[0097] S3.1.6. The feature map obtained in step S3.1.3 Input to the second resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, get the feature map ;
[0098] S3.1.7, the feature map obtained in step S3.1.5 Input to the third feature extraction unit, and output the feature map ;
[0099] S3.1.8. The feature map obtained in step S3.1.7 Input to the third downsampling layer and output the feature map ;
[0100] S3.1.9, the feature map obtained in step S3.1.6 Input to the third resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, get the feature map ;
[0101] S3.1.10, the feature map obtained in step S3.1.8 Input to the fourth feature extraction unit, and output the feature map ;
[0102] S3.1.11. The feature map obtained in step S3.1.10 Input to the fourth downsampling layer and output the feature map ;
[0103] S3.1.12. The feature map obtained in step S3.1.9 Input to the fourth resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, the output is the feature map .
[0104] The intermediate structure layer is as follows:
[0105] S3.2, the intermediate structure layer includes two convolution blocks and a residual connection block, where the convolution blocks are composed of a [3×3] convolution layer, a BN normalization layer and a Relu activation function;
[0106] The feature map obtained in step S3.1.11 Input to the intermediate structure layer and output the feature map , the calculation formula is as follows:
[0107] .
[0108] The fusion filter enhancement and geodesic distance transform decoder are as follows:
[0109] S3.3, the fusion filter enhancement and geodesic distance transform decoder part is sequentially provided with a first filter enhancement and geodesic distance transform module, a first decoder module, a second filter enhancement and geodesic distance transform module, a second decoder module, a third filter enhancement and geodesic distance transform module, a third decoder module, a fourth filter enhancement and geodesic distance transform module, and a fourth decoder module;
[0110] The four filter enhancement and geodesic distance transform modules each include an upsampling layer, a filter enhancement layer, a geodesic distance transform layer, a convolution layer, Activation function, The activation function is calculated as follows:
[0111] ,
[0112] ,
[0113] ,
[0114] ,
[0115] in, represents a convolution operation with a convolution kernel size of [1×1], represents the input feature map, represents the operation of the upsampling layer, Represents the feature map of the skip connection. The feature map of the skip connection includes , , and , express Activation function, express Activation function, represents the feature map obtained by the first formula operation, It means taking the point set with the largest pixel value for the feature map. represents the obtained point set, Represents the resampled feature map, the resampled feature map includes , , and , represents the filtering enhancement operation, Indicates the calculation of geodesic distance between the input point set and the feature map. represents the geodesic distance map, represents the product operation, Represents the output feature map of the entire filtering enhancement and geodesic distance transformation module;
[0116] Each of the four decoder modules contains two convolution blocks and one residual connection block, and the calculation formula is:
[0117] ,
[0118] in, represents the feature map output by the decoder module, It represents a convolution operation with a kernel size of [3×3], a stride of 1, and a padding of 1. () indicates BN normalization operation and Relu activation function continuous operation.
[0119] The specific process of fusion filtering enhancement and geodesic distance transform decoder is as follows:
[0120] S3.3.1 The feature map obtained in step S3.2 , the feature map obtained in step S3.1.10 And the feature map obtained in S3.1.12 Input to the first filter enhancement and geodesic distance transformation module, and output the feature map ;
[0121] S3.3.2 The feature map obtained in step S3.3.1 Input to the first decoder module, output feature map ;
[0122] S3.3.3 The feature map obtained in step S3.3.2 and the feature map obtained in step S3.1.7 and the feature map obtained in step S3.1.9 Input to the second filtering enhancement and geodesic distance transformation module, and output the feature map ;
[0123] S3.3.4 The feature map obtained in step S3.3.3 Input to the second decoder module, output feature map ;
[0124] S3.3.5 The feature map in step S3.3.4 , the feature map in step S3.1.4 and the feature maps in S3.1.6 Input to the third filter enhancement and geodesic distance transformation module, and output the feature map ;
[0125] S3.3.6 Convert the feature map in step S3.3.5 Input to the third decoder module and output the feature map ;
[0126] S3.3.7 The feature map in step S3.3.6 , the feature map in step S3.1.1 and the feature maps in S3.1.3 Input to the fourth filter enhancement and geodesic distance transformation module, and output the feature map ;
[0127] S3.3.8 Convert the feature map in step S3.3.7 Input to the fourth decoder module, output feature map , and then After a convolution operation, the final result image is obtained , Specifically, it is a probability map, which records the predicted probability of each element belonging to a blood vessel.
[0128] S4 is as follows:
[0129] The loss function is calculated as follows:
[0130] ,
[0131] ,
[0132] ,
[0133] in, represents the total loss function, Represents binary loss, represents the cross entropy loss, and Respectively represent the weight coefficients used to adjust the contribution of the two losses, Indicates deviation, represents the total number of element samples, Indicates The predicted probability of an element, , Indicates The true label of each element;
[0134] Through the loss function The difference between the network structure prediction results and the true label is measured to obtain the gradient of the loss function with respect to the weights and biases in the blood vessel extraction network model.
[0135] S5 is as follows:
[0136] The vascular extraction network model uses AdamW as the optimizer. The adaptive learning rate of the weights and biases in the vascular extraction network model is calculated by using the moving average of the gradient mean and variance. Then AdamW uses the learning rate and the calculated gradient to update the parameters of the network structure. By repeatedly calculating the gradient and updating the parameters, the loss function value gradually decreases and stops when it reaches the set threshold. The network structure is updated and optimized, and the optimal parameters in the training process are saved. The AdamW parameter update formula is:
[0137] ,
[0138] ,
[0139] ,
[0140] ,
[0141] ,
[0142] ,
[0143] Where t represents the time step, represents the gradient at time t, represents the weight value of weight and bias in the blood vessel extraction network model at time t-1, represents the learning rate obtained by the learning rate decay strategy, , , , , are constants, , They are , The tth power, represents the gradient at time step t, represents the first-order moment estimate of the gradient, represents the second-order moment estimate, represents the first-order moment estimate bias correction, Represents the second-order moment estimation deviation correction, and the above parameters are saved.
[0144] The filtering enhancement and geodesic distance transformation modules in the present invention are specifically as follows:
[0145] The traditional mathematical image data processing method and deep learning method are combined, and the Frangi filter is used to preprocess the image to enhance the vascular structure in the image. The Frangi filter uses the Hessian matrix at multiple scales to calculate the vesselness value of each point in the image. The higher the value, the more likely the pixel belongs to the vascular structure, so as to enhance the slender structure similar to the blood vessel. For a given pixel, its Hessian matrix is a matrix composed of the second-order partial derivatives of the image intensity function at that point. The formula for calculating the vesselness value of the Frangi filter is as follows:
[0146] ,
[0147] in, represents the ratio, , represents the eigenvalue of the Hessian matrix at each point at each scale, Used to distinguish vascular structures from spherical structures. Vascular structures should have a higher Value and lower value, , used to suppress background noise. and c are two parameters of the algorithm, controlling and sensitivity;
[0148] Geodesic distance transform is a distance calculation method based on image content. It calculates the shortest path length from a subset of the image to each point outside the subset, where the subset is the points inside the blood vessel. The sampling method of the present invention is a fast marching algorithm, which works in an iterative manner, starting from a set of input points and gradually spreading outward until the entire image is covered. On the input image, given point The distance value to its known neighbor points , New distance estimate for It can be obtained through the following equation:
[0149] ,
[0150] in, It's on point The cost of , simplifying the above equation, can get the following equation to update the distance value of each point:
[0151] ,
[0152] in, and It is at and The partial derivative in the direction can be considered as point The known distance values of the adjacent points are used to approximate the calculation, and then the above equation is solved to find The minimum non-negative solution of , this solution represents the distance from the starting point to the input point The shortest geodesic distance estimation is performed by iteratively calculating the shortest geodesic distance from the starting point to each point in the image, and a geodesic distance map is generated. This distance map is combined with deep learning for better image processing.
[0153] Example 2
[0154] 30% of the data in the data sets DRIVE and FIVE were selected for testing. The present invention achieved results of 96.47%, 80.38% and 84.25% in accuracy Acc, similarity coefficient Dice and accuracy Pre, respectively. Compared with the advanced U-Net (deep learning model), ResUnet (deep learning structure combining ResNet and U-Net) and Dense Unet (network model combining DenseNet and Unet), it can be seen from the comparison results in Table 1 that the present invention can better extract data sets with high complexity and can extract continuous vascular structures.
[0155] Table 1 Comparison of the results of the present invention with other models
[0156]
[0157] Example 3
[0158] like Figure 3 As shown, the input fundus image and its corresponding label map and the image processed by the method of the present invention. By comparing the label map of the fundus image and the image processed by the method of the present invention, it can be seen that the vascular image extracted by the method of the present invention is almost identical to the label map of the fundus image. Therefore, it can be seen that the fundus image vascular extraction by the method of the present invention has extremely high accuracy. The method of the present invention can realize the extraction of complete and continuous vascular structures from complex, low-contrast medical images, thereby helping doctors to diagnose and treat diseases.
[0159] Although the above describes the specific implementation mode of the invention in conjunction with the drawings, it is not intended to limit the scope of protection of the invention. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.
Claims
1. A blood vessel extraction method integrating filtering enhancement and geodesic distance transformation, characterized in that: The following steps are involved: S1. Select image data from the retinal vascular dataset DRIVE and the fundus image vascular segmentation dataset FIVES to construct a dataset ; S2. The data set is processed by AHE algorithm Perform cropping, flipping, rotation, and scaling operations to augment the dataset The image data in the dataset is obtained , the dataset according to The ratio of the augmented dataset is divided into training sets and test set ; S3. Build a blood vessel extraction network model and train the training set The image data is input into the model for training. The blood vessel extraction network model includes three parts: encoder, intermediate structure layer, fusion filter enhancement and geodesic distance transform decoder. The fusion filter enhancement and geodesic distance transform decoder part is sequentially provided with a first filter enhancement and geodesic distance transform module, a first decoder module, a second filter enhancement and geodesic distance transform module, a second decoder module, a third filter enhancement and geodesic distance transform module, a third decoder module, a fourth filter enhancement and geodesic distance transform module, and a fourth decoder module; The four filter enhancement and geodesic distance transform modules each include an upsampling layer, a filter enhancement layer, a geodesic distance transform layer, a convolution layer, Activation function, Activation function; Each of the four decoder modules contains two convolutional blocks and one residual connection block; S4. Calculate the loss function gradient based on the predicted results and the true labels to measure the performance of the blood vessel extraction network model; S5, training the model by updating and optimizing the parameters in the blood vessel extraction network model, and saving the optimal parameters during the training process; S6. Load the saved optimal parameters into the blood vessel extraction network model and read the test set The blood vessels are extracted from the image data and the results are saved after they are obtained.
2. The blood vessel extraction method of claim 1 that combines filtering enhancement and geodesic distance transformation, wherein: S3 is as follows: S3.1, the encoder is a feature extraction part, wherein a first feature extraction unit, a first downsampling layer, a first resampling layer, a second feature extraction unit, a second downsampling layer, a second resampling layer, a third feature extraction unit, a third downsampling layer, a third resampling layer, a fourth feature extraction unit, a fourth downsampling layer, and a fourth resampling layer are sequentially arranged; Among them, the pooling windows of the first downsampling layer, the second downsampling layer, the third downsampling layer and the fourth downsampling layer are all set to 2; the first feature extraction unit, the second feature extraction unit, the third feature extraction unit and the fourth feature extraction unit are all composed of two convolution blocks and a residual connection block, and each convolution block is composed of a [3×3] convolution layer, Normalization layer and The activation function is composed of the following calculation formulas for the feature extraction unit: , in, represents a convolution operation with a kernel size of [3×3], a stride of 1, and a padding of 1. express Normalized and The activation function operates continuously, represents the input image data, Represents the output feature map.
3. The blood vessel extraction method of claim 2, wherein the encoder The specific process of processing the input image data is as follows: S3.1.1、Dataset The Image data Input to the first feature extraction unit, output feature map , , Representation dataset S3.1.
2. The feature map obtained in step S3.1.1 Input to the first downsampling layer and output the feature map ; S3.1.
3. Dataset The Image data Input to the first resampling layer, the image Resample the image The size is cropped to the same as the feature map Consistent, get the feature map ; S3.1.4, the feature map obtained in step S3.1.2 Input to the second feature extraction unit, output feature map ; S3.1.
5. The feature map obtained in step S3.1.4 Input to the second downsampling layer and output the feature map ; S3.1.
6. The feature map obtained in step S3.1.3 Input to the second resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, get the feature map ; S3.1.7, the feature map obtained in step S3.1.5 Input to the third feature extraction unit, and output the feature map ; S3.1.
8. The feature map obtained in step S3.1.7 Input to the third downsampling layer and output the feature map ; S3.1.9, the feature map obtained in step S3.1.6 Input to the third resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, get the feature map ; S3.1.10, the feature map obtained in step S3.1.8 Input to the fourth feature extraction unit, and output the feature map ; S3.1.
11. The feature map obtained in step S3.1.10 Input to the fourth downsampling layer and output the feature map ; S3.1.
12. The feature map obtained in step S3.1.9 Input to the fourth resampling layer, the feature map Resample and crop the size to the same size as the feature map Consistent, the output is the feature map .
4. The blood vessel extraction method of claim 3 that combines filtering enhancement and geodesic distance transformation, wherein: The intermediate structure layer is as follows: S3.2, the intermediate structure layer includes two convolution blocks and a residual connection block, where the convolution blocks are composed of a [3×3] convolution layer, a BN normalization layer and a Relu activation function; The feature map obtained in step S3.1.11 Input to the intermediate structure layer and output the feature map , the calculation formula is as follows: 。 5. The blood vessel extraction method of claim 4, characterized in that: The filter enhancement and geodesic distance transform decoder are as follows: S3.3, the calculation formulas of the four filtering enhancement and geodesic distance transformation modules are as follows: , , , , in, represents a convolution operation with a convolution kernel size of [1×1], represents the input feature map, represents the operation of the upsampling layer, Represents the feature map of the skip connection. The feature map of the skip connection includes , , and , express Activation function, express Activation function, represents the feature map obtained by the first formula operation, It means taking the point set with the largest pixel value for the feature map. represents the obtained point set, Represents the resampled feature map, the resampled feature map includes , , and , represents the filtering enhancement operation, Indicates the calculation of geodesic distance between the input point set and the feature map. represents the geodesic distance map, represents the product operation, Represents the output feature map of the entire filtering enhancement and geodesic distance transformation module; The calculation formulas for the four decoder modules are: , in, represents the feature map output by the decoder module, It represents a convolution operation with a kernel size of [3×3], a stride of 1, and a padding of 1. () indicates BN normalization operation and Relu activation function continuous operation.
6. The blood vessel extraction method of claim 5, characterized in that: The specific process of filtering enhancement and geodesic distance transform decoder is as follows: S3.3.1 The feature map obtained in step S3.2 , the feature map obtained in step S3.1.10 And the feature map obtained in S3.1.12 Input to the first filter enhancement and geodesic distance transformation module, and output the feature map ; S3.3.2 The feature map obtained in step S3.3.1 Input to the first decoder module, output feature map ; S3.3.3 The feature map obtained in step S3.3.2 and the feature map obtained in step S3.1.7 and the feature map obtained in step S3.1.9 Input to the second filtering enhancement and geodesic distance transformation module, and output the feature map ; S3.3.4 The feature map obtained in step S3.3.3 Input to the second decoder module, output feature map ; S3.3.5 The feature map in step S3.3.4 , the feature map in step S3.1.4 and the feature maps in S3.1.6 Input to the third filter enhancement and geodesic distance transformation module, and output the feature map ; S3.3.6 Convert the feature map in step S3.3.5 Input to the third decoder module and output the feature map ; S3.3.7 The feature map in step S3.3.6 , the feature map in step S3.1.1 and the feature maps in S3.1.3 Input to the fourth filter enhancement and geodesic distance transformation module, and output the feature map ; S3.3.8 Convert the feature map in step S3.3.7 Input to the fourth decoder module, output feature map , and then After a convolution operation, the final result image is obtained , Specifically, it is a probability map, which records the predicted probability of each element belonging to a blood vessel.
7. The blood vessel extraction method of claim 6, wherein: S4 is as follows: The loss function is calculated as follows: , , , in, represents the total loss function, Represents binary loss, represents the cross entropy loss, and Respectively represent the weight coefficients used to adjust the contribution of the two losses, Indicates deviation, represents the total number of element samples, Indicates The predicted probability of an element, , Indicates The true label of each element; Through the loss function The difference between the network structure prediction results and the true label is measured to obtain the gradient of the loss function with respect to the weights and biases in the blood vessel extraction network model.
8. The blood vessel extraction method of claim 7 that combines filtering enhancement and geodesic distance transformation, wherein: S5 is as follows: The vascular extraction network model uses AdamW as the optimizer. The adaptive learning rate of the weights and biases in the vascular extraction network model is calculated by using the moving average of the gradient mean and variance. Then AdamW uses the learning rate and the calculated gradient to update the parameters of the network structure. By repeatedly calculating the gradient and updating the parameters, the loss function value gradually decreases and stops when it reaches the set threshold. The network structure is updated and optimized, and the optimal parameters in the training process are saved. The AdamW parameter update formula is: , , , , , , Where t represents the time step, represents the gradient at time t, represents the weight value of weight and bias in the blood vessel extraction network model at time t-1, represents the learning rate obtained by the learning rate decay strategy, , , , , are constants, , They are , The tth power, represents the gradient at time step t, represents the first-order moment estimate of the gradient, represents the second-order moment estimate, represents the first-order moment estimate bias correction, Represents the second-order moment estimation deviation correction, and the above parameters are saved.
Citation Information
Patent Citations
Blood vessel segmentation method of deep learning network integrated with geodesic voting algorithm
CN116524191A
Tubular structure rapid tracking method fused with neural network
CN117078720A