WO2019051941A1 - Method, apparatus and device for identifying vehicle type, and computer-readable storage medium - Google Patents
Method, apparatus and device for identifying vehicle type, and computer-readable storage medium Download PDFInfo
- Publication number
- WO2019051941A1 WO2019051941A1 PCT/CN2017/108232 CN2017108232W WO2019051941A1 WO 2019051941 A1 WO2019051941 A1 WO 2019051941A1 CN 2017108232 W CN2017108232 W CN 2017108232W WO 2019051941 A1 WO2019051941 A1 WO 2019051941A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- picture
- preset
- model
- error
- tested
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/08—Detecting or categorising vehicles
Definitions
- the present application relates to the field of computer technology, and in particular, to a vehicle identification method, apparatus, device, and computer readable storage medium based on a convolutional neural network.
- Automobile model identification plays a key role in vehicle management, vehicle violation and escape, vehicle inspection and control, and accidental vehicle loss compensation.
- the vehicle type has the advantage of being difficult to change, and becomes a very important feature in vehicle identification.
- the model In the case of cars and deck cars, it is impossible to obtain effective vehicle information through license plate recognition and image sharpening processing technology, especially in the case of car damage claims, the model has a great influence on the amount of compensation, and the vehicle type identification is similar to other traffic monitoring and control. Traffic accident liability determination and other scenarios also play a very important role.
- the embodiment of the present application provides a vehicle identification method, device, device and computer readable storage medium based on a convolutional neural network, which can realize high-precision vehicle type recognition and make the identification process efficient and stable.
- an embodiment of the present application provides a vehicle identification method based on a convolutional neural network, the method comprising:
- Pre-processing the acquired picture to be tested inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information,
- the pre-processed picture to be tested is input to a second preset detection model; the second preset detection model is used to calculate a probability value of the picture to be tested corresponding to each type of vehicle type; determining a maximum probability among all probability values a value, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; wherein the first preset detection model and the second preset detection model respectively use a preset picture data to convolutional neural network Get it by training accordingly.
- the embodiment of the present application further provides a vehicle identification device based on a convolutional neural network, the device comprising:
- a processing unit configured to: perform pre-processing on the acquired image to be tested; and the determining unit is configured to input the pre-processed image to be tested into the first preset detection model to determine whether the image to be tested includes vehicle feature information; And if the picture to be tested contains the vehicle feature information, the pre-processed picture to be tested is input to the second preset detection model; and the calculating unit is configured to calculate the to-be-waited by the second preset detection model
- the measured picture corresponds to a probability value of each type of vehicle type; the determining unit is configured to determine a maximum probability value of all the probability values, and the vehicle type corresponding to the maximum probability value is used as the model of the picture to be tested; wherein
- the first preset detection model and the second preset detection model are respectively acquired by performing corresponding training on the convolutional neural network by using preset image data.
- the embodiment of the present application further provides a vehicle identification device based on a convolutional neural network, the device comprising:
- a memory for storing a program for realizing vehicle type recognition; and a processor for running a program for realizing vehicle type identification stored in the memory to perform the following operations:
- Pre-processing the acquired picture to be tested inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information,
- the pre-processed picture to be tested is input to a second preset detection model; the second preset detection model is used to calculate a probability value of the picture to be tested corresponding to each type of vehicle type; determining a maximum probability among all probability values a value, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; wherein the first preset detection model and the second preset detection model respectively use a preset picture data to convolutional neural network Get it by training accordingly.
- an embodiment of the present application further provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors Execute to implement the following steps:
- Pre-processing the acquired picture to be tested inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information,
- the pre-processed picture to be tested is input to a second preset detection model; the second preset detection model is used to calculate a probability value of the picture to be tested corresponding to each type of vehicle type; determining a maximum probability among all probability values a value, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; wherein the first preset detection model and the second preset detection model respectively use a preset picture data to convolutional neural network Get it by training accordingly.
- the embodiment of the present application determines whether the picture to be tested contains vehicle feature information by inputting the pre-processed picture to be tested into a first preset detection model; if the picture to be tested contains vehicle feature information, the pre-processed to-be-processed Inputting a second preset detection model; calculating, by the second preset detection model, a probability value of the picture to be tested corresponding to each type of vehicle; determining a maximum probability value among all probability values, and The vehicle model corresponding to the maximum probability value is used as the model of the picture to be tested; specifically, the vehicle is first classified according to the picture to be measured, and then the picture containing the vehicle characteristic information is found according to the second classification result of the vehicle, and the classification and recognition of the vehicle type are performed again.
- the application embodiment can realize the classification and recognition of the fine vehicle type of the vehicle, for example, achieving high-precision vehicle type recognition of up to 92.48%, and at the same time making the recognition process more efficient and stable.
- FIG. 1 is a schematic flow chart of a vehicle identification method based on a convolutional neural network according to an embodiment of the present application
- FIG. 2 is another schematic flowchart of a method provided by an embodiment of the present application.
- FIG. 3 is another schematic flowchart of a method provided by an embodiment of the present application.
- FIG. 4 is another schematic diagram of a method provided by an embodiment of the present application.
- FIG. 5 is a schematic block diagram of a vehicle identification device based on a convolutional neural network according to an embodiment of the present application
- FIG. 6 is another schematic block diagram of an apparatus provided by an embodiment of the present application.
- FIG. 7 is another schematic block diagram of an apparatus provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a vehicle identification device based on a convolutional neural network according to an embodiment of the present application.
- FIG. 1 is a schematic flow chart of a vehicle identification method based on a convolutional neural network according to an embodiment of the present application.
- the method can be run on devices such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices.
- the method of the present application can automatically analyze the input picture to be tested, thereby realizing the classification and recognition of the fine vehicle type of the vehicle, for example, achieving high-precision vehicle identification up to 92.48%, and also making the identification process more efficient and stable.
- the method includes steps S101 to S105.
- the picture to be tested may be a regular picture, or may be a picture obtained by extracting a video key frame from the video data.
- the pre-processed picture to be tested needs to be input into the first preset detection model to perform two classifications, thereby determining whether the picture to be tested contains vehicle feature information.
- the first preset detection model may be a vehicle binary classification model trained based on a deep convolutional neural network and a large number of vehicle related picture data sets.
- step S102 includes steps S201 to S202.
- S201 Input the pre-processed picture to be tested into the first preset detection model to obtain a confidence.
- a corresponding confidence level may be obtained, because the first preset detection model is based on a deep convolutional neural network.
- the training is obtained, so the confidence can be outputted by the connection layer for the two classifications in the deep convolutional neural network.
- the pre-set reliability may be correspondingly set according to actual conditions. For example, when the pre-set reliability is 0.6, if the confidence is less than or equal to 0.6, the picture to be tested is a picture containing vehicle characteristic information. That is, if the confidence level is greater than a preset threshold, the picture to be tested contains vehicle feature information.
- the pre-processed image to be tested is input into the second preset detection model, and the second preset detection model may be based on A model classification model trained by deep convolutional neural networks and a large number of vehicle-related image data sets.
- the probability value of each type of vehicle corresponding to the picture to be tested may be calculated.
- the model in the embodiment of the present application may include information such as a brand name, a manufacturer name, and a model of the vehicle, and is of course not limited to the above information.
- each probability value of the output can be calculated by the second preset detection model. Corresponding to a model.
- the model may include a model as shown in Table 1 below.
- each of the serial numbers 1 to 12 has a probability. If the probability of the model indicated by the serial number 9 is the largest, then the model of the vehicle in the picture to be tested is the brand name Land Rover. The manufacturer is called Land Rover (import), and the model number of the car is the model found in the first generation.
- S105 Determine a maximum probability value among all the probability values, and use a vehicle type corresponding to the maximum probability value as a model of the picture to be tested.
- all the probability values are compared and analyzed to obtain the maximum probability value.
- the model corresponding to the probability value is the model of the picture to be tested.
- the preset picture data includes preset first picture data, and the steps in the vehicle identification method based on the convolutional neural network provided by the embodiment of the present application are provided. Step S301 to S305 are also included before S101:
- the preset first picture data is divided into a first training set and a first verification set.
- the preset first picture data may include a preset image including a picture of the vehicle and a picture not including the vehicle, which may be manually classified and filtered, and the two types of data are used as two scenes, and Input data is provided to the convolutional neural network for learning classification, so that it can be judged Whether the picture is a vehicle two-category model containing a picture of the vehicle.
- the given classification of the picture without the vehicle may be marked as 0, the given classification of the picture containing the vehicle is marked as 1, and the preset picture data marked with the label is assigned as the first ratio of 4:1.
- the training set and the first verification set may include a picture containing the vehicle and a picture not containing the vehicle, and the first verification set may include a picture containing the vehicle and a picture not containing the vehicle.
- the first training set is used for regular training of the convolutional neural network
- the first verification set is used for performing corresponding classification detection on the model obtained by the trained convolutional neural network.
- the The first training set and the first verification set are first subjected to corresponding preprocessing, such as feature enhancement, etc., before the convolutional neural network can be input for training.
- the Convolutional Neural Network is a feedforward neural network, and the artificial neurons can respond to surrounding units in a part of the coverage, and have excellent performance for large image processing.
- Different convolutional neural networks include different hierarchical structures.
- the embodiment of the present application can train the first intermediate model by using the first training set to select the deep convolutional neural network.
- the first convolutional neural network may comprise an eight-layer structure, wherein the first convolutional neural network comprises five convolutional layers, two fully connected layers, and one probability for two classifications Statistical layer.
- the first five layers are convolutional layers for feature extraction and dimensionality reduction, the latter two layers are fully connected layers, and finally the probability and statistics layer for binary classification.
- Each convolutional layer in the first convolutional neural network can filter the input image data into a two-dimensional vector through the convolution kernel, and calculate its parameters separately during the training phase, while the fully connected layer will input and weight the vector.
- the dot multiplication is performed, so that the neurons of the latter layer are all connected with the neurons of the previous layer, all neurons are accelerated by the activation function, and the probability statistical layer is used for judging whether the picture includes vehicle characteristic information.
- the picture in the first verification set is input into the first intermediate model for classification detection to obtain a classification detection result, and when the classification detection result is inconsistent with the preset classification of the picture, the picture is identified as a first A wrong sample.
- the image in which all the classification detection results are inconsistent with the pre-classification of the picture can be classified into the first error set.
- each first error set can be included to One less first error sample.
- the first intermediate model is trained by using the first error set to obtain a new first intermediate model.
- the first intermediate model is trained to obtain a corresponding new first intermediate model, thereby further improving the accuracy of the classification detection of the first intermediate model.
- the first verification set after obtaining the new first intermediate model, the first verification set needs to be used again to perform verification to obtain a new classification detection result, and at the same time, it is determined whether the number of error samples in the first error set at this time is less than The preset threshold, when the number of error samples in the first error set is less than the preset threshold, then it may be determined that the new first intermediate model at this time is the corresponding first preset detection model. And if the number of error samples in the first error set is greater than or equal to the preset threshold, then step S304 may be returned.
- the first layer of the convolution layer is taken as an example, and the image is unified to a size of 227*227, and the convolution kernel size is 11 *11, the step size is 4, the number of convolution kernels is 96, and the size of the feature map after convolution is 55 after the edge is subtracted.
- the feature map is normalized by the ReLu activation function and Norm normalized by the pooling operation.
- the feature map with the size of 27*27*96 is output, and then input into the subsequent convolution layer and the fully connected layer for binary classification.
- the preset picture data further includes preset second picture data, and step S101 in the vehicle identification method based on the convolutional neural network provided by the embodiment of the present application is provided. It may also include steps S401 to S405 before:
- the preset second picture data is divided into a second training set and a second verification set.
- the preset second picture data may include a preset classified picture of the vehicle having various vehicle types, which may be manually classified to filter the corresponding vehicle type, and each picture is used as a scene and used as input data. It is provided to a convolutional neural network for learning classification, so as to obtain a vehicle classification model that can determine the vehicle model in the picture.
- the second training set is used for regular training on the convolutional neural network
- the second verification set is used for the second training set.
- the model obtained by the trained convolutional neural network is classified and detected.
- the second training set and the second verification set may be pre-processed, such as feature enhancement, before inputting. Convolutional neural networks are trained.
- the Convolutional Neural Network is a feedforward neural network, and the artificial neurons can respond to surrounding units in a part of the coverage, and have excellent performance for large image processing.
- Different convolutional neural networks include different hierarchical structures.
- the embodiment of the present application can train the second deep model by using the second deep training convolution neural network.
- the picture in the second verification set is input into the second intermediate model for classification detection to obtain the classification detection result, and when the classification detection result is inconsistent with the preset classification of the picture, the picture is identified as a first Two wrong samples.
- the image in which all the classification detection results are inconsistent with the pre-classification of the picture can be classified as the second error set.
- each second error set can include at least one second error sample.
- the second intermediate model is trained by using the second error set to obtain a new second intermediate model.
- the second intermediate model is trained to obtain a corresponding new second intermediate model, thereby further improving the accuracy of the classification detection of the second intermediate model.
- the intermediate model is a corresponding second preset detection model.
- the second verification set needs to be used again to perform verification to obtain a new classification detection result, and at the same time, it is determined whether the number of error samples in the second error set at this time is smaller than The preset threshold, when the number of error samples in the second error set is less than the preset threshold, then it may be determined that the new second intermediate model at this time is the corresponding second preset detection model. And if If the number of error samples in the second error set is greater than or equal to the preset threshold, then step S404 may be returned.
- the second convolutional neural network may comprise a twenty-layer structure, as shown in Table 2.
- the second convolutional neural network uses a large number of 1*1 convolution kernels to enhance the fitting of nonlinearities for dimensionality reduction, while adding the initial module (Inception), using different scale filters to solve the scale. problem.
- the other layers are similar, except that the number of filters is changed.
- the second convolutional neural network may include three output layers, wherein the structure of the last output layer is optimal, and the story uses the result of the output layer of the last layer as an output. Therefore, by training the hundreds of thousands of vehicle images of the determined vehicle in the second convolutional neural network, it is possible to generate a vehicle classification model that retains the vehicle characteristic parameters.
- the pre-processed picture to be tested is input into the first preset detection model to determine whether the picture to be tested contains vehicle feature information; And collecting the pre-processed picture to be input into the second preset detection model; calculating, by using the second preset detection model, the probability value of the picture to be tested corresponding to each type of vehicle type; determining all probability values The maximum probability value in the middle, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; specifically, the vehicle is first classified according to the picture to be measured, and then the picture containing the vehicle characteristic information is found according to the vehicle classification result.
- the application embodiment can realize the classification and recognition of the fine vehicle type of the vehicle, that is, realize the vehicle identification with high precision of up to 92.48%, and at the same time, make the identification process more efficient and stable.
- the embodiment of the present application further provides a vehicle identification device based on a convolutional neural network, where the device 100 includes: a processing unit 101, a determining unit 102, The input unit 103, the calculation unit 104, and the determination unit 105.
- the processing unit 101 is configured to perform pre-processing on the acquired picture to be tested.
- the determining unit 102 is configured to input the pre-processed picture to be tested into a first preset detection model to determine whether the picture to be tested contains vehicle feature information.
- the input unit 103 is configured to input the pre-processed picture to be tested into the second preset detection model if the picture to be tested contains vehicle feature information.
- the calculating unit 104 is configured to calculate, by using the second preset detection model, a probability value of the picture to be tested corresponding to each type of vehicle type.
- the determining unit 105 is configured to determine a maximum probability value among all the probability values, and use the vehicle type corresponding to the maximum probability value as the vehicle type of the picture to be tested.
- the preset picture data includes preset first picture data
- the apparatus 100 further includes a classification unit 201, a training unit 202, a verification unit 203, an adjustment unit 204, Decision unit 205.
- the classification unit 201 is configured to divide the preset first picture data into a first training set and a first verification set;
- the training unit 202 is configured to train the first convolutional neural network by using the first training set to obtain a corresponding first intermediate model
- the verification unit 203 is configured to verify the first intermediate model by using the first verification set to obtain a corresponding first error set, where the first error set includes at least one first error sample;
- the adjusting unit 204 is configured to: if the number of the first error samples in the first error set is greater than or equal to the first preset threshold, use the first error set to train the first intermediate model to obtain a new first Intermediate model
- the determining unit 205 is configured to verify the new first intermediate model again by using the first verification set until the number of the first error samples in the first error set is less than a preset threshold, and determine that the new time is
- the first intermediate model is a corresponding first preset detection model.
- the preset picture data further includes preset second picture data, wherein the classification unit 201 is further configured to divide the preset second picture data into the second training set and the second verification set.
- the training unit 202 is further configured to train the second convolutional neural network by using the second training set to obtain a corresponding second intermediate model.
- the verification unit 203 is further configured to verify the second intermediate model by using the second verification set to obtain a corresponding second error set, wherein the second error set includes at least one second error sample.
- the adjusting unit 204 is further configured to: if the number of the second error samples in the second error set is greater than or equal to the second preset threshold, use the second error set to train the second intermediate model to obtain a new second Intermediate model.
- the determining unit 205 is further configured to use the second verification set to verify the new second intermediate model again, until the number of the second error samples in the second error set is less than a preset threshold, and determine the current time
- the new second intermediate model is a corresponding second preset detection model.
- the determining unit 102 includes a confidence acquiring unit 301 and a confidence determining unit 302.
- the confidence acquiring unit 301 is configured to input the pre-processed picture to be tested into the first preset detection model to obtain a confidence.
- the confidence determination unit 302 is configured to determine whether the confidence level is greater than a preset threshold.
- the picture to be tested contains vehicle feature information.
- the above-described convolutional neural network based vehicle identification device can be implemented in the form of a computer program that can be run on a device as shown in FIG.
- FIG. 8 is a schematic structural diagram of a vehicle type identification device based on a convolutional neural network according to the present application.
- the device 800 can include an input device 801, an output device 802, a transceiver device 803, a memory 804, and a processor 805, where:
- the input device 801 is configured to receive input data of an external access control device.
- the input device 801 in the embodiment of the present application may include a keyboard, a mouse, a photoelectric input device, a sound input device, a touch input device, a scanner, and the like.
- the output device 802 is configured to output output data of the access control device to the outside.
- the output device 802 described in this embodiment of the present application may include a display, a speaker, a printer, and the like.
- the transceiver device 803 is configured to send data to or receive data from other devices through a communication link.
- the transceiver 803 of the embodiment of the present application may include a transceiver device such as a radio frequency antenna.
- the memory 804 is used to store program data with various functions.
- the memory 804 of the embodiment of the present application includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium can store an operating system and program data.
- the processor 805 can be caused to perform a vehicle type identification method.
- the internal memory provides an environment for the operation of program data in a non-volatile storage medium that, when executed by the processor 805, causes the processor 805 to perform a vehicle type identification method.
- the processor 805 is configured to run a program for realizing vehicle type identification stored in the memory 804, to perform the following operations: pre-processing the acquired image to be tested; and inputting the pre-processed image to be tested into the first preset Detecting a model to determine whether the image to be tested contains vehicle feature information; if the image to be tested contains vehicle feature information, inputting the pre-processed image to be input into a second preset detection model;
- the model calculates that the picture to be tested corresponds to a probability value of each type of vehicle type; determines a maximum probability value among all the probability values, and uses the vehicle type corresponding to the maximum probability value as the model of the picture to be tested.
- the preset picture data includes preset first picture data
- the pre-processing of the obtained picture to be tested includes:
- the preset picture data further includes preset second picture data
- the method further includes: dividing the preset second picture data into a second training set and a second verification set; Two The training set trains the second convolutional neural network to obtain a corresponding second intermediate model; and the second intermediate model is verified by the second verification set to obtain a corresponding second error set, wherein the The second error set includes at least one second error sample; if the number of the second error samples in the second error set is greater than or equal to the second preset threshold, the second intermediate model is trained by using the second error set Obtaining a new second intermediate model; verifying, by the second verification set, the new second intermediate model again, until the number of second error samples in the second error set is less than a preset threshold, and determining The new second intermediate model at this time is the corresponding second preset detection model.
- the first convolutional neural network comprises an eight-layer structure
- the second convolutional neural network comprises a twenty-layer structure, wherein the first convolutional neural network comprises five convolutional layers, two full The connection layer and a probabilistic layer for the two classifications.
- the inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains the vehicle feature information comprises: inputting the pre-processed picture to be input into the first preset detection model Obtaining a confidence level; determining whether the confidence level is greater than a preset threshold; wherein, if the confidence level is greater than a preset threshold, the picture to be tested includes vehicle feature information.
- the embodiment of the convolutional neural network based vehicle type identification device shown in FIG. 8 does not constitute a limitation on the specific configuration of the convolutional neural network based vehicle type identification device.
- the vehicle type identification device of the convolutional neural network may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements.
- the convolutional neural network based vehicle identification device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are consistent with the embodiment shown in FIG. This will not be repeated here.
- the application provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
- the image to be tested is preprocessed; the preprocessed picture to be tested is input into the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information, the preprocessing is performed
- the second picture to be tested is input to the second preset detection model; the probability value of the picture to be tested corresponding to each type of vehicle type is calculated by the second preset detection model; and the maximum probability value among all the probability values is determined, And the model corresponding to the maximum probability value is used as the model of the picture to be tested.
- the preset picture data includes preset first picture data
- the pre-processing of the acquired picture to be tested includes: dividing the preset first picture data into the first training set and a first verification set; training the first convolutional neural network with the first training set to obtain a corresponding first intermediate model; and verifying the first intermediate model by using the first verification set to obtain Corresponding first error set, wherein the first error set includes at least one first error sample; if the number of the first error samples in the first error set is greater than or equal to a first preset threshold, using the first The error set trains the first intermediate model to obtain a new first intermediate model; the new first intermediate model is again verified using the first verification set until the first error sample in the first error set The number is less than the preset threshold, and it is determined that the new first intermediate model at this time is the corresponding first preset detection model.
- the preset picture data further includes preset second picture data
- the method further includes: dividing the preset second picture data into a second training set and a second verification set;
- the second training set trains the second convolutional neural network to obtain a corresponding second intermediate model; and uses the second verification set to verify the second intermediate model to obtain a corresponding second error set, where
- the second error set includes at least one second error sample; if the number of the second error samples in the second error set is greater than or equal to a second preset threshold, training the second intermediate model with the second error set Obtaining a new second intermediate model; verifying the new second intermediate model again by using the second verification set until the number of second error samples in the second error set is less than a preset threshold, and It is determined that the new second intermediate model at this time is the corresponding second preset detection model.
- the first convolutional neural network comprises an eight-layer structure
- the second convolutional neural network comprises a twenty-layer structure, wherein the first convolutional neural network comprises five convolutional layers, two full The connection layer and a probabilistic layer for the two classifications.
- the inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information includes: pre-processing the obtained picture to be tested; Entering a first preset detection model to obtain a confidence level; determining whether the confidence level is greater than a preset threshold; wherein, if the confidence level is greater than a preset threshold, the image to be tested includes vehicle feature information .
- the foregoing storage medium of the present application includes: a magnetic disk, an optical disk, a read-only memory (ROM), and the like, which can store various program codes.
- the units in all the embodiments of the present application may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
- the steps in the method of the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs.
- the units in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
Abstract
Description
本申请要求于2017年9月15日提交中国专利局、申请号为CN 2017108336368、申请名称为“基于卷积神经网络的车型识别方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims to be filed on September 15, 2017 in the Chinese Patent Office, the application number is CN 2017108336368, and the application is entitled "Convolutional Neural Network-Based Vehicle Identification Method, Apparatus, Equipment, and Computer-Readable Storage Media" Priority is hereby incorporated by reference in its entirety.
本申请涉及计算机技术领域,尤其涉及一种基于卷积神经网络的车型识别方法、装置、设备及计算机可读存储介质。The present application relates to the field of computer technology, and in particular, to a vehicle identification method, apparatus, device, and computer readable storage medium based on a convolutional neural network.
汽车车型识别在车辆管理、车辆违规逃逸、车辆巡查布控和事故车损赔付等诸多问题上都起到关键作用,车辆类型具有不易改变的优点,成为车辆辨识中非常重要的特征,而在无牌车、套牌车等情况下,无法通过车牌识别和图像清晰化处理技术获取有效的车辆信息,特别是在车损理赔时,车型对赔付金额影响巨大,车型识别在其他类似交通监控和管制、交通事故责任认定等诸多场景中也起着非常重要的作用。Automobile model identification plays a key role in vehicle management, vehicle violation and escape, vehicle inspection and control, and accidental vehicle loss compensation. The vehicle type has the advantage of being difficult to change, and becomes a very important feature in vehicle identification. In the case of cars and deck cars, it is impossible to obtain effective vehicle information through license plate recognition and image sharpening processing technology, especially in the case of car damage claims, the model has a great influence on the amount of compensation, and the vehicle type identification is similar to other traffic monitoring and control. Traffic accident liability determination and other scenarios also play a very important role.
传统的车型识别方法,往往只能针对不同的任务设计诸如基于尺度不变特征转换(SIFT)等不同的特征,然后利用支持向量机(SVM)或随机森林(Random Forest)等分类器进行训练,但往往只能应用到车辆种类和车牌识别的场景中,对于多达上千种且很多类型非常相似的车型来说,很难人工设计针对性的特征进行识别。另外虽然还有基于多传感器融合的车型识别方法,但是该方法的原理和识别非常简单,存在着对外界环境敏感、故障率较高的缺点。Traditional vehicle identification methods often only design different features such as scale-invariant feature conversion (SIFT) for different tasks, and then use the support vector machine (SVM) or random forest (Random Forest) classifiers for training. However, it can only be applied to the scene of vehicle type and license plate recognition. For thousands of models with many similar types, it is difficult to manually identify the targeted features. In addition, although there is a vehicle identification method based on multi-sensor fusion, the principle and recognition of the method are very simple, and there are disadvantages of being sensitive to the external environment and having a high failure rate.
申请内容Application content
本申请实施例提供一种基于卷积神经网络的车型识别方法、装置、设备及计算机可读存储介质,能够实现高精度的车型识别,同时使得识别过程高效稳定。 The embodiment of the present application provides a vehicle identification method, device, device and computer readable storage medium based on a convolutional neural network, which can realize high-precision vehicle type recognition and make the identification process efficient and stable.
一方面,本申请实施例提供了一种基于卷积神经网络的车型识别方法,该方法包括:In one aspect, an embodiment of the present application provides a vehicle identification method based on a convolutional neural network, the method comprising:
对获取的待测图片进行预处理;将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型;其中,所述第一预设检测模型以及第二预设检测模型分别通过预设的图片数据对卷积神经网络进行相应的训练而获取。Pre-processing the acquired picture to be tested; inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information, The pre-processed picture to be tested is input to a second preset detection model; the second preset detection model is used to calculate a probability value of the picture to be tested corresponding to each type of vehicle type; determining a maximum probability among all probability values a value, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; wherein the first preset detection model and the second preset detection model respectively use a preset picture data to convolutional neural network Get it by training accordingly.
另一方面,本申请实施例还提供了一种基于卷积神经网络的车型识别装置,该装置包括:On the other hand, the embodiment of the present application further provides a vehicle identification device based on a convolutional neural network, the device comprising:
处理单元,用于对获取的待测图片进行预处理;判断单元,用于将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;输入单元,用于若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;计算单元,用于通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定单元,用于确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型;其中,所述第一预设检测模型以及第二预设检测模型分别通过预设的图片数据对卷积神经网络进行相应的训练而获取。a processing unit, configured to: perform pre-processing on the acquired image to be tested; and the determining unit is configured to input the pre-processed image to be tested into the first preset detection model to determine whether the image to be tested includes vehicle feature information; And if the picture to be tested contains the vehicle feature information, the pre-processed picture to be tested is input to the second preset detection model; and the calculating unit is configured to calculate the to-be-waited by the second preset detection model The measured picture corresponds to a probability value of each type of vehicle type; the determining unit is configured to determine a maximum probability value of all the probability values, and the vehicle type corresponding to the maximum probability value is used as the model of the picture to be tested; wherein The first preset detection model and the second preset detection model are respectively acquired by performing corresponding training on the convolutional neural network by using preset image data.
又一方面,本申请实施例还提供了一种基于卷积神经网络的车型识别设备,该设备包括:In another aspect, the embodiment of the present application further provides a vehicle identification device based on a convolutional neural network, the device comprising:
存储器,用于存储实现车型识别的程序;以及处理器,用于运行所述存储器中存储的实现车型识别的程序,以执行以下操作:a memory for storing a program for realizing vehicle type recognition; and a processor for running a program for realizing vehicle type identification stored in the memory to perform the following operations:
对获取的待测图片进行预处理;将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型;其中,所述第一预设检测模型以及第二预设检测模型分别通过预设的图片数据对卷积神经网络进行相应的训练而获取。 Pre-processing the acquired picture to be tested; inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information, The pre-processed picture to be tested is input to a second preset detection model; the second preset detection model is used to calculate a probability value of the picture to be tested corresponding to each type of vehicle type; determining a maximum probability among all probability values a value, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; wherein the first preset detection model and the second preset detection model respectively use a preset picture data to convolutional neural network Get it by training accordingly.
再一方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:In still another aspect, an embodiment of the present application further provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors Execute to implement the following steps:
对获取的待测图片进行预处理;将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型;其中,所述第一预设检测模型以及第二预设检测模型分别通过预设的图片数据对卷积神经网络进行相应的训练而获取。Pre-processing the acquired picture to be tested; inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information, The pre-processed picture to be tested is input to a second preset detection model; the second preset detection model is used to calculate a probability value of the picture to be tested corresponding to each type of vehicle type; determining a maximum probability among all probability values a value, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; wherein the first preset detection model and the second preset detection model respectively use a preset picture data to convolutional neural network Get it by training accordingly.
本申请实施例通过将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型;具体的是先对待测图片进行车辆二分类,再根据车辆二分类结果找到含有车辆特征信息的图片,并再次进行车型的分类识别,从而使得该申请实施例能够实现对车辆的精细车型的分类识别,例如实现高达92.48%的高精度的车型识别,同时也能够使得识别过程更为高效稳定。The embodiment of the present application determines whether the picture to be tested contains vehicle feature information by inputting the pre-processed picture to be tested into a first preset detection model; if the picture to be tested contains vehicle feature information, the pre-processed to-be-processed Inputting a second preset detection model; calculating, by the second preset detection model, a probability value of the picture to be tested corresponding to each type of vehicle; determining a maximum probability value among all probability values, and The vehicle model corresponding to the maximum probability value is used as the model of the picture to be tested; specifically, the vehicle is first classified according to the picture to be measured, and then the picture containing the vehicle characteristic information is found according to the second classification result of the vehicle, and the classification and recognition of the vehicle type are performed again. Thereby, the application embodiment can realize the classification and recognition of the fine vehicle type of the vehicle, for example, achieving high-precision vehicle type recognition of up to 92.48%, and at the same time making the recognition process more efficient and stable.
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are some embodiments of the present application. For the ordinary technicians, other drawings can be obtained based on these drawings without paying creative labor.
图1是本申请实施例提供的基于卷积神经网络的车型识别方法的示意流程图;1 is a schematic flow chart of a vehicle identification method based on a convolutional neural network according to an embodiment of the present application;
图2是本申请实施例提供的方法的另一示意流程图;2 is another schematic flowchart of a method provided by an embodiment of the present application;
图3是本申请实施例提供的方法的另一示意流程图;FIG. 3 is another schematic flowchart of a method provided by an embodiment of the present application;
图4是本申请实施例提供的方法的另一演示示意图; 4 is another schematic diagram of a method provided by an embodiment of the present application;
图5是本申请实施例提供的基于卷积神经网络的车型识别装置的示意性框图;FIG. 5 is a schematic block diagram of a vehicle identification device based on a convolutional neural network according to an embodiment of the present application; FIG.
图6是本申请实施例提供的装置的另一示意性框图;6 is another schematic block diagram of an apparatus provided by an embodiment of the present application;
图7是本申请实施例提供的装置的另一示意性框图;FIG. 7 is another schematic block diagram of an apparatus provided by an embodiment of the present application;
图8是本申请实施例提供的基于卷积神经网络的车型识别设备的结构组成示意图。FIG. 8 is a schematic structural diagram of a vehicle identification device based on a convolutional neural network according to an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。The use of the terms "comprising", "comprising", "","," The presence or addition of a plurality of other features, integers, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。The terminology used herein is for the purpose of describing particular embodiments and is not intended to be limiting. As used in the specification and the appended claims, the claims
请参阅图1,图1是本申请实施例提供的一种基于卷积神经网络的车型识别方法的示意流程图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等设备中。本申请的方法可以自动分析输入的待测图片,从而实现对车辆的精细车型的分类识别,例如实现高达92.48%的高精度的车型识别,同时也能够使得识别过程更为高效稳定。如图1所示,该方法包括步骤S101~S105。Please refer to FIG. 1. FIG. 1 is a schematic flow chart of a vehicle identification method based on a convolutional neural network according to an embodiment of the present application. The method can be run on devices such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices. The method of the present application can automatically analyze the input picture to be tested, thereby realizing the classification and recognition of the fine vehicle type of the vehicle, for example, achieving high-precision vehicle identification up to 92.48%, and also making the identification process more efficient and stable. As shown in FIG. 1, the method includes steps S101 to S105.
S101对获取的待测图片进行预处理。S101 preprocesses the obtained picture to be tested.
在本申请实施例中,获取待测图片后,需要对其进行一定的处理。待测图片可以是常规的图片,也可以是从视频数据中提取视频关键帧从而得到的图片。为了提高分类检测的准确性,需要对待测图片进行相应的处理。尤其是,需要对待测图片进行特征强化,即统一化到227*227大小后的图像。 In the embodiment of the present application, after obtaining the picture to be tested, it is required to perform certain processing on it. The picture to be tested may be a regular picture, or may be a picture obtained by extracting a video key frame from the video data. In order to improve the accuracy of the classification detection, it is necessary to perform corresponding processing on the picture to be tested. In particular, it is necessary to perform feature enhancement on the picture to be measured, that is, to unify the image to a size of 227*227.
S102,将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息。S102. Input the pre-processed picture to be tested into the first preset detection model to determine whether the picture to be tested contains vehicle feature information.
在本申请实施例中,需要将预处理后的待测图片输入第一预设检测模型进行二分类,从而判定所述待测图片是否含有车辆特征信息。其中,第一预设检测模型可以是一个基于深度卷积神经网路和大量车辆相关图片数据集训练出来的车辆二分类模型。In the embodiment of the present application, the pre-processed picture to be tested needs to be input into the first preset detection model to perform two classifications, thereby determining whether the picture to be tested contains vehicle feature information. The first preset detection model may be a vehicle binary classification model trained based on a deep convolutional neural network and a large number of vehicle related picture data sets.
具体的,如图2所示,作为优选的实施例,步骤S102包括步骤S201~S202,Specifically, as shown in FIG. 2, as a preferred embodiment, step S102 includes steps S201 to S202.
S201,将预处理后的待测图片输入第一预设检测模型以得到一置信度。S201: Input the pre-processed picture to be tested into the first preset detection model to obtain a confidence.
在本申请实施例中,将已进行预处理的待测图片输入第一预设检测模型后,可以得到一个相应的置信度,因所述第一预设检测模型是基于深度卷积神经网络而训练得到的,故该置信度可以由该深度卷积神经网络中的用于二分类的连接层作为输出。In the embodiment of the present application, after the pre-processed picture to be tested is input into the first preset detection model, a corresponding confidence level may be obtained, because the first preset detection model is based on a deep convolutional neural network. The training is obtained, so the confidence can be outputted by the connection layer for the two classifications in the deep convolutional neural network.
S202,判断所述置信度是否大于预设临界值。S202. Determine whether the confidence level is greater than a preset threshold.
在本申请实施例中,该置信度如果不大于预设置信度,那么可知,该待测图片不含有车辆特征信息,那么也即图片不含有车辆,不需要进行后续的车型识别。其中,所述预设置信度可以根据实际情况进行相应的设定。比如,当预设置信度为0.6时,如果所述置信度小于或等于0.6,那么该待测图片为含有车辆特征信息的图片。即,其中,若所述置信度大于预设临界值,所述待测图片含有车辆特征信息。In the embodiment of the present application, if the confidence is not greater than the pre-set reliability, it can be known that the picture to be tested does not contain the vehicle feature information, that is, the picture does not contain the vehicle, and subsequent vehicle type identification is not required. The pre-set reliability may be correspondingly set according to actual conditions. For example, when the pre-set reliability is 0.6, if the confidence is less than or equal to 0.6, the picture to be tested is a picture containing vehicle characteristic information. That is, if the confidence level is greater than a preset threshold, the picture to be tested contains vehicle feature information.
S103,若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型。S103. If the picture to be tested contains vehicle feature information, input the pre-processed picture to be input into the second preset detection model.
其中,在本申请实施例中,当所述待测图片含有车辆特征信息时,要将预处理后的待测图片输入第二预设检测模型,所述第二预设检测模型可以是一个基于深度卷积神经网路和大量车辆相关图片数据集训练出来的车型分类模型。In the embodiment of the present application, when the image to be tested includes the vehicle feature information, the pre-processed image to be tested is input into the second preset detection model, and the second preset detection model may be based on A model classification model trained by deep convolutional neural networks and a large number of vehicle-related image data sets.
S104,通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值。S104. Calculate, by using the second preset detection model, a probability value of the picture to be tested corresponding to each type of vehicle type.
在本申请实施例中,所述进行处理后的待测图片输入所述第二预设检测模型后可以计算得出所述待测图片对应的每一类车型的概率值。其中,本申请实施例中的车型可以包括品牌名、厂商名以及车系型号等信息,当然也不仅限于上述信息。一般情况下,可以通过第二预设检测模型计算输出的每个概率值均 对应一个车型。In the embodiment of the present application, after the processed picture to be tested is input to the second preset detection model, the probability value of each type of vehicle corresponding to the picture to be tested may be calculated. The model in the embodiment of the present application may include information such as a brand name, a manufacturer name, and a model of the vehicle, and is of course not limited to the above information. In general, each probability value of the output can be calculated by the second preset detection model. Corresponding to a model.
例如,所述车型可以包括如下面表1所示的车型,For example, the model may include a model as shown in Table 1 below.
表1Table 1
其中,序号1到序号12中的每一个车型都对应有一个概率,假若序号9所表示的车型对应的概率最大,那么此时所述待测图片中的车辆的车型即为品牌名为路虎,厂商名为路虎(进口),车系型号为第一代发现的型号。Among them, each of the serial numbers 1 to 12 has a probability. If the probability of the model indicated by the serial number 9 is the largest, then the model of the vehicle in the picture to be tested is the brand name Land Rover. The manufacturer is called Land Rover (import), and the model number of the car is the model found in the first generation.
S105,确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型。S105. Determine a maximum probability value among all the probability values, and use a vehicle type corresponding to the maximum probability value as a model of the picture to be tested.
在本申请实施例中,对所有的概率值进行对比分析,从而获取最大概率值,此时,该概率值所对应有的车型即为所述待测图片的车型。In the embodiment of the present application, all the probability values are compared and analyzed to obtain the maximum probability value. At this time, the model corresponding to the probability value is the model of the picture to be tested.
另外,作为优选的实施例,如图3所示,所述预设的图片数据包括预设的第一图片数据,本申请实施例提供的一种基于卷积神经网络的车型识别方法中的步骤S101之前还包括步骤S301~S305:In addition, as a preferred embodiment, as shown in FIG. 3, the preset picture data includes preset first picture data, and the steps in the vehicle identification method based on the convolutional neural network provided by the embodiment of the present application are provided. Step S301 to S305 are also included before S101:
S301,将预设的第一图片数据分为第一训练集以及第一验证集。S301. The preset first picture data is divided into a first training set and a first verification set.
在本申请实施例中,预设的第一图片数据可以包括预设分类的包括车辆的图片和不包括车辆的图片,其可由人工进行分类筛选,将这两类数据作为两个场景,并作为输入数据提供给卷积神经网络进行学习分类,从而得到可以判断 图片是否为含有车辆的图片的车辆二分类模型。In the embodiment of the present application, the preset first picture data may include a preset image including a picture of the vehicle and a picture not including the vehicle, which may be manually classified and filtered, and the two types of data are used as two scenes, and Input data is provided to the convolutional neural network for learning classification, so that it can be judged Whether the picture is a vehicle two-category model containing a picture of the vehicle.
具体的,可以对不含有车辆的图片给定分类标注为0,对含有车辆的图片给定分类标注为1,再对已进行标注的预设的图片数据按4:1的比例分配为第一训练集以及第一验证集,第一训练集中可以包括含有车辆的图片和不含有车辆的图片,第一验证集中可以包括含有车辆的图片和不含有车辆的图片。Specifically, the given classification of the picture without the vehicle may be marked as 0, the given classification of the picture containing the vehicle is marked as 1, and the preset picture data marked with the label is assigned as the first ratio of 4:1. The training set and the first verification set may include a picture containing the vehicle and a picture not containing the vehicle, and the first verification set may include a picture containing the vehicle and a picture not containing the vehicle.
其中,第一训练集用于对卷积神经网络进行常规训练,而第一验证集用于对训练后的卷积神经网络得到的模型进行相应的分类检测,为了提高识别的准确度,可以对第一训练集和第一验证集先进行相应的预处理,比如特征强化等,然后才能输入卷积神经网络进行训练。The first training set is used for regular training of the convolutional neural network, and the first verification set is used for performing corresponding classification detection on the model obtained by the trained convolutional neural network. In order to improve the accuracy of the identification, the The first training set and the first verification set are first subjected to corresponding preprocessing, such as feature enhancement, etc., before the convolutional neural network can be input for training.
S302,利用所述第一训练集对第一卷积神经网络进行训练,以得到对应的第一中间模型。S302. Train the first convolutional neural network by using the first training set to obtain a corresponding first intermediate model.
在本申请实施例中,卷积神经网络(Convolutional Neural Network,CNN)是一种前馈神经网络,它的人工神经元可以响应一部分覆盖范围内的周围单元,对于大型图像处理有出色表现。不同的卷积神经网络包括不同的分层结构。具体的,本申请实施例可以通过第一训练集对选用的深度卷积神经网路来训练得到第一中间模型。In the embodiment of the present application, the Convolutional Neural Network (CNN) is a feedforward neural network, and the artificial neurons can respond to surrounding units in a part of the coverage, and have excellent performance for large image processing. Different convolutional neural networks include different hierarchical structures. Specifically, the embodiment of the present application can train the first intermediate model by using the first training set to select the deep convolutional neural network.
作为优选的实施例,所述第一卷积神经网络可以包括八层结构,其中,所述第一卷积神经网络包括五个卷积层、两个全连接层以及一个用于二分类的概率统计层。其中前五层为卷积层,用于进行特征提取和降维,后两层为全连接层,最后为用于二分类的概率统计层。第一卷积神经网络中的每层卷积层可以通过卷积核将输入的图片数据过滤为二维向量,在训练阶段对其参数进行单独计算,而全连接层将输入和带权重的向量进行点乘,因此后一层的神经元与前一层的神经元全部连接起来,所有神经元都通过激活函数进行学习加速,而概率统计层用于进行图片是否包括车辆特征信息的判断。As a preferred embodiment, the first convolutional neural network may comprise an eight-layer structure, wherein the first convolutional neural network comprises five convolutional layers, two fully connected layers, and one probability for two classifications Statistical layer. The first five layers are convolutional layers for feature extraction and dimensionality reduction, the latter two layers are fully connected layers, and finally the probability and statistics layer for binary classification. Each convolutional layer in the first convolutional neural network can filter the input image data into a two-dimensional vector through the convolution kernel, and calculate its parameters separately during the training phase, while the fully connected layer will input and weight the vector. The dot multiplication is performed, so that the neurons of the latter layer are all connected with the neurons of the previous layer, all neurons are accelerated by the activation function, and the probability statistical layer is used for judging whether the picture includes vehicle characteristic information.
S303,利用所述第一验证集对所述第一中间模型进行验证,以得到对应的第一错误集,其中所述第一错误集包括至少一个第一错误样本。S303. Verify the first intermediate model by using the first verification set to obtain a corresponding first error set, where the first error set includes at least one first error sample.
在本申请实施例中,将第一验证集中的图片输入第一中间模型中进行分类检测以得到分类检测结果,当分类检测结果与该图片的预设分类不一致时,将该图片认定为一个第一错误样本。具体可以将所有分类检测结果与图片的预分类不一致的图片归类为第一错误集。综上可知,每个第一错误集均可以包括至 少一个第一错误样本。In the embodiment of the present application, the picture in the first verification set is input into the first intermediate model for classification detection to obtain a classification detection result, and when the classification detection result is inconsistent with the preset classification of the picture, the picture is identified as a first A wrong sample. Specifically, the image in which all the classification detection results are inconsistent with the pre-classification of the picture can be classified into the first error set. In summary, each first error set can be included to One less first error sample.
S304,若所述第一错误集中第一错误样本的数量大于或等于第一预设阀值,利用所述第一错误集训练所述第一中间模型以得到一个新的第一中间模型。S304. If the number of the first error samples in the first error set is greater than or equal to the first preset threshold, the first intermediate model is trained by using the first error set to obtain a new first intermediate model.
在本申请实施例中,如果第一错误集中错误样本的数量大于或等于预设阈值,则表明此时分类检测的结果的错误率在不可接受的范围内,此时需要利用所述第一错误集训练所述第一中间模型以得到一个对应的新的第一中间模型,从而进一步提高第一中间模型的分类检测的准确度。In the embodiment of the present application, if the number of the first error concentration error samples is greater than or equal to the preset threshold, it indicates that the error rate of the result of the classification detection is within an unacceptable range, and the first error needs to be utilized. The first intermediate model is trained to obtain a corresponding new first intermediate model, thereby further improving the accuracy of the classification detection of the first intermediate model.
S305,利用所述第一验证集对所述新的第一中间模型再次进行验证,直至所述第一错误集中第一错误样本的数量小于预设阀值,并判定此时的新的第一中间模型为对应的第一预设检测模型。S305. Verify the new first intermediate model again by using the first verification set, until the number of the first error samples in the first error set is less than a preset threshold, and determine a new first at this time. The intermediate model is the corresponding first preset detection model.
在本申请实施例中,得到新的第一中间模型后,需要再利用第一验证集再次进行验证以得到新的分类检测结果,同时判断此时的第一错误集中的错误样本的数量是否小于预设阀值,当第一错误集中的错误样本的数量小于预设阀值,那么则可以判定此时的新的第一中间模型为对应的第一预设检测模型。而如果第一错误集中的错误样本的数量大于预或等于预设阀值,那么则可以返回步骤S304。In the embodiment of the present application, after obtaining the new first intermediate model, the first verification set needs to be used again to perform verification to obtain a new classification detection result, and at the same time, it is determined whether the number of error samples in the first error set at this time is less than The preset threshold, when the number of error samples in the first error set is less than the preset threshold, then it may be determined that the new first intermediate model at this time is the corresponding first preset detection model. And if the number of error samples in the first error set is greater than or equal to the preset threshold, then step S304 may be returned.
故通过第一预设检测模型对处理后的待测图片进行二分类的时候,以通过第一层卷积层为例,输入统一化到227*227大小后的图片,卷积核大小为11*11,步长为4,卷积核个数为96,卷积后的特征图减去边缘后大小为55,特征图经过ReLu激活函数、Norm归一化后通过池化操作降维,最终输出大小为27*27*96的特征图,然后再输入后续的卷积层以及全连接层中以进行二分类。Therefore, when the processed image to be tested is classified into two by the first preset detection model, the first layer of the convolution layer is taken as an example, and the image is unified to a size of 227*227, and the convolution kernel size is 11 *11, the step size is 4, the number of convolution kernels is 96, and the size of the feature map after convolution is 55 after the edge is subtracted. The feature map is normalized by the ReLu activation function and Norm normalized by the pooling operation. The feature map with the size of 27*27*96 is output, and then input into the subsequent convolution layer and the fully connected layer for binary classification.
作为优选的实施例,如图4所示,所述预设的图片数据还包括预设的第二图片数据,本申请实施例提供的一种基于卷积神经网络的车型识别方法中的步骤S101之前还可以包括步骤S401~S405:As a preferred embodiment, as shown in FIG. 4, the preset picture data further includes preset second picture data, and step S101 in the vehicle identification method based on the convolutional neural network provided by the embodiment of the present application is provided. It may also include steps S401 to S405 before:
S401,将预设的第二图片数据分为第二训练集以及第二验证集。S401. The preset second picture data is divided into a second training set and a second verification set.
在本申请实施例中,预设的第二图片数据可以包括预设分类的具有各种车型的车辆的图片,其可由人工进行分类筛选对应车型,将每张图片作为一个场景,并作为输入数据提供给一个卷积神经网络进行学习分类,从而得到可以判断图片中的车辆车型的车型分类模型。In the embodiment of the present application, the preset second picture data may include a preset classified picture of the vehicle having various vehicle types, which may be manually classified to filter the corresponding vehicle type, and each picture is used as a scene and used as input data. It is provided to a convolutional neural network for learning classification, so as to obtain a vehicle classification model that can determine the vehicle model in the picture.
其中,第二训练集用于对卷积神经网络进行常规训练,而第二验证集用于 对训练后的卷积神经网络得到的模型进行相应的分类检测,为了提高识别的准确度,可以对第二训练集和第二验证集先进行相应的预处理,比如特征强化等,然后才能输入卷积神经网络进行训练。Wherein, the second training set is used for regular training on the convolutional neural network, and the second verification set is used for the second training set. The model obtained by the trained convolutional neural network is classified and detected. In order to improve the accuracy of the recognition, the second training set and the second verification set may be pre-processed, such as feature enhancement, before inputting. Convolutional neural networks are trained.
S402,利用所述第二训练集对第二卷积神经网络进行训练,以得到对应的第二中间模型。S402. Train the second convolutional neural network by using the second training set to obtain a corresponding second intermediate model.
在本申请实施例中,卷积神经网络(Convolutional Neural Network,CNN)是一种前馈神经网络,它的人工神经元可以响应一部分覆盖范围内的周围单元,对于大型图像处理有出色表现。不同的卷积神经网络包括不同的分层结构。具体的,本申请实施例可以通过第二训练集对选用的深度卷积神经网路来训练得到第二中间模型。In the embodiment of the present application, the Convolutional Neural Network (CNN) is a feedforward neural network, and the artificial neurons can respond to surrounding units in a part of the coverage, and have excellent performance for large image processing. Different convolutional neural networks include different hierarchical structures. Specifically, the embodiment of the present application can train the second deep model by using the second deep training convolution neural network.
S403,利用所述第二验证集对所述第二中间模型进行验证,以得到对应的第二错误集,其中所述第二错误集包括至少一个第二错误样本。S403. Verify the second intermediate model by using the second verification set to obtain a corresponding second error set, where the second error set includes at least one second error sample.
在本申请实施例中,将第二验证集中的图片输入第二中间模型中进行分类检测以得到分类检测结果,当分类检测结果与该图片的预设分类不一致时,将该图片认定为一个第二错误样本。具体可以将所有分类检测结果与图片的预分类不一致的图片归类为第二错误集。综上可知,每个第二错误集均可以包括至少一个第二错误样本。In the embodiment of the present application, the picture in the second verification set is input into the second intermediate model for classification detection to obtain the classification detection result, and when the classification detection result is inconsistent with the preset classification of the picture, the picture is identified as a first Two wrong samples. Specifically, the image in which all the classification detection results are inconsistent with the pre-classification of the picture can be classified as the second error set. In summary, each second error set can include at least one second error sample.
S404,若所述第二错误集中第二错误样本的数量大于或等于第二预设阀值,利用所述第二错误集训练所述第二中间模型以得到一个新的第二中间模型。S404. If the number of the second error samples in the second error set is greater than or equal to the second preset threshold, the second intermediate model is trained by using the second error set to obtain a new second intermediate model.
在本申请实施例中,如果第二错误集中错误样本的数量大于或等于预设阈值,则表明此时分类检测的结果的错误率在不可接受的范围内,此时需要利用所述第二错误集训练所述第二中间模型以得到一个对应的新的第二中间模型,从而进一步提高第二中间模型的分类检测的准确度。In the embodiment of the present application, if the number of the second error concentration error samples is greater than or equal to the preset threshold, it indicates that the error rate of the result of the classification detection is within an unacceptable range, and the second error needs to be utilized. The second intermediate model is trained to obtain a corresponding new second intermediate model, thereby further improving the accuracy of the classification detection of the second intermediate model.
S405,利用所述第二验证集对所述新的第二中间模型再次进行验证,直至所述第二错误集中第二错误样本的数量小于预设阀值,并判定此时的新的第二中间模型为对应的第二预设检测模型。S405. Verify the new second intermediate model again by using the second verification set, until the number of second error samples in the second error set is less than a preset threshold, and determine a new second at this time. The intermediate model is a corresponding second preset detection model.
在本申请实施例中,得到新的第二中间模型后,需要再利用第二验证集再次进行验证以得到新的分类检测结果,同时判断此时的第二错误集中的错误样本的数量是否小于预设阀值,当第二错误集中的错误样本的数量小于预设阀值,那么则可以判定此时的新的第二中间模型为对应的第二预设检测模型。而如果 第二错误集中的错误样本的数量大于预或等于预设阀值,那么则可以返回步骤S404。In the embodiment of the present application, after obtaining the new second intermediate model, the second verification set needs to be used again to perform verification to obtain a new classification detection result, and at the same time, it is determined whether the number of error samples in the second error set at this time is smaller than The preset threshold, when the number of error samples in the second error set is less than the preset threshold, then it may be determined that the new second intermediate model at this time is the corresponding second preset detection model. And if If the number of error samples in the second error set is greater than or equal to the preset threshold, then step S404 may be returned.
其中,第二卷积神经网路可以包括二十层结构,如表2所示。Wherein, the second convolutional neural network may comprise a twenty-layer structure, as shown in Table 2.
表2Table 2
该第二卷积神经网络使用了大量的1*1的卷积核,增强了对非线性的拟合用于降维,同时加入了初始模块(Inception),使用不同尺度的滤波器来解决尺度问题。同时其余各层都是类似,只是对滤波器的个数做了改动。另外,该第二卷积神经网络可以包括三个输出层,其中最后一个输出层的结构最优,故事利用最后一层的输出层得出的结果作为输出。故通过对该第二卷积神经网络对数十万张确定车型的车辆图片进行训练,可以生成保有车型特征参数的车型分类模型。The second convolutional neural network uses a large number of 1*1 convolution kernels to enhance the fitting of nonlinearities for dimensionality reduction, while adding the initial module (Inception), using different scale filters to solve the scale. problem. At the same time, the other layers are similar, except that the number of filters is changed. In addition, the second convolutional neural network may include three output layers, wherein the structure of the last output layer is optimal, and the story uses the result of the output layer of the last layer as an output. Therefore, by training the hundreds of thousands of vehicle images of the determined vehicle in the second convolutional neural network, it is possible to generate a vehicle classification model that retains the vehicle characteristic parameters.
由以上可见,本申请实施例通过将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特 征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型;具体的是先对待测图片进行车辆二分类,再根据车辆二分类结果找到含有车辆特征信息的图片,并再次进行车型的分类识别,从而使得该申请实施例能够实现对车辆的精细车型的分类识别,即实现高达92.48%的高精度的车型识别,同时也能够使得识别过程更为高效稳定。It can be seen that, in the embodiment of the present application, the pre-processed picture to be tested is input into the first preset detection model to determine whether the picture to be tested contains vehicle feature information; And collecting the pre-processed picture to be input into the second preset detection model; calculating, by using the second preset detection model, the probability value of the picture to be tested corresponding to each type of vehicle type; determining all probability values The maximum probability value in the middle, and the vehicle corresponding to the maximum probability value is used as the model of the picture to be tested; specifically, the vehicle is first classified according to the picture to be measured, and then the picture containing the vehicle characteristic information is found according to the vehicle classification result. And the classification identification of the vehicle model is performed again, so that the application embodiment can realize the classification and recognition of the fine vehicle type of the vehicle, that is, realize the vehicle identification with high precision of up to 92.48%, and at the same time, make the identification process more efficient and stable.
请参阅图5,对应上述一种基于卷积神经网络的车型识别方法,本申请实施例还提出一种基于卷积神经网络的车型识别装置,该装置100包括:处理单元101、判断单元102、输入单元103、计算单元104、确定单元105。Referring to FIG. 5 , corresponding to the above-described method for identifying a vehicle type based on a convolutional neural network, the embodiment of the present application further provides a vehicle identification device based on a convolutional neural network, where the
其中,所述处理单元101,用于对获取的待测图片进行预处理。The
所述判断单元102用于将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息。The determining
输入单元103用于若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型。The
计算单元104用于通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值。The calculating
确定单元105用于确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型。The determining
如图6所示,作为优选的实施例,所述预设的图片数据包括预设的第一图片数据,所述装置100还包括分类单元201、训练单元202、验证单元203、调整单元204、判定单元205。As shown in FIG. 6 , as a preferred embodiment, the preset picture data includes preset first picture data, and the
其中,分类单元201用于将预设的第一图片数据分为第一训练集以及第一验证集;The
训练单元202用于利用所述第一训练集对第一卷积神经网络进行训练,以得到对应的第一中间模型;The
验证单元203用于利用所述第一验证集对所述第一中间模型进行验证,以得到对应的第一错误集,其中所述第一错误集包括至少一个第一错误样本;The
调整单元204用于若所述第一错误集中第一错误样本的数量大于或等于第一预设阀值,利用所述第一错误集训练所述第一中间模型以得到一个新的第一
中间模型;The adjusting
判定单元205用于利用所述第一验证集对所述新的第一中间模型再次进行验证,直至所述第一错误集中第一错误样本的数量小于预设阀值,并判定此时的新的第一中间模型为对应的第一预设检测模型。The determining
作为优选的,所述预设的图片数据还包括预设的第二图片数据,其中分类单元201还用于将预设的第二图片数据分为第二训练集以及第二验证集。Preferably, the preset picture data further includes preset second picture data, wherein the
训练单元202还用于利用所述第二训练集对第二卷积神经网络进行训练,以得到对应的第二中间模型。The
验证单元203还用于利用所述第二验证集对所述第二中间模型进行验证,以得到对应的第二错误集,其中所述第二错误集包括至少一个第二错误样本。The
调整单元204还用于若所述第二错误集中第二错误样本的数量大于或等于第二预设阀值,利用所述第二错误集训练所述第二中间模型以得到一个新的第二中间模型。The adjusting
判定单元205还用于利用所述第二验证集对所述新的第二中间模型再次进行验证,直至所述第二错误集中第二错误样本的数量小于预设阀值,并判定此时的新的第二中间模型为对应的第二预设检测模型。The determining
如图7所示,所述判断单元102,包括置信度获取单元301、置信度判断单元302。As shown in FIG. 7, the determining
其中,置信度获取单元301用于将预处理后的待测图片输入第一预设检测模型以得到一置信度。The
置信度判断单元302用于判断所述置信度是否大于预设临界值。The
其中,若所述置信度大于预设临界值,所述待测图片含有车辆特征信息。Wherein, if the confidence level is greater than a preset threshold, the picture to be tested contains vehicle feature information.
上述基于卷积神经网络的车型识别装置可以实现为一种计算机程序的形式,该计算机程序可以在如图8所示的设备上运行。The above-described convolutional neural network based vehicle identification device can be implemented in the form of a computer program that can be run on a device as shown in FIG.
图8为本申请一种基于卷积神经网络的车型识别设备的结构组成示意图。如图8所示,该设备800可包括:输入装置801、输出装置802、收发装置803、存储器804以及处理器805,其中:FIG. 8 is a schematic structural diagram of a vehicle type identification device based on a convolutional neural network according to the present application. As shown in FIG. 8, the
所述输入装置801,用于接收外部访问控制设备的输入数据。具体实现中,本申请实施例所述的输入装置801可包括键盘、鼠标、光电输入装置、声音输入装置、触摸式输入装置、扫描仪等。
The
所述输出装置802,用于对外输出访问控制设备的输出数据。具体实现中,本申请实施例所述的输出装置802可包括显示器、扬声器、打印机等。The
所述收发装置803,用于通过通信链路向其他设备发送数据或者从其他设备接收数据。具体实现中,本申请实施例的收发装置803可包括射频天线等收发器件。The
存储器804用于存储带有各种功能的程序数据。具体实现中,本申请实施例的存储器804包括非易失性存储介质以及内存储器。其中,该非易失性存储介质可存储操作系统和程序数据。该程序数据被执行时,可使得处理器805执行一种车型识别方法。该内存储器为非易失性存储介质中的程序数据的运行提供环境,该程序数据被处理器805执行时,可使得处理器805执行一种车型识别方法。The
所述处理器805,用于运行所述存储器804中存储的实现车型识别的程序,以执行如下操作:对获取的待测图片进行预处理;将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型。The
进一步地,所述预设的图片数据包括预设的第一图片数据,所述对获取的待测图片进行预处理之前,包括:Further, the preset picture data includes preset first picture data, and the pre-processing of the obtained picture to be tested includes:
将预设的第一图片数据分为第一训练集以及第一验证集;利用所述第一训练集对第一卷积神经网络进行训练,以得到对应的第一中间模型;利用所述第一验证集对所述第一中间模型进行验证,以得到对应的第一错误集,其中所述第一错误集包括至少一个第一错误样本;若所述第一错误集中第一错误样本的数量大于或等于第一预设阀值,利用所述第一错误集训练所述第一中间模型以得到一个新的第一中间模型;利用所述第一验证集对所述新的第一中间模型再次进行验证,直至所述第一错误集中第一错误样本的数量小于预设阀值,并判定此时的新的第一中间模型为对应的第一预设检测模型。Dividing the preset first picture data into a first training set and a first verification set; training the first convolutional neural network by using the first training set to obtain a corresponding first intermediate model; Verifying, by the verification set, the first intermediate model to obtain a corresponding first error set, wherein the first error set includes at least one first error sample; and if the first error set is the number of first error samples Greater than or equal to the first preset threshold, training the first intermediate model with the first error set to obtain a new first intermediate model; using the first verification set to the new first intermediate model The verification is performed again until the number of the first error samples in the first error set is less than the preset threshold, and it is determined that the new first intermediate model at this time is the corresponding first preset detection model.
进一步地,所述预设的图片数据还包括预设的第二图片数据,所述方法还包括:将预设的第二图片数据分为第二训练集以及第二验证集;利用所述第二 训练集对第二卷积神经网络进行训练,以得到对应的第二中间模型;利用所述第二验证集对所述第二中间模型进行验证,以得到对应的第二错误集,其中所述第二错误集包括至少一个第二错误样本;若所述第二错误集中第二错误样本的数量大于或等于第二预设阀值,利用所述第二错误集训练所述第二中间模型以得到一个新的第二中间模型;利用所述第二验证集对所述新的第二中间模型再次进行验证,直至所述第二错误集中第二错误样本的数量小于预设阀值,并判定此时的新的第二中间模型为对应的第二预设检测模型。Further, the preset picture data further includes preset second picture data, the method further includes: dividing the preset second picture data into a second training set and a second verification set; Two The training set trains the second convolutional neural network to obtain a corresponding second intermediate model; and the second intermediate model is verified by the second verification set to obtain a corresponding second error set, wherein the The second error set includes at least one second error sample; if the number of the second error samples in the second error set is greater than or equal to the second preset threshold, the second intermediate model is trained by using the second error set Obtaining a new second intermediate model; verifying, by the second verification set, the new second intermediate model again, until the number of second error samples in the second error set is less than a preset threshold, and determining The new second intermediate model at this time is the corresponding second preset detection model.
进一步地,所述第一卷积神经网络包括八层结构,所述第二卷积神经网络包括二十层结构,其中,所述第一卷积神经网络包括五个卷积层、两个全连接层以及一个用于二分类的概率统计层。Further, the first convolutional neural network comprises an eight-layer structure, and the second convolutional neural network comprises a twenty-layer structure, wherein the first convolutional neural network comprises five convolutional layers, two full The connection layer and a probabilistic layer for the two classifications.
进一步地,所述将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息,包括:将预处理后的待测图片输入第一预设检测模型以得到一置信度;判断所述置信度是否大于预设临界值;其中,若所述置信度大于预设临界值,所述待测图片含有车辆特征信息。Further, the inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains the vehicle feature information comprises: inputting the pre-processed picture to be input into the first preset detection model Obtaining a confidence level; determining whether the confidence level is greater than a preset threshold; wherein, if the confidence level is greater than a preset threshold, the picture to be tested includes vehicle feature information.
本领域技术人员可以理解,图8中示出的基于卷积神经网络的车型识别设备的实施例并不构成对基于卷积神经网络的车型识别设备具体构成的限定,在其他实施例中,基于卷积神经网络的车型识别设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,基于卷积神经网络的车型识别设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图8所示实施例一致,在此不再赘述。本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:对获取的待测图片进行预处理;将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息;若所述待测图片含有车辆特征信息,将预处理后的待测图片输入第二预设检测模型;通过所述第二预设检测模型计算得出所述待测图片对应于每一类车型的概率值;确定所有概率值中的最大概率值,并将所述最大概率值对应的车型作为所述待测图片的车型。It will be understood by those skilled in the art that the embodiment of the convolutional neural network based vehicle type identification device shown in FIG. 8 does not constitute a limitation on the specific configuration of the convolutional neural network based vehicle type identification device. In other embodiments, based on The vehicle type identification device of the convolutional neural network may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements. For example, in some embodiments, the convolutional neural network based vehicle identification device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are consistent with the embodiment shown in FIG. This will not be repeated here. The application provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps: The image to be tested is preprocessed; the preprocessed picture to be tested is input into the first preset detection model to determine whether the picture to be tested contains vehicle feature information; if the picture to be tested contains vehicle feature information, the preprocessing is performed The second picture to be tested is input to the second preset detection model; the probability value of the picture to be tested corresponding to each type of vehicle type is calculated by the second preset detection model; and the maximum probability value among all the probability values is determined, And the model corresponding to the maximum probability value is used as the model of the picture to be tested.
进一步地,所述预设的图片数据包括预设的第一图片数据,所述对获取的待测图片进行预处理之前,包括:将预设的第一图片数据分为第一训练集以及 第一验证集;利用所述第一训练集对第一卷积神经网络进行训练,以得到对应的第一中间模型;利用所述第一验证集对所述第一中间模型进行验证,以得到对应的第一错误集,其中所述第一错误集包括至少一个第一错误样本;若所述第一错误集中第一错误样本的数量大于或等于第一预设阀值,利用所述第一错误集训练所述第一中间模型以得到一个新的第一中间模型;利用所述第一验证集对所述新的第一中间模型再次进行验证,直至所述第一错误集中第一错误样本的数量小于预设阀值,并判定此时的新的第一中间模型为对应的第一预设检测模型。Further, the preset picture data includes preset first picture data, and the pre-processing of the acquired picture to be tested includes: dividing the preset first picture data into the first training set and a first verification set; training the first convolutional neural network with the first training set to obtain a corresponding first intermediate model; and verifying the first intermediate model by using the first verification set to obtain Corresponding first error set, wherein the first error set includes at least one first error sample; if the number of the first error samples in the first error set is greater than or equal to a first preset threshold, using the first The error set trains the first intermediate model to obtain a new first intermediate model; the new first intermediate model is again verified using the first verification set until the first error sample in the first error set The number is less than the preset threshold, and it is determined that the new first intermediate model at this time is the corresponding first preset detection model.
进一步地,所述预设的图片数据还包括预设的第二图片数据,所述方法还包括:将预设的第二图片数据分为第二训练集以及第二验证集;利用所述第二训练集对第二卷积神经网络进行训练,以得到对应的第二中间模型;利用所述第二验证集对所述第二中间模型进行验证,以得到对应的第二错误集,其中所述第二错误集包括至少一个第二错误样本;若所述第二错误集中第二错误样本的数量大于或等于第二预设阀值,利用所述第二错误集训练所述第二中间模型以得到一个新的第二中间模型;利用所述第二验证集对所述新的第二中间模型再次进行验证,直至所述第二错误集中第二错误样本的数量小于预设阀值,并判定此时的新的第二中间模型为对应的第二预设检测模型。Further, the preset picture data further includes preset second picture data, the method further includes: dividing the preset second picture data into a second training set and a second verification set; The second training set trains the second convolutional neural network to obtain a corresponding second intermediate model; and uses the second verification set to verify the second intermediate model to obtain a corresponding second error set, where The second error set includes at least one second error sample; if the number of the second error samples in the second error set is greater than or equal to a second preset threshold, training the second intermediate model with the second error set Obtaining a new second intermediate model; verifying the new second intermediate model again by using the second verification set until the number of second error samples in the second error set is less than a preset threshold, and It is determined that the new second intermediate model at this time is the corresponding second preset detection model.
进一步地,所述第一卷积神经网络包括八层结构,所述第二卷积神经网络包括二十层结构,其中,所述第一卷积神经网络包括五个卷积层、两个全连接层以及一个用于二分类的概率统计层。Further, the first convolutional neural network comprises an eight-layer structure, and the second convolutional neural network comprises a twenty-layer structure, wherein the first convolutional neural network comprises five convolutional layers, two full The connection layer and a probabilistic layer for the two classifications.
进一步地,所述将预处理后的待测图片输入第一预设检测模型以判断所述待测图片是否含有车辆特征信息,包括:对获取的待测图片进行预处理;将预处理后的待测图片输入第一预设检测模型以得到一置信度;判断所述置信度是否大于预设临界值;其中,若所述置信度大于预设临界值,所述待测图片含有车辆特征信息。Further, the inputting the pre-processed picture to the first preset detection model to determine whether the picture to be tested contains vehicle feature information includes: pre-processing the obtained picture to be tested; Entering a first preset detection model to obtain a confidence level; determining whether the confidence level is greater than a preset threshold; wherein, if the confidence level is greater than a preset threshold, the image to be tested includes vehicle feature information .
本申请前述的存储介质包括:磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等各种可以存储程序代码的介质。本申请所有实施例中的单元可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。The foregoing storage medium of the present application includes: a magnetic disk, an optical disk, a read-only memory (ROM), and the like, which can store various program codes. The units in all the embodiments of the present application may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。 本申请实施例装置中的单元可以根据实际需要进行合并、划分和删减。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。The steps in the method of the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs. The units in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs. A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the device, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalents can be easily conceived by those skilled in the art within the technical scope disclosed in the present application. Modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
Claims (20)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710833636.8A CN107665353A (en) | 2017-09-15 | 2017-09-15 | Model recognizing method, device, equipment and computer-readable recording medium based on convolutional neural networks |
| CN201710833636.8 | 2017-09-15 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019051941A1 true WO2019051941A1 (en) | 2019-03-21 |
Family
ID=61097903
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/108232 Ceased WO2019051941A1 (en) | 2017-09-15 | 2017-10-30 | Method, apparatus and device for identifying vehicle type, and computer-readable storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107665353A (en) |
| WO (1) | WO2019051941A1 (en) |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110245577A (en) * | 2019-05-23 | 2019-09-17 | 复钧智能科技(苏州)有限公司 | Target vehicle recognition methods, device and Vehicular real time monitoring system |
| CN111461195A (en) * | 2020-03-27 | 2020-07-28 | 国网电子商务有限公司 | A kind of picture verification method, device and electronic equipment |
| CN111461093A (en) * | 2020-06-22 | 2020-07-28 | 北京慧智数据科技有限公司 | Modified truck identification method based on deep learning technology |
| CN111814582A (en) * | 2020-06-15 | 2020-10-23 | 开易(北京)科技有限公司 | A method and device for processing driver behavior monitoring images |
| CN111816311A (en) * | 2020-07-22 | 2020-10-23 | 北京捷通华声科技股份有限公司 | State identification method, system and device |
| CN111882519A (en) * | 2020-06-15 | 2020-11-03 | 上海眼控科技股份有限公司 | Method and device for identifying car lamp |
| CN111881944A (en) * | 2020-07-08 | 2020-11-03 | 贵州无忧天空科技有限公司 | Method, electronic device and computer readable medium for image authentication |
| CN112036334A (en) * | 2020-09-03 | 2020-12-04 | 深圳迈瑞生物医疗电子股份有限公司 | Method, system and terminal for classifying visible components in sample to be detected |
| CN112257869A (en) * | 2020-09-29 | 2021-01-22 | 北京北大千方科技有限公司 | Analysis method, system and computer medium for deck car based on random forest |
| CN114323583A (en) * | 2021-12-21 | 2022-04-12 | 广汽本田汽车有限公司 | Vehicle light detection method, device, equipment and system |
| CN114330596A (en) * | 2022-01-12 | 2022-04-12 | 中翔科技(杭州)有限公司 | Equipment state feedback method and system based on neural network image classification algorithm |
| CN115083169A (en) * | 2022-06-14 | 2022-09-20 | 公安部交通管理科学研究所 | Method for discovering suspected vehicle imitating ambulance |
| CN115731437A (en) * | 2022-11-16 | 2023-03-03 | 济南博观智能科技有限公司 | A car model identification method, device and medium |
| CN116363450A (en) * | 2023-03-01 | 2023-06-30 | 北京爱笔科技有限公司 | Image recognition model training and image recognition method, system, device and medium |
Families Citing this family (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108491866B (en) * | 2018-03-06 | 2022-09-13 | 平安科技(深圳)有限公司 | Pornographic picture identification method, electronic device and readable storage medium |
| CN108875600A (en) * | 2018-05-31 | 2018-11-23 | 银江股份有限公司 | A kind of information of vehicles detection and tracking method, apparatus and computer storage medium based on YOLO |
| CN109308565B (en) * | 2018-08-01 | 2024-03-19 | 平安科技(深圳)有限公司 | Crowd performance grade identification method and device, storage medium and computer equipment |
| CN109214426A (en) * | 2018-08-08 | 2019-01-15 | 王新维 | A kind of method and deep neural network model of the detection of object appearance |
| CN109242835A (en) * | 2018-08-24 | 2019-01-18 | 深圳市兆泰云智能科技有限公司 | Vehicle bottom defect inspection method, device, equipment and system based on artificial intelligence |
| CN110569700B (en) * | 2018-09-26 | 2020-11-03 | 创新先进技术有限公司 | Method and device for optimizing damage identification result |
| CN109145107B (en) * | 2018-09-27 | 2023-07-25 | 平安科技(深圳)有限公司 | Topic extraction method, device, medium and equipment based on convolutional neural network |
| CN110147707B (en) * | 2018-10-25 | 2021-07-20 | 初速度(苏州)科技有限公司 | High-precision vehicle identification method and system |
| CN109815997B (en) * | 2019-01-04 | 2024-07-19 | 平安科技(深圳)有限公司 | Method and related device for identifying vehicle damage based on deep learning |
| CN109872145B (en) * | 2019-01-29 | 2020-12-08 | 中智沃达(北京)电力科技有限公司 | Charging field intelligent management system based on CNN convolutional neural network |
| CN111507483A (en) * | 2019-01-30 | 2020-08-07 | 鸿富锦精密电子(天津)有限公司 | Rework board detection apparatus, method, and computer-readable storage medium |
| CN109977766A (en) * | 2019-02-18 | 2019-07-05 | 南京航空航天大学 | A kind of fine recognition methods of vehicle based on local feature |
| CN110414929A (en) * | 2019-07-10 | 2019-11-05 | 广州市巴图鲁信息科技有限公司 | A kind of automobile parts picture intelligent checks method |
| CN110503051B (en) * | 2019-08-27 | 2023-04-07 | 西南林业大学 | Precious wood identification system and method based on image identification technology |
| CN111881956B (en) * | 2020-07-15 | 2023-05-12 | 北京市商汤科技开发有限公司 | Network training method and device, target detection method and device, and electronic equipment |
| CN112435463B (en) * | 2020-10-20 | 2022-04-01 | 北京科技大学 | Vehicle type and vehicle weight classification method based on road internet of things monitoring |
| CN112329886A (en) * | 2020-11-26 | 2021-02-05 | 珠海大横琴科技发展有限公司 | Double-license plate recognition method, model training method, device, equipment and storage medium |
| CN115761659B (en) * | 2023-01-09 | 2023-04-11 | 南京隼眼电子科技有限公司 | Recognition model construction method, vehicle type recognition method, electronic device, and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104463241A (en) * | 2014-10-31 | 2015-03-25 | 北京理工大学 | Vehicle type recognition method in intelligent transportation monitoring system |
| CN104680149A (en) * | 2015-03-10 | 2015-06-03 | 苏州科达科技股份有限公司 | Method and system for recognizing object type |
| US20160140424A1 (en) * | 2014-11-13 | 2016-05-19 | Nec Laboratories America, Inc. | Object-centric Fine-grained Image Classification |
| US20160148079A1 (en) * | 2014-11-21 | 2016-05-26 | Adobe Systems Incorporated | Object detection using cascaded convolutional neural networks |
| CN105938560A (en) * | 2016-03-23 | 2016-09-14 | 吉林大学 | Convolutional-neural-network-based vehicle model refined classification system |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104182735A (en) * | 2014-08-18 | 2014-12-03 | 厦门美图之家科技有限公司 | Training optimization pornographic picture or video detection method based on convolutional neural network |
| CN104978586A (en) * | 2015-06-29 | 2015-10-14 | 百度在线网络技术(北京)有限公司 | Trademark identifying method and apparatus |
| CN106022285A (en) * | 2016-05-30 | 2016-10-12 | 北京智芯原动科技有限公司 | Vehicle type identification method and vehicle type identification device based on convolutional neural network |
| CN106529446A (en) * | 2016-10-27 | 2017-03-22 | 桂林电子科技大学 | Vehicle type identification method and system based on multi-block deep convolutional neural network |
-
2017
- 2017-09-15 CN CN201710833636.8A patent/CN107665353A/en active Pending
- 2017-10-30 WO PCT/CN2017/108232 patent/WO2019051941A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104463241A (en) * | 2014-10-31 | 2015-03-25 | 北京理工大学 | Vehicle type recognition method in intelligent transportation monitoring system |
| US20160140424A1 (en) * | 2014-11-13 | 2016-05-19 | Nec Laboratories America, Inc. | Object-centric Fine-grained Image Classification |
| US20160148079A1 (en) * | 2014-11-21 | 2016-05-26 | Adobe Systems Incorporated | Object detection using cascaded convolutional neural networks |
| CN104680149A (en) * | 2015-03-10 | 2015-06-03 | 苏州科达科技股份有限公司 | Method and system for recognizing object type |
| CN105938560A (en) * | 2016-03-23 | 2016-09-14 | 吉林大学 | Convolutional-neural-network-based vehicle model refined classification system |
Cited By (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110245577A (en) * | 2019-05-23 | 2019-09-17 | 复钧智能科技(苏州)有限公司 | Target vehicle recognition methods, device and Vehicular real time monitoring system |
| CN111461195A (en) * | 2020-03-27 | 2020-07-28 | 国网电子商务有限公司 | A kind of picture verification method, device and electronic equipment |
| CN111461195B (en) * | 2020-03-27 | 2023-06-09 | 国网数字科技控股有限公司 | Picture verification method and device and electronic equipment |
| CN111814582B (en) * | 2020-06-15 | 2022-06-28 | 开易(北京)科技有限公司 | A method and device for processing driver behavior monitoring images |
| CN111882519A (en) * | 2020-06-15 | 2020-11-03 | 上海眼控科技股份有限公司 | Method and device for identifying car lamp |
| CN111814582A (en) * | 2020-06-15 | 2020-10-23 | 开易(北京)科技有限公司 | A method and device for processing driver behavior monitoring images |
| CN111461093B (en) * | 2020-06-22 | 2020-09-29 | 北京慧智数据科技有限公司 | Modified truck identification method based on deep learning technology |
| CN111461093A (en) * | 2020-06-22 | 2020-07-28 | 北京慧智数据科技有限公司 | Modified truck identification method based on deep learning technology |
| CN111881944A (en) * | 2020-07-08 | 2020-11-03 | 贵州无忧天空科技有限公司 | Method, electronic device and computer readable medium for image authentication |
| CN111816311A (en) * | 2020-07-22 | 2020-10-23 | 北京捷通华声科技股份有限公司 | State identification method, system and device |
| CN112036334A (en) * | 2020-09-03 | 2020-12-04 | 深圳迈瑞生物医疗电子股份有限公司 | Method, system and terminal for classifying visible components in sample to be detected |
| CN112257869A (en) * | 2020-09-29 | 2021-01-22 | 北京北大千方科技有限公司 | Analysis method, system and computer medium for deck car based on random forest |
| CN114323583A (en) * | 2021-12-21 | 2022-04-12 | 广汽本田汽车有限公司 | Vehicle light detection method, device, equipment and system |
| CN114323583B (en) * | 2021-12-21 | 2024-06-04 | 广汽本田汽车有限公司 | Vehicle light detection method, device, equipment and system |
| CN114330596A (en) * | 2022-01-12 | 2022-04-12 | 中翔科技(杭州)有限公司 | Equipment state feedback method and system based on neural network image classification algorithm |
| CN115083169A (en) * | 2022-06-14 | 2022-09-20 | 公安部交通管理科学研究所 | Method for discovering suspected vehicle imitating ambulance |
| CN115083169B (en) * | 2022-06-14 | 2023-07-18 | 公安部交通管理科学研究所 | A method for discovering a suspected vehicle pretending to be an ambulance |
| CN115731437A (en) * | 2022-11-16 | 2023-03-03 | 济南博观智能科技有限公司 | A car model identification method, device and medium |
| CN116363450A (en) * | 2023-03-01 | 2023-06-30 | 北京爱笔科技有限公司 | Image recognition model training and image recognition method, system, device and medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107665353A (en) | 2018-02-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019051941A1 (en) | Method, apparatus and device for identifying vehicle type, and computer-readable storage medium | |
| CN110020592B (en) | Object detection model training method, device, computer equipment and storage medium | |
| WO2020215571A1 (en) | Sensitive data identification method and device, storage medium, and computer apparatus | |
| CN112949785B (en) | Object detection method, device, equipment and computer storage medium | |
| CN111417960A (en) | Information processing apparatus, information processing method, and program | |
| CN105144239A (en) | Image processing device, program, and image processing method | |
| CN110807491A (en) | License plate image definition model training method, definition detection method and device | |
| CN110956255A (en) | Difficult sample mining method, device, electronic device, and computer-readable storage medium | |
| CN114943674A (en) | Defect detection method, electronic device and storage medium | |
| CN112686129B (en) | Face recognition system and method | |
| US20250080610A1 (en) | Method and system for automatically annotating sensor data | |
| CN112508062B (en) | A method, device, equipment and storage medium for classifying open set data | |
| CN113408564A (en) | Graph processing method, network training method, device, equipment and storage medium | |
| CN110135428B (en) | Image segmentation processing method and device | |
| KR20150093453A (en) | Method and apparatus for detection license plate | |
| US11605210B2 (en) | Method for optical character recognition in document subject to shadows, and device employing method | |
| CN112287905A (en) | Vehicle damage identification method, device, equipment and storage medium | |
| CN112801045B (en) | A text area detection method, electronic device and computer storage medium | |
| CN111931767B (en) | A multi-model target detection method, device, system and storage medium based on image information degree | |
| CN110659631A (en) | License plate recognition method and terminal equipment | |
| WO2016149937A1 (en) | Neural network classification through decomposition | |
| CN111126456A (en) | Processing method, device, equipment and storage medium of neural network model | |
| CN121058040A (en) | Defect classification of processed chips | |
| CN117037111A (en) | Small traffic sign detection method, device, equipment and storage medium | |
| CN115761280A (en) | Image point inspection comparison method, electronic equipment and computer readable storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17925264 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/09/2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17925264 Country of ref document: EP Kind code of ref document: A1 |