Intelligent driving, license plate detection and recognition Python C++ and Android implementation license plate detection and recognition (real-time license plate recognition)

this project will develop an C++ and Python and Android version of the license plate detection and recognition APP, wherein the license plate detection algorithm using YOLOv5 model, license plate recognition algorithm using PlateNet model; license plate detection and recognition APP can achieve real-time detection and recognition effect on ordinary Android mobile phones, CPU (4 thread) about 30ms, GPU about 25ms, basically meet the performance requirements of business.

In order to be deployed on the mobile Android platform, I carried out a simple model lightweight for YOLOv5s, and developed a light-level version yolov5s05_416 and yolov5s05_320 model; the lightweight model can achieve real-time detection effect on ordinary Android mobile phones

CCPD (Chinese City Parking Dataset, ECCV) is a data set of Chinese city license plates, there are two: CCPD 2019 and CCPD 2020, the former is mainly blue card data, about 34W; the latter is mainly new energy green card data, about 10,000;

The environment of the license plate photos taken by the CCPD 2019 license plate dataset is complex and changeable, including data of multiple scenes such as tilt, blur, rain, snow, etc., and most of the pictures have and only contain one license plate;

If you have any questions or need the full code or data or need customized development requirements, you can contact me Email Mail me : slowlon@foxmail.com
Considering the license plate detection data set, the target is relatively small, and the target boxes are almost all vertical rectangular boxes; the Anchor effect of directly multiplexing the original COCO may not be very good; therefore, here the labeled box of the license plate data set CCPD is re-clustered to obtain a new Anchor; The following table gives the Anchor results of yolov5s, yolov5s05_416 and yolov5s05_320 re-clustering:

C++ version project

Realized the C/C++ version of license plate detection and license plate recognition, license plate detection model YOLOv5 and license plate recognition model PlateNet, model inference using TNN deployment framework (supports multi-threaded CPU and GPU accelerated inference); image processing using OpenCV library, model acceleration using OpenCL, real-time processing can be achieved in ordinary devices.

If you want to deploy your own trained license plate detection model YOLOv5 and license plate recognition model PlateNet in this demo, you can convert the trained Pytorch model to ONNX, then to TNN model, and then replace the primitive model with your own TNN model.

This is CMakeLists.txt, the main configuration OpenCV+OpenCL+base-utils+TNN these four libraries, Windows system, please configure and compile by yourself

If you have any questions or need the full code or data or need customized development requirements, you can contact me Email Mail me : slowlon@foxmail.com
main code:

If you have any questions or need the full code or data or need customized development requirements, you can contact me Email Mail me : slowlon@foxmail.com

Share