# Robust Parking Block Segmentation from a Surveillance Camera Perspective
## 3 Dataset
### Evaluation Protocol  
This section describes an evaluation protocol proposed on the basis of the APKLOT dataset. This protocol is the applied further on in the experiments section.  
The _overall accuracy_ metric considers the model's capability of not including some areas in the predicted class, that is, the negative cell on the contingency table. Conversely, recall, precision and the F-Measure are considered to be biased in this sense. In order to avoid this bias, the authors of PKLot [9] and DLib [10] opted to use only _overall accuracy_. Overall accuracy is given by Equation (1), where \(T_{p}\) are the true positives, \(T_{n}\) are the true negatives, \(F_{p}\) are false positives, \(F_{n}\) are false negatives, \(P\) is the sum between true and false positives and \(N\) is the sum between true and false negatives. Finally, \(Right=T_{p}+T_{n}\) and \(Wrong=T_{p}+T_{n}\).  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Year** & **Statistics** & **Notes** \\ \hline
2018 & Only 1 class discriminating between parking spot and other & Images were taken from \\  & spaces. & Google Maps API at zoom \\  & Train: & level 20. \\  & 300 images & \\  & 4034 labelme polygons & \\  & Validation: & 100 images \\  & 1513 labelme polygons & \\ Test: & 101 images & \\  & 1459 labelme polygons & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Image sets in _APKLOT_.  
Figure 4: Size and sparsity statistics of the input images. (**a**) depicts width and height distribution of the parking lot satellite images; (**b**) contrasts total area of the images (left) vs. parking block polygons area (right).  
\[Acc=\frac{T_{p}+T_{n}}{P+N}=\frac{T_{p}+T_{n}}{T_{p}+T_{n}+F_{p}+F_{n}}=\frac{ Right}{Right+Wrong}. \tag{1}\]  
This metric is usual in cases where we would like to classify individual instances without considering their spatial locality. Yet, the case of pixel segmentation deserves a special consideration. Each pixel is an instance we want to classify. However, most of the features come from the neighboring features. A foreground detected near the ground truth has presumably more informational value than a background detected near the ground truth to such a point that the distinction between foreground and background becomes relevant.  
One of the Pascal VOC [8] challenges consists of detecting many classes and marking them by using bounding boxes. Then, the background coincidences play no important role in how to position and scale the bounding boxes over detections. However, the overlapping between the true box and the predicted box is a good indicator of how well the prediction is performing. This overlapping is reflected in Equation (2), that is, the IoU formula proposed by Reference [8].  
\[IoU=\frac{T_{p}}{T_{p}+F_{p}+F_{n}}=\frac{\bigcap_{area}}{\bigcup_{area}}. \tag{2}\]  
Equation (2) measures the overlapping pixels between the ground truth polygon and the prediction polygon, regardless of the similarity between the areas outside of the polygons. That is, the true negatives are not taken into account. The idea is to reward overlapping foregrounds, instead of backgrounds. An IoU score greater than 0.5 is normally considered a \"good\" prediction for example, 10 different IoU thresholds are considered from 0.5 to 0.95 in the COCO challenge [29].