 Research
 Open Access
 Published:
Automatic detection of intracranial aneurysms in 3DDSA based on a Bayesian optimized filter
BioMedical Engineering OnLine volume 19, Article number: 73 (2020)
Abstract
Background
Intracranial aneurysm is a common type of cerebrovascular disease with a risk of devastating subarachnoid hemorrhage if it is ruptured. Accurate computeraided detection of aneurysms can help doctors improve the diagnostic accuracy, and it is very helpful in reducing the risk of subarachnoid hemorrhage. Aneurysms are detected in 2D or 3D images from different modalities. 3D images can provide more vascular information than 2D images, and it is more difficult to detect. The detection performance of 2D images is related to the angle of view; it may take several angles to determine the aneurysm. As the gold standard for the diagnosis of vascular diseases, the detection on digital subtraction angiography (DSA) has more clinical value than other modalities. In this study, we proposed an adaptive multiscale filter to detect intracranial aneurysms on 3DDSA.
Methods
Adaptive aneurysm detection consists of three parts. The first part is a filter based on Hessian matrix eigenvalues, whose parameters are automatically obtained by Bayesian optimization. The second part is aneurysm extraction based on region growth and adaptive thresholding. The third part is the iterative detection strategy for multiple aneurysms.
Results
The proposed method was quantitatively evaluated on data sets of 145 patients. The results showed a detection precision of 94.6%, and a sensitivity of 96.4% with a falsepositive rate of 6.2%. Among aneurysms smaller than 5 mm, 93.9% were found. Compared with aneurysm detection on 2DDSA, automatic detection on 3DDSA can effectively reduce the misdiagnosis rate and obtain more accurate detection results. Compared with other modalities detection, we also get similar or better detection performance.
Conclusions
The experimental results show that the proposed method is stable and reliable for aneurysm detection, which provides an option for doctors to accurately diagnose aneurysms.
Background
Intracranial aneurysm is a serious lifethreatening cerebrovascular disease and usually occurs around the arteries at the base of the brain called the Circle of Willis. The worldwide incidence of aneurysms is approximately 3% [1]. In a crosssectional study in China, 7% of adults between the ages of 35 and 75 years had an aneurysm detected on widespread screening with brain magnetic resonance angiography (MRA) [2]. Subarachnoid hemorrhage (SAH), which results from the rupture of an intracranial aneurysm, is a devastating event associated with high rates of mortality (40–50%) and morbidity, while only 40% of SAH patients recover to reach independent status [3, 4]. Aneurysm rupture is a rare event; nevertheless, early detection is essential for its prevention. With early detection, the growth of aneurysms can be halted by interventional or surgical treatment [5]. Intracranial aneurysms are usually asymptomatic before rupture and are often found incidentally [6]. The increasing use of medical imaging devices has led to an increased diagnosis rate of unruptured intracranial aneurysms. Image modalities that are used in aneurysm diagnosis usually include computed tomography angiography (CTA), magnetic resonance angiography (MRA), and digital subtraction angiography (DSA). These imaging techniques can adequately show the location, size and shape of aneurysms and help doctors make reasonable treatment plans [7]. For some small intracranial aneurysms, CTA and MRA diagnosis performance is not as good as DSA, which has been used as the ground truth for aneurysm diagnosis [8, 9].
Detection of aneurysms can help doctors to improve the accuracy of aneurysm diagnosis, allowing them to take effective measures for developing a corresponding treatment to reduce the risk of arachnoid hemorrhage. Generally, aneurysms are detected from 2D or 3D images. Different detection systems have been tested with different angiographic modalities [10]. Many studies have shown some progress in the detection of aneurysms on 2DDSA. Sulayman et al. [11] proposed a semiautomatic detection algorithm that combined image processing and machine learning and achieved 89.5% sensitivity and 81% positive predictive value on 2DDSA. Jin et al. [12] proposed a novel, fully automated detection and segmentation on 2DDSA time series images. They combined a deep learning model (Unet) with long shortterm memory (LSTM) and obtained an aneurysm detection sensitivity of 89.3%. Rahmany et al. [13] separated blood vessels from the background, and further processed the vessel regions to detect aneurysms by integrating MSER, SURF and SIFT feature descriptors. The sensitivity of their method was 100%, but only the data from three patients were analyzed. Other detection methods have only been evaluated for a single patient; these methods are generally based on traditional image processing [14, 15].
In addition to 2DDSA, aneurysm detection systems have also been developed for using on 3DMRA and 3DCTA. Hanaoka et al. [16] extracted a novel feature named HoTPiG (Histogram of Triangular Paths in Graph) from 3DMRA. Then, they used a traditional machine learning method to detect aneurysms, and the results showed a sensitivity of 89.2%. Sichterman et al. [17] first preprocessed 3DMRA with different methods and then used a neural network that consisted of two pathways with 11 layers to detect intracranial aneurysms; the sensitivity reached 90%. Hentschke et al. [18] combined both lowlevel and highlevel features, which were used to classify and detect aneurysms on MRA and CTA. They achieved a sensitivity higher than 93% for three modalities. After that, Hentschke et al. [19] detected aneurysms with three angiographic modalities (CEMRA, TOFMRA, CTA) by combining the features of shape information, spatial information and probability information. The true positives could be distinguished with a linear discriminant function (LDF), reaching a sensitivity of 95% for the three modalities, and 93% of aneurysms that were smaller than 5 mm were found. According to the local and global geometric characteristics of the aneurysm, Zhou et al. [20] used a pretrained deep learning model to detect aneurysms on different 3D modalities and obtained 94.7% accuracy and 94.8% sensitivity. Yang et al. [21] proposed a fully automated computeraided detection (CAD) scheme for detecting aneurysms on 3D MRA. First, they used two methods to extract points of interest (POI) and then reduced false positives according to feature analysis, obtaining a sensitivity of 96%, but only 91% of aneurysms that were smaller than 5 mm were found.
In the clinical diagnosis of aneurysms, the detection performance for 2D images depends on the selected viewing angle. However, multiple aneurysms may not be all observed at one angle. 3D images can provide more information than 2D images, and its detection is more difficult. As the gold standard for the diagnosis of intracranial aneurysms, DSA is an optimal choice for aneurysm detection. Detection on 3DDSA has more clinical value than on other 3D modalities.
The enhanced filter based on Hessian matrix has great potential in computeraided diagnosis. Some multiscale enhancement filters were proposed to enhance specific shape structures [22,23,24,25]. This idea can also be used in aneurysm detection, but one of the difficulties was in setting the parameters for the multiscale filters. In previous studies, the parameters for multiscale filters were set manually. Therefore, it will be much convenient if these parameters could be searched automatically. For the search of hyperparameters, the common search methods include Grid search, Random search, Genetic algorithm and Bayesian optimization [26]. In fact, grid search and random search are very common and general methods; their search ability is not good as genetic algorithm. However, genetic algorithm also has some defects, such as poor local search ability, long time consuming and slow searching speed [27]. The advantage of Bayesian optimization is to use Gaussian process to adjust the parameters, which will consider the previous search information and constantly update the prior knowledge [28]. Moreover, Bayesian optimization has fewer iterations and faster speed, and it is still stable for nonconvex problems [29]. In this study, we proposed an automatic detection of intracranial aneurysms on 3DDSA based on a Bayesian optimized filter.
Results
In the evaluated data, there were 165 aneurysms in 145 patients, among whom 127 patients had one aneurysm, 16 patients had two aneurysms, and 2 patients had three aneurysms. The response of the enhancement filter was visualized by rendering technology. After the optimal scale parameters were obtained by Bayesian optimization, the proposed filter was used to detect the aneurysms.
All 3DDSA data were analyzed with the same method. These data may or may not contain aneurysms, and there may be one or multiple aneurysms in the data. In clinical diagnosis, although most patients have only one aneurysm, multiple aneurysms also occur occasionally. In our method, when the detected target was an aneurysm, it was removed, and then the steps were repeated in the remaining image to continue detection. In the second round of detection, another set of optimal parameters was obtained. These parameters were substituted into the filter and used to continue to detect aneurysms in the remaining image. In this way, two aneurysms in a patient could be detected. When there were more than two aneurysms in a patient, the detection method was repeated again. Figures 1 and 2 illustrate the detection results of two aneurysms in a single patient.
Figure 1 shows the first aneurysm detection process. The maximum intensity projection (MIP) and 3D visual rendering were used to display the blood vessels and aneurysms, respectively. In Fig. 1, the red arrow indicates the first aneurysm. Figure 1a, b shows the image to be detected.
Figure 1c shows the Bayesian optimization process for finding the parameters of the aneurysm filter, where ×1 and ×2 represent the two parameters \(\left( {{\text{s}},\tau } \right)\), respectively, of the filter. The ordinate represents the target function value corresponding to each group of parameters, the blue point represents the point that has been found in each search process, and the black point is the next group of parameter points found by model calculation in the Bayesian optimization process. Since the number of calculations was set to 50 in advance, there are 50 points in the graph. In the final result, the point with the lowest objective function value is the optimization point, which is represented by a red asterisk.
When the optimal parameters were obtained by Bayesian optimization, these parameters were substituted into the filter for aneurysm detection. Figure 1d, e shows the filtered image. As seen from the figure, the aneurysm was obviously enhanced, and other areas, including blood vessels, were suppressed to dark pixel values. In Fig. 1f, g, the detected aneurysm was removed by region growth. According to the detection rules, if the first target was detected as an aneurysm, it was removed, and then the detection steps were repeated until the target was not an aneurysm.
Figure 2 shows the Bayesian optimization process and detection results for the second aneurysm. The detection process and image display were the same as the first aneurysm. Also, Fig. 2a, b shows the image to be detected. Figure 2c shows the Bayesian optimization procedure for detection of the second aneurysm. Figure 2d, e shows the filtered image, in which the red arrow indicates the detected aneurysm. According to the same rule used for the first aneurysm, the second aneurysm was also extracted by region growth. After the first and second aneurysms were detected, the detection process was continued, as shown in Fig. 2f, g. When no more aneurysms were detected, the detection process was stopped.
The filter can enhance not only spherical aneurysms but also aneurysms that slightly deviate from a spherical structure. In our method, mean value of the filtering response of the detected target (\(V_{\text{mean}}\)) was used to detect the aneurysm. As the threshold was gradually changed, we could determine whether the detected target was an aneurysm by comparing the value of \(V_{\text{mean}}\) with the threshold. Maximum value of the filtering response of the detected target (\(V_{ \hbox{max} }\)) was also used for comparison, and the detection method was the same as that of \(V_{\text{mean}}\). During filter processing, since the response of the aneurysm region is uniform, it is theoretically better to use the mean value. The diagnosis of two neuroradiologists served as a reference standard. The performance of the proposed method was objectively evaluated by precision, recall, and F1score, which were defined as:
where \({\text{TP}}\), \({\text{TN}}\), \({\text{FP}}\), \({\text{FN}}\) are the number of truepositive aneurysms, number of truenegative aneurysms, number of falsepositive aneurysms, and number of falsenegative aneurysms, respectively. Recall can also be called sensitivity, which is a measure of coverage, and is the proportion true positives among all actual aneurysms. The precision–recall (PR) curve can be obtained by plotting recall on the horizontal axis and precision on the vertical axis. According to the values of precision and recall, the F1score can be calculated; when the value of F1score is maximized, the detection performance is regarded as the best. It is also possible to calculate the false positive rate, which is defined as \({\text{FPR}} = {\raise0.7ex\hbox{${\text{FP}}$} \!\mathord{\left/ {\vphantom {{\text{FP}} {\left( {{\text{FP}} + {\text{TN}}} \right)}}}\right.\kern0pt} \!\lower0.7ex\hbox{${\left( {{\text{FP}} + {\text{TN}}} \right)}$}}\). The receiver operator characteristic (ROC) curve can be drawn from the sensitivity and false positive rate. This curve can also reflect the performance of detection, more specifically by calculating the area under the curve (AUC).
We also detected aneurysms on 2DDSA for comparison. First, we selected a view angle that clearly showed an aneurysm on 2DDSA for each patient and then detected the aneurysm with the method described in this paper, only changing the dimension from 3D to 2D. When the target was extracted, the maximum or mean value of the response of the target was compared with the threshold. When the threshold was gradually changed, different values of precision and recall could be obtained. In this way, a series of different detected results were obtained. The detection process can be drawn as a PR curve and as a ROC curve, which are shown in Figs. 3 and 4, respectively. To increase the experimental contrast, each patient was also assessed by a human. The best detection results are listed in Table 1.
As shown in the PRC and ROC curves, 3DDSA \((V_{\text{mean}} )\) had the best performance and conformed to the theoretical analysis. From the experimental results, we obtained a precision of 94.6% and a recall of 96.4%. When the sensitivity was 96.4%, the falsepositive rate was 6.2%. In our experiment, 6 of 165 aneurysms remained undetected by the proposed method. A histogram of aneurysm size and detection frequency on 3DDSA is shown in Fig. 5. From the detection results, 5 of the falsenegative aneurysms were under 5 mm, and the detection rate for small aneurysms (< 5 mm) was thus (82 − 5)/82 ≈ 93.9%. The mean size of the 6 undetected aneurysms was 3.63 mm, and four of them were not detected by humans on 2DDSA. Because of the nonuniformity of the filter response, the position of some vascular protrusions could also be enhanced very well; so, the performance using the maximum response value as the threshold value was not as good as that of the mean response value. On 2DDSA, due to the limitation of the 2D image perspective, a total of 163 observed targets were regarded as aneurysms, of which 154 were true positive, resulting in a recall of 93.3%. In the automatic detection of aneurysms, overlapping curved vessels and aneurysmal areas are easily confused in 2DDSA; therefore, more false positives are obtained. The experiment shows that the performance of aneurysm detection in 3DDSA is better than that in 2DDSA.
Discussion
In this section, we also compared with other aneurysm detection algorithms. According to the known literature, many aneurysm detection systems were carried on the modalities of 2DDSA, 3DMRA/MRI and 3DCTA. Since the evaluation criteria of each algorithm were different, we selected some criteria for comparison, and the results are shown in Table 2.
When comparing the performance of several other algorithms, the results of our method are superior in some indicators due to differences in data sets and evaluation criteria. As can be seen from Table 2, our method achieved the highest sensitivity. Sulayman et al. [11] combined the traditional feature extraction and machine learning method, 89% detection sensitivity was obtained in 19 cases. Jin et al. [12] used deep learning to detect aneurysms in more 2DDSA cases; the detection sensitivity was the same as Sulayman’s method. They also combined with image segmentation and got a lower dice coefficient. Clemens et al. [19] obtained 95% sensitivity by traditional machine learning, and the sensitivity of small aneurysms detection was 93%, while our result was 93.9%. The F1score obtained by Zhou et al. [20] through deep learning was similar to our proposed method, but we had higher sensitivity. These aneurysm detection systems usually use traditional handcrafted feature machine learning methods or other deep learning methods, and they were detected on the same dimension of image modality. In this paper, we used Bayesian optimization to automatically find filter parameters, and detected aneurysms on both 2DDSA and 3DDSA. As far as we know, it is the first time that Bayesian optimization is used in the automatic search for filter parameters, and based on the theory of Hessian matrix and traditional image processing, we get good detection performance.
We chose DSA instead of other neuroimaging modalities, such as MRA or CTA, for aneurysm intracranial detection because DSA provides maximum contrast between cerebrovascular and surrounding tissues and DSA remains the most effective modality in the diagnosis of cerebrovascular diseases. Compared to 3D images, 2D images are limited by different, constrained view angles, the inability to see some of the aneurysms in some sections, and the interference from overlapping parts of the bending of blood vessels. However, these problems do not affect 3D images, which can provide more information for detection.
This paper presented a novel framework that performed structure enhancement and Bayesian optimization of brain DSA to accurately identify intracranial aneurysms. The methodology presented in the preceding sections efficiently solved the most significant research questions through comprehensive investigation of filter processing and automatic filter parameter adjustment. This method was based on the principle that eigenvalues of the Hessian matrix can enhance objects of different shapes. A filter based on the eigenvalues of the Hessian matrix was constructed, and the optimal parameters were found by Bayesian optimization. By enhancing spherical structures and suppressing other structures, aneurysms could be detected. The proposed method is reliable for the detection of intracranial aneurysms in a patient one at a time.
However, our system also has limitations. The detection of small aneurysms is still very difficult because of the overlap of vascular tissue. The system also generated some false positives, although they could be easily distinguished by humans. Computeraided diagnosis is helpful for doctors to diagnose aneurysms accurately and analyze some of their properties, such as aneurysm rupture. In the future research, we can improve the detection filter and aneurysm extraction rules to increase the detection sensitivity of small aneurysms. We can also combine the threedimensional deep learning to obtain better detection performance.
Conclusions
In this paper, we proposed an automatic aneurysm detection method based on Bayesian optimization filter in 3DDSA. First, we constructed a multiscale enhancement filter based on the attribute of Hessian matrix, and then used Bayesian optimization to automatically search for the optimal detection parameters of the aneurysm filter. We found that the mean response of the filter was a good discriminating parameter, and the adaptive threshold method can be used to determine whether the enhanced target was an aneurysm. When the aneurysm was detected, region growth method was used to remove the aneurysm. The detection was continued in the remaining images, and each aneurysm corresponds to a set of optimal detection parameters. The experimental results show that our method was superior to other methods.
This method was evaluated on 145 patients with 165 intracranial aneurysms, and the quantitative assessment showed good performance of aneurysm detection. We obtained a detection precision of 94.6%, and a sensitivity of 96.4% with a falsepositive rate of 6.2%. The F1score and AUC can reach 95.5% and 0.98, respectively; only 6 aneurysms remained undetected. The analysis was carried out in MATLAB (R2018b).
The proposed method can be used to assist doctors in the diagnosis of aneurysms, which is a stable and reliable detection method. Therefore, we hope that it can give a technical option to improve the accuracy of intracranial aneurysms detection. The major contributions can be summarized as follows:

1.
We carried out aneurysm detection on 3DDSA; compared with other 3D modalities, this modality can provide more complete aneurysm information and reduce the rate of missing aneurysm detection.

2.
We proposed a multiscale aneurysm enhancement filter and established the relationship between aneurysm detection and Bayesian optimization.

3.
We used Bayesian optimization to automatically search for the detection parameters of the aneurysm filter, where each aneurysm corresponded to a set of optimal filter parameters.

4.
For multiple aneurysms, we used an iterative detection strategy and an adaptive threshold based on the region growth method to extract the aneurysms.
Materials and methods
Materials
The original angiography data were obtained from the Department of Neurosurgery, Huashan Hospital, Fudan University. This dataset consisted of information from 145 patients who had data from both 3DDSA and corresponding 2DDSA. The image pixel spacing of DSA was 0.4–0.6 mm. Aneurysms from each patient were studied in this paper. The baseline characteristics of the patients are shown in Table 3. “Single” denotes patients with only one aneurysm, and “Multiple” denotes patients with two or more aneurysms; among the “Multiple” patients, 18 had a total of 38 aneurysms. In the following subsection, the proposed method will be described in detail.
Methods
Figure 6 shows a flowchart of the proposed method. First, the original images were preprocessed. Then, we constructed a filter based on the eigenvalues of the image voxel Hessian matrix and automatically determined the filter parameters through Bayesian optimization. The filter is capable of enhancing the aneurysm area and inhibiting the other tissues of the blood vessels. In the experiment, we found that the mean value of the filter response of the detected target can be used to screen for aneurysms. When an aneurysm is detected, it can be removed by region growth. We can repeat the previous steps to detect any aneurysms in the remaining image. Generally, the detailed process of the proposed computeraided aneurysm detection system includes five steps: (1) preprocessing; (2) optimal filter parameter determination by Bayesian optimization; (3) filter enhancement; (4) adaptive thresholding; (5) aneurysm extraction.
Preprocessing
Given the existence of some noise in the image, a \(3 \times 3 \times 3\) median filter was used to remove the noise. Then, the image pixel values were normalized to the range 0–1. The image preprocessing process is shown in Fig. 7.
Optimal filter parameter determination by Bayesian optimization
Enhancement filters can enhance certain structures in an image. Previous studies [23,24,25] have proposed various multiscale filters based on the second derivative of image intensity. Given that the shape of the aneurysm can be approximated as a sphere, we can regard the detection of the aneurysm as a filtering process using a spherical structure filter. Since the size of aneurysms is variable, it is important to introduce a scale parameter that varies adaptively. Let the intensity of the coordinate point \(x = \left[ {x_{1} ,x_{2} ,x_{3} } \right]^{\text{T}}\) in a 3D image be \(I\left( x \right)\). To analyze the local behavior of an image \(I\left( x \right)\), Taylor expansion was carried out as follows:
where \(\nabla_{0,s}\) and \(H_{0,s}\) are gradient vectors and the Hessian matrix of images at point \(x_{0}\), respectively, and s denotes the scale parameter. A scale space is introduced, and the secondorder derivative of \(I\left( x \right)\) is a \(3 \times 3\) Hessian matrix, which can be defined as a convolution with derivatives of Gaussians:
where \(G\left( {x,s} \right) = \left( {2\pi s^{2} } \right)^{{{\raise0.7ex\hbox{${  3}$} \!\mathord{\left/ {\vphantom {{  3} 2}}\right.\kern0pt} \!\lower0.7ex\hbox{$2$}}}} \exp \left( {  \frac{{x^{\text{T}} x}}{{2s^{2} }}} \right)\) is a 3D Gaussian function, and \(*\) denotes convolution. Assume the three eigenvalues of the Hessian matrix in 3DDSA are \(\lambda_{1} ,\lambda_{2} ,\lambda_{3}\), and they are sorted according to their magnitude \(\left {\lambda_{1} } \right \le \left {\lambda_{2} } \right \le \left {\lambda_{3} } \right\). The eigenvalues of the Hessian matrix can enhance the structure of different shapes. For spherical objects, the relationship between the magnitude and signs of the eigenvalues with the desired enhancement pattern is shown in Table 4 [30].
The magnitude and signs of the eigenvalues of the Hessian matrix reflect the specific shape of the structure, and a filter that is composed of these eigenvalues can enhance objects of different shapes. Bright spherical structures on a dark or bright background can be represented by negative and positive eigenvalues, respectively. In addition to the properties shown in Table 2, when \(\left( {\lambda_{1} \approx \lambda_{2} \approx \lambda_{3}^{{\left {\lambda_{1,2,3} } \right}} \le 0} \right)\), the spherical structure will also be enhanced. Based on the Hessian matrix eigenvalue attributes of 3D images, different filters can be constructed to enhance a specific shape structure. In this paper, inspired by the method proposed by Jerman [31], we used an enhancement filter that combines these eigenvalues to detect intracranial aneurysms as follows:
where \(\lambda_{3} \left( {x,s} \right)\) denotes \(\lambda_{3} (x)\) at scale s; the minimum of all \(\lambda_{3} \left( {x,s} \right)\) is computed to find the eigenvalue with the highest magnitude. The value of \(\tau\) determines the response intensity of the filter. To obtain the maximum filter response value, we need to compare the eigenvalues for each point \(x\) at scale s on the image. The value of s depends on the size of the aneurysm. The values of \(s\) and \(\tau\) vary within certain ranges; \(s\) varies from 0 to 20, and \(\tau\) varies from 0.7 to 1. For aneurysm detection, the goal is to find a set of parameters \(\left( {s,\tau } \right)\) that maximize the value of function \(B_{\text{p}}\). The exponential function in \(B_{\text{p}}\) is used to increase the contrast between light and dark. In our experiment, we can find the maximum value of function \(B_{\text{p}}\) quickly with Bayesian optimization, which automatically finds the parameters. The second eigenvalue \(\lambda_{2}\) does not provide information for distinguishing spherical shapes from other shapes; so, this value is not used to construct the filter.
To obtain the maximum value of the filter, the parameters need to be adjusted repeatedly, and each set of parameters should be calculated for comparison because different scale parameters may enhance different shape and size structures. Bayesian optimization can automatically and quickly find the optimal set of parameters without artificially selecting or setting any of them [32]. Assume a set of hyperparameters \(Z = \left\{ {z_{1} ,z_{2} , \ldots z_{n} } \right\}\), where each \(z_{i} = \left( {s_{i} ,\tau_{i} } \right), i = 1,2,3 \ldots n,\) denotes a set of filter parameters in our experiment, and a corresponding relation between the set of hyperparameters and the final loss function \(f\left( Z \right)\). If there is a function \(f:Z \to R\), using the reciprocal of the proposed filter \(\left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {B_{\text{p}} }}}\right.\kern0pt} \!\lower0.7ex\hbox{${B_{\text{p}} }$}}} \right)\) as the loss function in our method, the goal is to find \(Z \in R\) that makes:
The flow chart of the Bayesian algorithm is as follows:
where \(f\) is the form of the loss function; \(Z\) are the filter parameters; \(R\) is the acquisition function; \(M\) is the hypothesis module of the input data; y is the value of the loss function; and T is the number of iterations. Since each calculation requires many computing resources, the number of iterations was set to 50 in this paper. The specific process of Bayesian optimization calculation is as follows:
 Step 1:

Obtain the initialized dataset \(D = \left( {z_{1} ,y_{1} } \right), \ldots ,\left( {z_{n} ,y_{n} } \right)\);
 Step 2:

Calculate the concrete form of the model M function from the assumed model \(M\) and initial dataset \(D\);
 Step 3:

Acquire the next data point through the acquisition function \(R\);
 Step 4:

Calculate the new value \(f\left( {z_{i} } \right)\) and update the dataset
The input data model is assumed to follow a Gaussian distribution; then, \(f\sim {\text{GP}}\left( {u,K} \right)\) (GP: Gaussian process, \(u\): mean, \(K\): covariance kernel), so the new prediction data also obey a normal distribution:
To obtain the concrete expression of function \(p\left( {y z,D} \right)\), \(y,\hat{u},\hat{\sigma }^{2}\) should be computed first; they are defined as
To avoid falling into a local minimum, the acquisition function \(R\) is defined as:
where \(f^{\prime} = \hbox{min} f\left( z \right)\) and \(u\left( z \right) = \hbox{max} \left( {0,f^{\prime}  f\left( z \right)} \right)\). Finding the maximum absolute value of the difference between \(f^{\prime}\) and \(f\left( z \right)\) as a reward, \(u\left( {\text{z}} \right)\) is the utility function. Through this formula, we can see that the maximum value of \(a_{\text{EI}}\) is the optimum point. On the left side, \(u\left( z \right)\) must be reduced as much as possible, and on the right side, the covariance \(k\left( {z,z} \right)\) must be increased as much as possible.
To avoid obtaining the local minimum value of the objective function, the positive acquisition functions modify their behavior based on whether they estimate that they are overexploiting an area. Assuming \(\sigma F\left( z \right)\) is the standard deviation of the posterior objective function at position \(z\), the posterior standard deviation of the additive noise is \(\sigma\), and \(t_{\sigma }\) is the value of the exploration ratio option, which is a positive number. After each iteration, the positive acquisition functions evaluate whether the next point \(z\) satisfies:
If this condition is satisfied, the algorithm will consider point \(z\) an overexploited point. Then, the acquisition function modifies its kernel function by multiplying \(\theta\) by the number of iterations [33]. Then, a new point is generated according to the new fitted kernel function. Evaluating the new point \(z\), if it is again overexploited, \(\theta\) is multiplied by an additional factor of 10, and the above steps are repeated. This continues up to five times in an attempt to obtain a point \(z\) that is not overexploited as the next point.
Filter enhancement
Each aneurysm corresponds to a set of optimal filter detection parameters that can be found by Bayesian optimization. When the minimum loss function is found, the corresponding parameters constitute the aneurysm detection parameters, which are substituted into the filter for sphere region enhancement, and the enhanced region is designated the detection target.
Adaptive thresholding
In this paper, two parameters were used to determine whether the detected target was an aneurysm: one was the maximum value (\(V_{\hbox{max} }\)) of the filtering response of the detected target, and the other was the mean value (\(V_{\text{mean}}\)) of the filtering response of the detected target. They were defined as follows:
where \({\text{\O }}\) denotes the set of filter response values of the detected target. If \(V_{\text{mean}}\) or \(V_{\hbox{max} }\) was greater than a certain threshold, the target was treated as an aneurysm; otherwise, it was not.
Aneurysm extraction
The detected target was extracted by region growth. First, the position of the maximum filtering response value in the image was located. We used this position as the seed point for region growth, which began in the 3D image space with 26 neighborhoods, and new points were added to the seed region until the final target area was obtained. Because the detected target incompletely coincided with the aneurysm, we first compared the length, width and height of the target extracted from the growth region and then selected their maximum value. Since some aneurysms were not completely spherical, we found the center of mass of the detected target and used this maximum value as the radius to extract the spherical target; if the target was an aneurysm, it was removed.
When a target was removed, the same steps were used in the remaining image until no further aneurysms were detected. It is important to note that to avoid detecting the same target, the detected region had to be removed after each iteration.
Availability of data and materials
Not applicable.
Abbreviations
 MRA:

Magnetic resonance angiography
 SAH:

Subarachnoid hemorrhage
 CTA:

Computed tomography angiography
 DSA:

Digital subtraction angiography
 LSTM:

Long shortterm memory
 LDF:

Linear discriminant function
 CAD:

Computeraided detection
 POI:

Points of interest
 MIP:

Maximum intensity projection
 AUC:

Area under curve
 ROC:

Receiver operator characteristic
 PR:

Precision–recall
References
Vlak MH, Algra A, Brandenburg R, Rinkel GJ. Prevalence of unruptured intracranial aneurysms, with emphasis on sex, age, comorbidity, country, and time period: a systematic review and metaanalysis. Lancet Neurol. 2011;10:626–36. https://doi.org/10.1016/S14744422(11)701090.
Li MH, Li YD, Tan HQ, Gu BX, Chen YC, Wang W, Chen SW, Hu DJ. Contrastfree MRA at 3.0 T for the detection of intracranial aneurysms. Neurology. 2011;77:667–76. https://doi.org/10.1212/WNL.0b013e3182299f5a.
Juvela S, Poussa K, Porras M. Factors affecting formation and growth of intracranial aneurysms: a longterm followup study. Stroke. 2001;32:485–91. https://doi.org/10.1161/01.STR.32.2.485.
Millan RD, DempereMarco L, Pozo JM, Cebral JR, Frangi AF. Morphological characterization of intracranial aneurysms using 3D moment invariants. IEEE Trans Med Imaging. 2007;26:1270–82. https://doi.org/10.1109/TMI.2007.901008.
Molyneux AJ, Kerr RSC, Yu LM, Clarke M, Sneade M, Yarnold JA, Sandercock P. International subarachnoid aneurysm trial (ISAT) of neurosurgical clipping versus endovascular coiling in 2143 patients with ruptured intracranial aneurysms: a randomised comparison of effects on survival, dependency, seizures, rebleeding, subgroups, and aneurysm occlusion. Lancet. 2005;366:809–17. https://doi.org/10.1016/S01406736(05)672145.
Loumiotis I, Brown RD, Vine JR, Cloft HJ, Kallmes DF, Lanzino G. Small (< 10mm) incidentally found intracranial aneurysms, part 2: treatment recommendations, natural history, complications, and shortterm outcome in 212 consecutive patients. Neurosurg Focus. 2011;31:1–7. https://doi.org/10.3171/2011.9.FOCUS11237.
Kohout J, Chiarini A, Clapworthy GJ, Klajnsek G. Aneurysm identification by analysis of the bloodvessel skeleton. Comput Methods Programs Biomed. 2013;109:32–47. https://doi.org/10.1016/j.cmpb.2012.08.018.
Li MH, Li YD, Gu BX, Cheng YS, Chen YC. Accurate diagnosis of small cerebral aneurysms ≤ 5 mm in diameter with 3.0T MR angiography. Radiology. 2014;271:553–60. https://doi.org/10.1148/radiol.14122770.
Menke J, Larsen J, Kallenberg K. Diagnosing cerebral aneurysms by computed tomographic angiography: metaanalysis. Ann Neurol. 2011;69:646–54. https://doi.org/10.1002/ana.22270.
Doi K. Computeraided diagnosis in medical imaging: historical review, current status and future potential. Comput Med Imaging Graph. 2007;31:198–211. https://doi.org/10.1016/j.compmedimag.2007.02.002.
Sulayman N, AlMawaldi M, Kanafani Q. Semiautomatic detection and segmentation algorithm of saccular aneurysms in 2D cerebral DSA images. Egypt J Radiol Nucl Med. 2016;47:859–65. https://doi.org/10.1016/j.ejrnm.2016.03.016.
Jin HL, Yin Y, Hu MH, Yang GM, Qin L. Fully automated unruptured intracranial aneurysm detection and segmentation from digital subtraction angiography series using an endtoend spatiotemporal deep neural network. In: Medical Imaging 2019: Image Processing. International Society for Optics and Photonics. Vol. 10949. 2019. p. 109491I18. https://doi.org/10.1117/12.2512623.
Rahmany I, Arfaoui B, Khlifa N, Megdiche H. Cerebral aneurysm computeraided detection system by combing MSER, SURF and SIFT descriptors. In: 2018 5th international conference on control, decision and information technologies, IEEE. 2018:1122–7. https://doi.org/10.1109/CoDIT.2018.8394937.
Rahmany I, Khlifa N. Detection of intracranial aneurysm in angiographic images using fuzzy approaches. In: International image processing, applications and systems conference, IEEE. 2014. p. 1–6. https://doi.org/10.1109/IPAS.2014.7043312.
Zakaria H, Kurniawan A, Mengko TL, Santoso OS. Detection of cerebral aneurysms by using time based parametric color coded of cerebral angiogram. In: Proceedings of the 2011 international conference on electrical engineering and informatics, IEEE. 2011. pp. 1–4. https://doi.org/10.1109/ICEEI.2011.6021503.
Hanaoka S, Nomura Y, Nemoto M, Miki S, Yoshikawa T, Hayashi N, Ohtomo K, Masutani Y, Shimizu A. HoTPiG: a novel geometrical feature for vessel morphometry and its application to cerebral aneurysm detection. In: International conference on medical image computing and computerassisted intervention. 2015. pp. 103–10. https://doi.org/10.1007/9783319245713_13.
Sichtermann T, Faron A, Sijben R, Teichert N, Freiherr Wiesmann M. Deep learningbased detection of intracranial aneurysms in 3D TOFMRA. Am J Neuroradiol. 2019;40:25–32. https://doi.org/10.3174/ajnr.A5911.
Hentschke CM, Tönnies KD, Beuing O, Nickl R. A new feature for automatic aneurysm detection. In: 2012 9th IEEE international symposium on biomedical imaging, IEEE. 2012. pp. 800–3. https://doi.org/10.1109/ISBI.2012.6235669.
Hentschke CM, Beuing O, Paukisch H, Scherlach C, Skalej M, Tonnies KD. A system to detect cerebral aneurysms in multimodality angiographic data sets. Med Phys. 2014;41:1–11. https://doi.org/10.1118/1.4890775.
Zhou M, Wang X, Wu Z, Pozo JM, Frangi AF. Intracranial aneurysm detection from 3D vascular mesh models with ensemble deep learning. In: International conference on medical image computing and computerassisted intervention. 2019. pp. 243–52. https://doi.org/10.1007/9783030322519_27.
Yang X, Blezek DJ, Cheng LT, Ryan WJ, Kallmes DF, Erickson BJ. Computeraided detection of intracranial aneurysms in MR angiography. J Digit Imaging. 2011;24:86–95. https://doi.org/10.1007/s1027800992540.
Li Q, Arimura H, Doi K. Selective enhancement filters for lung nodules, intracranial aneurysms, and breast microcalcifications. Int Congr Ser. 2004;21268:929–34. https://doi.org/10.1016/j.ics.2004.03.216.
Sato Y, Westin C, Bhalerao A, Nakajima S, Shiraga N, Tamura S, Kikinis R. Tissue classification based on 3D local intensity structures for volume rendering. IEEE Trans Vis Comput Graphics. 2000;6:160–80. https://doi.org/10.1109/2945.856997.
Moon WK, Shen YW, Bae MS, Huang CS, Chen JH, Chang RF. Computeraided tumor detection based on multiscale blob detection algorithm in automated breast ultrasound images. IEEE Trans Med Imaging. 2013;32:1191–200. https://doi.org/10.1109/tmi.2012.2230403.
Yang SF, Cheng CH. Fast computation of Hessianbased enhancement filters for medical images. Comput Methods Programs Biomed. 2014;116:215–25. https://doi.org/10.1016/j.cmpb.2014.05.002.
West C, Montazeri A, Monk S, Taylor CJ. A genetic algorithm approach for parameter optimization of a 7DOF robotic manipulator. Ifac Pap Online. 2016;49:1261–6. https://doi.org/10.1016/j.ifacol.2016.07.688.
Liashchynskyi P, Liashchynskyi P. Grid search, random search, genetic algorithm: a big comparison for NAS. 2019. pp. 1–11. http://arxiv.org/abs/1912.06059.
Wang ZY, Zoghi M, Hutter F, Matheson D, Freitas ND. Bayesian optimization in high dimensions via random embeddings. In: International joint conference on artificial intelligence. 2013. pp. 1778–84.
MartinezCantin R. BayesOpt: a Bayesian optimization library for nonlinear optimization, experimental design and bandits. J Mach Learn Res. 2014;15:3735–9.
Frangi AF, Niessen WJ, Vincken KL, Viergever MA. Multiscale vessel enhancement filtering. In: International conference on medical image computing and computerassisted intervention. 1998. pp. 130–7. https://doi.org/10.1007/BFb0056195.
Jerman T, Pernuš F, Likar B, Špiclin Ž. Blob enhancement and visualization for improved intracranial aneurysm detection. IEEE Trans Vis Comput Graphics. 2016;22:1705–17. https://doi.org/10.1109/TVCG.2015.2446493.
Bergstra JS, Bardenet R, Bengio Y, Kégl B. Algorithms for hyperparameter optimization. In: Advances in neural information processing systems. 2011. Pp. 2546–54.
Bull AD. Convergence rates of efficient global optimization algorithms. J Mach Learn Res. 2011;12:2879–904. https://doi.org/10.1524/auto.2011.0951.
Acknowledgements
The authors are grateful to all study participants.
Funding
This work was supported by the new technology projects of Shanghai Science and technology innovation action plan (18511102800), Shanghai Municipal Science and Technology Major Project (No. 2018SHZDZX01) and ZJLab, and Shanghai Municipal Health Commission Project (2018ZHYL0107).
Author information
Authors and Affiliations
Contributions
TH and JhY suggested the algorithm for image analysis, TH implemented it and analyzed the experimental results; HY and WN collected experimental data and provided clinical guidance. YyW and YxG consulted the obtained result. All authors read and approved the final manuscript
Corresponding authors
Ethics declarations
Ethics approval and consent to participate
Bioetic Commission for this study is not necessary.
Consent for publication
Not applicable.
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
About this article
Cite this article
Hu, T., Yang, H., Ni, W. et al. Automatic detection of intracranial aneurysms in 3DDSA based on a Bayesian optimized filter. BioMed Eng OnLine 19, 73 (2020). https://doi.org/10.1186/s12938020008179
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s12938020008179
Keywords
 Aneurysm detection
 Multiscale filter
 Bayesian optimization
 Adaptive thresholding