A keras implementation of the network proposed in https://arxiv.org/abs/1806.10447 LPRnet is a fully end to end licence plate recognition network with the following priorities:
- Parameter efficiency
- Speed
This repo contains all the code necessary to train LPRnet on a synthetic dataset
- Utilizes separable convolutional layers as opposed to the normal convolutional layers used in the paper.
- Training data is generated at train time.
- Dataset generation adopted from https://github.com/bluesy7585/tensorflow_LPRnet
- Dataset augmentation adopted from the proposed system in https://arxiv.org/abs/2108.06949, code available at https://github.com/roatienza/straug
To train LPRnet, run the following script to train with 10000 epochs.
python train.py 10000
This script runs a quick demo of LPRnet on a video using MobileNetV2SSD-FPNLite as the licence plate detector.
python demo/sync.py
A keras generator is used to generate synthetic images at train time. Fonts are located in \fonts
.
A sample set of synthetic plates is shown below.
The model architecture is implemented with the following modifications:
- Depthwise separable convolutional layers are used as a drop in replacement for the regular convolutional layers.
- Global context is used concatenating each small basic block as suggested in the paper.
A diagram of the architecture is shown below.
- Improve synthetic data generation.
- Make implementation compatible with google's coral TPU compiler. Currently only 32/52 ops are mapped to the TPU (no depthwise layers)
- Test training without synthetic data with annotated images of licence plates.