Instructions to use dronefreak/pklot-yolov8n with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use dronefreak/pklot-yolov8n with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("dronefreak/pklot-yolov8n", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
YOLOv8n Finetuned on PKLot
Fine-tuned YOLOv8n 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 ultralytics huggingface_hub
Load Model from Hugging Face
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
weights = hf_hub_download(
repo_id="dronefreak/pklot-yolov8n",
filename="best.pt"
)
model = YOLO(weights)
Run Inference
results = model.predict(
source="image.jpg",
conf=0.25
)
results[0].show()
Performance
Evaluated on the PKLot test split, using DetectionBench's standard evaluation pipeline (detectionbench-evaluate).
| Metric | Score (%) |
|---|---|
| mAP@50 | 99.42 |
| mAP@50-95 | 94.85 |
| Precision | 99.49 |
| Recall | 98.68 |
| F1 Score | 99.08 |
| Parameters | 3.2M |
| FLOPs | 8.7B (at 640 px) |
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.48 | 96.94 |
| occupied | 99.35 | 92.76 |
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 | Ultralytics YOLO |
| Training Toolkit | DetectionBench |
| Epochs (configured max) | 60 |
| Epochs (actually trained) | 60 |
| Early Stopping Patience | 15 |
| Batch Size | auto (Ultralytics AutoBatch) |
| Image Size | 960 |
| Optimizer | AdamW |
| Initial Learning Rate | 0.001 |
| Seed | 0 |
Repository Contents
best.pt
results.csv
args.yaml
BoxPR_curve.png
BoxF1_curve.png
BoxP_curve.png
BoxR_curve.png
confusion_matrix.png
confusion_matrix_normalized.png
val_batch0_pred.jpg
pklot_yolov8n_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}
}
No official YOLOv8 research paper has been published by Ultralytics; this is their own recommended software citation instead:
@software{jocher2023yolov8,
author = {Glenn Jocher and Ayush Chaurasia and Jing Qiu},
title = {Ultralytics YOLOv8},
version = {8.0.0},
year = {2023},
url = {https://github.com/ultralytics/ultralytics},
license = {AGPL-3.0}
}
- Downloads last month
- 63
Model tree for dronefreak/pklot-yolov8n
Base model
Ultralytics/YOLOv8Dataset used to train dronefreak/pklot-yolov8n
Collection including dronefreak/pklot-yolov8n
Evaluation results
- mAP@50 (test split) on PKLotDetectionBench99.420
- mAP@50-95 (test split) on PKLotDetectionBench94.850
- Precision (test split) on PKLotDetectionBench99.490
- Recall (test split) on PKLotDetectionBench98.680
