## 2 Methods
### Performance Evaluation  
The area under the Receiver Operating Characteristic (ROC) curve has been widely used to evaluate the capacity that a method has to detect features in medical images. The ROC curve computes the True Positive Fraction (TPF) and False Positive Fraction (FPF) by applying a sliding threshold to a given filter response, which is in general a gray-scale image, and comparing the number of resulting binary images with the corresponding ground-truth angiogram. The area under the ROC curve (\(A_{z}\)) can be computed using the trapezoidal rule, and it is in the range \([0,1]\). Being \(A_{z}=1\) a perfect detection of the features of interest, and \(A_{z}=0\) the opposite meaning.  
To evaluate the performance of a binary segmentation method, the accuracy metric has been the most commonly used in literature. However, because accuracy metric is low sensitive to imbalanced classes, in this work the metrics of mean class accuracy [20], sensitivity, specificity, positive predictive value, and Dice similarity coefficient are also employed to evaluate the segmentation performance of the proposed method. The six metrics are in the range \([0,1]\). An accuracy of 1 means a perfect extraction of the features of interest, and 0 otherwise. The mean class accuracy provides a metric that is not biased by the difference of sizes between the classes of blood vessel pixels and image background that are present in a coronary angiogram. The percentage of feature pixels correctly classified, and background pixels correctly classified, are measured by the sensitivity and specificity metrics, respectively. The positive predictive value corresponds to the percentage of actual feature pixels classified by the feature of interest. The Dice coefficient measures the similarity between the features of interest extracted by a segmentation method and the ground-truth, ignoring the background pixels correctly classified.  
The computation of the six metrics for binary classification performance require to obtain the total number of feature pixels correctly classified as features (TP), feature pixels incorrectly classified as background (FP), background pixels correctly classified as background (TN), and background pixels incorrectly classified as features (FN). The classification accuracy is then defined as following:  
\[Accuracy=\frac{TP+TN}{TP+FP+TN+FN}\,. \tag{5}\]  
Sensitivity and specificity are defined respectively as follows:  
\[Sensitivity=\frac{TP}{TP+FN}\,, \tag{6}\]  
\[Specificity=\frac{TN}{TN+FP}\,. \tag{7}\]  
When only two classes are present in an image, mean class accuracy can be computed from sensitivity and specificity as follows:  
\[Mean\ class\ accuracy=\frac{Sensitivity+Specificity}{2}\,. \tag{8}\]  
The positive predictive value is computed as follows:  
\[Positive\ predictive\ value=\frac{TP}{TP+FP}\,. \tag{9}\]  
The Dice similarity coefficient is computed as follows:  
\[Dice=\frac{2\cdot TP}{2\cdot TP+FP+FN}\,. \tag{10}\]  
In the context of artificial neural networks, the approximation performance is generally measured using the Mean Squared Error (MSE). In addition, a scheme of cross validation with random sub-sampling is integrated to the training stage in order to prevent the parameters overfitting. The cross validation scheme allows to employ images from the training set repeatedly without invalidating the results obtained during the training stage [21]. This scheme separates the training set into two subsets, one to train the network, and the second one to validate the generalization capability of the neural network. In this work, for each training trial, the validation set is conformed by a random sample of 25% of the angiograms of the training set, while the remaining X-ray images of this set are used to train the artificial neural network.