# Spinal Cord Segmentation in Ultrasound Medical Imagery
## 4 Experimental Results
### The Used Datasets and the Evaluation Metrics  
#### 4.1.1 The Used Datasets  
To confirm the approaches adopted, we constructed 2 different datasets (Dataset-A and Dataset-B) based on ultrasound medical images collected from 10 patients during the laminectomy surgical operation. The surgeries were performed in King Saud University Medical City. All subjects gave their informed consent for inclusion before they participated in the study. The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of the Institutional Review Board of King Saud University Medical City (Project No. E-15-1602).  
The first dataset is built to test the efficiency of the algorithm where the spinal cord exists within the training set. This dataset is formed by collecting significant images from the recorded ultrasound video captured during the laminectomy surgery. We mean by significant the existence of the spinal cord boundary in the images as sometimes the video contains many frames without clear spinal cord boundaries because the ultrasound probe was not set in the right place on top of the spine where the laminae were removed. Then, we cropped the zone containing the spinal cord into \(256\times 256\) sized images. After that, we provided the pixel-wise manual segmentation of the image labeled by an expert and guided by two neurosurgeons working in the field of spine surgery. After that, we subdivided images for every patient into the train and the test sets following the rule of 80/20, which means putting 80 % of the labeled data inside the train set and 20% inside the test set. Table 1 provides details about Dataset-A used in validating the performance of the segmentation model on spinal cords already provided on the training set.  
We built Dataset-B to validate model performance on spinal cords not previously provided in the train-set. It is formed by collecting ten different subsets. Every subset Dataset-B\({}^{i}\) is formed by putting  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Patient ID**} & **Total Number** & **Images Put** & **Images Put** \\  & **of Labeled** & **on the** & **on the** \\  & **Images** & **Train Set** & **Test Set** \\ \hline
01 & 13 & 9 & 4 \\
02 & 3 & 2 & 1 \\
03 & 3 & 2 & 1 \\
04 & 6 & 4 & 2 \\
05 & 2 & 1 & 1 \\
06 & 14 & 10 & 4 \\
07 & 4 & 3 & 1 \\
08 & 5 & 3 & 2 \\
09 & 6 & 4 & 2 \\
10 & 7 & 5 & 2 \\ Total & 63 & 43 & 20 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Composition of Dataset-A.  
all the images corresponding to the \(i\)th patient inside the test set and putting all the images of the other patients inside the train set. Then, measures will be calculated by averaging the results generated by the segmentation model on every Dataset-\(B^{i}\). We aim by this method to test the generalization of the model on spinal cord patterns not provided in the train set in a cross-validation manner. Table 2 gives us an idea about the composition of every Dataset-\(B^{i}\) inside Dataset-B. We note that in every Dataset-\(B^{i}\), the test set always contains spinal cord patterns not already learned by the model. This allows us to judge the ability of the model to be applied to new images taken for a new patient, which is the most probable scenario is real cases.