Source-linked AI summary
Toward Parking Spot Occupancy Recognition: A Self-Supervised Approach
Luan Marko Kujavski, Rayson Laroca, Paulo Lisboa de Almeida
TL;DR
Parking occupancy recognition needs to generalize across environments without costly target-lot labels. This paper uses a two-phase self-supervised training pipeline and two-stage deployment, reaching 97.8% average accuracy without manual annotation.
Problem
Parking occupancy models face costly target-environment labeling and accuracy drops when deployed in unseen environments.
Method
The method combines generic and parking-lot self-supervised training with supervised fine-tuning on generic labeled parking data, followed by optional deployment specialization.
Results
97.8% global average accuracy was achieved by the Two-stage Deployment scheme, compared with 97.2% for the Strong General Model.
Takeaways & Limitations
The approach supports cross-environment generalization and domain specialization without manual annotation, indicating a practical and scalable parking-monitoring solution.
Abstract
from arXiv · showhide
As urban areas expand, automatic monitoring of parking lots becomes essential for efficient and sustainable cities. This work proposes a self-supervised approach for parking spot occupancy recognition that requires no labeled samples from the target parking lot. Building upon a self-supervised transfer learning fine-tuning protocol, the proposed training strategy consists of two self-supervised stages: first on unlabeled generic data and then on unlabeled target-specific data, followed by supervised fine-tuning using only generic parking lot labels. We adopt SimCLR with a ResNet-50 encoder and evaluate the method under a leave-one-out cross-environment protocol on three public datasets: PKLot, CNRPark-EXT, and PLds. We also introduce a two-stage deployment strategy in which a Strong General Model is initially deployed, followed by a Specialized Model that incorporates unlabeled images collected during the first N days of deployment in a self-supervised manner. Experimental results show that the Strong General Model alone outperforms supervised and self-supervised baselines, achieving an average accuracy of 97.2%, which further improves to 97.8% with the proposed two-stage strategy. These results demonstrate that self-supervised learning enables a scalable and labelefficient solution for real-world parking occupancy monitoring. Our trained models and source code are publicly available at https://github.com/LoanMaikon/Parking-Spot-Occupancy-Recognition.
I. INTRODUCTION
The introduction frames parking occupancy recognition as a sustainability challenge hindered by target-environment labeling costs and cross-environment accuracy loss. It proposes two self-supervised training stages and a deployment strategy that adapts using unlabeled target-lot samples.
- Motivation: Urban parking searches increase congestion, fuel consumption, and carbon emissions, motivating vision-based occupancy classification for more efficient cities.The system determines whether each parking space is empty or occupied in real time.
- Challenge: Target-environment labeling is costly, and models often lose substantial accuracy when deployed in unseen environments without labeled target data.These limitations motivate a self-supervised approach that avoids target-environment annotations.
- Training pipeline: The proposed training pipeline adds domain-specific self-supervised fine-tuning to generic self-supervised pretraining before supervised task fine-tuning.This extends the standard self-supervised transfer-learning baseline with a second self-supervised stage using parking-lot images.
- Deployment strategy: The pipeline produces a Strong General Model, followed by a Specialized Model trained with unlabeled target-lot samples collected during the first N deployment days.The Specialized Model is trained after the initial N-day deployment period using the same pipeline.
- Evaluation: Experiments use PKLot, CNRPark-EXT, and PLds, covering varied lighting, weather, and viewpoints, and compare the approach with supervised and self-supervised baselines.The introduction reports that the Two-stage Deployment scheme achieves the highest accuracy, followed by the Strong General Model.
II. RELATED WORK
The related-work section reviews prior research on self-supervised learning and parking spot occupancy classification. It emphasizes their main paradigms and explains how they motivate the proposed approach.
- The section reviews prior work on self-supervised learning.
- It also reviews prior work on parking spot occupancy classification.
- The review emphasizes the main paradigms and their motivation for the proposed approach.
A. Self-Supervised Learning · B. Parking Spot Occupancy Classification
Self-supervised learning learns transferable representations from unlabeled data through pretext tasks and related objectives. Parking occupancy research has progressed from dataset creation and highly accurate but annotation-intensive methods toward label-efficient, deployable approaches, including this work’s teacher-free target adaptation.
- A. Self-Supervised Learning: Self-supervised learning uses pretext tasks to learn invariant, semantically informative features from large unlabeled datasets.These representations can transfer to downstream tasks through a task-specific head.
- A. Self-Supervised Learning: Early self-supervised methods learned classifications without explicit external labels by exploiting relationships across multiple modalities.Later visual approaches included predicting relative patch positions and identifying shuffled-patch permutations.
- A. Self-Supervised Learning: Recent approaches include canonical correlation analysis with prototype clustering, self-distillation from model predictions, and masked image modeling.Masked image modeling trains models to reconstruct missing or masked input regions.
- B. Parking Spot Occupancy Classification: Parking occupancy research first emphasized large-scale datasets, including PKLot, CNRPark-EXT, and PLds.These datasets supported training and evaluation in the field’s initial phase.
- B. Parking Spot Occupancy Classification: Methods in the second phase often exceed 99% accuracy when many labeled samples from the target parking lot are available.Their extensive annotation requirements make deployment costly because each new parking lot requires substantial labeling.
- B. Parking Spot Occupancy Classification: The current phase seeks to reduce target-environment labeling and develop lightweight models for power-restricted platforms such as edge devices.Existing approaches include SVM- and deep-learning-based models, although the cited models still require large amounts of labeled data.
- B. Parking Spot Occupancy Classification: Approximately 1,000 labeled target-environment samples enabled accuracies close to 97%, while later work achieved similar performance without target labels using a teacher-student framework.That framework generates pseudo-labels during the first N deployment days before adapting a lightweight model.
- B. Parking Spot Occupancy Classification: This work combines self-supervised learning with unlabeled target-environment data to fine-tune a custom model for direct deployment on devices such as smart cameras.Unlike the referenced teacher-student method, the proposed approach does not rely on a teacher model.
III. PROPOSED APPROACH
The proposed approach builds Strong General and Specialized Models through a three-stage self-supervised and supervised pipeline. It uses generic and target-specific unlabeled parking-lot data without requiring target-lot labels.
- Model design: The method builds a Strong General Model for diverse parking lots and a Specialized Model tailored to a specific target lot.Both models use self-supervised learning to support generalization and target-environment adaptation.
- Two-stage deployment: During deployment, the Strong General Model operates for the first N days, after which the Specialized Model incorporates unlabeled images collected from the target environment.The Specialized Model augments the initial generic dataset with images gathered during this initial deployment period.
- Self-supervised representation learning: Both models initialize their encoders with SimCLR pretraining, which learns representations by aligning augmented views of the same image while contrasting them with representations from other images.The encoder is initially pretrained on ImageNet, and this initialization reduces training cost by providing generic visual representations.
- Self-supervised adaptation: In the second stage, domain-specific self-supervised fine-tuning adapts the encoder, using generic unlabeled parking-lot data for the Strong General Model and additional target data for the Specialized Model.The training procedures diverge after the shared domain-specific adaptation stage.
- Supervised fine-tuning: In the third stage, both models receive a linear classifier and undergo supervised fine-tuning using labeled data from generic parking lots.The pipeline first learns transferable representations from generic unlabeled images, then refines them for the parking-lot domain before supervised training.
IV. EXPERIMENTAL SETUP
The section outlines the datasets, evaluation protocol, and training configuration used in the experiments.
- The experimental setup covers the datasets, evaluation protocol, and training configuration used in the experiments.
A. Datasets
The study uses ImageNet for generic pretraining and three parking-occupancy datasets spanning varied lots, cameras, viewpoints, and weather conditions. Cross-environment generalization is assessed with leave-one-out training and testing across the three datasets.
- Dataset selection: The domain-specific datasets are PKLot, CNRPark-EXT, and PLds, while ImageNet provides general-purpose visual data for pretraining.The parking datasets contain images collected across different parking lots, cameras, viewing angles, and weather conditions.
- PKLot: Approximately 1.2 million annotated cropped images comprise PKLot, collected from three Brazilian cameras across sunny, rainy, and cloudy conditions.The images have an average resolution of 57×59 pixels.
- CNRPark-EXT: Approximately 165,000 annotated samples comprise CNRPark-EXT, collected in Italy from cameras 1 to 9 under sunny, rainy, and cloudy conditions.Each cropped image has an average resolution of 96×91 pixels.
- PLds: Approximately 104,000 labeled samples comprise PLds, collected at Pittsburgh International Airport across five weather conditions and three cameras.The average image resolution is 303 × 108 pixels, and the cameras are isshk, qridr, and vxusd/vmlix.
- Evaluation protocol: The leave-one-out protocol trains models on two datasets and evaluates them on the remaining dataset to measure cross-environment generalization.The three splits test PLds after training on PKLot and CNRPark-EXT, CNRPark-EXT after training on PKLot and PLds, and PKLot after training on CNRPark-EXT and PLds.
B. Base Model and Hyperparameter Settings
The method uses a ResNet-50 SimCLR pipeline with two self-supervised stages followed by supervised fine-tuning, with specified optimization, preprocessing, and deployment settings. Baselines use conventional transfer-learning protocols, and the model switch is fixed at N = 7 days.
- Architecture and training pipeline: ResNet-50 serves as the SimCLR backbone for both models, using 224 × 224 ImageNet-normalized inputs and two self-supervised stages before supervised fine-tuning.The Strong General Model and Specialized Model share this three-stage pipeline.
- Self-supervised training: 80,000 self-supervised training steps use LARS with learning rate 0.3, batch size 512, weight decay 10−6, τ = 0.5, and a 128-dimensional projection space.Training uses publicly available SimCLR weights initially, followed by self-supervised training on task-specific data, without scheduling or warm-up.
- Supervised fine-tuning: 30,000 supervised fine-tuning steps use SGD with Nesterov momentum 0.9 and batch size 256, with grid-searched learning rates and weight decay values.No data augmentation is applied during supervised fine-tuning.
- Baseline comparisons: The proposed approach is compared with supervised and self-supervised ResNet-50 transfer-learning baselines, using the same learning-rate and weight-decay grid search for fairness.The baselines differ in whether ImageNet pretraining is supervised or self-supervised.
- Deployment setting: N = 7 days is used in all experiments before switching from the Strong General Model to the Specialized Model.The value follows the deployment strategy defined in the paper.
V. RESULTS AND DISCUSSION
The reported results are averaged over five runs and include experiments on a high-performance server and a Raspberry Pi 5 to simulate edge deployment.
- All reported results represent the average of five runs.
- Experiments used two Intel Xeon Gold 6430 processors, 512 GB of DDR5 DRAM, and an NVIDIA RTX 6000 Ada Generation GPU with 48 GB of VRAM.
- Edge deployment was simulated on a Raspberry Pi 5 with 8 GB of DRAM.
A. Main Results
The proposed self-supervised models achieve strong cross-environment parking occupancy accuracy, with the Two-stage Deployment reaching the best overall result. Training requires approximately 25 hours on one GPU, while Raspberry Pi inference processes 100 visible spaces in under 23 seconds.
- Baseline results: 97.0% and 97.1% overall average accuracy were achieved by the Self-supervised Baseline and Supervised Baseline, respectively, exceeding the 91.8% reported for cross-parking-lot evaluation in.Results are reported in accuracy because the dataset subsets are relatively well balanced.
- Deployment results: 97.8% global average accuracy was achieved by the Two-stage Deployment, the best overall result, though it underperformed the Supervised Baseline on PLds by 0.7 percentage points.The scheme uses the Strong General Model for the first N days and the Specialized Model thereafter.
- Efficiency: 25 hours of training are required for either a Strong General Model or Specialized Model on a single GPU, while Raspberry Pi processing takes 0.2282 seconds per parking spot.Inference accounts for 0.2140 seconds, with remaining time used for preprocessing; 100 visible spaces can be processed in under 23 seconds.
B. Using Labeled Samples from the Target Parking Lot
When labeled target-lot samples are available, the Specialized Model consistently outperforms competing methods across sample sizes. With 1,000 target samples, it reaches 98.8% accuracy versus 97%5 for, while the Self-supervised Baseline remains more dependent on labeled data.
- Using Labeled Samples from the Target Parking Lot: The Specialized Model consistently outperforms all competing methods across the entire range of labeled target-lot samples.Samples are randomly drawn from the first N deployment days, with evaluation on the remaining days.
- Using Labeled Samples from the Target Parking Lot: 98.8% accuracy is achieved by the proposed approach with 1,000 target samples, compared with 97%5 for.
- Using Labeled Samples from the Target Parking Lot: The Self-supervised Baseline improves more slowly and remains noticeably below all other models, including the supervised model, with 8,192 samples.Its performance shows a stronger dependence on labeled data.
VI. CONCLUSIONS
The work introduces a two-phase self-supervised approach for cross-dataset parking occupancy recognition without target-environment labels. It achieves 97.2% average accuracy with the Strong General Model and 97.8% with two-stage deployment, while highlighting edge-inference and computational constraints.
- Approach: The proposed method uses SimCLR and a two-phase self-supervised training pipeline for cross-dataset parking spot occupancy recognition.The evaluation uses three widely used datasets and targets high accuracy without labeled samples from the target environment.
- Deployment results: 97.2% average accuracy is achieved by the Strong General Model.With 25 GPU hours, the Specialized Model trained after the 7th deployment day reaches 97.8% average accuracy.
- Deployment results: 97.8% average accuracy is achieved by the Two-stage Deployment scheme without manual annotation.The Specialized Model replaces the Strong General Model after the N-th deployment day, which was the 7th day in the experiments.
- Efficiency and limitations: 0.2282 seconds is required to classify one parking space image on a Raspberry Pi 5.The result supports edge computing on relatively capable devices, although latency may remain prohibitive on more resource-constrained platforms.
- Conclusions and future work: Self-supervised learning demonstrates effectiveness for cross-environment generalization and domain specialization despite computational demands during training and deployment.Future work will examine alternative self-supervised paradigms, different architectures, and accuracy-efficiency trade-offs for edge deployment.