# Egyptian Hieroglyphs Segmentation with Convolutional Neural Networks
## 4 Results on the Training and Validation Set
The segmentation obtained by using training from scratch with a duration of 3000 epochs and a threshold on the objectness score equal to 0.7 is shown in Figure 7. Despite the high confidence of the RPN, related to the high objectness scores, the quality of the segmentation masks is rather poor with respect to the results obtained with pre-training (see Figure 6a). For a quantitative assessment of the segmentation process, we can use metrics commonly used for this purpose. Given a glyph with a known segmentation mask, i.e., the ground truth, and the mask predicted by the network, the _Intersection Over Union_ (IoU) is the ratio between the overlapping areas of ground truth and prediction over the area of their union; this metric ranges from 0 to 1. By setting a threshold on the IoU, we can discriminate successful segmentations (IoU above the threshold) from unsuccessful ones. Taking the average successful rates over the whole dataset yields an average precision (AP) of the segmentation process and, therefore, a measure of its quality. The AP metric obviously depends on the threshold that we use to select the successful segmentation: for example, by using a threshold of 0.75, we obtain a metric referred to as AP75 (expressed as percentage). The IoU and AP metrics can be applied not only to masks, but also to bounding boxes. In Table 1, the segmentation quality evaluated on the validation set obtained for an objectness score threshold equal to 0.5 and for a different duration of the training process is shown; more specifically, the AP50 and AP75 values are tabulated. Results in Table 1 show that both bounding box and mask regression achieve better performances for a higher number of epochs, that is, they benefit from a longer training. Additionally, in order to further quantify the IoU behaviour varying with the choice of the different hyper-parameters, we report in Table 2 the results relative to the single glyph representing the \"owl\" in the bottom left part of the image in Figure 4. As can be seen, the \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Number of Epochs** & **Bounding-Box Regression** & \multicolumn{2}{c}{**Mask Regression**} \\ \hline  & AP50 & AP75 & AP50 & AP75 \\ \hline
300 & 82.0\% & 56.0\% & 77.8\% & 37.8\% \\
500 & 90.4\% & 77.3\% & 86.8\% & 51.3\% \\
3000 & 93.4\% & 85.0\% & 91.2\% & 65.8\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance metrics of the segmentation process (on the validation set) vs. the training epochs (objectness score threshold = 0.5). Figure 7: Segmentation results obtained with a training from scratch of 3000 epochs and with an objectness score threshold equal to 0.7.  
threshold value, which impacts the detection ability, has not influence on the IoU, while the number of iterations improves the quality of the segmentation as measured by the IoU. In summary, the above results show the influence of some important hyper-parameters of the network on the segmentation performance. As to the objectness score, this influences the symbol detection ability. On the other hand, the number of epochs influences the IoU metrics, so that training duration can be traded for segmentation quality.