The experimental dataset employed in this research originates from a parking lot dataset, the PKLot dataset, the COCO dataset, PASCAL VOC dataset. The COCO and PASCAL VOC datasets are widely recognized datasets for object detection tasks, containing 70 and 30 object categories, respectively. For this study, only the category relating to “cars” is utilized. The PKLot dataset [17] specifically focuses on parking space classification and provides an extensive image dataset captured at the parking lot of the New Delhi Municipal Corporation (NDMCPL) in New Delhi. Each image in the PKLot dataset is accompanied by an annotation file, facilitating precise object localization and classification. This dataset incorporates diverse scenarios, including sunny days, rainy days, and cloudy days, introducing variations in outdoor empty parking space visibility due to varying illumination levels. To validate the experiment's robustness, vacant parking spaces under all weather conditions are utilized as both the training sets and test sets.
On rainy and cloudy days, the dataset comprises 1,041 occupied parking spaces and 2,553 vacant parking spaces. Sample images depicting diverse scenarios are illustrated in Figs. 2 and 3. For sunny day scenario within the dataset, there are 16,430 occupied parking spaces and 14,272 vacant parking spaces. Introducing obstruction to the dataset results in 6,986 occupied parking spaces and 15,076 vacant parking spaces. This dataset selection allows for a comprehensive evaluation of the proposed model's performance across diverse weather conditions and obstruction scenarios.
The data-set comprises a total of 9,475 images, with detailed characteristics summarized in Table 1.
Table 1
Overview of the characteristics of the NDMCPL subsets
Parking | Time | Weather | No. of days | No. of images | |
Occupied Percentage | Vacant Percentage |
NDMCPL (300 parking spaces) | Day time | Sunny | 58 | 3256 | 79.42% | 20.58% |
Rainy | 27 | 750 | 68.1% | 31.9% |
Overcast | 39 | 1880 | 45.63% | 54.37% |
Night time | Sunny | 45 | 2360 | 56.35% | 43.65% |
Rainy | 19 | 350 | 43.19% | 56.81% |
Overcast | 27 | 879 | 35.79% | 64.21% |
Data Set Processing
The processing of the PKLot dataset necessitates conversion into a format compatible with the PASCAL VOC dataset structure. Initially, the coordinate information contained within the XML files is extracted and reformatted to align with the specifications of the VOC dataset. Despite YOLOv3's commendable performance in target detection tasks using daily detection datasets, further refinement is essential to adapt it for parking lot detection tasks. The improved YOLOv3 algorithm model integrates a feature pyramid network structure, merging and linking feature maps from different levels to produce four sets of predictive feature maps. Following this, positional and class predictions are performed on these four sets of predictive feature maps.
Experimental Results
The experimental hardware setup for this study includes an Intel(R) Gold 5218R CPU @ 2.2 GHz, equipped with an 8-core CPU, 256GB memory, and a dedicated RTX 3090 graphics card. The operating system utilized is Windows 8. The algorithm is developed using the PyTorch framework, with a specific focus on PyTorch version 1.7.0 and CUDA version 11.0.
In the conducted experiment, the specified parameters were set as follows: a batch size − 16, an initial learning rate of 0.001, and adjustment to 0.0001 after 50 epochs. The total training duration spanned 100 epochs. The training concluded automatically when the validation loss failed to decrease consistently, signifying convergence of the model. Data allocation for the experiment involved a division into 70% for the training set, 10% for the validation set, and 20% for the test set. Notably, the training-validation set constituted 80% of the overall dataset.
Analysis of Daytime Detection Algorithm Experimental Results
In order to assess the efficacy of the algorithm designed for all-day detection of outdoor parking spaces by YOLO v3, recognizing the distinct characteristics of nighttime scenes, and the slightly elevated image darkness.
To enhance the detection accuracy specifically for nighttime outdoor parking spaces, a test set comprising 4596 nighttime outdoor parking lot images is generated using OpenCV based on the parking lot dataset. This experimental validation demonstrates the effectiveness of knowledge refinement through YOLOv3 for the purpose of enhancing detection accuracy.