Improved AlexNet license plate recognition method and device

By improving the AlexNet model, the problems of low efficiency and poor reliability of traditional license plate recognition technology are solved, and efficient license plate recognition in natural scenarios is achieved, especially in complex background environments, improving the recognition accuracy and reliability.

CN119169602APending Publication Date: 2024-12-20INSPUR SOFTWARE TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411162923.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional license plate recognition technology is inefficient and has poor reliability, especially in complex background environments, which is difficult to accurately identify license plate characters.

Method used

Improve the AlexNet model, by reducing the size of the convolution layer, using Relu activation function and BatchNormalization, adopting ordinary pooling, removing the first two fully connected layers, adding Flatten layer and dropout operations, adjusting the loss function and Softmax classification layer to form a more efficient License plate recognition method.

Benefits of technology

It improves the accuracy and reliability of license plate recognition, reduces the impact of complex background environments on recognition, enhances the model's expression ability and generalization ability, and improves the recognition rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169602A_ABST
    Figure CN119169602A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of deep learning, and particularly provides an improved AlexNet license plate recognition method and device, and the method comprises the following steps: S1, reducing the size of a convolutional layer; s2, a Relu activation function is used, and BatchNormalization is added into the Relu activation function; s3, common pooling is adopted; s4, the first two full connection layers are removed, a Flaten layer is added, and dropout operation is added; s5, obtaining a loss function; and S6, changing the output Softmax classification layer into seven classes. Compared with the prior art, the license plate recognition accuracy can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and specifically provides a license plate recognition method and device for improving AlexNet. Background Art

[0002] Intelligent transportation system combines advanced data communication transmission technology, sensor technology, electronic control technology and computer technology, which is the future development trend of transportation system. License plate recognition technology, as an important part of intelligent transportation system, has received extensive attention. With the rapid development of the country, more and more highways, urban roads and parking lots are being built, and the requirements for traffic control and safety management are also increasing. License plate recognition technology is indispensable.

[0003] Traditional license plate recognition technology segments license plate characters and then performs individual license plate character recognition, which has the problems of low efficiency and poor reliability. Summary of the invention

[0004] The present invention aims at solving the above-mentioned deficiencies of the prior art and provides a highly practical license plate recognition method of improving AlexNet.

[0005] A further technical task of the present invention is to provide a license plate recognition device of an improved AlexNet that is reasonably designed, safe and applicable.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] An improved license plate recognition method of AlexNet has the following steps:

[0008] S1, reduce the size of the convolutional layer;

[0009] S2, use Relu activation function and add BatchNormalization;

[0010] S3, using normal pooling;

[0011] S4, remove the first two fully connected layers, add a Flatten layer, and add a dropout operation;

[0012] S5, loss function;

[0013] S6. Change the output Softmax classification layer to 7 categories.

[0014] Furthermore, in step S1, the convolution calculation of the two-dimensional image is mapped to the continuous sliding convolution window to obtain the corresponding convolution value. In CNN, each feature map is convolved by multiple input feature maps. The input x of the i-th convolution layer is calculated as follows:

[0015] hic =f(W i *x) (1)

[0016] Among them, * represents the convolution operation, W i represents the convolution kernel of this layer, f represents the activation function, W i =[W i 1 W i 2 , …, W i k ], K is the number of convolution kernels in this layer, and each convolution kernel W i k It is an M×M×N weight matrix, where M is the window size and N is the number of input channels.

[0017] Furthermore, in step S2, for the input x, the Relu activation function is defined as:

[0018]

[0019] First, each feature in a mini-batch is normalized, and then a common slope and bias for each mini-batch are learned. Given a BN layer X∈R n×p The input of BN layer is: n represents the batch size, p represents the feature dimension, and the conversion formula of BN layer to feature j∈{1,…,p} is:

[0020]

[0021] Among them, x j and j is the input / output scalar of a neuron’s response in a data sample; x j represents the jth column of the input data; γ j and β j The parameters are learned.

[0022] Furthermore, in step S3, OverlappingPooling is used, the step size is smaller than the pooling window size, and there is an overlapping area between adjacent pooling windows. OverlappingPooling can only reduce overfitting, and MaxPooling in ordinary pooling is used, that is, the maximum value of the image area is selected as the value of the area after pooling.

[0023] Furthermore, in step S4, the Flatten layer is a flattening layer. Since the fully connected layer requires one-dimensional data to be input, the input data must be "flattened" into a dropout operation before entering the fully connected layer to alleviate the situation of fewer training samples in the neural network by preventing the synergy of certain features;

[0024] The network structure corresponding to each input sample is different, but all these different network structures share the weights of the hidden nodes at the same time, so that different samples correspond to different models.

[0025] Furthermore, in step S5, the loss function measures the difference between the predicted result and the input label, which is defined as:

[0026]

[0027] Where W is the weight matrix of the convolutional and fully connected layers, n is the number of training samples, i is the training sample index, and K is the class index. If the i-th sample belongs to the K-th class, then yik =1, otherwise yik =0, P( xi =K) is the Kth input predicted by the model xi The probability of is a function of parameter W, so the loss function takes W as a parameter;

[0028] A stochastic gradient descent SGD algorithm is used, where W is iteratively updated as follows:

[0029]

[0030] Among them, α is the learning rate, which determines the step size of learning, and K is the index of the class.

[0031] Further, in step S6, the output layer of the AlexNet model has 1000 classification numbers, and the output Softmax classification layer is changed to 7 categories, corresponding to the characters of the license plate, and the license plate characters include the abbreviations of 31 provinces and cities, namely 31 Chinese characters, 24 English letters and 10 Arabic numerals;

[0032] The sum of the probabilities of each row is 1. Finally, the characters corresponding to the maximum probability values ​​in each row are output in turn to obtain the 7-digit license plate number.

[0033] An improved AlexNet license plate recognition device, characterized by comprising: at least one memory and at least one processor;

[0034] The at least one memory is used to store a machine-readable program;

[0035] The at least one processor is used to call the machine-readable program to execute an improved AlexNet license plate recognition method.

[0036] Compared with the prior art, the improved AlexNet license plate recognition method and device of the present invention have the following outstanding beneficial effects:

[0037] The present invention adopts the license plate recognition method based on the improved AlexNet to perform license plate recognition in natural scenes, avoiding the influence of license plate character segmentation on the recognition result, reducing the influence of complex background environment on license plate recognition, and having a high recognition rate and reliability. However, due to the sample size problem, many expanded samples were used in the model training process, which affected the model training results. This problem will be improved later, and different neural networks will be tried for training to further improve the accuracy of license plate recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Attached Figure 1 It is a graphical diagram of the Relu activation function in the license plate recognition method of improving AlexNet;

[0040] Attached Figure 2 This is a schematic diagram of label classification in the license plate recognition method of improving AlexNet;

[0041] Attached Figure 3 This is a diagram of the improved AlexNet convolutional neural network structure in an improved AlexNet license plate recognition method. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] A best embodiment is given below:

[0044] An improved license plate recognition method of AlexNet in this embodiment has the following steps:

[0045] S1, reduce the size of the convolutional layer;

[0046] Convolution is the most important operation in CNN to reduce the size of convolutional layers. The convolution calculation of a two-dimensional image is mapped to a continuous sliding convolution window to obtain the corresponding convolution value. In CNN, each feature map is convolved by multiple input feature maps. For the input x of the i-th convolutional layer, the calculation is as follows:

[0047] h ic =f(W i *x) (1)

[0048] Among them, * represents the convolution operation, W i represents the convolution kernel of this layer, f represents the activation function, W i =[W i 1 W i 2 , …, W i k ], K is the number of convolution kernels in this layer, and each convolution kernel W i k It is an M×M×N weight matrix, where M is the window size and N is the number of input channels.

[0049] This paper uses 3×3 convolution kernels to replace the 11×11 convolution kernels in the first convolution layer and the 5×5 convolution kernels in the second convolution layer in the Alexnet model. On the one hand, it can greatly reduce the number of network parameters, and on the other hand, it can introduce more nonlinearities and enhance the expressiveness of the model.

[0050] S2, use Relu activation function and add BatchNormalization;

[0051] like Figure 1 As shown in Figure 1, the Relu activation function is an unsaturated nonlinear function, which is essentially a piecewise linear model that can simulate the signals received by brain neurons.

[0052] The Relu activation function can adaptively learn the rectifier parameters and improve the accuracy without adding extra cost. This paper adds the Relu activation function to the model to prevent the gradient dispersion problem when accelerating network training and improve the recognition accuracy. For input x, the Relu activation function is defined as:

[0053]

[0054] In order to prevent the AlexNet model from overfitting and enhance the generalization ability, the local response normalization (LRN) layer is introduced after the activation function of the first convolutional layer and the second convolutional layer. The LRN layer has no practical effect in the model of this article, so the LRN layer is not used. BatchNormalization (Batch-Norm) is a technique to improve neural network training by stabilizing the distribution of layer inputs. The Batch-Norm layer was originally designed to alleviate the problem of internal covariate shift, which is a common problem when training a very deep neural network. First, each feature in the mini-batch is standardized, and then the common slope and bias of each mini-batch are learned. Given a BN layer X∈R n×p The input of BN layer is: n represents the batch size, p represents the feature dimension, and the conversion formula of BN layer to feature j∈{1,…,p} is:

[0055]

[0056] Among them, x j and j is the input / output scalar of a neuron’s response in a data sample; x j represents the jth column of the input data; γ j and β j The parameters are learned, and this transformation ensures that the input distribution of each layer remains unchanged between different mini-batches. For stochastic gradient descent (SGD) optimization, a stable input distribution can greatly promote model convergence, thereby greatly improving the training speed of CNN. In addition, if the training data is transformed at each stage, the same training samples will be applied to different transformations, in other words, more comprehensively expanded throughout the training process.

[0057] Adding a Batch-Norm layer after the Relu activation function can significantly reduce the number of convergence iterations and make the optimization process smoother. This smoothness makes the gradient movement more predictable and stable, thereby achieving faster and more efficient training and improving the final performance of the model.

[0058] S3, using normal pooling;

[0059] As the number of convolutional layers increases, the parameters of the network will grow exponentially, and the pooling operation can effectively reduce the number of network parameters. In order to reduce the parameters of all regions, the pooling operation is performed by calculating the statistical features of a region to represent the characteristics of the entire region. In order to reduce overfitting, the AlexNet model uses OverlappingPooling (overlapping pooling). The step size is smaller than the pooling window size. There are overlapping areas between adjacent pooling windows. OverlappingPooling can only "slightly" reduce overfitting. Therefore, the model in this article chooses to use MaxPooling (maximum pooling) in ordinary pooling, that is, the maximum value of the image area is selected as the value after pooling of the area, the pooling window is set to 2×2, and the step size is set to 2.

[0060] S4, remove the first two fully connected layers, add a Flatten layer, and add a dropout operation;

[0061] The fully connected layer plays the role of "classifier" in the entire convolutional neural network. After calculation, the three fully connected layers of AlexNet contain 37,752,832, 16,781,312, and 4,097,000 parameters respectively, while the number of parameters of the entire model is 60,965,128. The fully connected layer contains about 96.2% of the network parameters of the model. The huge network parameters require a very high amount of training data. The original AlexNet uses ImageNet, which has a million-level data volume, while the amount of data collected for license plate recognition in this article is only tens of thousands, which is much less. Therefore, this article reduces the network parameters of the entire model by removing the first two of the three fully connected layers of the AlexNet network model.

[0062] Flatten layer is a flattening layer. Since the fully connected layer requires one-dimensional data as input, the input data must be "flattened" into one dimension before entering the fully connected layer. The dropout operation can alleviate the situation of fewer training samples in the neural network by preventing the synergy of certain features. The network structure corresponding to each input sample is different, but all these different network structures share the weights of the hidden nodes at the same time, so that different samples correspond to different models. Simply put, the dropout operation is achieved by randomly suppressing a certain number of neurons, and the suppressed neurons temporarily do not participate in the forward communication of the network. In order to prevent overfitting and improve the generalization of the model, the dropout operation is added to the model in this article, and the probability value of the dropout operation is selected as 0.5.

[0063] S5, loss function;

[0064] The loss function measures the difference between the predicted result and the input label and is defined as:

[0065]

[0066] Where W is the weight matrix of the convolutional and fully connected layers, n is the number of training samples, i is the training sample index, and K is the class index. If the i-th sample belongs to the K-th class, then yik =1, otherwise yik = 0. P( xi =K) is the Kth input predicted by the model xi The probability of is a function of parameter W, so the loss function takes W as a parameter. This paper uses a stochastic gradient descent (SGD) algorithm, where W is iteratively updated as follows:

[0067]

[0068] Among them, α is the learning rate, which is a very important parameter that determines the step size of learning. K is the index of the class.

[0069] S6, change the output Softmax classification layer to 7 categories;

[0070] The output layer of the AlexNet model has 1000 categories. This paper changes the output Softmax classification layer to 7 categories, corresponding to the characters of the license plate. my country's license plate characters include the abbreviations of 31 provinces and cities, that is, 31 Chinese characters, 24 English letters (excluding O and I) and 10 Arabic numerals.

[0071] like Figure 2 As shown in Figure 1, the license plate recognition problem can be viewed as a multi-label classification problem containing 65 labels.

[0072] The sum of the probabilities of each row is 1, and finally the characters corresponding to the maximum probability value in each row are output in turn, that is, the 7-digit license plate number is obtained. The improved AlexNet convolutional neural network structure is as follows Figure 3 shown.

[0073] Based on the above method, an improved AlexNet license plate recognition device in this embodiment is characterized by comprising: at least one memory and at least one processor;

[0074] The at least one memory is used to store a machine-readable program;

[0075] The at least one processor is used to call the machine-readable program to execute an improved AlexNet license plate recognition method.

[0076] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that comply with the claims of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.

[0077] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An improved AlexNet license plate recognition method, characterized in that: The steps are as follows: S1, reduce the size of the convolutional layer; S2, use Relu activation function and add BatchNormalization; S3, using normal pooling; S4, remove the first two fully connected layers, add a Flatten layer, and add a dropout operation; S5, loss function; S6. Change the output Softmax classification layer to 7 categories.

2. The improved AlexNet license plate recognition method according to claim 1, characterized in that: In step S1, the convolution calculation of the two-dimensional image is mapped to the continuous sliding convolution window to obtain the corresponding convolution value. In CNN, each feature map is convolved by multiple input feature maps. The input x of the i-th convolution layer is calculated as follows: h ic =f(W i *x) (1) Among them, * represents the convolution operation, W i represents the convolution kernel of this layer, f represents the activation function, W i =[ W i 1 W i 2 , …, W i k ], K is the number of convolution kernels in this layer, and each convolution kernel W i k It is an M×M×N weight matrix, where M is the window size and N is the number of input channels.

3. The improved AlexNet license plate recognition method according to claim 2, characterized in that: In step S2, for the input x, the ReLU activation function is defined as: First, each feature in a mini-batch is normalized, and then a common slope and bias for each mini-batch are learned. Given a BN layer X∈R n×p The input of BN layer is: n represents the batch size, p represents the feature dimension, and the conversion formula of BN layer to feature j∈{1,…,p} is: Among them, x j and j is the input / output scalar of a neuron’s response in a data sample; x j represents the jth column of the input data; γ j and β j The parameters are learned.

4. The improved AlexNet license plate recognition method according to claim 3, characterized in that: In step S3, OverlappingPooling is used, the step size is smaller than the pooling window size, there is an overlapping area between adjacent pooling windows, OverlappingPooling can only reduce overfitting, and MaxPooling in ordinary pooling is used, that is, the maximum value of the image area is selected as the pooled value of the area.

5. The improved AlexNet license plate recognition method according to claim 4, characterized in that: In step S4, the Flatten layer is a flattening layer. Since the fully connected layer requires one-dimensional data as input, the input data must be "flattened" into a dropout operation before entering the fully connected layer to alleviate the situation of fewer training samples in the neural network by preventing the synergy of certain features; The network structure corresponding to each input sample is different, but all these different network structures share the weights of the hidden nodes at the same time, so that different samples correspond to different models.

6. The improved AlexNet license plate recognition method according to claim 5, characterized in that: In step S5, the loss function measures the difference between the predicted result and the input label and is defined as: Where W is the weight matrix of the convolutional and fully connected layers, n is the number of training samples, i is the training sample index, and K is the class index. If the i-th sample belongs to the K-th class, then yik =1, otherwise yik =0, P( xi =K) is the Kth input predicted by the model xi The probability of is a function of parameter W, so the loss function takes W as a parameter; A stochastic gradient descent SGD algorithm is used, where W is iteratively updated as follows: Among them, α is the learning rate, which determines the step size of learning, and K is the index of the class.

7. The improved AlexNet license plate recognition method according to claim 6, characterized in that: In step S6, the output layer of the AlexNet model has 1000 classification numbers, and the output Softmax classification layer is changed to 7 categories, corresponding to the characters of the license plate. The license plate characters include the abbreviations of 31 provinces and cities, namely 31 Chinese characters, 24 English letters and 10 Arabic numerals; The sum of the probabilities of each row is 1. Finally, the characters corresponding to the maximum probability values ​​in each row are output in turn to obtain the 7-digit license plate number.

8. An improved AlexNet license plate recognition device, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Remote sensing image recognition method based on improved AlexNet

    CN108614997A

  • A face recognition method incorporating a plurality of improved VGG networks

    CN109255340A

  • A license plate location and recognition method based on depth learning

    CN109508715A

  • Traditional digital water meter reading recognition method based on deep learning and frame difference method

    CN112270317A

  • Capsicum leaf disease detection method based on improved AlexNet

    CN114820435A