# Deep Learning Semantic Segmentation for Water Level Estimation Using Surveillance Camera
## 3 Results  
### Water Segmentation  
#### 3.1.1 Performance Evaluation  
Semantic segmentation applying DeepLabv3+ and SegNet approaches was performed to classify images into the water body and background regions. Both segmentation architectures were trained using the training dataset as described in Section 2.1. The training time varied depending on the complexity of the network and the number of features extracted. To evaluate the performances of the trained networks, testing was accomplished using 20% of the original dataset, taking a total of 142 images. In particular, SegNet was more complex as compared to DeepLabv3+, which over-limit the GPU capacity causing the network to be trained on CPU. Hence, the training time for SegNet was significantly longer than DeepLabv3+. Therefore, this study did not compare the performance of these two networks in terms of time-wise. Rather, they were evaluated in terms of overall accuracy, IoU, and BF score for the entire dataset and individual classes as well as visual comparison of the segmentation results. The accuracy results of the predicted water body extracted from the segmentation task for the aggregate dataset are shown in Figure 6 and the performance of per-class metrics is illustrated in Figures 7 and 8.  
Figure 6 summarizes the overall dataset accuracy for the semantic segmentation achieved by the two trained models. Both models achieved an overall accuracy of more than 95% with DeepLabv3+ obtaining the highest value of 96.72%. For the IoU metric, DeepLabv3+ achieved 94.12% while SegNet achieved 91.05%, indicating that there is a high agreement between the predicted and referenced labeled data. However, the segmentation performance in terms of BF score is not as high as overall accuracy and IoU metrics. DeepLabv3+ obtained 82.40%, which is better than the result obtained by SegNet that achieved only 67.20%. The results demonstrate that the matching boundary between the predicted and ground truth region was not as satisfactory as expected.  
Figure 7 shows that the class-specific accuracy for the segmentation of water bodies from CCTV images obtained by the trained model when using the DeepLabv3+ network. It demonstrates that the performance metrics of DeepLabv3+ are slightly better than SegNet (Figure 8). The overall accuracy for both water and background classes was achieved above 95% for DeepLabv3+. In terms of the IoU metric, the DeepLabv3+ trained model achieved around 92.08% and 95.31% for water and background classes, respectively. DeepLabv3+ outperformed SegNet for the BF score metric by achieving 79.22% for water and 85.59% for background class.  
For per class performance, SegNet achieved approximately 94% to 96% of overall accuracy for both classes with the IoU metric obtained around 88.82% and 93.29% for water and background classes, respectively as shown in Figure 8. The result of the BF score was low as compared to other metrics with the water class only obtaining around 66.44% and the background class achieving 67.96%.  
Although the overall dataset performance is high, the BF score for the class metric shows that the boundaries of water were poorly mapped to the correct contours, especially for SegNet. This might happen due to the class imbalance problem, where the number of pixels that belonged to the water class was smaller than the background class [45],  
Figure 8: Class-specific metrics for SegNet network.  
Figure 7: Class-specific metrics for DeepLabv3+ network.  
Additional data that includes more pixels in the water class might help to improve the segmentation results. Based on the results obtained, it clearly shows that the model trained using the DeepLabv3+ network outperformed the one that used SegNet in terms of accuracy, IoU, and BF score metrics.