## 2 An ESNet of Real-Time Semantic Segmentation Based on DCNN
### Evaluation Indicators of Semantic Segmentation  
As one of the most critical topics in CV, semantic segmentation aims to segment different objects in pictures and identify their semantic categories. Early semantic segmentation mostly follows a segmentation-first-classification scheme. With the development of DL, semantic segmentation is mainly transformed into a pixel-level classification task, semantic classification of pixels based on image patches around them. To measure the accuracy of semantic segmentation, commonly used evaluation indicators include Pixel Accuracy (PACC) and Intersection over Union (IoU).  
The calculation of the accuracy of pixel classification is the proportion of correctly identified pixels to all pixels, and its mathematical expression is shown in Equation (8).  
\[\mathrm{P-ACC}\ =\frac{\sum_{l}^{N}\delta\left(\hat{l}_{l},\ l_{i}\right)}{N} \tag{8}\]  
\(N\) is the total number of pixels in the test set, \(\hat{l}_{l},l_{i}\) refers to the predicted label and true value of pixel \(i\), respectively, and \(\delta\) is the indicator function shown in Equation (9).  
\[\delta(\mathrm{x},\ \mathrm{y})=\left\{\begin{array}{ll}\ 1\ \mathrm{if}\ x=y\\ 0\ \mathrm{otherwise}\end{array}\right. \tag{9}\]The most commonly used evaluation criterion for semantic segmentation is the IoU. The IoU is a common criterion for evaluating the similarity of sets A and B in statistics. This criterion calculates the ratio of the number of elements in the intersection of A and B to the number of elements in the union. The higher the value, the more similar the two sets are. When it is extended to the field of semantic segmentation, the set involved in the calculation of the IoU of a certain class \((k)\) is the set of pixels predicted to be this class and the set whose true value is this class, and its mathematical expression is shown in Equation (10).  
\[\text{IoU}(k)\ =\frac{\left(\sum_{i}^{N}\delta(l_{i},\ k)\ \&\ \delta\left(l_{l},\ k \right)\right)}{\left(\sum_{i}^{N}\delta(l_{i},\ k)\ |\ \delta\left(l_{l},\ k \right)\right)} \tag{10}\]  
In Equation (10), the meaning of each symbol is consistent with that of Equation (8). Frequency-weighted Intersection over Union (FwIoU) is an extension of the average IoU. The pixel categories of the predicted target are weighted separately, and the weight is determined by the frequency of each pixel in all target pixels. Its calculation equation is shown in Equation (11).  
\[FwIoU=\frac{1}{\sum_{i=0}^{k}\sum_{j=0}^{k}p_{ij}}\sum_{j=0}^{k}\frac{\sum_{j= 0}^{k}p_{ij}p_{ii}}{\sum_{j=0}^{k}p_{ij}+\sum_{j=0}^{k}p_{ji}-p_{ii}} \tag{11}\]  
Computational complexity is usually assessed using two main indicators, one is used to measure the speed of the model's forward prediction, and the other is considered from the perspective of the model's computational memory or storage.  
Forward inference time calculates the entire processing time of a single image input into an algorithm or the output result of pixel-level semantic segmentation from the system to the network. This indicator is affected mainly by the hardware used; thus, an evaluation of this indicator for any algorithm should specify the hardware used.  
Memory usage is important for semantic segmentation tasks, especially when deploying semantic segmentation algorithms on some resource-constrained devices, such as mobile phones, digital cameras, or safety systems in autonomous driving; they need to be carefully evaluated. Memory usage may change significantly during its operation for a complex semantic segmentation network. Therefore, peak memory is generally used, which demonstrates the maximum memory required for a single image when the model is running.