Disclosure of Invention
The present invention is directed to overcoming the above-mentioned drawbacks of the prior art and providing a method for detecting an aneurysm and predicting the risk of rupture in digital subtraction angiography.
The purpose of the invention can be realized by the following technical scheme:
a method for aneurysm detection and risk of rupture prediction in digital subtraction angiography, comprising the steps of:
1) automatically extracting a frame of image from the DSA image, and performing noise removal and normalization pretreatment on the extracted image;
2) constructing a multi-scale aneurysm detection filter according to the response difference of the image blackplug matrix characteristic value to different structures, and automatically searching the detection parameters of the filter by adopting Bayesian optimization;
3) the method comprises the steps of enhancing the aneurysm on an image by using a filter after parameter optimization, judging the aneurysm according to the mean value of filter response intensity and the shape characteristic of the aneurysm, removing the detected aneurysm by using a region growing method, and performing cyclic detection on the image from which the aneurysm is removed;
4) extracting blood flow perfusion characteristics, texture characteristics and intensity characteristics of the detected aneurysm;
5) and (3) performing feature screening on the features of the unbroken and broken aneurysms by adopting iterative sparse representation to obtain features with higher discriminativity, and then performing classification decision by adopting sparse representation.
Further, the step 1) specifically comprises the following steps:
11) extracting images from the artery phase and the capillary phase of the DSA, removing image noise by adopting Gaussian filtering, enhancing blood vessels on the image by adopting a Frangi filter, obtaining a binary blood vessel image by adopting an Otsu threshold segmentation method, and corroding the binary image by utilizing a morphological corrosion method to remove small spots in the binary image;
12) marking a connected region of the image, thinning the main blood vessel by taking the maximum connected region of the binary image as the main blood vessel to obtain a blood vessel center line, eliminating blood vessel branches which are perpendicular to the trend of the blood vessel and have pixel points less than 10, and calculating the length of the blood vessel center line of all image frames;
13) in the arterial phase, the length of the center line of the blood vessel is gradually increased, when the arterial phase is nearly finished, the length of the center line reaches the first maximum value, the image at the moment is extracted to detect the aneurysm, and normalization processing is carried out on the extracted image.
Further, in step 2), the multi-scale aneurysm detection filter is composed of eigenvalues of an image blackplug matrix, and the blackplug matrix is defined as a convolution of a pixel gray value and a gaussian function derivative, and then:
wherein, H is a black plug matrix, and I (x) is a coordinate point x ═ x in the two-dimensional image
1,x
2]
TG (x, s) is a Gaussian function, and
s represents a scale parameter and x represents a convolution.
Further, in the step 2), the aneurysm detection filter BpThe expression of (a) is:
wherein λ is2(x, s) denotes. lambda.2(x) The value at the s-scale, τ being a parameter determining the strength of the filter response, λ1、λ2Two eigenvalues of a black plug matrix of pixels in the image, and lambda1|≤|λ2|,B1And λρIs an intermediate parameter.
Further, in the step 2), a maximum response value of the filter is obtained by comparing a characteristic value of each point x in the image under the s scale, and the detection parameters of the filter specifically include:
wherein A isrAnd P is the area and perimeter, V, of the measured object, respectivelymeanFor the average value of the filter response intensity, the larger the value of the detection parameter F, the more likely it is an aneurysm.
Further, in the step 2), in the aneurysm detection process, a bayesian optimization method is adopted to automatically find two unknown detection parameters τ and s of the filter, the target is to search the maximum value of the detection parameter F, the corresponding parameter is the detection parameter of the filter, and in order to obtain the maximum value of the detection parameter F, the filter parameter is adjusted and the F value corresponding to each group of parameters is calculated for comparison.
The optimal parameter set can be automatically and quickly found by adopting Bayesian optimization without manually selecting or setting any parameter, and after the filter parameter is found, the filter parameter is substituted into the filter for aneurysm detection.
Further, in the step 4), the aneurysms of the five continuous frames of images, including ruptured aneurysms and unbroken aneurysms, are extracted, and corresponding blood perfusion characteristics, intensity characteristics and texture characteristics are respectively extracted. .
Further, the extraction of the blood perfusion characteristics of the aneurysm is specifically as follows:
selecting three different positions on the image, namely the interior of the aneurysm, the edge of the aneurysm and the exterior of the aneurysm, selecting an interested region with the size of 5 x 5 at each position, drawing a time-density curve of the interested region at each position, and extracting blood flow perfusion characteristics from the time-density curve.
Further, the extraction of the intensity features and texture features of the aneurysm is specifically as follows:
and extracting intensity and texture features according to the difference of the aneurysm gray level and texture on the image, wherein the intensity features describe the statistical distribution of voxel intensity in the image, and the texture features describe the texture difference of the image respectively based on a gray level co-occurrence matrix, a gray level run-length matrix, a gray level size area matrix and a neighborhood gray level difference matrix.
Further, in the step 5), a method of iterative sparse representation is adopted to select features closely related to sample labels, specifically, an OMP algorithm is adopted to solve an optimization problem, a sliding window strategy is adopted in the sparse representation method, and information of all samples in a window is utilized, so that an iterative process specifically includes the following steps:
51) calculating coefficients after the kth iteration
Then there are:
wherein, gkAs a standard value for the kth iteration, FkThe sample characteristic of the kth iteration is sigma, which is a small constant;
52) calculating the coefficient after the k iteration
Average value of (2)
When the condition of M is satisfied
(k)-M
(k-1)||
2< ε or K ═ K
0Then the iteration stops, where ε is a small positive integer, K
0Is the maximum iteration number;
53) coefficient M obtained by iteration(k)The method is used for feature selection, each feature corresponds to a score through iterative operation, the higher the score is, the more important the feature is, the final scores are sorted, a set number of features are selected for classification, the selected features are classified by adopting a sparse representation method, and then a sparse representation classification model is as follows:
wherein F represents the characteristics of the aneurysm to be tested, and F ═ F
R,F
U],F
R=[f
1,f
2,…,f
n1]For the feature set of the ruptured aneurysm in the training sample, n is the number of ruptured aneurysms, F
U=[f
1,f
2,…,f
n2]To train the feature set for the unbroken aneurysm in the sample, n2 is the number of unbroken aneurysms, p is a sparsely represented control parameter,
for sparse representation of coefficients, when obtaining optimal sparse representation coefficients
According to the residual r
α(f) The class to which the feature belongs is judged,then the residual error r
α(f) The expression of (a) is:
wherein, deltaα(.) represent coefficients corresponding to the selected feature classes.
Compared with the prior art, the invention has the following advantages:
according to the characteristic that the intracranial aneurysm on the DSA image is in a similar circular shape, a multi-scale aneurysm detection filter is constructed based on the response difference situation of the characteristic value of a blackplug matrix to different object structures in the image, and the detection parameters of the filter are automatically searched by adopting a Bayesian optimization method, so that manual setting is not needed, and the manual intervention quantity is reduced.
And secondly, for the rupture risk prediction of the aneurysm, respectively extracting texture characteristics, intensity characteristics and blood flow perfusion characteristics of the aneurysm according to the morphological texture difference and the blood flow difference, wherein the characteristics can effectively reflect the difference between ruptured aneurysm and non-ruptured aneurysm.
Thirdly, the invention adopts a feature screening and classifying method based on sparse representation, can screen partial more distinctive features from the extracted features, and improves the classifying precision while reducing the calculated amount.
Detailed Description
The aneurysm detection and rupture risk prediction method in DSA will be described in detail below with reference to the accompanying drawings and embodiments,
examples
As shown in fig. 1, the present invention provides a method for detecting an aneurysm and predicting a rupture risk in digital subtraction angiography, which comprises the following steps:
step 1, for each frame of image of DSA, starting from a first frame, firstly adopting Gaussian filtering to remove image noise, then utilizing a Frangi filter to enhance blood vessels, adopting an Otsu threshold segmentation method to obtain a binary blood vessel image, utilizing a flat disc structural element with the radius of 2 to corrode the binary image, removing small spots in the binary image, marking a connected region of the image, finding out the largest connected region as a main blood vessel, thinning the main blood vessel to obtain a center line of the blood vessel, eliminating blood vessel branches perpendicular to the trend of the blood vessel and with pixel points smaller than 10, calculating the length of the center line of the blood vessel, calculating each frame of image by using the same method, finding out a frame at the position of a first maximum value after the lengths of the center lines of all frames in the DSA image are obtained, and extracting the image of the frame to detect aneurysms;
step 2, normalizing the image with the noise removed, constructing an aneurysm detection filter based on the image blackplug matrix eigenvalue, searching filter detection parameters by a Bayesian optimization method, setting a tau value change range between 0.8 and 1 and a s value change range between 0 and 20 for two unknown parameters reflecting the target size and intensity in the filter, setting the search times as 50, namely searching and iterating 50 times in an image space, setting a Bayesian optimization acquisition function as a gain expectation, aiming at balancing between development and exploration and finding an optimal parameter value, so that tau and s corresponding to F as the maximum value are the optimal detection parameters of the filter, obtaining a group of detection parameters after the search is finished, each aneurysm corresponds to a group of optimal detection parameters, and removing the aneurysm by a region growing method after the aneurysm is detected, then repeating the previous steps in the rest images and then carrying out detection;
step 3, intercepting the detected aneurysms, wherein the aneurysms which are not ruptured form one group, the ruptured aneurysms form another group, then respectively extracting features, wherein the intensity features and the texture features obtained from each aneurysm are respectively 31 and 39, so that each frame of image has 70 features, extracting five continuous frames of images from a key frame, extracting the aneurysms of each frame of image, and then respectively extracting the features such as intensity, texture and the like, so that 350(5 × 70) features can be obtained; selecting ROI (region of interest) at three different positions of the aneurysm from DSA (digital image acquisition) images, namely the inside of the aneurysm, the edge of the aneurysm and the outside of the aneurysm, selecting an image area with the size of 5 multiplied by 5 at each position, drawing a time-density curve, obtaining blood flow perfusion information from the curve, obtaining 11 blood flow perfusion characteristics at the inside, the edge and the outside of the aneurysm, extracting 33 blood flow perfusion characteristics from each aneurysm, obtaining two characteristics 383(350+33) in total,
and 4, performing feature screening on the two extracted features by using a sparse representation method, wherein parameters during the specific screening are set as follows: maximum number of iterations K0350, the small positive number epsilon is 0.0001, the number of samples selected in each iterative operation is 5, then the importance of the features is ranked by using iterative sparse representation, the first 11 important features are selected at first, the accuracy rate is calculated by using a sparse representation classification model, then a feature is newly added in each calculation until the 80 th important feature is added, so that 70 different accuracy values are obtained in total, the feature number corresponding to the highest accuracy rate is used for final aneurysm rupture risk prediction, and 32 important features are finally screened out,
step 5, after sparse representation screening, extracting 32 important features from each aneurysm, training and testing by using a sparse representation classifier, setting control parameters to be 0.5 and residual error to be 0.001 when the sparse representation classifier is trained, solving a sparse representation classification model by using an orthogonal matching pursuit algorithm, and finally judging the class of the features according to the sparse representation residual error, wherein in the embodiment of the invention, the performance of the classifier is evaluated by using AUC (area Under classifier), accuracy, sensitivity and specificity,
the following describes a specific implementation procedure of aneurysm detection and rupture risk prediction according to this embodiment.
In the data set used in the present invention, there were 263 aneurysms in total, of which 138 non-ruptured aneurysms and 125 ruptured aneurysms, 287 were used as training set and the remaining 76 were used as test set (36 ruptured aneurysms and 40 non-ruptured aneurysms) during training, and for aneurysm rupture risk prediction, four different sets of characteristics were selected for comparative experiments:
(1) intensity features and texture features (ITF) of a single frame image;
(2) intensity, texture, and blood perfusion characteristics (ITPF) of the single frame image;
(3) intensity features and texture features (ITSF) of the five frame image;
(4) intensity features, texture features, and blood flow perfusion features (ITPSF) of the five frame images.
The present invention adopts the features of group (4), and tables 1 and 2 are the aneurysm rupture risk prediction results before and after feature selection, respectively.
TABLE 1 prediction of aneurysm rupture before feature selection
TABLE 2 prediction of aneurysm rupture following feature selection
As can be seen from tables 1 and 2, both accuracy and AUC were significantly improved after feature selection. In table 2, the method proposed by the present invention achieves the highest accuracy of 96.1%, the sensitivity also reaches 94.4%, and the AUC is 0.982. And among four different groups of characteristics, the accuracy rate is the lowest when the intensity characteristic and the texture characteristic of a single frame image are used, and the accuracy rate is only 90.8%. After time sequence information and blood flow perfusion characteristics are added, the accuracy and other evaluation indexes are improved, the accuracy and AUC of the second group in the table are higher than those of the third group, and the result shows that the perfusion characteristics can identify ruptured aneurysms and unbroken aneurysms better than the time sequence information.
In summary, the present invention provides a method for aneurysm detection and rupture risk prediction. Firstly, constructing a multi-scale aneurysm detection filter based on a blackplug matrix theory, automatically searching parameters of the filter by Bayesian optimization, and detecting the aneurysm according to the shape of the aneurysm and the response condition of the filter; then, extracting the characteristics of related texture, strength, blood perfusion and the like according to the morphological characteristics and the blood flow condition of the aneurysm; finally, feature screening and classification are carried out by using a sparse representation method, and an aneurysm rupture risk prediction model is established. Experimental results show that the framework provided by the invention can accurately detect the aneurysm and predict the rupture risk of the aneurysm, and has potential application value in neurosurgery.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.