python tensorflow pytorch deep learning license plate recognition

Collecting and sorting out relevant data on license plate recognition

1、License Plate Detection with RetinaFace

Link: https://github.com/zeusees/License-Plate-Detector

The single-object detection algorithm Retinaface was used to train the license plate detection model. Through the test, the detection effect and applicability are more prominent, and the supported models are more abundant.

The open source version of the detection algorithm has gone through multiple iterations. Considering the efficiency and accuracy of the detection, the original version is gradually phased out. From the original license plate detection based on LBP and Harr features, interested partners can refer to train-detector ( https ://github.com/openalpr/train-detector ) This warehouse; later, we gradually adopted deep learning methods. Our last version used mobilenet-ssd-based algorithms for detection. You can move ( https:// gitee.com/zeusees/Mobilenet-SSD-License-Plate-Detection ) Check it here. Please try to use the new model for testing in the future.

The training of this version of the detection model combines the CCPD data set with our own data to support more types of license plates.

Clone and install

  1. git clone https://github.com/zeusees/License-Plate-Detector.git

  2. Pytorch version 1.2.0

  3. Python 3.6

  4. python detect.py

C++-based NCCNN model test

Source Code Compile

  1. cd Prj-ncnn

  2. cmake .

  3. make

Support license plate types

  • Blue single-layer license plate
  • Yellow single-layer license plate
  • Green new energy license plate, civil aviation license plate
  • Black single-layer license plate
  • White police license plate, military license plate, armed police license plate
  • Yellow double-decker license plate
  • Green agricultural license plate
  • White double-layer military card

reference

2、License-Plate-Recognition-Items

https://github.com/Haveoneriver/License-Plate-Recognition-Items

Ideas for license plate recognition

The idea of ​​license plate recognition is actually the same as verification code recognition. There are a total of 7 characters in Chinese license plates. These 7 characters can be one-hot encoded to generate a vector. One license plate corresponds to one license plate label, that is, these 7 Character generated vector

Use Google's colaboratory to train resnet34 model

train.ipynb is run in colaboratory

You can adjust the parameters in model.fit_generator(). I don’t have the default parameters used for adjustment. You can go to keras to view the settings of the model adjustment function.

#When training, there are 5 rounds of 1000 samples per round, one batch_size=32, so there are a total of 16W pictures

model.fit_generator(gen(), samples_per_epoch=1000,nb_epoch=5, nb_worker=1, pickle_safe=True, validation_data=gen(), nb_val_samples=1280)

test.py is to use the trained model for testing

When calling the evaluation function: After running, the accuracy of each character is not the accuracy of the entire picture

3. Baidu paddle

https://gitee.com/paddlepaddle/PaddleOCR/blob/develop/deploy/hubserving/readme.md

Based on the OCR method to recognize the license plate,

4. Python+Tensorflow+CNN realizes license plate recognition

https://blog.csdn.net/weixin_43397593/article/details/102372100

Generate license plates yourself and use a simple CNN model for deep learning,

The goal of this project is to recognize automatically generated license plates with various noises. In the case of noise interference, it is difficult to segment the license plate characters. The license plate recognition is to train 7 characters of the license plate at the same time. The characters include 31 province abbreviations, 10 Arabic numerals, and 24 English letters (except'O' and'I') ), a total of 65 categories, 7 characters are trained using a separate loss function.
(Running environment: tensorflow1.14.0-GPU version)

The CNN model built this time is relatively simple, with only 6 convolutional layers + 3 pooling layers + 1 fully connected layer. The model can be optimized by increasing the depth of the model and the number of neurons between each layer to improve the accuracy of recognition. This training data set is derived from automatically generated license plates. Since the real license plate image and the generated license plate image are distinguished in terms of noise interference, the recognition rate will differ. If you use a real license plate data set, you need to perform preprocessing methods such as filtering, equalization, corrosion, and vector quantization on the license plate.

5. TensorFlow license plate recognition full version (including license plate data set)

https://blog.csdn.net/u011808673/article/details/81215459

In a previous blog post "The MNIST Data Set for License Plate Recognition-Preliminary Demonstration Edition ", we demonstrated how to use TensorFlow for license plate recognition. However, the data set used at the time was MNIST digital handwriting, which can only be classified 0-9 There are 10 numbers in total, and the province abbreviations and letters cannot be classified, which is relatively limited and has no practical meaning.

After image positioning and segmentation processing, the blogger collected relevant province abbreviations and 26-letter picture data sets, combined with the python+TensorFlow code posted in the aforementioned blog post, to achieve a complete license plate recognition function. In the spirit of sharing, all codes and license plate data sets are sent here.

License plate data set download address (about 4000 pictures): https://pan.baidu.com/s/1RyoMbHtLUlsMDsvLBCLZ2w

The province is referred to as training + identification code (the saved file is named train-license-province.py ) ( please pay attention to the python text indentation when copying the code, as long as there is an indentation error, the correct result cannot be obtained or an exception occurs ):

6. Realize license plate recognition based on MNIST data set-preliminary demo version

And 5 are sister articles

https://blog.csdn.net/shadown1ght/article/details/78078499

 

7. License plate recognition github resources

Older resources

https://blog.csdn.net/yang_daxia/article/details/90449150

8、HyperLPR

Open source third-party library, license plate recognition, similar to 1

https://github.com/zeusees/HyperLPR

9. FakeLPR license plate recognition (3) ----- license plate end-to-end recognition

Introduction

The previous article introduced the positioning of the corner points of the license plate, this article will recognize the license plate end-to-end

1. Coarse positioning

2. Corner detection and correction

3. End-to-end character recognition

This article introduces the third step, end-to-end recognition of license plates. The idea is the same as the corner detection in the previous article. Multi-label classification is implemented through caffe to recognize license plates.

10. Use Tencent Cloud GPU to learn deep learning series 5: text recognition and positioning

Based on CNN and OCR recognition, the method is similar to 4

https://cloud.tencent.com/developer/article/1005199

 

11、keras-ocr

Using deep learning is similar to the method of 8, but there is no OCR recognition in Chinese,

https://github.com/faustomorales/keras-ocr

12. Chinese license plate location, correction and end-to-end recognition software based on u-net, cv2 and cnn

https://blog.csdn.net/qq_32194791/article/details/106748685

https://github.com/duanshengliu/End-to-end-for-chinese-plate-recognition

The overall idea: 1. Use u-net image segmentation to obtain a binary image, 2. Use cv2 for edge detection to obtain license plate area coordinates, and correct license plate graphics, 3. Use convolutional neural network cnn for license plate multi-label end to End recognition

Realization effect: It can be recognized well in tilted shooting angle, strong exposure or dim environment, and even some pictures that Baidu AI license plate recognition fails to recognize can also be recognized

Environment: python:3.6, tensorflow:1.15.2, opencv: 4.1.0.25

Same method as 4 and 10

13. Keras+resnet34 realizes license plate recognition

https://blog.csdn.net/weixin_38226321/article/details/107299660

Produce license plates yourself, and then train

14. Generate license plates through GAN network

https://www.cnblogs.com/kevin-dx/p/13900592.html

 

 

 

Guess you like

Origin blog.csdn.net/qingfengxd1/article/details/110878574