The Problem

License plate recognition (LPR) typically requires stitching together multiple models for detection and OCR, with heavy setup and poor performance on edge devices. FastALPR addresses this by providing a ready-to-run ALPR pipeline with optimized ONNX models that work out of the box, while still allowing you to swap in custom detection and OCR models.

What This Does

FastALPR is a Python framework that combines a license plate detector (fastalpr/defaultdetector.py) and an OCR engine (fastalpr/defaultocr.py) into a single ALPR class in fastalpr/alpr.py. It uses ONNX Runtime for inference, with optional backends for CUDA, OpenVINO, DirectML, and Qualcomm QNN. The core API is minimal: initialize ALPR, call it on an image, and get plate text, bounding boxes, and confidence scores.

The project includes a Makefile for common tasks, a pyproject.toml for packaging, and a uv.lock file that pins dependencies for reproducible development builds. Documentation lives in docs/ (built with mkdocs.yml), and CI/CD is handled through seven GitHub Actions workflows in .github/workflows/, covering tests, releases, CodeQL analysis, and secret scanning.

How To Use It

Setup: Install via pip with the appropriate ONNX backend extra. The README documents these commands verbatim:

pip install fast-alpr[onnx] # CPU pip install fast-alpr[onnx-gpu] # NVIDIA GPU pip install fast-alpr[onnx-openvino] # Intel CPUs

Running it: The entry point is the ALPR class. Default models are specified in fastalpr/defaultdetector.py and fastalpr/defaultocr.py, but you can pass custom model names to the constructor:

from fastalpr import ALPR

alpr = ALPR( detectormodel="yolo-v9-t-384-license-plate-end2end", ocrmodel="cct-xs-v1-global-model", ) results = alpr("assets/testimage.png")

Configuration: No environment variables or config files are required. Model selection is done via constructor arguments. The README's quick start example is cut off in the excerpt, but the docs/quickstart.md file likely contains the full example.

Real-World Use

Typical deployment: a parking access system or toll booth where a camera feed captures frames, and FastALPR extracts plate text for database lookup. The ONNX-optimized models are designed for low-latency inference on modest hardware. Since detection and OCR are decoupled, you could replace the OCR model with one trained for a specific region's plate fonts without touching the detection side.

Code Health & Issues

Low - Dependencies declared without a lockfile in pyproject.toml: The uv.lock file exists, which mitigates this for uv users, but pip install fast-alpr will resolve dependencies at install time. This is a minor reproducibility concern for end users. Low - Test coverage is thin: Only 4 test files exist in test/, and test_alpr.py is the sole test module. For a framework with model-swapping flexibility, there's no visible test matrix covering different ONNX backends or custom model inputs. Low - No license file: The repo has a LICENSE file, but the README badge references it without specifying the license type. Verify the license before commercial use. Positive: CI is well-configured with separate workflows for tests, releases, CodeQL, and secret scanning. The Makefile and pyproject.toml indicate a structured development workflow. The project uses mypy and pylint, suggesting type-checking and linting are enforced.

The Bottom Line

FastALPR is a solid, focused ALPR framework that prioritizes performance and modularity over feature sprawl. The ONNX backend flexibility is a genuine advantage for edge deployment. It's best suited for developers who need a working LPR pipeline quickly and want the ability to swap models later. The thin test suite and lack of a pip lockfile are minor concerns, but the clean architecture and good documentation make it a reasonable choice for production use with proper validation.