License plate classification method and system based on roadside parking scene
By constructing a feature learning model of the two branches in the license plate classification method, uniform sampling and enhanced sampling, the problem of low accuracy of the existing license plate classification method is solved, especially when dealing with rare license plate types, the classification accuracy is significantly improved.
Patent Information
- Application Number
- CN202510622936.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-06-10
AI Technical Summary
The existing license plate classification methods have low accuracy, especially under the influence of lighting conditions, weather conditions, image clarity, license plate shooting angle, license plate color and type, false detection is prone to occur, especially for rare types of license plates.
The license plate classification method based on roadside parking scenarios is adopted. By uniformly sampling and strengthening sampling of different license plate categories, the feature learning model of two branches is constructed. One branch performs uniform sampling and learning of all license plate types, and the other branch strengthens the sampling and learning of the small number of license plate types data, and finally integrates the features learned by the two branches.
It improves the accuracy of license plate type classification, reduces the impact of long-tail distribution data, enhances the ability to identify rare license plate types, and overall improves the accuracy of license plate classification algorithm.
Smart Images

Figure CN120126113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent parking management, and in particular to a license plate classification method and system based on roadside parking scenarios. Background Art
[0002] In recent years, with the development of social economy, people's demand for convenience in daily travel has continued to increase, and the number of cars has continued to increase. However, the increase in the number of parking spaces is far less than the increase in the number of vehicles, resulting in parking difficulties and parking chaos, which has become one of the main problems that need to be solved urgently. In recent years, with the development of intelligent technology, in order to effectively alleviate this problem, traffic management departments in various places have tried and built various intelligent parking management technologies. Among them, setting up parking spaces on the roadside, using intelligent sensing equipment to collect data such as video images, and processing and analyzing video image data through computer vision algorithms to achieve intelligent parking management is currently a mainstream solution. At present, it is mainly achieved by installing high-position video cameras on the roadside for data collection, and then using visual algorithms to achieve parking management of vehicle targets in roadside parking scenarios.
[0003] License plate recognition technology plays an important role in roadside parking management based on visual algorithms, including urban traffic management, vehicle identification, parking fee management, violation handling and other tasks. However, due to the influence of multiple factors such as lighting conditions, weather conditions, image clarity, license plate shooting angle, license plate color, license plate type, etc., license plate recognition is still a challenging task. In some cases, there are false detections, especially for some special license plate types with less license plate data, such as some remote areas with less license plate data collection, special types of license plates, and some temporary license plates currently added for the management of certain vehicles. In actual license plate recognition applications, these license plate types are more likely to be falsely detected; At present, the classification of license plate types is mainly based on the color of the license plate, such as blue, yellow, green, white, etc.; this classification method is too rough. This method that relies solely on color for classification cannot provide important license plate information in practical applications, resulting in low accuracy in license plate classification. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a license plate classification method and system based on roadside parking scenarios, which can solve the problem of low accuracy of existing license plate classification.
[0005] To achieve the above object, the present invention provides a license plate classification method based on a roadside parking scenario, the method comprising: The first sampling data is obtained by sampling different license plate categories with the same probability, and the sparse license plate category data with a data volume less than a preset threshold is subjected to enhanced sampling to obtain the second sampling data. The enhanced sampling is that the data sampling probability is inversely proportional to the data quantity; The first sampling data and the second sampling data are respectively subjected to feature extraction through a preset parallel feature extraction model to obtain first sampling data feature information and second sampling data feature information; According to the current sampling data training cycle and the total sampling data training cycle, the first sampling data feature information and the second sampling data feature information are subjected to feature fusion; The fused feature information is subjected to license plate classification through a preset multi-class classifier.
[0006] Further, the step of subjecting the sparse license plate category data with a data volume less than a preset threshold to enhanced sampling to obtain the second sampling data includes: According to the formula Determine the sampling probability corresponding to each sparse license plate category data, where represents the reciprocal of the total number of samples of this category i, C represents the total number of categories, and the total number of samples of category i is , the total number of samples in each iteration is B, and the probability of being sampled is , j represents the category, is the total number of samples for category j; According to the probability of being sampled The sparse license plate category data with a data volume less than a preset threshold is subjected to enhanced sampling to obtain the second sampling data.
[0007] Further, the step of respectively subjecting the first sampling data and the second sampling data to feature extraction through a preset parallel feature extraction model to obtain first sampling data feature information and second sampling data feature information includes: The first sampling data and the second sampling data are respectively subjected to global pooling through a preset parallel feature extraction model; The sampled data after global pooling is subjected to feature extraction through the convolutional layer, normalization layer, and activation function layer in the preset parallel feature extraction model; The extracted feature information is subjected to eigenvalue normalization through the sigmoid function in the preset parallel feature extraction model.
[0008] Further, the step of performing feature fusion on the first sampling data feature information and the second sampling data feature information according to the current sampling data training cycle and the total sampling data training cycle includes: According to the formula Perform feature fusion on the first sampled data feature information and the second sampled data feature information, where the fused feature output is , the first sampled data feature information and the second sampled data feature information are respectively and , the weight coefficient is , , T represents the current training cycle, and M represents the total training cycle.
[0009] Further, the step of classifying license plates for the fused feature information through a preset multi-class classifier includes: According to the formula Classify the fused feature information, where C represents the number of classes, represents the output for class i in the feature output after the fusion of the above two branches, represents taking the power of e for this output to ensure that the final output probability is greater than zero, represents taking the power of e for the outputs of all class numbers, and finally obtaining the classification probability for each class .
[0010] Further, the present invention provides a license plate classification system based on a roadside parking scenario, and the system includes: A sampling module, configured to sample the first sampled data with the same probability for different license plate classes, and perform enhanced sampling on the data of rare license plate classes with a data volume less than a preset threshold to obtain second sampled data, where the enhanced sampling is that the data sampling probability is inversely proportional to the data quantity; An extraction module, configured to respectively extract features from the first sampled data and the second sampled data through a preset parallel feature extraction model to obtain first sampled data feature information and second sampled data feature information; A fusion module, configured to perform feature fusion on the first sampled data feature information and the second sampled data feature information according to the current sampled data training cycle and the total sampled data training cycle; A classification module, configured to classify license plates for the fused feature information through a preset multi-class classifier.
[0011] Further, the sampling module is specifically configured to determine the sampling probability corresponding to the data of each rare license plate class according to the formula , where represents the reciprocal of the total number of samples of this class i, C represents the total number of classes, and the total number of samples for class i is , the total number of samples in each iteration is B, the probability of being sampled is , j represents the class, is the total number of samples for class j; According to the sampling probability Perform enhanced sampling on the sparse license plate category data with a data volume less than the preset threshold to obtain the second sampled data.
[0012] Further, the extraction module is specifically configured to perform global pooling on the first sampled data and the second sampled data respectively through a preset parallel feature extraction model; perform feature extraction on the sampled data after global pooling through the convolutional layer, normalization layer, and activation function layer in the preset parallel feature extraction model; perform eigenvalue normalization on the extracted feature information through the sigmoid function in the preset parallel feature extraction model.
[0013] Further, the fusion module is specifically configured to according to the formula Perform feature fusion on the feature information of the first sampled data and the feature information of the second sampled data, where the fused feature output is , the feature information of the first sampled data and the feature information of the second sampled data are respectively and , the weight coefficient is , , T represents the current training cycle, and M represents the total training cycle.
[0014] Further, the classification module is specifically configured to according to the formula Perform license plate classification on the fused feature information, where C represents the number of classes, represents the output for class i in the feature output after the fusion of the above two branches, represents taking the exponential power of this output to ensure that the final output probability is greater than zero, represents taking the exponential power of the outputs of all class numbers, and finally obtaining the classification probability for each class .
[0015] A license plate classification method and system based on the roadside parking scenario provided by the present invention collect and gather data of different types of license plates to construct a license plate classification data set, and use a convolutional neural network to build a license plate classification model for model training. Since there is less data of some types of license plates, such as military vehicles, driving school vehicles, etc., in order to improve the accuracy of the model for classifying different types of license plates and reduce the impact of long-tailed distribution data, when designing the model, feature learning is carried out through constructing two branches. One branch uniformly samples and learns all license plate types, and the other branch strengthens the sampling and learning of data of the tail license plate types with less quantity. Finally, the features learned by the two branches are fused, which not only ensures the feature learning of the license plate categories with the majority quantity, but also strengthens the feature learning of the license plate categories with the minority quantity, and overall improves the accuracy of the license plate type classification algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flowchart of a license plate classification method based on the roadside parking scenario provided by the present invention; Figure 2 is a schematic diagram of a license plate classification system based on the roadside parking scenario provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The following further describes in detail the device structure and implementation manner of the present invention through the drawings and embodiments.
[0018] The present invention provides a license plate classification method based on the roadside parking scenario, as Figure 1 shown, which specifically includes the following steps: 101. Sample the first sampling data with the same probability for different license plate categories, and perform enhanced sampling on the data of rare license plate categories with the data volume less than the preset threshold to obtain the second sampling data. The enhanced sampling is that the data sampling probability is inversely proportional to the data quantity.
[0019] Specifically, the step of performing enhanced sampling on the data of rare license plate categories with the data volume less than the preset threshold to obtain the second sampling data includes: According to the formula determine the sampling probability corresponding to each data of rare license plate categories, where represents the reciprocal of the total number of samples of category i, C represents the total number of categories, the total number of samples of category i is , the total sampling quantity in each iteration is B, the sampling probability is , j represents the category, is the total number of samples of category j; According to the sampling probability Strengthened sampling is performed on the sparse license plate category data with a data volume less than a preset threshold to obtain second sampled data.
[0020] For example, when performing model training, it is necessary to train all training data for M epochs, such as M = 200, in order to fully learn the features of all training data and obtain a model with better learning ability. In this process, the common practice is that for each training epoch, all training data is sampled only once with the same probability. That is to say, in each learning epoch, each sample is evenly sampled once for model learning. For the long-tailed distribution phenomenon existing in the above license plate data, the present invention adopts two different sampling methods: The first still adopts the above-mentioned conventional uniform sampling method, and for all license plate categories, sampling is performed with the same probability, defined as ; The second is the strengthened sampling method for sparse category data with a small data volume. Specifically, for each of the above training epochs, usually limited by hardware and equipment conditions, it is impossible to input all training data into the model for learning at one time. Therefore, a multi-iteration method is adopted. The number of samples input in each iteration B is set according to the hardware device conditions used, and it can usually be set to 64 or 128. That is to say, in one training epoch, the total number of the training set is N, the number of samples in each iteration is B, and a total of N / B iterations are performed to complete one training epoch; For the total number of samples of category i is , and the total number of samples in each iteration is B. In order to strengthen the sampling of sparse category data, for the sampling probability of each category, it is inversely proportional to the reciprocal of the number of that category. That is to say, the fewer the number of a category, the higher the probability of being sampled. Therefore, for a certain category i, the sampling probability is:
[0021] where represents the reciprocal of the total number of samples of category i, and C represents the total number of categories. Through the above definition, the sampling probability of each license plate category is no longer uniform, but is related to the reciprocal of its number. That is, the sampling probability of categories with a small number of samples increases, defined as .
[0022] For the embodiments of the present invention, before step 101, it may further include: collecting license plate images of different types, constructing a license plate classification dataset, and performing data annotation. Specifically, extract image frames containing motor vehicle and non-motor vehicle license plates from surveillance videos, use existing license plate object detection algorithms to detect license plates, obtain the position information of the license plates, and intercept and save them as license plate images; or manually intercept license plate images and then label the tags of the license plate types to obtain a license plate classification dataset; collect license plates of different types, specifically including blue license plates for ordinary cars, green license plates for new energy small cars, yellow-green color-matched license plates for new energy large cars, single-layer yellow license plates for ordinary motorcycles, yellow license plates for training vehicles with the character "xue" at the end, double-layer yellow license plates for large buses, trucks, tractors, etc., double-layer yellow license plates for trailers with the character "gua" at the end, black-bottom license plates for Guangdong-Hong Kong-Macao license plates, license plates with combinations of letters and numbers for Hong Kong and Macao license plates, yellow-bottom, white-bottom or black-bottom license plates, etc. Among them, the license plate object detection method includes, but is not limited to, two-stage or single-stage object detection methods such as Faster-RCNN, YOLO, SSD, etc.; the license plate images are license plate images of motor vehicles and non-motor vehicles captured by real road traffic scene monitoring, covering license plate images under different perspectives, different backgrounds, and different light intensities, specifically including license plates of different types of vehicles such as cars, new energy vehicles, buses, motorcycles, large trucks, police cars, embassy vehicles, trucks, etc.
[0023] Furthermore, count the license plate data of different types, divide them into a basic category group and a rare category group according to the statistical results, and preprocess the data; specifically, count the quantity of the labeled license plate data of different types, that is, among the above 12 license plate types, the proportion of the number of images of each category in the total number of all images. According to the statistical results of sorting the proportions of each license plate category, divide the N categories with fewer proportions into the rare category group, and the remaining 12 - N categories with more proportions into the basic category group. Specifically, in the present invention, N = 4, and it can be adjusted according to the actual data statistical results; preprocess the constructed license plate character dataset, including the character data of the rare category group and the basic category group above, including image size unification and data augmentation. Among them, image size unification means unifying the license plate image feature size to 64*256*3, H*W*C, height * width * number of channels; the above data augmentation is to perform data augmentation such as rotation, brightness transformation, and cropping on the license plate images. By using rotation, license plate images with different rotation angles are obtained to simulate the inclined license plate data encountered in the real shooting scene, etc. By performing brightness transformation on the license plate images, license plate image data under different brightness conditions in the morning, noon, and evening in the real scene are simulated, etc. By performing random cropping processing on the license plate images, license plate image data under the occlusion conditions encountered in the real scene are simulated, etc.
[0024] 102. Respectively perform feature extraction on the first sampling data and the second sampling data through a preset parallel feature extraction model to obtain first sampling data feature information and second sampling data feature information.
[0025] Specifically, respectively perform global pooling on the first sampling data and the second sampling data through a preset parallel feature extraction model; perform feature extraction on the globally pooled sampling data through the convolutional layer, normalization layer, and activation function layer in the preset parallel feature extraction model; perform eigenvalue normalization on the extracted feature information through the sigmoid function in the preset parallel feature extraction model.
[0026] For example, the entire license plate type classification model is set as a dual-branch network structure, and the input data of the two branches are respectively the data sampled by the above two sampling methods. and , after feature extraction by the backbone network, the output features of the two branches are respectively represented as and ; in the network structure setting of this dual-branch structure, the same backbone network and classifier network are adopted, and finally the results of the two branches are fused to perform iteration and optimization of the model; For the two branches, the same backbone network is adopted for two reasons: one is that the input data of the two branches are equally important. One is the uniformly sampled data, which covers all samples in the training set to improve the overall generalization performance of the model, and the other is to strengthen the data sampled from rare category data to improve the classification accuracy of the model for rare type license plates; the second is that adopting the same branch network structure can reduce the computational amount of model parameters and also facilitate the subsequent fusion of the two branches; for the backbone network of the two branches, it includes but is not limited to using networks such as ResNet, MobileNet, and Transformer for feature extraction. The present invention adopts a backbone network based on ResNet-50 for feature extraction to ensure that more abundant and effective features are extracted; Furthermore, to strengthen the feature extraction for each network layer, a module for weighting feature weights in the channel dimension is added; specifically, the module for weighting feature weights in the channel dimension first performs global semantic feature extraction on the output of each network layer. Define the output of each network layer as, which respectively represent the number of channels, the height of the feature map, and the width of the feature map. After a global pooling operation, the output is, and then through a convolutional layer - normalization layer - activation function layer with a convolutional kernel size of 1, further feature extraction is performed, and the output is. Then, the sigmoid function is used for eigenvalue normalization and weighted into the output of each original network layer, and the final output is.
[0027] 103. Feature fusion is performed on the first sampled data feature information and the second sampled data feature information according to the current training period of sampled data and the total training period of sampled data.
[0028] Specifically, according to the formula feature fusion is performed on the first sampled data feature information and the second sampled data feature information, where the fused feature output is , the first sampled data feature information and the second sampled data feature information are respectively and , the weight coefficient is , , T represents the current training period, and M represents the total training period.
[0029] For example, during the training process of the model, assume that M training periods are carried out. In the first N training periods, priority is given to Branch 1, that is, the features of all samples sampled evenly, so that the model can first learn the features of all samples. Then, in the M - N training periods, priority is given to Branch 2, that is, strengthening the features of the sampled data of rare types. In this way, on the basis of learning the overall features, the learning of rare type data can be gradually optimized; Therefore, by setting a weight coefficient to fuse the features learned by the two branches; define the fused feature output as :
[0030] where the weight system is dynamically adjusted as the training period of the model progresses; ; where, T represents the current training period, and M represents the total training period.
[0031] 104. The fused feature information is classified for license plates by a pre - set multi - class classifier.
[0032] Specifically, according to the formula the fused feature information is classified for license plates, where C represents the number of classes, represents the output for class i in the fused feature output of the above two branches, represents taking the power of e for this output to ensure that the final output probability is greater than zero, represents taking the power of e for the outputs of all class numbers, and finally obtaining the classification probability .
[0033] Further, according to the above-trained license plate type classification model, test the license plate type classification data; specifically, input the license plate character image into the license plate type classification model, where the weight coefficients of the two branches are set to 0.5, indicating that the results of the two branches are equally important, and finally obtain the classification result of the license plate character image.
[0034] A license plate classification method based on the roadside parking scenario provided by an embodiment of the present invention constructs a license plate classification data set by collecting and gathering different types of license plate data, uses a convolutional neural network to build a license plate classification model, and performs model training. Since the data of some types of license plates is less, such as military vehicles, training vehicles, etc., in order to improve the accuracy of the model for classifying different types of license plates and reduce the influence of long-tail distribution data, when designing the model, two branches are constructed for feature learning. One branch uniformly samples and learns all license plate types, and the other branch strengthens the sampling and learning of the data of the tail license plate types with less quantity. Finally, the features learned by the two branches are fused, which not only ensures the feature learning of the license plate categories with the majority quantity, but also strengthens the feature learning of the license plate categories with the minority quantity, and overall improves the accuracy of the license plate type classification algorithm.
[0035] As Figure 1 a specific implementation manner of the method shown, an embodiment of the present invention provides a license plate classification system based on the roadside parking scenario, as Figure 2 shown, the system includes: a sampling module 21, configured to sample different license plate categories with the same probability to obtain first sampling data, and perform enhanced sampling on the data of rare license plate categories with a data volume less than a preset threshold to obtain second sampling data, where the enhanced sampling is that the data sampling probability is inversely proportional to the data quantity; an extraction module 22, configured to extract feature information of the first sampling data and the second sampling data respectively through a preset parallel feature extraction model to obtain first sampling data feature information and second sampling data feature information; a fusion module 23, configured to perform feature fusion on the first sampling data feature information and the second sampling data feature information according to the current sampling data training period and the total sampling data training period; a classification module 24, configured to perform license plate classification on the fused feature information through a preset multi-class classifier.
[0036] Further, the sampling module 21 is specifically configured to determine the sampling probability corresponding to each rare license plate category data according to the formula wherein, represents the reciprocal of the total number of samples of this category i, C represents the total number of categories, and the total number of samples of category i is , the total number of samples in each iteration is B, and the sampling probability is , j represents the category, is the total number of samples for category j; According to the sampling probability perform enhanced sampling on the sparse license plate category data with a data volume less than a preset threshold to obtain second sampling data.
[0037] Further, the extraction module 22 is specifically configured to perform global pooling on the first sampling data and the second sampling data respectively through a preset parallel feature extraction model; perform feature extraction on the sampled data after global pooling through the convolutional layer, normalization layer, and activation function layer in the preset parallel feature extraction model; perform eigenvalue normalization on the extracted feature information through the sigmoid function in the preset parallel feature extraction model.
[0038] Further, the fusion module 23 is specifically configured to, according to the formula perform feature fusion on the first sampling data feature information and the second sampling data feature information, where the fused feature output is , the first sampling data feature information and the second sampling data feature information are respectively and , the weight coefficient is , , T represents the current training cycle, and M represents the total training cycle.
[0039] Further, the classification module 24 is specifically configured to, according to the formula perform license plate classification on the fused feature information, where C represents the number of categories, represents the output for category i in the fused feature output of the above two branches, represents taking the power of e of this output to ensure that the final output probability is greater than zero, represents taking the power of e of the outputs of all category numbers, and finally obtaining the classification probability for each category .
[0040] A license plate classification system based on the roadside parking scenario provided by an embodiment of the present invention constructs a license plate classification data set by collecting and gathering different types of license plate data, and uses a convolutional neural network to build a license plate classification model for model training. Since there is less data for some types of license plates, such as military vehicles and training vehicles, in order to improve the accuracy of the model for classifying different types of license plates and reduce the impact of long-tail distribution data, when designing the model, two branches are constructed for feature learning. One branch uniformly samples and learns all license plate types, and the other branch strengthens the sampling and learning of data for the tail license plate types with a small number. Finally, the features learned by the two branches are fused, which not only ensures the feature learning of the license plate categories with a majority in number, but also strengthens the feature learning of the license plate categories with a minority in number, and overall improves the accuracy of the license plate type classification algorithm.
[0041] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of the present disclosure. The appended method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy recited.
[0042] In the above detailed description, various features are combined in a single embodiment to simplify the present disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly recited in each claim. On the contrary, as reflected in the appended claims, the present invention lies in a state with fewer features than all the features of the single disclosed embodiment. Therefore, the appended claims are hereby clearly incorporated into the detailed description, where each claim stands alone as a separate preferred embodiment of the present invention.
[0043] In order to enable any person skilled in the art to implement or use the present invention, the above-described disclosed embodiments have been described. For those skilled in the art, various modification methods of these embodiments are obvious, and the general principles defined herein can also be applied to other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.
[0044] The foregoing description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but those of ordinary skill in the art should recognize that the various embodiments can be further combined and arranged. Accordingly, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is inclusive in a manner similar to the term "including" as interpreted when used as a transitional word in a claim. In addition, any use of the term "or" in the specification or claims is intended to mean "non-exclusive or".
[0045] Those skilled in the art will also appreciate that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention can be implemented by electronic hardware, computer software, or a combination of both. To clearly show the interchangeability of hardware and software, the various illustrative components, units, and steps have been generally described in terms of their functions. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the overall system. Those skilled in the art can use various methods to implement the described functions for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of the present invention.
[0046] The various illustrative logical blocks or units described in the embodiments of the present invention can be implemented or operated by a general-purpose processor, a digital signal processor, an application specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of the above designs to perform the described functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
[0047] In the embodiments of the present invention, the steps of the methods or algorithms described can be directly embedded in hardware, software modules executed by a processor, or a combination of the two. The software modules can be stored in a RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be provided in an ASIC, and the ASIC can be provided in a user terminal. Optionally, the processor and the storage medium can also be provided in different components of the user terminal.
[0048] In one or more exemplary designs, the above-described functions in the embodiments of the present invention can be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium or transmitted on a computer-readable medium in the form of one or more instructions or codes. The computer-readable medium includes computer storage media and communication media that facilitate the transfer of a computer program from one place to another. The storage medium can be any available medium accessible by a general or special computer. For example, such a computer-readable medium can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM, or other optical disk storage, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to carry or store program code in the form of instructions or data structures and other forms readable by a general or special computer, or a general or special processor. In addition, any connection can be appropriately defined as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote resource via a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless means such as infrared, wireless, and microwave, it is also included in the defined computer-readable medium. The disks (disk) and discs (disc) include compact discs, laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs. Disks usually reproduce data magnetically, while discs usually reproduce data optically by laser. The above combinations can also be included in the computer-readable medium.
[0049] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A license plate classification method based on roadside parking scene, characterized in that: The method comprises: The first sampling data is obtained by sampling different license plate categories with the same probability, and the second sampling data is obtained by performing enhanced sampling on the rare license plate category data whose data volume is less than a preset threshold, wherein the enhanced sampling is that the data sampling probability is inversely proportional to the data volume; Performing feature extraction on the first sampled data and the second sampled data respectively by using a preset parallel feature extraction model to obtain feature information of the first sampled data and feature information of the second sampled data; According to a current sampling data training cycle and a total sampling data training cycle, performing feature fusion on the first sampling data feature information and the second sampling data feature information; The license plate classification is performed on the fused feature information through a preset multi-category classifier.
2. A license plate classification method based on roadside parking scene according to claim 1, characterized in that: The step of performing enhanced sampling on the rare license plate category data whose data volume is less than a preset threshold to obtain second sampling data comprises: According to the formula Determine the sampling probability corresponding to each rare license plate category data, where, represents the reciprocal of the total number of samples of category i, C represents the total number of categories, and the total number of samples for category i is , in each iteration, the total number of samples is B, and the probability of being sampled is , j represents the category, is the total number of samples for category j; According to the probability of being sampled The rare license plate category data whose data volume is less than a preset threshold is subjected to enhanced sampling to obtain second sampling data.
3. The license plate classification method based on roadside parking scene according to claim 1 is characterized in that: The step of extracting features from the first sampled data and the second sampled data respectively by using a preset parallel feature extraction model to obtain feature information of the first sampled data and feature information of the second sampled data comprises: Performing global pooling on the first sampled data and the second sampled data respectively by using a preset parallel feature extraction model; The convolution layer, normalization layer, and activation function layer in the preset parallel feature extraction model are used to extract features from the globally pooled sampled data; The extracted feature information is normalized by using a function in a preset parallel feature extraction model.
4. The license plate classification method based on roadside parking scene according to claim 1 is characterized in that: The step of performing feature fusion on the first sampling data feature information and the second sampling data feature information according to the current sampling data training cycle and the total sampling data training cycle comprises: According to the formula The first sampling data feature information and the second sampling data feature information are subjected to feature fusion, wherein the fused feature output is , the first sampling data characteristic information and the second sampling data characteristic information are respectively and , the weight coefficient is , , T represents the current training cycle, and M represents the total training cycle.
5. The license plate classification method based on roadside parking scene according to claim 1 is characterized in that: The step of classifying the license plate of the fused feature information by presetting a multi-category classifier comprises: According to the formula The fused feature information is used to classify the license plate, where C represents the number of categories. It represents the output of category i in the feature output after the fusion of the above two branches. It means taking the power of e for the output to ensure that the final output probability is greater than zero. The output representing the number of all categories is raised to the power of e, and the classification probability of each category is finally obtained. .
6. A license plate classification system based on roadside parking scenarios, characterized in that: The system comprises: A sampling module, used to sample different license plate categories with the same probability to obtain first sampling data, and to perform enhanced sampling on rare license plate category data whose data volume is less than a preset threshold to obtain second sampling data, wherein the enhanced sampling is that the data sampling probability is inversely proportional to the data volume; An extraction module, used to perform feature extraction on the first sampled data and the second sampled data respectively through a preset parallel feature extraction model to obtain feature information of the first sampled data and feature information of the second sampled data; A fusion module, used for performing feature fusion on the first sampling data feature information and the second sampling data feature information according to a current sampling data training cycle and a total sampling data training cycle; The classification module is used to classify the license plate of the fused feature information by using a preset multi-category classifier.
7. A license plate classification system based on roadside parking scenarios according to claim 6, characterized in that: The sampling module is specifically used to Determine the sampling probability corresponding to each rare license plate category data, where, represents the reciprocal of the total number of samples of category i, C represents the total number of categories, and the total number of samples for category i is , in each iteration, the total number of samples is B, and the probability of being sampled is , j represents the category, is the total number of samples for category j; According to the probability of being sampled The rare license plate category data whose data volume is less than a preset threshold is subjected to enhanced sampling to obtain second sampling data.
8. The license plate classification system based on roadside parking scenarios according to claim 6 is characterized in that: The extraction module is specifically used to globally pool the first sampling data and the second sampling data respectively through a preset parallel feature extraction model; perform feature extraction on the globally pooled sampling data through the convolution layer, normalization layer, and activation function layer in the preset parallel feature extraction model; and perform feature value normalization on the extracted feature information through the function in the preset parallel feature extraction model.
9. A license plate classification system based on roadside parking scenarios according to claim 6, characterized in that: The fusion module is specifically used to The first sampling data feature information and the second sampling data feature information are subjected to feature fusion, wherein the fused feature output is , the first sampling data characteristic information and the second sampling data characteristic information are respectively and , the weight coefficient is , , T represents the current training cycle, and M represents the total training cycle.
10. A license plate classification system based on roadside parking scenarios according to claim 6, characterized in that: The classification module is specifically used to classify The fused feature information is used to classify the license plate, where C represents the number of categories. It represents the output of category i in the feature output after the fusion of the above two branches. It means taking the power of e for the output to ensure that the final output probability is greater than zero. The output representing the number of all categories is raised to the power of e, and the classification probability of each category is finally obtained. .
Citation Information
Patent Citations
Lightweight license plate recognition method and system based on full convolutional network
CN111767927A
License plate type recognition model construction method and license plate type recognition method
CN113313110A
License plate character classification method and system
CN116386018A
Multi-type license plate recognition model training method and device, equipment and storage medium
CN116935373A
License plate type identification method and system
CN117542032A
Cited By
Motor vehicle license plate state discrimination method based on deep learning
CN122336426A
