# Robust Parking Block Segmentation from a Surveillance Camera Perspective
## 4 Experiments and Results  
Having reviewed the structure of _APKLOT_, let us see how it is used in the steps required by the methodology.  
It is important to mention that, to our knowledge, no other works on the state-of-the-art deal with the problem of segmenting parking blocks from the camera perspective. The distinction between parking blocks and parking spots is an important one because the former ranges in a variety of non-uniform shapes absent in the latter. Cityscapes [21] includes a label for segmenting parking spots from the camera perspective, but this label is not included in any evaluation and is treated as void. However, if a future work would like to compare their results with ours, they could use pixel-level intersection over union (also used in Cityscapes but for other labels).  
In consideration of this void in the domain of parking blocks, we decided to compare the training of the CNN with the original APKLOT dataset to training with an augmented version of the same dataset, that is, the 300 satellite images of the original training set were used to train one set of experiments. In parallel, 100 samples for each of those images were generated to accrue a total of 30,300 sample images for a second set of experiments. In particular the data augmentation that was done consisted in the following actions:  
* Randomly crop by a value between 0 and 50 pixels
* Horizontally flip 50% of the images
* Vertically flip 50% of the images
* Rotate images by a value between \(-45\) and \(45\) degrees  
Secondly, testing of the CNN was done with 100 independent satellite view images (hereby _World_). In parallel, 14 independent satellite view images of the Tecnologico de Monterrey (ITESM) were also segmented. These images are the ones we will use to test the algorithm performance once we have translated the results into the 62 surveillance camera images inside ITESM.  
Finally, the homographies for each of the 62 surveillance camera perspective images were calculated from the correspondence points and applied to the previous 14 images' segmentation results. To find the best four points for the homography, we used algebraic error, the default for the OpenCV findHomography method. See Figure 5 for a visual guide to these steps.  
Figure 5 shows a tree structure to help us visualize the data flow and metrics used. The yellow diamonds correspond to the main metrics for measuring the contribution of this work. We already explained both overall accuracy and IoU in Section 3.4. Multiclass logistic regression (i.e., negative log-likelihood loss, NLL or categorical cross entropy) is used in tandem with a softmax layer (one-hot) and estimates the maximum a posteriori class label given the parameters learned by the CNN. Each of the dataset icons is captioned with the number of annotated instances contributed. The numbers on the top of each dataset icon represent the number of instances before augmentation and single polygon extraction. 300 parking lots and their polygons to train the CNN, 100 for testing, 14 parking lots inside the university, 62 ground camera view image that correspond to those 14 and a set of more than 4 correspondence points for each of those 62 images.