Introduction
Urban parking remains a significant challenge, often leading to increased traffic congestion and driver frustration. While smart parking solutions utilizing fixed infrastructure (e.g., overhead cameras or ground sensors) exist, their deployment is limited by high installation and maintenance costs. In this work, we explore a more scalable alternative: leveraging the ubiquitous dashcam as an intelligent sensor to detect vacant parking spaces from a driver's perspective.
The Challenge of Early Detection
Unlike traditional "bird's-eye view" surveillance systems, dashcams operate in unconstrained environments characterized by shifting viewpoints, varying lighting, and frequent occlusions. A critical requirement for a driver-centric system is early detection—identifying a vacant spot seconds before the vehicle reaches it. Standard object detectors typically require an object to be fully visible and centered, which is insufficient for providing timely alerts to a moving driver. The challenge lies in training a model to recognize a "potential" vacancy when the spot is still distant, blurry, or partially hidden.
Proposed Methodology
We formulate parking vacancy detection as a binary classification task over video sequences. We evaluated two primary deep learning architectures:
- 3D-CNN: Utilizes 3D convolutional kernels to extract spatial-temporal features from a stack of video frames simultaneously, capturing both motion and appearance changes.
- 3D-CNN + LSTM: Integrates a Long Short-Term Memory (LSTM) layer to capture long-term temporal dependencies across successive video clips, modeling the sequence of the approach.
Monotonicity Loss Function
The core innovation of this research is the Monotonicity Loss Function. Standard loss functions like Cross-Entropy treat frames independently, ignoring the temporal progression of a vehicle approaching a target. We argue that as a car nears a vacant spot, the model's detection confidence should strictly increase. Our proposed loss function penalizes the network if the detection score fluctuates or drops during the approach. By incorporating a penalty for non-monotonic behavior, the model is discouraged from outputting high confidence scores for distant, ambiguous frames while outputting lower scores for closer, clearer frames. This constraint effectively stabilizes the detection signal and aligns the model's behavior with the physical reality of the approach.
Experimental Setup and Dataset
To evaluate the system, we curated a "Dashcam Parking Dataset" consisting of 5,800 video clips (5 seconds each at 30 fps) from 22 different indoor and outdoor parking environments. The dataset is balanced with 2,900 positive clips (reaching a spot in the final second) and 2,900 negative clips, covering diverse lighting conditions and parking configurations (parallel, perpendicular, and angled).
Results and Discussion
The experimental results demonstrate that the proposed monotonicity loss significantly enhances detection performance. For the 3D-CNN model, the proposed loss achieved an accuracy of 85%, outperforming Mean Squared Error (77.5%) and Cross-Entropy (84.5%).
Furthermore, the 3D-CNN + LSTM model demonstrated impressive predictive capabilities, identifying vacant spots up to 3 seconds before arrival with 80% recall. At the moment of arrival (0 seconds), the system reached a peak recall of 97%. These results suggest that the model successfully picks up on subtle visual gaps between parked vehicles that indicate a vacancy ahead, effectively simulating human anticipation.
Conclusion
This research provides a robust framework for early parking detection using low-cost dashcam hardware. By enforcing temporal monotonicity in the learning process, the system achieves high reliability even in complex urban environments. Future work will focus on spatial localization to pinpoint the exact coordinates of detected spots and optimizing the model for real-time execution on edge devices.
Summary updated