LiteALPR: Lightweight & Accurate License Plate Recognition
Representative license plate samples across diverse layouts and visual conditions evaluated in LiteALPR.
What is LiteALPR?
LiteALPR is an open-source, lightweight two-stage Automatic License Plate Recognition (ALPR) library designed for high-throughput workstation processing and resource-constrained edge deployment.
LiteALPR integrates two task-specific lightweight adaptations:
- YOLOv8n-Efficient Detector: Replaces dense C2f bottlenecks across backbone stages (P3–P5) and the PANet neck with lightweight C3Ghost modules (\(5 \times 5\) depthwise convolutions), reducing parameters to 2.00M, cutting \(416 \times 416\) compute to 2.36 GFLOPs (-30.8%), and accelerating CPU detection by 2.34× while preserving localization precision (99.45% \(\text{mAP}_{50}\), 88.07% \(\text{mAP}_{50-95}\)).
- SVTR26-Tiny Recognizer: Replaces 2D self- and cross-attention decoders with an attention-free Efficient RCTC Decoder using Height-wise Average Pooling (HAP) and 4-bucket aspect-ratio resizing (\(64 \times 64\), \(48 \times 96\), \(40 \times 112\), \(32 \times 128\)), reducing parameters to 4.22M and lowering latency to ~5.03 ms on GPU and ~8.32 ms on CPU.
- Multi-National Training & Degradation Modeling: Trained with Gaussian/motion blur, JPEG compression, additive noise, and PARSeq-style augmentations across Brazilian, Chinese, and Vietnamese/auxiliary benchmarks.
Key Highlights
- ⚡ High Throughput: 66.45 FPS on an NVIDIA GeForce RTX 3060 GPU, 23.44 FPS on an AMD Ryzen 5 4600G CPU, and 15.70 FPS (10W) / 10.74 FPS (5W) sustained without thermal throttling on an NVIDIA Jetson Nano (4GB).
- 🎯 Competitive Accuracy: 77.55% end-to-end exact-match accuracy (6.22% CER) on 5,230 full-scene holdout images (compared to 39.67% for out-of-the-box fast-alpr), and 89.14% sequence accuracy (3.28% CER) across 25,000 localized plate crops (87.96% on the 22,350 real-image crops; 89.25% on 20,036 strictly unseen-plate crops).
- 📦 Plug-and-Play Python API: Simple
LiteALPR()interface with automatic Hugging Face weight caching and modulardetect()/recognize()execution. - 🔄 Flexible Backends: Native support for ONNX Runtime (CPU & CUDA), PyTorch (
.pt/.pth), and TensorRT 4-profile static engines on Jetson Nano. - 🌐 Multi-National Benchmarks: Evaluated across Brazil (RodoSol-ALPR), China (CCPD) & CBLPRD-330k, Vietnam, and Auxiliary European subsets, with full sample-level split manifests in
manifests/.
Quick Example
from litealpr import LiteALPR
# Initialize pipeline (auto-downloads pre-trained models from HuggingFace)
model = LiteALPR()
# Read license plate
results = model.read("sample.jpg")
for res in results:
print(f"Plate: {res['text']} | Confidence: {res['score']:.4f} | Box: {res['box']}")
Next Steps
- Check out Getting Started to install LiteALPR via
pip. - Read about our Pipeline & Architecture design.
- Explore the comprehensive Python API & Usage guide.
- Learn how to train custom models in the Training & Tools guide.
- Understand the hardware and software setup in Reference Environment.
- Review detailed Benchmarks across GPU, CPU, and regional subsets.
- Learn how to build 4-profile TensorRT engines in Jetson Nano Deployment.
- Cite the project in your research using Paper & Citation.