# Automated Pixel-Level Deep Crack Segmentation on Historical Surfaces Using U-Net Models
## 4 Experimental Results
### Results and Discussion  
All models were trained for 50 epochs. The training started with a batch size of 16 for Deep ResU-Net and ResU-Net++ models and 12 for the \(U^{2}-Net\) model. Figure 9 shows samples of the training dataset. Moreover, samples of GrabCut results are shown in Figure 10.  
As shown in Table 2, which presents the performance metrics of evaluating the Deep ResU-Net model, the best model is the one trained using cross-entropy (CE) as a loss function and tested on enhanced images using contrast stretching. It is noticed that using contrast stretching as a preprocessing step in the testing phase enhances the performance by increasing the mean IoU (mIoU) from 67.069% to 74.959% for the model that uses CE loss. In general, the performance of the Deep ResU-Net model is improved when tested on preprocessed images by contrast stretching. Table 3 shows the performance metrics of evaluating the ResU-Net++ model. From Table 3, it is noticed that the performance of the ResU-Net++ model is improved when tested on preprocessed images by contrast stretching. Tables 4 and 5 show the performance metrics of evaluating the ResU-Net++ model on each testing dataset individually, with and without contrast stretching. Table 6 shows the performance metrics of evaluating the \(U^{2}\)-Net model. As noticed from Table 6, the best model is the one trained using the Dice coefficient as a loss function by achieving an mIoU and Dice score of 80.922% and 75.523%, respectively. It is noticed that using contrast stretching as a preprocessing step in the testing phase has a slight effect on the performance. It does not enhance the performance. Figure 9: Training dataset samples. At this point, the \(U^{2}\)-Net architecture utilized for the crack segmentation task is highlighted since it obtained the best results, as concluded from Tables 2, 3 and 6. Table 7 shows the performance metrics of evaluating the \(U^{2}\)-Net model on each testing dataset individually. Figure 10: Semi-supervised GrabCut pixel-level map generation. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Loss Function**} & \multicolumn{2}{c}{**Contrast Stretching**} & \multirow{2}{*}{**Accuracy \%**} & \multirow{2}{*}{**Precision\%**} & \multirow{2}{*}{**Recall\%**} & \multirow{2}{*}{**mIoU\%**} & \multirow{2}{*}{**Dice Score\%**} & \multirow{2}{*}{** Jaccard\%**} \\ \cline{2-2} \cline{6-6}  & No & 98.507 & 73.169 & 84.347 & 80.922 & 75.523 & 60.672 \\ \cline{2-6} \cline{6-6}  & Yes & 98.473 & 72.397 & 84.995 & 80.778 & 75.294 & 60.377 \\ \hline \multirow{2}{*}{**Binary Cross-Entropy**} & No & 98.239 & 75.248 & 75.795 & 78.834 & 71.678 & 55.858 \\ \cline{2-6}  & Yes & 98.189 & 74.267 & 77.406 & 78.944 & 71.929 & 56.153 \\ \hline \multirow{2}{*}{**Hybrid**} & No & 98.208 & 69.396 & 85.365 & 79.502 & 73.065 & 57.561 \\ \cline{2-6}  & Yes & 98.175 & 68.742 & 85.773 & 79.318 & 72.746 & 57.166 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: \(U^{2}\)-Net performance metrics. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Loss Function**} & \multicolumn{2}{c}{**Contrast Stretching**} & \multirow{2}{*}{**Accuracy \%**} & \multirow{2}{*}{**Precision\%**} & \multirow{2}{*}{**Recall\%**} & \multirow{2}{*}{**mIoU\%**} & \multirow{2}{*}{**Dice Score\%**} & \multirow{2}{*}{** Jaccard\%**} \\ \cline{2-2} \cline{6-6}  & No & 98.285 & 70.360 & 60.621 & 73.359 & 58.934 & 41.778 \\ \hline \multirow{2}{*}{**Dice Loss**} & Yes & 97.96 & 66.648 & 74.66 & 76.236 & 68.073 & 51.599 \\ \hline \multirow{2}{*}{**Binary Cross-Entropy**} & No & 98.318 & 79.161 & 52.466 & 72.124 & 52.447 & 35.545 \\ \cline{2-6}  & Yes & 97.99 & 79.12 & 69.205 & 77.572 & 62.27 & 45.212 \\ \hline \multirow{2}{*}{**Hybrid**} & No & 98.448 & 71.78 & 54.60 & 71.88 & 55.31 & 38.227 \\ \cline{2-6}  & Yes & 98.21 & 70.69 & 74.29 & 77.32 & 69.43 & 53.175 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: ResNet-Net++ performance metrics.