RF-DETR Nano Finetuned on PKLot
Fine-tuned RF-DETR Nano object detector on the PKLot benchmark dataset, trained and evaluated as part of DetectionBench -- a framework for reproducibly benchmarking modern object detectors with identical training recipes and evaluation metrics across multiple real-world datasets.
Usage
Install Dependencies
pip install rfdetr huggingface_hub
Load Model from Hugging Face
from huggingface_hub import hf_hub_download
import rfdetr
weights = hf_hub_download(
repo_id="dronefreak/pklot-rfdetr-nano",
filename="checkpoint_best_total.pth"
)
model = rfdetr.RFDETRNano(pretrain_weights=weights)
Run Inference
detections = model.predict("image.jpg", threshold=0.25)
Performance
Evaluated on the PKLot test split, using DetectionBench's standard evaluation pipeline (detectionbench-evaluate).
| Metric | Score (%) |
|---|---|
| mAP@50 | 98.93 |
| mAP@50-95 | 91.63 |
| Precision | 99.66 |
| Recall | 99.81 |
| F1 Score | 99.74 |
| Parameters | 30.5M |
| FLOPs | N/A (not published upstream) |
PKLot Model Zoo
Every model DetectionBench has trained and evaluated on PKLot so far, for full transparency -- see DetectionBench for the smaller, curated comparison set used on the project README.
| Model | mAP@50 | mAP@50-95 | Precision | Recall |
|---|---|---|---|---|
| YOLO11n | 99.42 | 94.99 | 99.78 | 99.92 |
| YOLO26n | 99.42 | 94.6 | 99.66 | 99.37 |
| YOLOv8n | 99.42 | 94.85 | 99.49 | 98.68 |
| YOLO26m | 99.41 | 94.92 | 99.6 | 99.64 |
| YOLOv8s | 99.33 | 95.33 | 99.5 | 96.18 |
| YOLO26s | 99.31 | 94.32 | 99.52 | 92.31 |
| RF-DETR Nano | 98.93 | 91.63 | 99.66 | 99.81 |
| YOLOv8m | 98.41 | 95.4 | 99.55 | 97.67 |
Per-Class Performance
| Class | mAP@50 | mAP@50-95 |
|---|---|---|
| vacant | 99.0 | 94.67 |
| occupied | 98.87 | 88.6 |
This model was evaluated with Supervision's detection metrics, which report mAP/Precision/Recall directly but don't produce a confusion-matrix plot the way Ultralytics' validator does.
Dataset
This model was trained on PKLot. For the full dataset description, provenance, license, and citation, see the dataset card:
https://huggingface.co/datasets/dronefreak/PKLot
Classes
- vacant
- occupied
Training Configuration
| Setting | Value |
|---|---|
| Dataset | PKLot |
| Framework | RF-DETR |
| Training Toolkit | DetectionBench |
| Epochs (configured max) | 60 |
| Epochs (actually trained) | 59 |
| Early Stopping Patience | 15 |
| Batch Size | 6 |
| Resolution | 512 |
| Optimizer | adamw |
| Learning Rate | 0.0001 |
| Seed | 42 |
Repository Contents
checkpoint_best_total.pth
metrics.csv
config.json
pklot_rfdetr-nano_showcase.jpg
README.md
Related Resources
- PKLot dataset card on Hugging Face
- DetectionBench -- reproducible benchmarks for modern object detectors on real-world datasets
- PKLot paper (Expert Systems with Applications, doi:10.1016/j.eswa.2015.02.009)
- PKLot project website (official data source)
Training Framework
This model was trained using DetectionBench, an open-source framework for benchmarking object detectors across multiple real-world datasets with a common pipeline.
Features include:
- A dataset-adapter registry for converting real-world datasets into a canonical format
- Identical training/evaluation recipes across model families (Ultralytics YOLO/RT-DETR, RF-DETR)
- Hardware profiling (latency, FPS, VRAM, parameters, FLOPs)
- One-command reproducibility via versioned Hydra configs
If you find this model useful, please consider starring the repository.
Known Limitations
- Not free-form car detection: PKLot's own task is per-space classification at fixed, camera-specific locations. This adapter treats every marked space as a box to detect and classify (
vacant/occupied), so scores reflect that easier, location-aware task, not general-purpose car detection or the classification literature's numbers. - Fixed-camera memorization: all frames come from 3 stationary cameras (PUCPR, UFPR04, UFPR05), so each parking space sits at a near-identical pixel position across all 12,417 frames -- a detector can substantially memorize per-camera space layouts. Splits are grouped by (lot, capture day), so validation/test measure generalization to unseen days on seen cameras, not to new lots or camera placements. Expect very high and fast-saturating mAP@50 as a result (see mAP@50-95 for a metric that still discriminates between models).
- Very dense: about 56 boxes per image on average (median 40, up to 100 -- the PUCPR lot alone has 100+ marked spaces, so roughly a third of images hit that ceiling).
- Loosened boxes for a small subset: 7,671 labelled spaces (1.1%, all in UFPR04) have no contour polygon in the release, only a rotated rectangle, so their axis-aligned box is looser than the rest (mean IoU ~0.85 against the contour-derived boxes where both exist).
- Rare weather conditions: sunny and cloudy days dominate the capture period; rainy-day frames are comparatively rare, so performance under rain is measured on fewer examples.
Citation
If you use this model in your research, please consider citing the dataset and the model architecture:
@article{almeida2015pklot,
title={PKLot -- A robust dataset for parking lot classification},
author={de Almeida, Paulo R. L. and Oliveira, Luiz S. and Britto Jr, Alceu S. and Silva Jr, Eunelson J. and Koerich, Alessandro L.},
journal={Expert Systems with Applications},
volume={42},
number={11},
pages={4937--4949},
year={2015},
doi={10.1016/j.eswa.2015.02.009}
}
@inproceedings{robinson2026rfdetr,
title = {RF-DETR: Real-Time Detection Transformer},
author = {Robinson, Isaac and Robicheaux, Peter and Popov, Matvei and Ramanan, Deva and Peri, Neehar},
booktitle = {International Conference on Learning Representations (ICLR)},
year = {2026},
url = {https://arxiv.org/abs/2511.09554}
}
@article{oquab2023dinov2,
title={DINOv2: Learning Robust Visual Features without Supervision},
author={Oquab, Maxime and Darcet, Timoth{\'e}e and Moutakanni, Theo and Vo, Huy and Szafraniec, Marc and Khalidov, Vasil and Fernandez, Pierre and Haziza, Daniel and Massa, Francisco and El-Nouby, Alaaeldin and others},
journal={arXiv preprint arXiv:2304.07193},
year={2023}
}