## 2 Automatic Segmentation Using U-Net
### U-Net Training Phase  
The training phase involves a two-step learning process. The first step involves learning the patient's image and label data and the second step involves learning the augmentation data produced  
Figure 5: Example of input data image and label. from the image and label data of the first step. The reason for dividing the process into two-steps was related to the large amount of learning time needed: Learning speed was slow, making it difficult to reduce the value of the loss function. Thus, the first-step was intended to reduce the loss function, by learning 1218 slices from six patients, which aided in make learning the augmentation data in the second step faster. Another advantage was that the second-step learning result--capture of the augmentation data--improved the outcome of the first-step learning result, as U-Net learned more data during in the process of learning augmentation data. In the second learning process, not all the augmentation data were used for learning, with approximately 20% retained for use in process validation. In the first step of the learning process, 1218 training data was trained 2000 times, which corresponded to one epoch and there were progressed 10 epochs. The dice loss function, which has become popular in medical image segmentation, was used [27]. The concept underlying its use was discussed by [PERSON], et al. [28]. The dice coefficient D is expressed as shown in Equation (1):  
\[D=\frac{2|X\cap Y|}{|X|+|Y|} \tag{1}\]  
where \(Y\) is the predicted segmentation of the neural network and \(X\) is the ground truth value. This equation indicates that if the dice coefficient was close to 1, the prediction result would be close to the ground truth value. Dice loss was defined as shown in Equation (2):  
\[Dicloss=1-\frac{2|X\cap Y|+1}{|X|+|Y|+1} \tag{2}\]  
In the first step of learning, the tendency for dice loss with respect to the training epoch was calculated, giving the results shown in Figure 6.  
To achieve a more accurate prediction, the second step of the learning process was performed using the generated augmentation data. For this purpose, 10,718 samples of 13,398 data were used for re-training, with 2680 samples retained for validation and a total of 15 training epochs were performed. In the second step, the dice loss was 0.0691 and the validation loss was 0.1767. These results were extremely low in comparison with those of the first step. The total learning time was 485 min. An NVIDIA Quadro M4000 GPU was used for the learning process, with code implemented using Tensorflow (Version 1.8.0) equipped with Keras libraries. New patient data (note: new patient data not included in the training data set) were applied to U-Net as test data and the results of U-Net for the automatic segmentation of ICAs and optic nerves are shown in Figure 7a,b respectively. The U-Net 3-D model of the segmented ICAs and optic nerves was shown in Figure 13. The times required for ICA segmentation by U-Net and by humans (manually), for 232  
Figure 6: First-step learning graph for dice loss per training epoch. image slices, are presented in Table 1. U-Net-based segmentation significantly reduced the amount of time required in comparison with manual segmentation. Jaccard similarity, precision and recall were used to quantitatively measure the accuracy of U-Net segmentation. Jaccard similarity is defined as follows:  
\[\text{Jaccard similarity}(X,Y)=\frac{|X\cap Y|}{|X\cup Y|}, \tag{3}\]  
where \(X\) represents the ground truth and \(Y\) represents the predicted U-Net result. As shown in (3), a Jaccard similarity closer to 1 indicates that \(X\) and \(Y\) are more similar. Label data produced by [PERSON] were assumed to be the ground truth values and the Jaccard similarity was calculated for each pixel between \(X\) and \(Y\) images. Precision is defined as:  
\[\text{Precision}=\frac{TP}{TP+FP}. \tag{4}\] \begin{table}
\begin{tabular}{c c} \hline \multicolumn{2}{c}{**Time Required [s]**} \\ \hline Manual & 518 \\ \hline U-Net & 13 \\ \hline \end{tabular}
\end{table}