CN117218613B - Vehicle snapshot recognition system and method - Google Patents

Vehicle snapshot recognition system and method Download PDF

Info

Publication number
CN117218613B
CN117218613B CN202311484690.8A CN202311484690A CN117218613B CN 117218613 B CN117218613 B CN 117218613B CN 202311484690 A CN202311484690 A CN 202311484690A CN 117218613 B CN117218613 B CN 117218613B
Authority
CN
China
Prior art keywords
vehicle
representing
network model
neural network
convolutional neural
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311484690.8A
Other languages
Chinese (zh)
Other versions
CN117218613A (en
Inventor
袁梦
韦冬娜
杨涛
黄世武
胡平华
吴伟涌
翟力军
朱玉锋
凌善邦
辛韦进
吴禄彬
秦磊磊
康茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cosco Shipping Technology Engineering Co ltd
Cosco Shipping Specialized Carriers Co ltd
Original Assignee
Guangzhou Cosco Shipping Technology Engineering Co ltd
Cosco Shipping Specialized Carriers Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Cosco Shipping Technology Engineering Co ltd, Cosco Shipping Specialized Carriers Co ltd filed Critical Guangzhou Cosco Shipping Technology Engineering Co ltd
Priority to CN202311484690.8A priority Critical patent/CN117218613B/en
Publication of CN117218613A publication Critical patent/CN117218613A/en
Application granted granted Critical
Publication of CN117218613B publication Critical patent/CN117218613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The invention discloses a vehicle snapshot recognition system and a method, which belong to the technical field of vehicle recognition, wherein the method comprises the following steps: constructing a vehicle database by utilizing the hash table; constructing vehicle generation data and a convolutional neural network model; performing vehicle identification training on the optimized convolutional neural network model by using the vehicle generation data, and performing super-parameter optimization on the convolutional neural network model until the vehicle identification accuracy of the convolutional neural network model reaches a preset accuracy; acquiring a target vehicle picture, and preprocessing the target vehicle picture; carrying out vehicle identification on the preprocessed target vehicle picture by using the trained convolutional neural network model, and extracting a vehicle model and a license plate number; searching the identification result and the vehicle database to obtain a search result, and outputting target vehicle information under the condition that the search result is consistent; and under the condition that the search results are inconsistent, the target vehicle is brought into an illegal vehicle library, and dangerous early warning is sent out. And the vehicle identification speed and accuracy are improved.

Description

Vehicle snapshot recognition system and method
Technical Field
The invention belongs to the technical field of vehicle identification, and particularly relates to a vehicle snapshot identification system and method.
Background
The vehicle snapshot is a technology and a process for capturing, recording and identifying a vehicle in running, can be used for various applications, including the fields of traffic monitoring, parking management, safety monitoring, road charging, vehicle identification, data analysis, intelligent traffic systems and the like, has a very wide application range, can improve the efficiency of traffic management, improve road safety, provide real-time traffic information, support crime investigation and other tasks, and plays an important role in intelligent traffic systems, urban planning, safety monitoring and the like.
In the prior art, the accuracy rate of vehicle identification on the vehicle pictures acquired by the camera is not high, and the feedback result can be obtained only by long-time processing, so that the processing time of illegal vehicles is shortened, and the road safety is endangered.
Disclosure of Invention
The invention provides a vehicle snapshot recognition system and a vehicle snapshot recognition method, which aim to solve the technical problems that in the prior art, the accuracy of vehicle recognition on vehicle pictures acquired by a camera is not high, a feedback result can be obtained only by long-time processing, the processing time of illegal vehicles is slow, and the road safety is damaged.
First aspect
The invention provides a vehicle snapshot recognition method, which comprises the following steps:
s101: constructing a vehicle database by utilizing the hash table, wherein the vehicle database comprises vehicle models and corresponding license plate numbers;
s102: constructing vehicle generation data based on the generation countermeasure network model;
s103: constructing a lightweight convolutional neural network model by using a pruning technology;
s104: performing vehicle identification training on the optimized convolutional neural network model by using the vehicle generation data, and performing super-parameter optimization on the convolutional neural network model by combining a genetic algorithm until the vehicle identification accuracy of the convolutional neural network model reaches a preset accuracy;
s105: acquiring a target vehicle picture, and preprocessing the target vehicle picture, wherein the preprocessing comprises edge detection and image correction;
s106: carrying out vehicle identification on the preprocessed target vehicle picture by using the trained convolutional neural network model, and extracting a vehicle model and a license plate number;
s107: searching the identification result and the vehicle database to obtain a search result, and outputting target vehicle information under the condition that the search result is consistent;
s108: and under the condition that the search results are inconsistent, the target vehicle is brought into an illegal vehicle library, and dangerous early warning is sent out.
Second aspect
The invention provides a vehicle snapshot recognition system for executing the vehicle snapshot recognition method in the first aspect.
Compared with the prior art, the invention has at least the following beneficial technical effects:
(1) In the invention, the hash table is utilized to construct the vehicle database for searching comparison of the identification result, the low complexity, high concurrency capacity and high-efficiency storage capacity of the hash table are fully utilized, the problem of low searching efficiency caused by overlarge vehicle data amount is avoided, the searching efficiency is improved, the storage cost is reduced, and the identification speed of the model is improved.
(2) In order to improve the vehicle identification accuracy, generating multi-type vehicle generation data for training by generating an countermeasure network model, training a lightweight convolutional neural network model formed after pruning, optimizing super-parameters which are difficult to determine an optimal value by combining a genetic algorithm, overcoming the problem that the training data is difficult and inaccurate to acquire, improving the generalization capability and the identification accuracy of the lightweight convolutional neural network model, reducing the parameter quantity of the convolutional neural network by a pruning technology, and further improving the identification speed of the model.
(3) According to the invention, the acquired target vehicle picture is subjected to image correction through image correction, so that the problem of poor recognition accuracy caused by the inclination of the acquired picture in the vehicle running state is avoided, and the accuracy of vehicle recognition is further improved. And finally, the recognition speed and recognition accuracy of the vehicles are improved, the road running time of illegal vehicles is shortened, and the road safety is maintained.
Drawings
The above features, technical features, advantages and implementation of the present invention will be further described in the following description of preferred embodiments with reference to the accompanying drawings in a clear and easily understood manner.
Fig. 1 is a schematic flow chart of a vehicle snapshot recognition method provided by the invention.
Detailed Description
Embodiment 1, in one embodiment, referring to fig. 1 of the specification, a schematic flow chart of a vehicle snapshot recognition method provided by the invention is shown.
The invention provides a vehicle snapshot recognition method, which comprises the following steps:
s101: and constructing a vehicle database by using the hash table.
The vehicle database comprises vehicle models and corresponding license plate numbers.
The hash table is a data structure for efficiently storing and retrieving key-value pair data. It allows fast data access by mapping keys (typically unique) to a array index, the hash table is efficient because it uses a hash function that can map any size input (keys) to a fixed size output (index) to find or insert data within a constant time complexity (O (1)).
It should be noted that, the vehicle database constructed by the hash table allows for quick retrieval of vehicle information, and related data can be directly obtained only by providing license plate numbers without traversing the whole database, and in addition, the hash table generally saves more memory than the traditional database management system because it does not need a complex index structure, which is particularly useful for large-scale vehicle databases, has flexibility, can be resized as needed, and does not need redesign the database, its simple interface makes the operations of data insertion, update and deletion very easy to implement, and the hash table can easily implement data deduplication, ensuring that the same license plate number is not repeatedly recorded. Most importantly, under proper hash functions and index structures, the hash table can realize high-performance data access, so that the retrieval and management of vehicle information become efficient.
In one possible implementation, S101 specifically includes:
s1011: taking the license plate number as a unique identifier of the hash key;
s1012: establishing a hash function, and mapping the hash key to an index of a hash table, wherein the hash function specifically comprises:
wherein,hash() The hash function is represented by a hash function,keythe hash key is represented by a hash key,aandbindicating that the adjustment constant is to be made,Mthe symbol "%" represents modulo arithmetic, representing the size of the hash table;
s1013: and taking the license plate number as a key, and inserting the vehicle model as a value into the hash table to obtain a vehicle database.
S102: vehicle generation data is constructed based on the generation of the antagonism network model.
The generation countermeasure network is a deep learning model, and comprises a generator and a discriminator, wherein the generator is responsible for generating forged data, the discriminator is responsible for distinguishing forged data and real data, and the forged data and the real data are mutually opposed in the training process, so that the generator gradually generates more realistic data, and meanwhile, the discriminator becomes more good at recognizing the forged data, and finally, the aim of generating high-quality and realistic data is achieved. The generated data of the countermeasure network can be used for training the vehicle recognition model, so that the diversity and quantity of training data are increased, the performance and generalization capability of the model are improved, the generated virtual vehicle data can fill the defects of the existing data set, and the generated virtual vehicle data comprise changes of different vehicle types, illumination conditions, backgrounds and the like, so that the model is more suitable for various actual scenes, and the accuracy and the robustness of vehicle recognition are improved.
In one possible implementation, S102 specifically includes:
s1021: taking the vehicle model and the license plate number as generating tasks, constructing and generating an countermeasure network model, wherein the generating countermeasure network model comprises a generator and a discriminator;
s1022: generating synthetic data to be detected by using the generated countermeasure network model;
s1023: collecting vehicle history data, and calculating the coincidence probability of the synthesized data to be detected and the vehicle history data through a discriminator;
s1024: fixing parameters of the discriminant, training a generator, and establishing an objective function with minimum probability of coincidence as a target:
wherein,representing the objective function of the generator,/>Respectively representing the generator parameters and the arbiter parameters,Erepresenting the mathematical expectation value,Fthe representation of the generator is provided with a representation,Gthe representation of the arbiter is made of,pzthe distribution of the historical data is represented,phrepresenting a composite data distribution;
s1025: fixing parameters of a generator, training a discriminator, and establishing an objective function with the maximum probability of coincidence as a target:
wherein,representing an objective function of the arbiter;
s1026: and generating vehicle generation data by using the generated countermeasure network model obtained after training.
S103: and constructing a lightweight convolutional neural network model by using a pruning technology.
Among them, pruning is a technique for reducing unnecessary connections and parameters in a neural network by automatically or manually identifying and deleting connections that contribute less to the network, thereby reducing the size and computational effort of the model without compromising its performance. This helps create a lighter weight model, reducing memory and computing resource requirements. The convolutional neural network model is a deep learning model, is particularly suitable for processing images and space data, consists of a plurality of convolutional layers and pooling layers, is used for automatically extracting features in the images, and is used for classifying or regressing tasks in a full-connection layer, and is widely used for tasks such as image classification, object detection, image generation and the like.
It should be noted that, by constructing a lightweight convolutional neural network model by using a pruning technology, the volume of the model can be reduced, and the requirements of model storage and memory are reduced, so that the model is more suitable for an embedded system or an environment with limited resources, the problem of large data processing amount and low processing speed caused by vehicle identification by using a neural network is avoided, and meanwhile, the speed and accuracy of vehicle detection are improved. And the reasoning time of the model is shortened, the instantaneity is improved, and the method is suitable for applications requiring quick response. The calculation cost of the model is reduced, the energy consumption of training and reasoning is reduced, the calculation resources are saved, the performance of the model is maintained or improved, unnecessary connection and parameters can be deleted through intelligent pruning, and meanwhile, the accuracy and generalization capability of the model are maintained.
In one possible implementation, S103 specifically includes:
s1031: setting an adjustable retention parameter for each convolution kernel of the convolution neural network model, and converting the adjustable retention parameter into a forward operation ratio of the corresponding convolution kernel:
wherein,representing the adjustable retention parameter(s),bthe boundary is represented by a representation of the boundary,ijrepresent the firstiLayer convolution layer 1jThe number of convolution kernels is chosen to be the number of convolution kernels,representing the forward operation ratio.
S1032: and (3) increasing constraint conditions of the adjustable retention parameters, contracting the adjustable retention parameters, and determining a convolution kernel with a zero forward operation ratio.
In one possible embodiment, S1032 specifically includes:
S1032A: the output of the convolution kernel is converted through a forward operation ratio:
wherein,representing the original output of the convolution kernel,/>Representing the actual output of the convolution kernel;
S1032B: adding constraint conditions of the adjustable retention parameters, and shrinking the adjustable retention parameters, wherein the constraint conditions are specifically as follows:
wherein,the constraint condition is represented by a constraint condition,eandEthe current iteration number and the first preset iteration number are respectively indicated.
Specifically, the forward operation ratio between the original output and the real output of the convolution kernel is converted, namely the output ratio of the convolution kernel is calculated to perform feature mapping, and constraint conditions are introduced and adjustable retention parameters are contracted, wherein the constraint conditions are dynamically adjusted according to the iteration times E and the preset iteration times E, so that the complexity of the model is limited, and meanwhile, the stability and the generalization performance of the model are improved. Through the conversion of the forward operation ratio and the introduction of constraint conditions, the fine control and optimization of model parameters can be realized, so that the model is lighter and is suitable for a resource-limited environment, and meanwhile, good performance and robustness are maintained, so that the method is beneficial to constructing an efficient deep learning model, and the calculation efficiency and the deployability of the model are improved.
It should be noted that, the size of the first preset iteration number may be set by a person skilled in the art according to actual needs, and the present invention is not limited herein.
S1033: and removing the convolution kernel with the contracted forward operation ratio of zero to obtain a lightweight convolution neural network model.
S104: and carrying out vehicle identification training on the optimized convolutional neural network model by utilizing the vehicle generation data, and carrying out super-parameter optimization on the convolutional neural network model by combining a genetic algorithm until the vehicle identification accuracy of the convolutional neural network model reaches a preset accuracy.
The vehicle recognition training is to train a convolutional neural network model by using a large amount of vehicle data, so that the convolutional neural network model can automatically recognize and classify input vehicle images and is used for recognizing vehicle models or license plate number tasks. The genetic algorithm is an optimization algorithm, simulates the biological evolution process, and gradually evolves through selecting, crossing, mutating and the like on candidate solutions to find an optimal solution or a solution close to the optimal solution, wherein the genetic algorithm is used for searching and optimizing super parameters of a convolutional neural network model, such as learning rate, layer number, convolutional kernel size and the like, so as to achieve optimal vehicle identification performance. The super-parameter optimization refers to adjusting super-parameters of a model when the model is trained by a machine learning process, wherein the parameters cannot be obtained through the training process of the model, and are required to be manually set, the selection of the super-parameters has important influence on the performance and training efficiency of the model, and the optimal super-parameter configuration can be automatically searched and determined through methods such as a genetic algorithm and the like so as to improve the performance of the model.
It should be noted that, by using the vehicle generated data for training and combining with a genetic algorithm to optimize the hyper-parameters of the convolutional neural network model, the model can be allowed to train on a wider data distribution, thereby improving the robustness and generalization capability of the model, the genetic algorithm can automatically search the optimal hyper-parameter configuration, reducing the requirement of manual adjustment, saving time and resources, and finally, the model can perform vehicle identification under a higher accuracy, and improving the performance and efficiency of the system.
In one possible implementation, S104 specifically includes:
s1041: and dividing the vehicle generation data into a training set and a testing set according to a preset proportion.
It should be noted that, the size of the preset ratio can be set by those skilled in the art according to actual needs, and the present invention is not limited herein.
S1042: and training the convolutional neural network model by using the training set.
S1043: and verifying the vehicle identification accuracy of the trained convolutional neural network model by using the test set.
S1044: and under the condition that the vehicle identification accuracy is lower than the preset accuracy, performing super-parameter optimization on the convolutional neural network model by combining a genetic algorithm, and returning to S1042.
In one possible implementation, S1044 specifically includes:
S1044A: determining a location update formula with super parameters as biological individuals:
wherein,representing updated position,/->Representing the current optimal position->All of which represent a random position and,trepresenting the current iteration number, +.>Representing parameters->Representation ofParameter of linear approach 0, ++>The random number is represented by a number,Wthe weight is represented by a weight that,prepresentation ofrMaximum threshold value of->Represents the maximum number of iterations, +.>Indicating fitness value of the biological individual, +.>Representing the optimal fitness value in the iterative process, < >>Representing the optimal fitness value in the current iteration process,/->Representing the lowest fitness value in the current iteration process,/->The fitness values representing the biological individuals are ranked in the first half of the population.
S1044B: setting a switching frequency and a searching mode, and re-determining the updated position of the biological individual until the current iteration number is greater than or equal to the second preset iteration number, and extracting the optimal individual, wherein the searching mode comprises re-searching and searching around the current optimal position:
wherein,Xrepresenting the redefined updated location(s),Randrrepresents [0,1 ]]Is used to determine the random value of (c),representing the upper and lower search space bounds respectively,zindicating the switching frequency.
It should be noted that, the size of the second preset iteration number may be set by a person skilled in the art according to actual needs, and the present invention is not limited herein.
S1044C: and taking the value corresponding to the optimal individual as the value of the super parameter.
S1045: and under the condition that the vehicle identification accuracy is greater than or equal to the preset accuracy, training of the convolutional neural network model is completed.
Specifically, firstly, the generated vehicle data is divided into a training set and a test set so as to train and verify the model, the training set is used for training the convolutional neural network model so that the model can identify the vehicle, the test set is used for verifying the vehicle identification accuracy of the trained model, whether the preset accuracy is reached or not is checked, if the vehicle identification accuracy is lower than the preset accuracy, the super parameters of the model are optimized by combining a genetic algorithm (S1044A and S1044B) so as to further improve the performance of the model, and once the preset accuracy is reached or exceeded, the training process of the convolutional neural network model is completed. The dynamic model training and optimizing process is allowed, and the expected high accuracy of the model on the vehicle recognition task is ensured by automatically searching and adjusting the super parameters, so that a more accurate vehicle recognition system is constructed, different scenes and data distribution are adapted, and the robustness and performance of the model are improved.
S105: and acquiring a target vehicle picture, and preprocessing the target vehicle picture.
Wherein the preprocessing includes edge detection and image correction.
The target vehicle picture refers to a vehicle image to be identified, such as a vehicle photo or video frame captured by a camera or a sensor. Preprocessing refers to a series of processing steps performed on an image prior to its input into the recognition system to extract useful information, reduce noise, and improve image quality. Edge detection is part of the preprocessing that aims to identify object boundaries in the image, i.e. the contours of the vehicle, and by detecting edges in the image, it is easier to separate the vehicle from the background, providing important features for identification. Image correction is another preprocessing step that is used to correct for distortions in the image, such as perspective distortion or tilting, to ensure that the vehicle image is at a standard viewing angle and scale, making the recognition algorithm more accurate.
It should be noted that, the preprocessing of the image is helpful to improve the performance and accuracy of the vehicle recognition system, the edge detection can highlight the shape of the vehicle, simplify the feature extraction process, and the image correction can ensure the consistency of the input image, reduce the recognition error, and the whole preprocessing process is helpful to improve the quality of the input data, so that the vehicle recognition algorithm is more robust, thereby improving the reliability of the system.
In one possible implementation, S105 specifically includes:
s1051: performing edge detection on the target vehicle picture to obtain an edge pixel point set of the target vehicle picture;
s1052: acquiring the inclination angle of the target vehicle picture through a Hough transformation method in the range of the edge pixel point set;
s1053: correcting each pixel point in the edge pixel point set through an affine transformation method:
wherein,representing the corrected new pixel coordinates, < >>Representing pixel point coordinates in the edge pixel point set,θindicating the angle of inclination.
Specifically, first, edge detection is performed on a target vehicle picture to obtain an edge pixel point set in an image, the pixel points represent the outline of a vehicle, the inclination angle of the target vehicle picture, that is, the inclination degree of the vehicle in the image, is estimated through a hough transformation method within the range of the edge pixel point set, next, correction is performed on each pixel point in the edge pixel point set through an affine transformation method, and the positions of the pixel points are adjusted according to the estimated inclination angle, so that the vehicle image is corrected to be standard in view angle and scale. By means of edge detection and inclination angle estimation, distortion in a vehicle image can be extracted and corrected, the image quality input to the recognition algorithm is guaranteed to be higher, the image correction is helpful to eliminate view angle offset and reduce shape distortion, accuracy and robustness of vehicle recognition are improved, the system is more suitable for vehicle images with different shooting conditions and angles, and performance and reliability of the vehicle recognition system are improved.
S106: and carrying out vehicle identification on the preprocessed target vehicle picture by using the trained convolutional neural network model, and extracting the vehicle model and the license plate number.
Specifically, firstly, a trained Convolutional Neural Network (CNN) model is used, a preprocessed target vehicle picture is input into the model, the model automatically extracts characteristics in an image through a plurality of layers of convolution and pooling operations, the characteristics comprise shape, texture and structure information of a vehicle, and then the characteristics are classified through a full connection layer and a classifier by the model to identify the model and license plate number of the vehicle. Specifically, the model determines class labels of the vehicle model and the license plate number by comparing the extracted features with feature patterns in the prior training data, so that the vehicle identification is realized, the process fully utilizes the deep learning capability of the convolutional neural network, key information can be extracted from the image efficiently and accurately, and the automatic identification of the vehicle model and the license plate number is realized.
S107: and searching the identification result and the vehicle database to obtain a search result, and outputting target vehicle information when the search result is consistent.
The search result refers to a matching result obtained by comparing information obtained by vehicle identification with a vehicle database. When the search results are consistent, the information matched with the identification results is found from the vehicle database, namely, the model and license plate number of the target vehicle are consistent with the records in the database, at the moment, the related information of the target vehicle, such as the vehicle type and license plate number, can be output, and the consistent search results indicate that the identification system successfully finds the matching item of the target vehicle in the database, so that the information of the illegal vehicle can be rapidly determined and recorded.
S108: and under the condition that the search results are inconsistent, the target vehicle is brought into an illegal vehicle library, and dangerous early warning is sent out.
Under the condition that the search results are inconsistent, the problems of vehicle license plate covering, license plate covering and illegal modification of the vehicle are described, and at the moment, the target vehicle is directly brought into an illegal vehicle library to remind workers of timely intervention, so that the road safety problem caused by illegal behaviors is avoided.
In one possible embodiment, the vehicle snapshot recognition method further includes:
s109: and retraining the convolutional neural network model at intervals of a preset duration.
In the actual use process, the data in the vehicle snapshot field may change along with time, new vehicle types, license plate number formats or shooting conditions may appear, the model can be adapted to the changes by periodically retraining the model, the identification performance of the model is ensured to be continuous and accurate, the model is periodically retrained to be helpful for maintaining the performance of the identification system, and the model is ensured to be capable of adapting to the changes and challenges, so that the continuous effectiveness of the system is improved, and the method is important for maintaining the accuracy and reliability of the vehicle snapshot identification system.
It should be noted that, the size of the preset duration may be set by those skilled in the art according to actual needs, and the present invention is not limited herein.
Compared with the prior art, the invention has at least the following beneficial technical effects:
in the invention, the hash table is utilized to construct the vehicle database for searching comparison of the identification result, the low complexity, high concurrency capacity and high-efficiency storage capacity of the hash table are fully utilized, the problem of low searching efficiency caused by overlarge vehicle data amount is avoided, the searching efficiency is improved, the storage cost is reduced, and the identification speed of the model is improved. Secondly, in order to improve the vehicle identification accuracy, generating multi-type vehicle generation data for training by generating an countermeasure network model, training a lightweight convolutional neural network model formed after pruning, optimizing super parameters which are difficult to determine an optimal value by combining a genetic algorithm, overcoming the problem that the training data is difficult and inaccurate to acquire, improving the generalization capability and the identification accuracy of the lightweight convolutional neural network model, reducing the parameter quantity of the convolutional neural network by a pruning technology, and further improving the identification speed of the model. In addition, the image correction is carried out on the collected target vehicle picture through the image correction, so that the problem of poor recognition accuracy caused by the inclination of the collected picture in the running state of the vehicle is avoided, and the accuracy of vehicle recognition is further improved. And finally, the recognition speed and recognition accuracy of the vehicles are improved, the road running time of illegal vehicles is shortened, and the road safety is maintained.
Embodiment 2 in one embodiment, the present invention provides a vehicle snapshot recognition system for executing the vehicle snapshot recognition method in embodiment 1.
The vehicle snapshot recognition system provided by the invention can realize the steps and effects of the vehicle snapshot recognition method in the embodiment 1, and in order to avoid repetition, the invention is not repeated.
Compared with the prior art, the invention has at least the following beneficial technical effects:
in the invention, the hash table is utilized to construct the vehicle database for searching comparison of the identification result, the low complexity, high concurrency capacity and high-efficiency storage capacity of the hash table are fully utilized, the problem of low searching efficiency caused by overlarge vehicle data amount is avoided, the searching efficiency is improved, the storage cost is reduced, and the identification speed of the model is improved. Secondly, in order to improve the vehicle identification accuracy, generating multi-type vehicle generation data for training by generating an countermeasure network model, training a lightweight convolutional neural network model formed after pruning, optimizing super parameters which are difficult to determine an optimal value by combining a genetic algorithm, overcoming the problem that the training data is difficult and inaccurate to acquire, improving the generalization capability and the identification accuracy of the lightweight convolutional neural network model, reducing the parameter quantity of the convolutional neural network by a pruning technology, and further improving the identification speed of the model. In addition, the image correction is carried out on the collected target vehicle picture through the image correction, so that the problem of poor recognition accuracy caused by the inclination of the collected picture in the running state of the vehicle is avoided, and the accuracy of vehicle recognition is further improved. And finally, the recognition speed and recognition accuracy of the vehicles are improved, the road running time of illegal vehicles is shortened, and the road safety is maintained.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (6)

1. A vehicle snapshot recognition method, comprising:
s101: constructing a vehicle database by utilizing a hash table, wherein the vehicle database comprises vehicle models and corresponding license plate numbers;
s102: constructing vehicle generation data based on the generation countermeasure network model;
s103: constructing a lightweight convolutional neural network model by using a pruning technology;
s104: performing vehicle identification training on the optimized convolutional neural network model by using the vehicle generation data, and performing super-parameter optimization on the convolutional neural network model by combining a genetic algorithm until the vehicle identification accuracy of the convolutional neural network model reaches a preset accuracy;
s105: acquiring a target vehicle picture, and preprocessing the target vehicle picture, wherein the preprocessing comprises edge detection and image correction;
s106: carrying out vehicle identification on the preprocessed target vehicle picture by using the trained convolutional neural network model, and extracting a vehicle model and a license plate number;
s107: searching the identification result and the vehicle database to obtain a search result, and outputting target vehicle information under the condition that the search result is consistent;
s108: under the condition that the search results are inconsistent, the target vehicle is brought into an illegal vehicle library, and dangerous early warning is sent out;
the step S103 specifically includes:
s1031: setting an adjustable retention parameter for each convolution kernel of the convolution neural network model, and converting the adjustable retention parameter into a forward operation ratio of the corresponding convolution kernel:
wherein,representing the said adjustable retention parameter(s),bthe boundary is represented by a representation of the boundary,ijrepresent the firstiLayer convolution layer 1jThe number of convolution kernels is chosen to be the number of convolution kernels,representing the forward operation ratio;
s1032: increasing constraint conditions of the adjustable retention parameters, shrinking the adjustable retention parameters, and determining a convolution kernel with the forward operation ratio of zero;
s1033: removing the convolution kernel with the contracted forward operation ratio of zero to obtain the lightweight convolution neural network model;
the step S1032 specifically includes:
S1032A: converting the output of the convolution kernel through the forward operation ratio:
wherein,representing the original output of the convolution kernel,/>Representing the actual output of the convolution kernel;
S1032B: adding constraint conditions of the adjustable retention parameters, and shrinking the adjustable retention parameters, wherein the constraint conditions are specifically as follows:
wherein,the condition of the constraint is represented by a set of parameters,eandErespectively indicating the current iteration times and the first preset iteration times;
the step S104 specifically includes:
s1041: dividing the vehicle generation data into a training set and a testing set according to a preset proportion;
s1042: training the convolutional neural network model by using the training set;
s1043: verifying the vehicle identification accuracy of the trained convolutional neural network model by using the test set;
s1044: under the condition that the vehicle identification accuracy is lower than the preset accuracy, performing super-parameter optimization on the convolutional neural network model by combining the genetic algorithm, and returning to S1042;
s1045: under the condition that the vehicle identification accuracy is greater than or equal to the preset accuracy, training the convolutional neural network model is completed;
the step S1044 specifically includes:
S1044A: determining a location update formula with the hyper-parameters as biological individuals:
wherein,representing updated position,/->Representing the current optimal position, S (g) representing the fitness value of said biological individual;>all of which represent a random position and,trepresenting the current iteration number, +.>Representing parameters->Parameter representing linear approach to 0, +.>The random number is represented by a number,Wthe weight is represented by a weight that,prepresentation ofrMaximum threshold value of->Represents the maximum number of iterations, +.>Representing the optimal fitness value in the iterative process, < >>Representing the optimal fitness value in the current iteration process,/->Representing the lowest fitness value in the current iteration process,/->Individuals whose fitness values represent the biological individuals are ranked in the first half of the population;
S1044B: setting a switching frequency and a searching mode, and re-determining the updated position of the biological individual until the current iteration number is greater than or equal to a second preset iteration number, and extracting an optimal individual, wherein the searching mode comprises re-searching and searching around the current optimal position;
S1044C: and taking the value corresponding to the optimal individual as the value of the super parameter.
2. The vehicle snapshot recognition method according to claim 1, wherein the S101 specifically includes:
s1011: taking the license plate number as a unique identifier of a hash key;
s1012: establishing a hash function, and mapping the hash key to an index of a hash table, wherein the hash function specifically comprises the following steps:
wherein,hash() The hash function is represented by a hash function of the hash code,keyrepresenting the hash key in question,aandbindicating that the adjustment constant is to be made,Mrepresenting the size of the hash table, and the symbol "%" represents modulo operation;
s1013: and taking the license plate number as a key, and inserting the vehicle model as a value into the hash table to obtain the vehicle database.
3. The vehicle snapshot recognition method according to claim 1, wherein S102 specifically includes:
s1021: taking the vehicle model and the license plate number as generating tasks, constructing the generating countermeasure network model, wherein the generating countermeasure network model comprises a generator and a discriminator;
s1022: generating synthetic data to be detected by utilizing the generating countermeasure network model;
s1023: collecting vehicle history data, and calculating the coincidence probability of the to-be-detected synthesized data and the vehicle history data through the discriminator;
s1024: fixing parameters of the discriminator, training the generator, and establishing an objective function with the minimum consistent probability as an objective:
wherein,representing the objective function of the generator, +.>Respectively representing the generator parameters and the arbiter parameters,Erepresenting the mathematical expectation value,Fthe generator is represented by a number of such generators,Grepresenting the said degree of freedom of the said arbiter,pzthe distribution of the historical data is represented,phrepresenting a composite data distribution;
s1025: fixing parameters of the generator, training the discriminator, and establishing an objective function with the maximum consistent probability as a target:
wherein,representing an objective function of the arbiter;
s1026: and generating the vehicle generation data by using the generated countermeasure network model obtained after training.
4. The vehicle snapshot recognition method according to claim 1, wherein S105 specifically includes:
s1051: performing edge detection on the target vehicle picture to obtain an edge pixel point set of the target vehicle picture;
s1052: acquiring the inclination angle of the target vehicle picture through a Hough transformation method in the range of the edge pixel point set;
s1053: correcting each pixel point in the edge pixel point set by an affine transformation method:
wherein,representing the corrected new pixel coordinates, < >>Representing pixel point coordinates in the set of edge pixel points,θrepresenting the tilt angle.
5. The vehicle snapshot recognition method according to claim 1, characterized in that the vehicle snapshot recognition method further comprises:
s109: and retraining the convolutional neural network model at intervals of a preset duration.
6. A vehicle snapshot recognition system for performing the vehicle snapshot recognition method of any one of claims 1 to 5.
CN202311484690.8A 2023-11-09 2023-11-09 Vehicle snapshot recognition system and method Active CN117218613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311484690.8A CN117218613B (en) 2023-11-09 2023-11-09 Vehicle snapshot recognition system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311484690.8A CN117218613B (en) 2023-11-09 2023-11-09 Vehicle snapshot recognition system and method

Publications (2)

Publication Number Publication Date
CN117218613A CN117218613A (en) 2023-12-12
CN117218613B true CN117218613B (en) 2024-03-19

Family

ID=89037522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311484690.8A Active CN117218613B (en) 2023-11-09 2023-11-09 Vehicle snapshot recognition system and method

Country Status (1)

Country Link
CN (1) CN117218613B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246876A (en) * 2013-05-10 2013-08-14 苏州祥益网络科技有限公司 Image feature comparison based counterfeit vehicle registration plate identification method
CN105279475A (en) * 2014-07-15 2016-01-27 贺江涛 Fake-licensed vehicle identification method and apparatus based on vehicle identity recognition
CN105321350A (en) * 2014-08-05 2016-02-10 北京大学 Method and device for detection of fake plate vehicles
CN105448103A (en) * 2015-12-24 2016-03-30 北京旷视科技有限公司 Vehicle fake license plate detection method and system
CN111160100A (en) * 2019-11-29 2020-05-15 南京航空航天大学 Lightweight depth model aerial photography vehicle detection method based on sample generation
CN112580536A (en) * 2020-12-23 2021-03-30 深圳市捷顺科技实业股份有限公司 High-order video vehicle and license plate detection method and device
CN114911965A (en) * 2022-04-19 2022-08-16 超级视线科技有限公司 Vehicle information query method and system
CN115320617A (en) * 2022-08-11 2022-11-11 湖南汽车工程职业学院 Automatic driving speed control system based on artificial intelligence
CN116403396A (en) * 2022-12-19 2023-07-07 山西交通控股有限公司 Tunnel vehicle detection method based on big data and video technology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120148092A1 (en) * 2010-12-09 2012-06-14 Gorilla Technology Inc. Automatic traffic violation detection system and method of the same
CN112132113A (en) * 2020-10-20 2020-12-25 北京百度网讯科技有限公司 Vehicle re-identification method and device, training method and electronic equipment
US11417125B2 (en) * 2020-11-30 2022-08-16 Sony Group Corporation Recognition of license plate numbers from Bayer-domain image data

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246876A (en) * 2013-05-10 2013-08-14 苏州祥益网络科技有限公司 Image feature comparison based counterfeit vehicle registration plate identification method
CN105279475A (en) * 2014-07-15 2016-01-27 贺江涛 Fake-licensed vehicle identification method and apparatus based on vehicle identity recognition
CN105321350A (en) * 2014-08-05 2016-02-10 北京大学 Method and device for detection of fake plate vehicles
CN105448103A (en) * 2015-12-24 2016-03-30 北京旷视科技有限公司 Vehicle fake license plate detection method and system
CN111160100A (en) * 2019-11-29 2020-05-15 南京航空航天大学 Lightweight depth model aerial photography vehicle detection method based on sample generation
CN112580536A (en) * 2020-12-23 2021-03-30 深圳市捷顺科技实业股份有限公司 High-order video vehicle and license plate detection method and device
CN114911965A (en) * 2022-04-19 2022-08-16 超级视线科技有限公司 Vehicle information query method and system
CN115320617A (en) * 2022-08-11 2022-11-11 湖南汽车工程职业学院 Automatic driving speed control system based on artificial intelligence
CN116403396A (en) * 2022-12-19 2023-07-07 山西交通控股有限公司 Tunnel vehicle detection method based on big data and video technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于神经网络的车牌识别技术的研究及应用;武丽娟;《中国优秀硕士学位论文全文数据库 (信息科技辑)》(第7期);第I138-600页 *

Also Published As

Publication number Publication date
CN117218613A (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN111460984B (en) Global lane line detection method based on key points and gradient equalization loss
Gavrila A bayesian, exemplar-based approach to hierarchical shape matching
US7995055B1 (en) Classifying objects in a scene
CN110263659B (en) Finger vein recognition method and system based on triplet loss and lightweight network
CN107633226B (en) Human body motion tracking feature processing method
Wang et al. Object detection using clustering algorithm adaptive searching regions in aerial images
CN111666434B (en) Streetscape picture retrieval method based on depth global features
CN109766873B (en) Pedestrian re-identification method based on hybrid deformable convolution
CN109034035A (en) Pedestrian&#39;s recognition methods again based on conspicuousness detection and Fusion Features
CN111860587B (en) Detection method for small targets of pictures
CN111428558A (en) Vehicle detection method based on improved YO L Ov3 method
CN106780639B (en) Hash coding method based on significance characteristic sparse embedding and extreme learning machine
CN106682681A (en) Recognition algorithm automatic improvement method based on relevance feedback
CN113129335B (en) Visual tracking algorithm and multi-template updating strategy based on twin network
CN110543581A (en) Multi-view three-dimensional model retrieval method based on non-local graph convolution network
CN110781882A (en) License plate positioning and identifying method based on YOLO model
CN110096982A (en) A kind of video frequency vehicle big data searching method based on deep learning
CN110751027B (en) Pedestrian re-identification method based on deep multi-instance learning
CN112257799A (en) Method, system and device for detecting household garbage target
CN112766170B (en) Self-adaptive segmentation detection method and device based on cluster unmanned aerial vehicle image
CN113850136A (en) Yolov5 and BCNN-based vehicle orientation identification method and system
CN112528845A (en) Physical circuit diagram identification method based on deep learning and application thereof
CN115311502A (en) Remote sensing image small sample scene classification method based on multi-scale double-flow architecture
CN111709317A (en) Pedestrian re-identification method based on multi-scale features under saliency model
CN111738164A (en) Pedestrian detection method based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant