Vietnamese License Plate Detection Benchmark
Controlled detection benchmark and model release evaluating compact inference (YOLOv8n, 3.0M parameters) against high-capacity server detection (YOLOv8l, 43.6M parameters) on Vietnamese vehicle license plates.
GitHub Repository: github.com/neitpm/vn-plate
Model Summary
- Task: Single-class bounding box localization (
0: 'plate'). - Dataset: 1,005 authentic captures partitioned into Train (704), Valid (200), and Test (101). Verified zero duplicate leakage across splits.
- YOLOv8n: 3.0M parameters, 8.1 GFLOPs ($640 \times 640$). Compact inference variant evaluated at $224 \times 224$ (1,029 decoded anchors).
- YOLOv8l Stage 2: 43.6M parameters, 164.8 GFLOPs ($640 \times 640$). High-capacity server baseline fine-tuned from a 10-layer frozen backbone.
Benchmark Metrics & Evaluation
Official Ultralytics Evaluation (GPU RTX 5060 Ti, Native PyTorch)
| Model Variant | Evaluation Resolution | Test Precision | Test Recall | Test mAP@0.5 | Test mAP@[0.5:0.95] |
|---|---|---|---|---|---|
YOLOv8n (best.pt) |
$640 \times 640$ | 99.9% | 100.0% | 99.50% | 78.19% |
YOLOv8l Stage 2 (best.pt) |
$640 \times 640$ | 99.8% | 100.0% | 99.50% | 78.47% |
(Note: Evaluated on the independent 101-image / 101-box test set).
Compact Deployment Resolution ($224 \times 224$ vs $640 \times 640$)
- YOLOv8n @ $224 \times 224$: Precision = 99.2%, Recall = 96.0%, mAP@0.5 = 99.25%, mAP@[0.5:0.95] = 68.82% ($-9.37$ points drop due to downsampling).
- Scale / Distance Recall Breakdown (IoU $\ge 0.5$):
- Small / Far plates ($< 2.5%$ area, $N = 34$): 79.4% recall (27/34) at $224 \times 224$ vs 100.0% at $640 \times 640$.
- Medium plates ($2.5% - 6.0%$ area, $N = 49$): 98.0% recall (48/49) at $224 \times 224$ vs 100.0% at $640 \times 640$.
- Large / Near plates ($> 6.0%$ area, $N = 18$): 100.0% recall (18/18) across both models.
Standardized CPU Latency Profiling
- Hardware: Intel Core i5-14600K (14 cores / 20 threads).
- Runtime: ONNX Runtime (
CPUExecutionProvider, 4 intra-op threads,ORT_ENABLE_ALL, 10 warmup runs). - YOLOv8n @ $224 \times 224$: 3.70 ms end-to-end (Pre: 0.19 ms, Fwd: 3.42 ms, Post: 0.09 ms) $\rightarrow$ 270.3 FPS.
- YOLOv8l @ $640 \times 640$: 375.01 ms end-to-end (Pre: 2.78 ms, Fwd: 372.07 ms, Post: 0.16 ms) $\rightarrow$ 2.7 FPS.
- (Note: Profiling reflects x86 CPU workstation performance; models have not been benchmarked on embedded ARM, mobile, or edge NPU hardware).
File Layout
weights/
yolov8n_edge.onnx # 11.56 MB (1,029 anchors, 224x224 input)
yolov8n_edge.pt # 5.95 MB (PyTorch weights)
yolov8l_server.onnx # 166.62 MB (8,400 anchors, 640x640 input)
yolov8l_server.pt # 83.58 MB (PyTorch weights)
scripts/
infer.py # Standalone Python inference runner (.pt & .onnx)
metadata/
weights_manifest.json # Checksums & file sizes
data_eval.yaml # Evaluation configuration
Checksum Verification
Verified SHA-256 cryptographic hashes:
weights/yolov8n_edge.onnx:28c4c12958f705ae658c6901f2e9e755a7e03f629a73c23750c7d37761af31ddweights/yolov8n_edge.pt:873851543beeb9c6483c07e64b99400d1554a70244862b1cd70b62035b6431c2weights/yolov8l_server.onnx:21f2e3aefc46dadd0b4b7e4a0200d0443644c41e982f9d756ef17231b74eaaa3weights/yolov8l_server.pt:8674e24abccf02522f12c34d6829efc3c0e13ab0c53a3ea4850bd6fe5a0671fd
Quickstart & Usage
Download checkpoints using huggingface_hub:
from huggingface_hub import hf_hub_download
# Download compact ONNX model
onnx_path = hf_hub_download(
repo_id="neitpm/vn-plate-detection-benchmark",
filename="weights/yolov8n_edge.onnx"
)
Run standalone inference:
python scripts/infer.py --weights weights/yolov8n_edge.onnx --source path/to/car.jpg --imgsz 224
Limitations
- Test Scope: Evaluation conducted on 101 test images under standard daytime lighting.
- OCR Integration: Alphanumeric optical character recognition is treated as a downstream application prototype; Character Error Rate (CER) and Word Error Rate (WER) were not evaluated due to lack of character-level ground truth in the dataset.
- Hardware Scope: Latency numbers reflect an Intel Core i5-14600K CPU with 4 threads; embedded ARM or mobile NPU performance will differ.