Real Time License Plate Matching


Matching the exit of a car from a carpark to the entry using camera observations from its license plate.

Input

Live stream of license plate images from car parks across Europe

Output

Matched visits (entry plus exit), corrected license plate string, and confidence score

Goal

Improve number of detected visits to increase billable carpark sessions (number of visits)


Motivation


APCOA as a leading European car park operator manages hundreds of locations across multiple countries. Cameras at entries and exits automatically capture license plate images. Matching an entry to an exit - i.e., recognising a complete visit - is business-critical: only successfully matched visits can be billed.

The existing solution relied on OCR strings provided by camera vendors and exact string matching. The vendor OCR was frequently inaccurate, thereby leading to unmatched visits that could not be billed. An avoidable loss of revenue.


Challenge


The task was multi-faceted and technically demanding:

  • License plate images of highly variable quality: cut-offs, occlusions, poor lighting, and dirt

  • Different plate formats and fonts across six European countries

  • Real-time requirement: matching must occur immediately after each camera observation

  • High, variable throughput of approximately one million observations per day

  • Non-consecutive observations (e.g., AABA patterns) and missing or incorrect driving directions

  • Correct hyphen placement as a country-specific challenge (the German market)


Solution


dida developed an end-to-end  solution covering the entire pipeline from image processing to visit assignment. The solution consists of three core components:

1. State-of-the-Art OCR Model

A custom OCR model based on a Transformer architecture (TrOCR) was trained specifically for vehicle license plates. The model uses an encoder-decoder approach with a specialised tokenizer for plate characters (digits, letters, hyphens). Through an iterative bootstrapping procedure, the model was trained on weakly labelled operational data - without costly manual annotation.

  • Simultaneous training on metric learning (encoder) and text generation (decoder)

  • Combined Cross-Entropy Loss and Triplet Loss for robust embeddings

  • Handling of cut-offs, multi-line plates, and varying image qualities

2. Hierarchical Matching Algorithm

Since OCR results can be imperfect (eg. cut-offs, occlusions), a fuzzy matching approach with domain-specific heuristics was developed:

  • Transit matching using maximum cliques within temporal windows, including time constraints

  • Backwards-directed visit matching for completed exits and forwards-directed matching for completed entries

  • String-overlap analysis for candidate discrimination

  • Composite confidence score combining an OCR term, a transit term, and a visit term

3. Scalable Microservice Architecture

For production deployment, an event-driven microservice architecture running on a Kubernetes cluster was built:

  • Event-driven architecture with a message bus for loosely coupled components

  • NVIDIA Triton Inference Server with ONNX backend and dynamic batching

  • PostgreSQL database for synchronisation across stateless matching pods

  • Infrastructure-as-Code with Terraform and Terragrunt for multi-environment deployments


Results


The solution was successfully deployed to production and delivers measurable business outcomes:

5 % revenue increase

Increase in matched visits through more precise matching, leading to a direct revenue uplift

> 80 % legal enforceability

Fuzzy matches achieve confidence levels on par with exact matches, enabling legal collection of parking fees

ROI > 10x

The ratio of additional revenue to ongoing operating costs exceeds a factor of ten

< 1 : 500 false-positive rate

Fewer than one incorrect match per 500, ensuring high reliability

6 countries, ~1 M obs./day

System deployed in production across six European countries, processing approximately one million observations daily

Real time

Matching occurs in near real time after every camera observation


Summary


This project demonstrates how an end-to-end AI solution can create significant business value: a custom deep-learning model, combined with domain-specific algorithms and a robust cloud infrastructure, enables reliable real-time visit matching across hundreds of car park locations in Europe. The solution directly improves the client’s revenue position while keeping operating costs low, and is readily scalable to additional markets and locations.


Project Presentation


Fabian Dechent presented the project on the dida conference 2025, explaining our approach and technical details related to this project.

Related projects