# _Applied sciences_
## 4 Experimental Evaluation
### Evaluation Metrics  
Based on the confusion matrix [15], the semantic segmentation accuracy is quantified by calculating evaluation metrics, such as pixel accuracy, recall, precision, F1-score, and intersection over union [19,20]. The confusion matrix is the classification result of the statistical classification model. It indicates the numbers of samples correctly and incorrectly categorized, as shown in Table 2. The blank areas denote the correctly categorized pixels, and other areas denote the incorrectly categorized pixels in the label. Whether the segmentation is manual or computerized (e.g., clustering algorithms or semantic segmentation), the segmented image areas cannot be guaranteed to be 100% correct. In this paper, a correct segmentation criterion is given by the labels, and then the correct areas in the labels are evaluated against the segmented areas and their differences are compared.  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Epoch** & **Iteration** & **Time Elapsed (ms)** & \
\begin{tabular}{c} **Mini-Batch** \\ **Accuracy** \\ \end{tabular} &
\begin{tabular}{c} **Mini-Batch** \\ **Loss** \\ \end{tabular} \\ \hline
1 & 1 & 0:01 & 05.49\% & 10.288 \\
1 & 20 & 0:08 & 98.46\% & 0.0407 \\
2 & 40 & 0:15 & 98.66\% &  
In the dataset, the ratio of the number of correctly segmented pixels (TP + TN) to the total number of pixels (TP + FN + FP + TN) is the pixel accuracy (PA), which is used to globally evaluate the percentage of correctly segmented pixels, represented by Equation (5).  
\[\text{PA}=\frac{\text{TP}+\text{TN}}{\text{TP}+\text{FN}+\text{FP}+\text{TN}} \tag{5}\]  
The F1-score is the summed average of recall and precision. Recall is the proportion of correctly segmented label pixels (TP) among all actual label samples (TP + FN), and precision is the proportion of correctly segmented label pixels (TP) among all predicted label samples (TP + FP), represented by Equations (6) and (7).  
\[\text{Recall}=\frac{\text{TP}}{\text{TP}+\text{FN}} \tag{6}\]  
\[\text{Precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{7}\]  
After applying Equations (6) and (7), the F1-score can be calculated, which indicates the matching quality of the predicted boundary of each class with its actual boundary on all images and evaluates the boundary accuracy, represented by Equation (8).  
\[\text{F1}-\text{score}=\frac{2\cdot\text{Precision}\times\text{Recall}}{ \text{Precision}+\text{Recall}} \tag{8}\]  
The intersection over union (IoU) is a standard metric for evaluating the accuracy of semantic segmentation and indicates the proportion of the overlap area between the predicted and actual segmentation to the joint area, indicating the regional smoothness, represented by Equation (9).  
\[\text{IoU}=\frac{\text{TP}}{\text{TP}+\text{FP}+\text{FN}} \tag{9}\]  
In Equations (5)-(9) and Table 2, TP is the number of correctly segmented label pixels, which are true positives. TN is the number of correctly segmented background pixels, which are true negatives. FN is the number of unrecognized label pixels, which are false negatives. FP is the number of unrecognized background pixels, which are false positives.