How we0091234/crnn_plate_recognition works
This repository implements Chinese license-plate character recognition: labeled plate crops are converted to training manifests, used to train a neural recognizer, and then recognized through image or ONNX inference. It also includes plate-image augmentation and support for preparing double-row plates by merging them into a single row. Plate detection is explicitly outside this project. The README documents several workflows; sampled source confirms dataset loading, model execution, and training/validation, while some integration details are inferred only from the documented entry points and tree.
Main entry points: train.py Training loop · demo.py Image demo · _360cc.py CCPD dataset · demo1.py Augmentation demo
Components 20
Data preparation
- Label manifest
plateLabel.py - Character alphabet
alphabets.py - CCPD dataset
lib/dataset/_360cc.py
Model training
- Training loop
train.py - Train and validate
lib/core/function.py - OCR networks
plateNet.py - CRNN architecture
lib/models/crnn.py - Model checkpoints
Recognition
- Image demo
demo.py - ONNX export
export.py - ONNX inference
onnx_infer.py - Plate text
- Double-row merge
demo.py - ONNX model
Image augmentation
- Augmentation demo
Text-Image-Augmentation-python-master/demo1.py - Image transforms
Text-Image-Augmentation-python-master/augment.py - MLS warp
Text-Image-Augmentation-python-master/warp_mls.py - Augmented crops
Other components
- Dataset operator
- Plate crops
Connections 24
- Dataset operator → Plate crops: provides crops
- Dataset operator → Label manifest: labels images
- Label manifest → CCPD dataset: writes manifests
- Character alphabet → CCPD dataset: maps characters
- Plate crops → CCPD dataset: loads images
- CCPD dataset → Training loop: supplies batches
- Training loop → OCR networks: runs training
- Training loop → CRNN architecture: imports architecture
- Training loop → Train and validate: calls train and validate
- OCR networks → Train and validate: computes predictions
- Training loop → Model checkpoints: saves weights
- Model checkpoints → Image demo: loads weights
- Image demo → OCR networks: runs recognition
- Image demo → Plate text: decodes text
- Model checkpoints → ONNX export: loads weights
- ONNX export → ONNX model: exports model
- ONNX model → ONNX inference: loads model
- ONNX inference → Plate text: returns text
- Dataset operator → Augmentation demo: selects source and destination
- Augmentation demo → Image transforms: applies transforms
- Image transforms → MLS warp: uses geometric warp
- Augmentation demo → Augmented crops: writes crops
- Plate crops → Double-row merge: provides double-row crop
- Double-row merge → Image demo: prepares input