Real-Time Parking Lot Occupancy Monitoring Using YOLOv8 with Parking Slot Alignment Transformation Algorithm
摘要
This study presents a camera-based approach for real-time parking occupancy monitoring across a campus parking lot using minimal hardware—a single pre-existing Pan-Tilt-Zoom closed-circuit television camera mounted on a nearby building. The system captures video footage, extracts frames at one-second intervals, and compiles them into a dataset, which is then divided into training, validation, and test sets. Data augmentations including resizing to 640 \(\,\times \,\) 640 and horizontal flipping were applied to enhance model performance to generalize on the dataset. A comparative study on various You Look Only Once (YOLO) model versions identified YOLOv8 as the top performer, achieving a precision of 99.6%, mAP50 of 99.4%, and mAP50-95 of 93.6%, while maintaining real-time processing capabilities. We developed a custom Parking Slot Alignment Transformation algorithm (PSAT) to convert detection outputs into a slot-occupancy map specific to the parking layout. Testing of the slot center transformation achieved up to 87.9% accuracy on average and when occupancy was high achieved up to 80.8% accuracy, with performance adjusting dynamically based on the number of cars in the lot. Results confirm that PSAT is both efficient and scalable, maintaining accuracy and responsiveness even at near-maximum capacity.