CN110765861A - Unlicensed vehicle type identification method and device and terminal equipment - Google Patents

Unlicensed vehicle type identification method and device and terminal equipment Download PDF

Info

Publication number
CN110765861A
CN110765861A CN201910874553.2A CN201910874553A CN110765861A CN 110765861 A CN110765861 A CN 110765861A CN 201910874553 A CN201910874553 A CN 201910874553A CN 110765861 A CN110765861 A CN 110765861A
Authority
CN
China
Prior art keywords
unlicensed vehicle
vehicle
image
effective area
unlicensed
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.)
Pending
Application number
CN201910874553.2A
Other languages
Chinese (zh)
Inventor
周庆标
古川南
李治农
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZKTeco Co Ltd
Original Assignee
ZKTeco Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZKTeco Co Ltd filed Critical ZKTeco Co Ltd
Priority to CN201910874553.2A priority Critical patent/CN110765861A/en
Publication of CN110765861A publication Critical patent/CN110765861A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Abstract

The invention provides a method, a device and terminal equipment for identifying the type of a unlicensed vehicle, wherein the method is applied to the technical field of characteristic identification and comprises the following steps: carrying out rough positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle; carrying out first preprocessing on an original image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle; carrying out second preprocessing on the effective area image of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle; and inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition. The method, the device and the terminal equipment for identifying the type of the unlicensed vehicle can ensure the identification precision of the type of the unlicensed vehicle and improve the identification speed of the type of the unlicensed vehicle.

Description

Unlicensed vehicle type identification method and device and terminal equipment
Technical Field
The invention belongs to the technical field of feature recognition, and particularly relates to a method and a device for recognizing the model of a unlicensed vehicle and terminal equipment.
Background
At present, there are two main methods for identifying the type of a vehicle without a license plate, which are respectively as follows: the traditional identification method of the manually designed features and the deep learning method of extracting the features based on the CNN neural network. The traditional identification method of the manually designed characteristics positions the vehicle position information through the extracted characteristics, extracts the vehicle type characteristics, and finally carries out the unlicensed vehicle type identification by using classification algorithms such as SVM, KNN and the like; the deep learning method for extracting features based on the CNN neural network is characterized in that vehicle position information is positioned, and then positioned vehicle pictures are sent to the CNN network to automatically learn the features contained in the vehicle picture data for license-free vehicle type recognition.
However, both of these identification methods have certain drawbacks:
(1) the traditional identification method of the manually designed features is not high in robustness in practical application due to the manually designed features, and is easily influenced by problems of camera installation angles, environmental illumination changes and the like, so that the identification precision is not ideal;
(2) when a vehicle detection module detects position information of a vehicle, the vehicle positioning algorithm is complex and the robustness is poor, so that the position detection of the vehicle is time-consuming and inaccurate, and when the deep learning method based on the CNN neural network feature extraction is used for vehicle type identification, the vehicle type identification network model is often very large, so that the identification speed is slow.
Disclosure of Invention
The invention aims to provide a method and a device for identifying the type of a unlicensed vehicle and terminal equipment, so as to improve the identification of the type of the unlicensed vehicle while ensuring the identification precision of the type of the unlicensed vehicle.
In a first aspect of the embodiments of the present invention, a method for identifying a unlicensed vehicle type is provided, including:
carrying out rough positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle;
carrying out first preprocessing on an original image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle;
carrying out second preprocessing on the effective area image of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle;
and inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition.
In a second aspect of the embodiments of the present invention, there is provided a license-free vehicle type recognition apparatus, including:
the rough positioning module is used for carrying out rough positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle;
the first preprocessing module is used for performing first preprocessing on the original image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle;
the second preprocessing module is used for carrying out second preprocessing on the effective area image of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle;
and the vehicle type recognition module is used for inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition.
In a third aspect of the embodiments of the present invention, there is provided a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for identifying a unlicensed vehicle type when executing the computer program.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the method for identifying a unlicensed vehicle type described above.
The method, the device and the terminal equipment for identifying the type of the unlicensed vehicle have the advantages that: according to the embodiment of the invention, the accurate positioning of the unlicensed vehicle is not carried out, only the coarse positioning is carried out, the image to be identified of the unlicensed vehicle is obtained by preprocessing the original image of the unlicensed vehicle, and finally the vehicle type identification is carried out through the preset lightweight neural network model. Compared with the method for acquiring the image to be identified by directly using the accurate positioning of the vehicle of the unlicensed vehicle in the prior art, the method and the device only perform rough positioning, and acquire the image to be identified of the unlicensed vehicle by preprocessing the original image of the unlicensed vehicle, so that the situations of time consumption, inaccurate positioning and the like during the accurate positioning of the unlicensed vehicle are effectively avoided, the vehicle type identification precision of the unlicensed vehicle is ensured, and the identification speed of the model identification of the unlicensed vehicle is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to yet another embodiment of the present invention;
fig. 4 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present invention;
fig. 5 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a unlicensed vehicle type identification device according to an embodiment of the present invention;
fig. 7 is a schematic block diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for identifying a type of a unlicensed vehicle according to an embodiment of the present invention. The method comprises the following steps:
s101: and carrying out coarse positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle.
In this embodiment, the unlicensed vehicle is roughly positioned, that is, an approximate whole vehicle area of the unlicensed vehicle is positioned, so as to obtain an original image including the whole vehicle area of the unlicensed vehicle, and the unlicensed vehicle does not need to be accurately positioned.
S102: and carrying out first preprocessing on the original image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle.
In this embodiment, the first preprocessing is to select an effective area of the unlicensed vehicle from an original image of the unlicensed vehicle, so as to obtain an image of the effective area of the unlicensed vehicle.
S103: and carrying out second preprocessing on the effective area image of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle.
In this embodiment, the second preprocessing is to perform size change and pixel adjustment on the image of the effective area of the unlicensed vehicle.
S104: and inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition.
In this embodiment, a preset lightweight neural network model may be obtained through training in advance, and the preset lightweight neural network model is used to receive an image to be recognized of a unlicensed vehicle and output vehicle type categories of the unlicensed vehicle and prediction probability values corresponding to each vehicle type category. In this embodiment, an image to be recognized of a unlicensed vehicle is input into a preset lightweight neural network model, and the vehicle type category with the maximum prediction probability value is obtained, that is, the vehicle type category of the unlicensed vehicle.
As can be seen from the above description, the method for identifying the type of the unlicensed vehicle according to the embodiment of the present invention does not perform accurate positioning of the vehicle of the unlicensed vehicle, performs only coarse positioning, obtains an image to be identified of the unlicensed vehicle by preprocessing an original image of the unlicensed vehicle, and finally performs vehicle type identification through a preset lightweight neural network model. Compared with the method for acquiring the image to be identified by directly using the accurate positioning of the vehicle of the unlicensed vehicle in the prior art, the method and the device only perform rough positioning, and acquire the image to be identified of the unlicensed vehicle by preprocessing the original image of the unlicensed vehicle, so that the situations of time consumption, inaccurate positioning and the like during the accurate positioning of the unlicensed vehicle are effectively avoided, the vehicle type identification precision of the unlicensed vehicle is ensured, and the identification speed of the model identification of the unlicensed vehicle is improved.
Referring to fig. 1 and fig. 2 together, fig. 2 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present application. On the basis of the above embodiment, step S102 can be detailed as follows:
s201: and detecting the position of the unlicensed vehicle in the original image of the unlicensed vehicle to obtain an initial effective area image of the unlicensed vehicle.
In this embodiment, first, the initial delineation region of the original image, that is, the initial effective region image of the unlicensed vehicle, is determined through the position detection of the unlicensed vehicle.
S202: and performing edge adjustment on the initial effective area image of the unlicensed vehicle to obtain the effective area image of the unlicensed vehicle.
In this embodiment, in order to prevent the position detection of the unlicensed vehicle from being inaccurate enough to affect the delineation of the feature area of the unlicensed vehicle (i.e., the determination of the valid area image of the unlicensed vehicle), in the embodiment of the present invention, after the initial valid area image is obtained, the edge of the initial valid area image is further adjusted to determine that the adjusted initial valid area image (i.e., the valid area image) contains more valid vehicle type features.
Referring to fig. 2 and fig. 3 together, fig. 3 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present application. On the basis of the above embodiment, step S202 can be detailed as follows:
s301: and establishing a rectangular coordinate system by taking the preset vertex of the initial effective area image of the unlicensed vehicle as an origin, and determining the coordinates of each vertex of the initial effective area image of the unlicensed vehicle in the rectangular coordinate system.
In this embodiment, the initial effective area image of the unlicensed vehicle is rectangular, that is, the initial effective area image of the unlicensed vehicle includes four vertices, a rectangular coordinate system may be established with the vertex at the upper left corner of the initial effective area image of the unlicensed vehicle as an origin, and it is ensured that the initial effective area image of the unlicensed vehicle is in the first quadrant, and then the coordinates of each vertex of the initial effective area image of the unlicensed vehicle are determined.
S302: and adjusting the coordinates of each vertex of the initial effective area image to obtain the effective area image of the unlicensed vehicle.
In this embodiment, the coordinates of each vertex of the initial effective area image may be adjusted to cover more vehicle type features, and the effective area image of the unlicensed vehicle is obtained after the adjustment is completed. If the coordinate value of a certain vertex is a negative value in the coordinate adjustment process, the effective area image of the unlicensed vehicle is translated until the effective area image of the unlicensed vehicle is completely located in the first quadrant (that is, the coordinates of all the vertices of the effective area image of the unlicensed vehicle are positive values).
Referring to fig. 1 and fig. 4 together, fig. 4 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present application. On the basis of the above embodiment, step S103 can be detailed as follows:
s401: and zooming the effective area image of the unlicensed vehicle according to a preset size.
In this embodiment, the effective area image of the unlicensed vehicle may be scaled according to a preset size, for example, the effective area image of the unlicensed vehicle may be scaled to 112 × 112 pixels.
S402: and adjusting the pixel value of the zoomed effective area image of the unlicensed vehicle according to a preset multiple to obtain an image to be identified of the unlicensed vehicle.
In this embodiment, for example, if the preset multiple is 0.017, the pixel value of each channel of the zoomed effective area image of the unlicensed vehicle is multiplied by 0.017, so as to obtain the image to be identified of the unlicensed vehicle.
Referring to fig. 1 to 5 together, fig. 5 is a schematic flow chart of a method for identifying a unlicensed vehicle type according to another embodiment of the present application. On the basis of the foregoing embodiment, the training process of the preset lightweight neural network model may include:
s501: and obtaining training sample data and test sample data of the unlicensed vehicle type.
In this embodiment, the sample data may be divided into training sample data and test sample data, where the training sample data is used to train the original lightweight neural network model, and the test sample data is used to test the trained lightweight neural network model to determine whether to terminate the training process.
S502: and training the original lightweight neural network model based on the training sample data.
In this embodiment, the process of training the original lightweight neural network model based on the training sample data is a process of continuously updating the weight and bias of the original lightweight neural network model.
S503: and testing the original lightweight neural network model trained by the training sample data based on the test sample data, and if the accuracy of the output result of the original lightweight neural network model reaches a preset threshold, determining that the training of the original lightweight neural network model is finished to obtain the preset lightweight neural network model.
In this embodiment, step S503 may also be replaced by the following method: and testing the original lightweight neural network model trained by the training sample data based on the test sample data, and determining that the training of the original lightweight neural network model is finished when the loss curve of the test sample data has an upward-conversion turning point to obtain a preset lightweight neural network model.
Optionally, as a specific implementation manner of the method for identifying a vehicle type of a unlicensed vehicle provided by the embodiment of the present invention, the network structure of the preset lightweight neural network includes three convolutional layers, four maximum pooling layers, four block units, a global average pooling layer, a full connection layer, and a softmax layer for classification. Each block unit comprises two convolution layers with convolution kernel size of 3 x 3 and an Eltwise layer.
In the present embodiment, the network structure of the lightweight neural network is preset as shown in table 1.
TABLE 1 Preset lightweight neural network-network architecture Table
Figure BDA0002203914540000071
Figure BDA0002203914540000081
That is, the preset lightweight neural network mainly includes 14 hierarchies, specifically:
the first layer is a basic convolution layer, convolution operation is carried out, the input of the convolution processing is an image to be identified of the unlicensed vehicle, three channels are BGR respectively, the size of the three channels is 112 × 112, the output size of the convolution processing is 16 × 56, 16 is the number of the channels, 56 × 56 is the size of a single featuremap, parameters of the convolution operation are convolution kernels 3 × 3 respectively, the step size is 2, pad is 1, and then an activation function of a relu type is added.
And the second layer is the maximum pooling layer, the pooling operation is carried out, the input of the pooling process is the output of the first layer, the number of channels is 16, the size of the channels is 56 × 56, the size of the output is 16 × 28, 16 is the number of channels, 28 × 28 is the size of a single featuremap, the parameters of the pooling operation are respectively the pooling size is 2 × 2, the step size is 2, and the pooling type is maximum pooling.
The third layer is a first block unit, which comprises two convolution layers and an Eltwise layer added with corresponding elements, specifically, the first layer is the convolution layer, convolution operation is carried out, the convolution processing inputs the largest pooled output of the second layer, the dimension is 16 × 28, the output dimension is 32 × 28, 32 is the number of channels, 28 × 28 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 3 × 3, the step size is 1, pad is 1, and then a relu-type activation function is added. And the second layer is a convolution layer, convolution operation is carried out, the convolution processing is input into the output of the first block unit and the first layer of convolution, the dimension size is 32 x 28, the output size is 16 x 28, 16 is the number of channels, 28 x 28 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 1 x 1, the step size is 1, the pad is 0, and then a relu type activation function is added. And the third layer is an Eltwise layer, corresponding element addition operations are carried out, the maximum pooling operation result of the second layer and the convolution output result of the second layer of the first block unit are respectively input, the dimensions are respectively 16 × 28 and 16 × 28, the output dimension is 16 × 28, wherein 16 is the number of channels, 28 × 28 is the size of a single featuremap, and each element refers to each point on each featuremap in each channel.
And the fourth layer is the maximum pooling layer, the pooling operation is carried out, the input of the pooling process is the output of the third layer, the number of channels is 16, the size of the channels is 28 × 28, the size of the output is 16 × 14, 16 is the number of channels, 14 × 14 is the size of a single featuremap, the parameters of the pooling operation are respectively the pooling size of 2 × 2, the step size is 2, and the pooling type is the maximum pooling.
And the fifth layer is a second block unit which comprises two convolution layers and an Eltwise layer added by corresponding elements, specifically, the first layer is the convolution layer and is used for performing convolution operation, the input of the convolution processing is the maximum pooled output of the fourth layer, the dimension is 16 × 14, the output dimension is 32 × 14, 32 is the number of channels, 14 × 14 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 3 × 3, the step size is 1, pad is 1, and then a relu-type activation function is added. And the second layer is a convolution layer, convolution operation is carried out, the convolution processing is input into the output of the first layer of convolution of the second block unit, the dimension size is 32 x 14, the output size is 16 x 14, 16 is the number of channels, 14 x 14 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 1 x 1, the step size is 1, the pad is 0, and a relu type activation function is added after the operation. And the third layer is an Eltwise layer, corresponding element addition operations are carried out, the maximum pooling operation result of the fourth layer and the convolution output result of the second layer of the second block unit are respectively input, the dimensions are respectively 16 × 14 and 16 × 14, the output dimension is 16 × 14, wherein 16 is the number of channels, 14 × 14 is the size of a single featuremap, and each element refers to each point on each featuremap in each channel.
And the sixth layer is the maximum pooling layer, the pooling operation is carried out, the input of the pooling process is the output of the fifth layer, the number of channels is 16, the size of the channels is 14 × 14, the size of the output is 16 × 7, 16 is the number of channels, 14 × 14 is the size of a single featuremap, the parameters of the pooling operation are respectively the pooling size of 2 × 2, the step size is 2, and the pooling type is the maximum pooling.
And a seventh layer is a convolution layer and performs convolution operation, the input of the convolution processing is the maximum pooled output of the sixth layer, the dimension size is 16 × 7, the output size is 32 × 7, 32 is the number of channels, 7 × 7 is the size of a single featuremap, the parameters of the convolution operation are convolution kernel 1 × 1, step size is 1, pad is 0, and then a relu type activation function is added.
The eighth layer is a third block unit, which includes two convolution layers and an Eltwise layer added with corresponding elements, specifically, the first layer is a convolution layer, and convolution operation is performed, the input convolution output of the seventh layer is convolution processing, the dimension is 32 × 7, the output dimension is 32 × 7, 32 is the number of channels, 7 × 7 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 3 × 3, the step size is 1, pad is 1, and then a relu-type activation function is added. And the second layer is a convolution layer, convolution operation is carried out, the convolution processing is input into the output of the first layer of convolution of the third block unit, the dimension size is 32 x 7, the output size is 32 x 7, 32 is the number of channels, 7 x 7 is the size of a single feature, the parameters of the convolution operation are convolution kernels 3 x 3 respectively, the step size is 1, the pad is 1, and a relu type activation function is added later. And the third layer is an Eltwise layer, corresponding element addition operations are carried out, the input of the addition operations are respectively the seventh layer convolution operation result and the third block unit second layer convolution output result, the dimensions are respectively 32 × 7 and 32 × 7, the output dimension is 32 × 7, wherein 32 is the number of channels, 7 × 7 is the size of a single featuremap, and each element refers to each point on each featuremap in each channel.
And the ninth layer is the largest pooling layer, the pooling operation is carried out, the input of the pooling process is the output of the eighth layer, the number of channels is 32, the size of the channels is 7 × 7, the size of the output is 32 × 4, 32 is the number of channels, 4 × 4 is the size of a single featuremap, the parameters of the pooling operation are respectively the pooling size of 2 × 2, the step size is 2, and the pooling type is the largest pooling.
And a tenth layer is a convolution layer and performs convolution operation, the input of the convolution processing is a ninth layer of maximum pooled output, the dimension size is 32 x 4, the size of the output is 32 x 4, 32 is the number of channels, 4 x 4 is the size of a single featuremap, the parameters of the convolution operation are convolution kernel 1 x 1, step size is 1, pad is 0, and then a relu type activation function is added.
The eleventh layer is a fourth block unit, which includes two convolution layers and an Eltwise layer added with corresponding elements, specifically, the first layer is a convolution layer, and convolution operation is performed, the input convolution of the convolution process is the output of the tenth layer, the dimension is 32 × 4, the output dimension is 32 × 4, 32 is the number of channels, 4 × 4 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 3 × 3, the step size is 1, pad is 1, and then a relu-type activation function is added. And the second layer is a convolution layer, convolution operation is carried out, the convolution processing is input into the output of the first layer of convolution of the fourth block unit, the dimension size is 32 x 4, the output size is 32 x 4, 32 is the number of channels, 4 x 4 is the size of a single featuremap, the parameters of the convolution operation are convolution kernels 3 x 3 respectively, the step size is 1, the pad is 1, and a relu type activation function is added later. And the third layer is an Eltwise layer, corresponding element addition operations are carried out, the input results are respectively the tenth layer convolution operation result and the fourth block unit second layer convolution output result, the dimensions are respectively 32 x 4 and 32 x 4, the output dimension is 32 x 4, wherein 32 is the number of channels, 4 x 4 is the size of a single featuremap, and each element refers to each point on each featuremap in each channel.
And the twelfth layer is a global average pooling layer, the pooling operation is carried out, the input of the pooling process is the output of the eleventh layer, the number of channels is 32, the size of the channels is 4 × 4, the size of the output is 32 × 1, wherein 32 is the number of channels, 1 × 1 is the size of a single featuremap, the parameters of the pooling operation are respectively the pooling size of 4 × 4, the step size is 1, and the pooling type is average pooling.
The thirteenth layer is a fully connected layer, which operates to perform fully connected computations. The input is the output of the twelfth layer global pooling, and the output is the vehicle type category and number.
The fourteenth layer is a softmax layer for classification, the input of the softmax layer is the output of the full connection layer, the softmax layer is used for calculating the prediction probability values corresponding to all vehicle type categories of the unlicensed vehicle, and the vehicle type category corresponding to the numerical value with the maximum prediction probability value is determined as the vehicle type category of the unlicensed vehicle.
In this embodiment, the classification model of the softmax layer is:
Figure BDA0002203914540000111
wherein L is an objective function of the classification model, N is the number of vehicle type categories, and f (x)i) For the prediction probability, y, corresponding to the type of vehicleiFor vehicle type class labels, λ is the regularization coefficient, and j (f) is the regularization term.
Fig. 6 is a block diagram of a unlicensed vehicle type recognition apparatus according to an embodiment of the present invention, which corresponds to the unlicensed vehicle type recognition method in the foregoing embodiment. For convenience of explanation, only portions related to the embodiments of the present invention are shown. Referring to fig. 6, the apparatus includes: the system comprises a rough positioning module 100, a first preprocessing module 200, a second preprocessing module 300 and a vehicle type identification module 400.
The rough positioning module 100 is configured to perform rough positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle.
The first preprocessing module 200 is configured to perform first preprocessing on an original image of a unlicensed vehicle to obtain an effective area image of the unlicensed vehicle.
And the second preprocessing module 300 is configured to perform second preprocessing on the image of the effective area of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle.
And the vehicle type recognition module 400 is used for inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition.
Referring to fig. 6, in another embodiment of the present invention, the first preprocessing module 200 may include:
the detecting unit 210 is configured to detect a position of the unlicensed vehicle in the original image of the unlicensed vehicle, and obtain an initial effective area image of the unlicensed vehicle.
And an edge adjusting unit 220, configured to perform edge adjustment on the initial effective area image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle.
Referring to fig. 6, in still another embodiment of the present invention, the edge adjusting unit 220 may include:
and the coordinate determination device 221 is used for establishing a rectangular coordinate system by taking the preset vertex of the initial effective area image of the unlicensed vehicle as an origin, and determining the coordinates of each vertex of the initial effective area image of the unlicensed vehicle in the rectangular coordinate system.
And an edge adjusting device 222 for adjusting the coordinates of each vertex of the initial effective area image to obtain an effective area image of the unlicensed vehicle.
Referring to fig. 6, in yet another embodiment of the present invention, the second preprocessing module 300 may include:
and the scaling unit 310 is used for scaling the effective area image of the unlicensed vehicle according to a preset size.
And the pixel adjusting unit 320 is configured to adjust the pixel value of the zoomed effective area image of the unlicensed vehicle according to a preset multiple, so as to obtain an image to be identified of the unlicensed vehicle.
Referring to fig. 6, in still another embodiment of the present invention, the unlicensed vehicle type identification device may further include a preset lightweight model creation module 500, and the preset lightweight model creation module 500 may include:
the sample obtaining unit 510 is configured to obtain training sample data and test sample data of a unlicensed vehicle type.
And the sample training unit 520 is configured to train the original lightweight neural network model based on the training sample data.
And the model testing unit 530 is configured to test the original lightweight neural network model trained by the training sample data based on the test sample data, and if the accuracy of the output result of the original lightweight neural network model reaches a preset threshold, determine that the training of the original lightweight neural network model is completed, so as to obtain the preset lightweight neural network model.
Optionally, as a specific implementation manner of the device for recognizing a vehicle type of a unlicensed vehicle provided by the embodiment of the present invention, the network structure of the preset lightweight neural network includes three convolutional layers, four maximum pooling layers, four block units, a global average pooling layer, a full connection layer, and a softmax layer for classification. Each block unit comprises two convolution layers with convolution kernel size of 3 x 3 and an Eltwise layer.
Referring to fig. 7, fig. 7 is a schematic block diagram of a terminal device according to an embodiment of the present invention. The terminal 700 in the present embodiment shown in fig. 7 may include: one or more processors 701, one or more input devices 702, one or more output devices 703, and one or more memories 704. The processor 701, the input device 702, the output device 703 and the memory 704 are in communication with each other via a communication bus 705. The memory 704 is used to store computer programs, which include program instructions. The processor 701 is configured to execute program instructions stored by the memory 704. The processor 701 is configured to call a program instruction to perform the following functions of operating each module/unit in the above-described device embodiments, for example, the functions of the modules 100 to 500 shown in fig. 6.
It should be understood that, in the embodiment of the present invention, the Processor 701 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 702 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 703 may include a display (LCD, etc.), a speaker, etc.
The memory 704 may include both read-only memory and random-access memory, and provides instructions and data to the processor 701. A portion of the memory 704 may also include non-volatile random access memory. For example, the memory 704 may also store device type information.
In a specific implementation, the processor 701, the input device 702, and the output device 703 described in this embodiment of the present invention may execute the implementation manners described in the first embodiment and the second embodiment of the unlicensed vehicle type identification method provided in this embodiment of the present invention, and may also execute the implementation manners of the terminal described in this embodiment of the present invention, which is not described herein again.
In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, where the computer program includes program instructions, and the program instructions, when executed by a processor, implement all or part of the processes in the method of the above embodiments, and may also be implemented by a computer program instructing associated hardware, and the computer program may be stored in a computer-readable storage medium, and the computer program, when executed by a processor, may implement the steps of the above methods embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may include any suitable increase or decrease as required by legislation and patent practice in the jurisdiction, for example, in some jurisdictions, computer readable media may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The computer readable storage medium may be an internal storage unit of the terminal of any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk provided on the terminal, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing a computer program and other programs and data required by the terminal. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for identifying a type of a unlicensed vehicle is characterized by comprising the following steps:
carrying out rough positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle;
carrying out first preprocessing on an original image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle;
carrying out second preprocessing on the effective area image of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle;
and inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition.
2. The method for identifying the type of the unlicensed vehicle as claimed in claim 1, wherein said first preprocessing of the original image of the unlicensed vehicle to obtain the image of the effective area of the unlicensed vehicle comprises:
detecting the position of the unlicensed vehicle in the original image of the unlicensed vehicle to obtain an initial effective area image of the unlicensed vehicle;
and performing edge adjustment on the initial effective area image of the unlicensed vehicle to obtain the effective area image of the unlicensed vehicle.
3. The method for identifying the type of the unlicensed vehicle as claimed in claim 2, wherein the edge adjustment of the initial effective area image of the unlicensed vehicle to obtain the effective area image of the unlicensed vehicle comprises:
establishing a rectangular coordinate system by taking a preset vertex of the initial effective area image of the unlicensed vehicle as an origin, and determining coordinates of each vertex of the initial effective area image of the unlicensed vehicle in the rectangular coordinate system;
and adjusting the coordinates of each vertex of the initial effective area image to obtain the effective area image of the unlicensed vehicle.
4. The method for identifying the type of the unlicensed vehicle as claimed in claim 1, wherein the second preprocessing of the image of the effective area of the unlicensed vehicle to obtain the image to be identified of the unlicensed vehicle comprises:
zooming the effective area image of the unlicensed vehicle according to a preset size;
and adjusting the pixel value of the zoomed effective area image of the unlicensed vehicle according to a preset multiple to obtain an image to be identified of the unlicensed vehicle.
5. The method for recognizing a unlicensed vehicle type according to any one of claims 1 to 4, wherein the training process of the preset lightweight neural network model includes:
acquiring training sample data and test sample data of a unlicensed vehicle type;
training an original lightweight neural network model based on training sample data;
and testing the original lightweight neural network model trained by the training sample data based on the test sample data, and if the accuracy of the output result of the original lightweight neural network model reaches a preset threshold, determining that the training of the original lightweight neural network model is finished to obtain the preset lightweight neural network model.
6. The method for identifying a type of a unlicensed vehicle as claimed in claim 5, wherein the network structure of the preset lightweight neural network comprises three convolutional layers, four maximum pooling layers, four block units, one global average pooling layer, one full connection layer and a softmax layer for classification; each block unit comprises two convolution layers with convolution kernel size of 3 x 3 and an Eltwise layer.
7. A unlicensed vehicle type identification device, comprising:
the rough positioning module is used for carrying out rough positioning on the unlicensed vehicle to obtain an original image of the unlicensed vehicle;
the first preprocessing module is used for performing first preprocessing on the original image of the unlicensed vehicle to obtain an effective area image of the unlicensed vehicle;
the second preprocessing module is used for carrying out second preprocessing on the effective area image of the unlicensed vehicle to obtain an image to be identified of the unlicensed vehicle;
and the vehicle type recognition module is used for inputting the image to be recognized of the unlicensed vehicle into a preset lightweight neural network model for vehicle type recognition.
8. The unlicensed vehicle type identification device of claim 7 wherein said first preprocessing module includes:
the detecting unit is used for detecting the position of the unlicensed vehicle in the original image of the unlicensed vehicle to obtain an initial effective area image of the unlicensed vehicle;
and the edge adjusting unit is used for carrying out edge adjustment on the initial effective area image of the unlicensed vehicle to obtain the effective area image of the unlicensed vehicle.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201910874553.2A 2019-09-17 2019-09-17 Unlicensed vehicle type identification method and device and terminal equipment Pending CN110765861A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910874553.2A CN110765861A (en) 2019-09-17 2019-09-17 Unlicensed vehicle type identification method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910874553.2A CN110765861A (en) 2019-09-17 2019-09-17 Unlicensed vehicle type identification method and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN110765861A true CN110765861A (en) 2020-02-07

Family

ID=69329871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910874553.2A Pending CN110765861A (en) 2019-09-17 2019-09-17 Unlicensed vehicle type identification method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN110765861A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140147003A1 (en) * 2012-11-23 2014-05-29 Nokia Corporation Method and Apparatus for Facial Image Processing
CN106056086A (en) * 2016-06-02 2016-10-26 江苏华通晟云科技有限公司 Vehicle brand and model identification method based on fast learning framework
CN107609555A (en) * 2017-09-15 2018-01-19 北京文安智能技术股份有限公司 Detection method of license plate, model recognizing method and relevant apparatus using it
CN107862340A (en) * 2017-11-16 2018-03-30 深圳市华尊科技股份有限公司 A kind of model recognizing method and device
CN108960064A (en) * 2018-06-01 2018-12-07 重庆锐纳达自动化技术有限公司 A kind of Face datection and recognition methods based on convolutional neural networks
CN108985200A (en) * 2018-07-02 2018-12-11 中国科学院半导体研究所 A kind of In vivo detection algorithm of the non-formula based on terminal device
CN109359666A (en) * 2018-09-07 2019-02-19 佳都新太科技股份有限公司 A kind of model recognizing method and processing terminal based on multiple features fusion neural network
CN109447053A (en) * 2019-01-09 2019-03-08 江苏星云网格信息技术有限公司 A kind of face identification method based on dual limitation attention neural network model
CN109508636A (en) * 2018-10-08 2019-03-22 百度在线网络技术(北京)有限公司 Vehicle attribute recognition methods, device, storage medium and electronic equipment
CN109726717A (en) * 2019-01-02 2019-05-07 西南石油大学 A kind of vehicle comprehensive information detection system
CN109816001A (en) * 2019-01-10 2019-05-28 高新兴科技集团股份有限公司 A kind of more attribute recognition approaches of vehicle based on deep learning, device and equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140147003A1 (en) * 2012-11-23 2014-05-29 Nokia Corporation Method and Apparatus for Facial Image Processing
CN106056086A (en) * 2016-06-02 2016-10-26 江苏华通晟云科技有限公司 Vehicle brand and model identification method based on fast learning framework
CN107609555A (en) * 2017-09-15 2018-01-19 北京文安智能技术股份有限公司 Detection method of license plate, model recognizing method and relevant apparatus using it
CN107862340A (en) * 2017-11-16 2018-03-30 深圳市华尊科技股份有限公司 A kind of model recognizing method and device
CN108960064A (en) * 2018-06-01 2018-12-07 重庆锐纳达自动化技术有限公司 A kind of Face datection and recognition methods based on convolutional neural networks
CN108985200A (en) * 2018-07-02 2018-12-11 中国科学院半导体研究所 A kind of In vivo detection algorithm of the non-formula based on terminal device
CN109359666A (en) * 2018-09-07 2019-02-19 佳都新太科技股份有限公司 A kind of model recognizing method and processing terminal based on multiple features fusion neural network
CN109508636A (en) * 2018-10-08 2019-03-22 百度在线网络技术(北京)有限公司 Vehicle attribute recognition methods, device, storage medium and electronic equipment
CN109726717A (en) * 2019-01-02 2019-05-07 西南石油大学 A kind of vehicle comprehensive information detection system
CN109447053A (en) * 2019-01-09 2019-03-08 江苏星云网格信息技术有限公司 A kind of face identification method based on dual limitation attention neural network model
CN109816001A (en) * 2019-01-10 2019-05-28 高新兴科技集团股份有限公司 A kind of more attribute recognition approaches of vehicle based on deep learning, device and equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ANDREW G. HOWARD等: ""MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications"", 《ARXIV》 *
杨娟等: ""基于语义 DCNN 特征融合的细粒度车型识别模型"", 《计算机辅助设计与图形学学报》 *
牟世刚: ""车辆车型与车牌识别系统的研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Similar Documents

Publication Publication Date Title
CN110909611B (en) Method and device for detecting attention area, readable storage medium and terminal equipment
CN109961009B (en) Pedestrian detection method, system, device and storage medium based on deep learning
CN111310775B (en) Data training method, device, terminal equipment and computer readable storage medium
CN106875381B (en) Mobile phone shell defect detection method based on deep learning
CN109902548B (en) Object attribute identification method and device, computing equipment and system
EP3113114A1 (en) Image processing method and device
CN112336342B (en) Hand key point detection method and device and terminal equipment
CN110852311A (en) Three-dimensional human hand key point positioning method and device
CN108090486A (en) Image processing method and device in a kind of game of billiards
CN111290684B (en) Image display method, image display device and terminal equipment
CN111798521B (en) Calibration method and device, storage medium and electronic equipment
CN111191582A (en) Three-dimensional target detection method, detection device, terminal device and computer-readable storage medium
CN113490947A (en) Detection model training method and device, detection model using method and storage medium
CN111199169A (en) Image processing method and device
CN109375833B (en) Touch instruction generation method and device
CN113780201A (en) Hand image processing method and device, equipment and medium
CN113269752A (en) Image detection method, device terminal equipment and storage medium
CN112966719A (en) Method and device for recognizing meter panel reading and terminal equipment
CN110210314B (en) Face detection method, device, computer equipment and storage medium
US20210166060A1 (en) Method and apparatus for image detection, patterning control method
CN110765861A (en) Unlicensed vehicle type identification method and device and terminal equipment
CN115063473A (en) Object height detection method and device, computer equipment and storage medium
CN112950652B (en) Robot and hand image segmentation method and device thereof
CN109241942A (en) Image processing method, device, face recognition device and storage medium
CN113947730A (en) Remote sensing data identification method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523710, 26, 188 Industrial Road, Pingshan Town, Guangdong, Dongguan, Tangxia

Applicant after: Entropy Technology Co.,Ltd.

Address before: 523710, 26, 188 Industrial Road, Pingshan Town, Guangdong, Dongguan, Tangxia

Applicant before: ZKTECO Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200207