«LPDet» provides a complete License Plate Detection and Recognition algorithm
ONLINE DEMO:LICENSE PLATE DETECT/SEGMENT/RECOG
Implementing license plate detection, segmentation, and recognition functions based on ultralytics/yolov5 v7.0 and zjykzj/crnn-ctc
Model Segmentation |
Input Shape | GFLOPs | Model Size (MB) | Speed RTX 3090 b1 (ms) |
ChineseLicensePlate mAP50 (%) |
Training Data | Testing Data |
---|---|---|---|---|---|---|---|
YOLOv5n-Seg | (3, 640, 640) | 6.7 | 3.9 | 9.0 | 99.2 | 200,579 | 105,585 |
Model Recognition |
Input Shape | GFLOPs | Model Size (MB) | Speed RTX 3090 b1 (ms) |
ChineseLicensePlate Accuracy (%) |
Training Data | Testing Data |
CRNN_Tiny | (3, 48, 168) | 0.3 | 4.0 | 7.5 | 76.226 | 269,621 | 149,002 |
Version | Release Date | Major Updates |
---|---|---|
v1.2.0 | 2024/08/17 | Add ONNX inference and Gradio demo. |
v1.1.0 | 2024/08/04 | Optimize license plate segmentation and recognition algorithms. |
v1.0.0 | 2024/07/21 | Implementing license plate detection, segmentation, and recognition functions. |
v0.3.0 | 2023/10/03 | Support for Automatic Mixed Precision (AMP) training. |
v0.2.0 | 2023/10/02 | Support for distributed training with multi-GPUs. |
v0.1.0 | 2023/09/29 | Reconstruct the 872699467/CCPD_CNN implementation to adapt to interfaces after Pytorch v1.0.0. |
This warehouse provides a complete license plate detection and recognition algorithm, with the goal of perfectly detecting and recognizing all license plates and license plate information.
Note: the latest implementation in our warehouse is entirely based on ultralytics/yolov5 v7.0
- ChineseLicensePlate: Baidu Drive(ad7l)
# Train
$ python segment/train.py --data ChineseLicensePlate-seg.yaml --weights yolov5n-seg.pt --img 640 --epoch 10
# Eval
$ python segment/val.py --weights yolov5n-seg_plate.pt --data ChineseLicensePlate-seg.yaml --img 640
# Predict
$ python segment/predict.py --weights yolov5n-seg_plate.pt --source ./assets/ccpd/
About license plate recognition algorithm, using zjykzj/crnn-ctc
$ git submodule init
$ git submodule update
Then predicting license plates
# Using Pytorch
$ python3 segment/predict_plate.py --weights yolov5n-seg_plate.pt --w-for-recog crnn_tiny-plate-b512-e100.pth --source ./assets/ccpd/
# Using ONNXRuntime
$ python3 segment/predict_plate.py --weights yolov5n-seg_plate.onnx --w-for-recog crnn_tiny-plate.onnx --source ./assets/ccpd/ --device cpu
- zhujian - Initial work - zjykzj
- detectRecog/CCPD
- 872699467/CCPD_CNN
- zjykzj/FastestDet
- zjykzj/YOLOv5
- zjykzj/crnn-ctc
- ultralytics/yolov5
Anyone's participation is welcome! Open an issue or submit PRs.
Small note:
- Git submission specifications should be complied with Conventional Commits
- If versioned, please conform to the Semantic Versioning 2.0.0 specification
- If editing the README, please conform to the standard-readme specification.
Apache License 2.0 © 2023 zjykzj