CN112580665B - Vehicle style identification method and device, electronic equipment and storage medium - Google Patents

Vehicle style identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112580665B
CN112580665B CN202011505460.1A CN202011505460A CN112580665B CN 112580665 B CN112580665 B CN 112580665B CN 202011505460 A CN202011505460 A CN 202011505460A CN 112580665 B CN112580665 B CN 112580665B
Authority
CN
China
Prior art keywords
vehicle
candidate
frame
feature
different scales
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011505460.1A
Other languages
Chinese (zh)
Other versions
CN112580665A (en
Inventor
吴晓东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Shenzhen Saiante Technology Service 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 Shenzhen Saiante Technology Service Co Ltd filed Critical Shenzhen Saiante Technology Service Co Ltd
Priority to CN202011505460.1A priority Critical patent/CN112580665B/en
Publication of CN112580665A publication Critical patent/CN112580665A/en
Application granted granted Critical
Publication of CN112580665B publication Critical patent/CN112580665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to artificial intelligence, and provides a vehicle style identification method, which comprises the following steps: the method comprises the steps of carrying out vehicle feature extraction on an original image to form three feature images with different scales, obviously expanding recall of vehicles with different scales by improving the traditional single-scale feature image into a multi-scale method, respectively executing frame selection operation on the three feature images with different scales based on three groups of anchor frames to generate candidate frames corresponding to the three feature images with different scales, effectively relieving the problem of missing recall and false detection of a vehicle detection frame, carrying out block division operation on a complete candidate frame to divide each candidate frame in the complete candidate frame into modules with preset sizes, and carrying out pixel point sampling on each module to obtain an output matrix, thereby increasing block division operation, effectively relieving the problem of pixel deviation, improving the positioning accuracy of the vehicle detection frame, and further improving the overall accuracy and recall rate of vehicle identification.

Description

Vehicle style identification method and device, electronic equipment and storage medium
Technical Field
The present invention relates to artificial intelligence, and more particularly, to a method, an apparatus, an electronic device, and a computer readable storage medium for identifying a vehicle style.
Background
When the current economy is developed at a high speed, different vehicles run on the road together, so that the vehicle type is identified as an important solution problem of the current road traffic safety.
Because the types of the vehicle models are various, and the vehicles of some models are quite similar from the aspect of appearance or vehicle logo, the difficulty of identifying the similar models based on the traditional FASTERRCNN network is high, the accuracy is low, and the vehicle model identification algorithm based on the traditional FASTERRCNN can reach a certain accuracy in simple scenes such as sunny days, daytime, vehicle front and the like, but the accuracy and recall rate are relatively low in difficult scenes such as haze, rainy days, night, vehicle side and the like.
Therefore, there is a need for a vehicle style identification method that can improve the recall rate of vehicle style identification, alleviate the problem of pixel deviation, improve the positioning accuracy of the vehicle detection frame, and improve the accuracy of vehicle style identification.
Disclosure of Invention
The invention provides a vehicle style identification method, a device, electronic equipment and a computer readable storage medium, which mainly aim to improve the recall rate of vehicle style identification, alleviate the problem of pixel deviation, improve the positioning accuracy of a vehicle detection frame and improve the accuracy of vehicle style identification.
In order to achieve the above object, the present invention provides a vehicle style identification method, including:
extracting vehicle features from the original image according to a preset feature extraction rule to form three feature graphs with different scales;
Respectively executing frame selection operation on the three feature images with different scales according to three preset anchor frames to generate candidate frames corresponding to the feature images with different scales, and merging the generated candidate frames to obtain a complete candidate frame;
performing a blocking operation on the full candidate frames to divide each candidate frame in the full candidate frames into modules of a preset size, and performing pixel point sampling on each module to obtain an output matrix;
and carrying out regression and classification on the output matrix to determine vehicle coordinates, and mapping the vehicle coordinates into image coordinates of the original image to complete recognition of the vehicle money.
Optionally, the process of extracting the vehicle features from the original image according to the preset feature extraction rule to form three feature graphs with different scales includes:
Converting the original image into a standard image with a preset size;
inputting the canonical image into a feature extraction network to extract vehicle features in the canonical image;
inputting the standard image into a first convolutional neural network for up-sampling based on the vehicle characteristics so as to obtain three characteristic diagrams with different scales; the three feature maps with different scales comprise a first feature map, a second feature map and a third feature map; the scale of the second characteristic diagram and the third characteristic diagram is respectively two times and four times that of the first characteristic diagram.
Optionally, the process of performing a frame selection operation on the three feature graphs with different scales according to the preset three groups of anchor frames to generate candidate frames corresponding to the three feature graphs with different scales includes:
Creating a third convolutional neural network, training the third convolutional neural network by using preset training data to form a frame selection network, and respectively inputting the three feature maps with different scales into the frame selection network; the frame selection network at least comprises 3*3 convolution layers, an activation function, a classification function, a regression function, a weighted non-maximum suppression algorithm and a clipping algorithm;
The three feature images with different scales are respectively passed through the 3*3 convolution layers and the activation functions to obtain three corresponding activation feature images;
The three activation feature images are respectively subjected to the operation of the classification function and the regression function to obtain a classification matrix and a regression matrix of the three activation feature images, whether the three activation feature images are vehicle feature images or not is respectively judged, if the three activation feature images are the vehicle feature images, coordinates of the anchor frames are displayed, and three pre-candidate frame groups respectively corresponding to the three feature images with different scales are formed;
And respectively executing a weighted non-maximum suppression algorithm and a clipping algorithm on each pre-candidate frame in the three pre-candidate frame groups to obtain three candidate frames corresponding to the three feature maps with different scales.
Optionally, the process of performing a weighted non-maximum suppression algorithm and a clipping algorithm on each pre-candidate frame in the three pre-candidate frame groups to obtain three candidate frames corresponding to the three feature maps with different scales includes:
respectively carrying out confidence ranking in each pre-candidate frame group, and selecting the pre-candidate frame with the highest confidence as a central pre-candidate frame;
Calculating the intersection ratio of the pre-candidate frames except the center pre-candidate frame in each pre-candidate frame group and the center pre-candidate frame;
updating the confidence scores of the rest pre-candidate frames in each pre-candidate frame group according to the threshold value of the cross ratio until all the pre-candidate frames in the pre-candidate frame group are selected;
And respectively carrying out confidence descending order according to the confidence scores of all the pre-candidate frames in each pre-candidate frame group, deleting the pre-candidate frames lower than a preset confidence threshold, and selecting the pre-candidate frames higher than the preset confidence threshold as candidate frames corresponding to the feature images with the three different scales.
Optionally, before performing the partitioning operation on the full candidate box, the method further includes:
Inputting the complete candidate boxes into a second convolutional neural network to uniformly fix the complete candidate boxes to a preset size; wherein,
The second convolutional neural network is RoIAlign and comprises a blocking layer, a pixel point sampling layer and a rounding layer.
Optionally, the performing a blocking operation on the complete candidate frames to divide each candidate frame of the complete candidate frames into modules of a preset size, and performing pixel sampling on each module to obtain an output matrix includes:
Partitioning each candidate frame in the complete candidate frames through the partitioning layer to form a module with a preset size;
sampling the pixel points of the module by the pixel point sampling layer by using a bilinear interpolation method to form a pixel point group;
And carrying out pixel point retaining operation on the module, and retaining the pixel point with the largest value in the pixel point group to obtain an output matrix.
In order to solve the above problems, the present invention also provides a vehicle style identification device, the device comprising:
the feature map acquisition module is used for extracting vehicle features from the original image according to a preset feature extraction rule to form three feature maps with different scales;
the candidate frame generation module is used for respectively executing frame selection operation on the three feature images with different scales according to three preset anchor frames to generate candidate frames corresponding to the three feature images with different scales, and merging the generated candidate frames to obtain a complete candidate frame;
The output matrix acquisition module is used for executing a blocking operation on the complete candidate frames to divide each candidate frame in the complete candidate frames into modules with preset sizes, and executing pixel point sampling on each module to acquire an output matrix;
And the vehicle coordinate determining module is used for carrying out regression and classification on the output matrix to determine vehicle coordinates, and mapping the vehicle coordinates into image coordinates of the original image to finish recognition of the vehicle money.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
A memory storing at least one instruction; and
And the processor executes the instructions stored in the memory to realize the vehicle style identification method.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one instruction that is executed by a processor in an electronic device to implement the vehicle style identification method described above.
According to the embodiment of the invention, vehicle feature extraction is carried out on an original image according to a preset feature extraction rule to form three feature images with different scales, and the method for improving the traditional single-scale feature image into a multi-scale method remarkably expands recall of vehicles with different scales, so that the overall recall rate of vehicle pattern recognition is improved; respectively executing frame selection operation on three feature graphs with different scales according to three preset groups of anchor frames to generate candidate frames corresponding to the feature graphs with different scales, and combining the generated candidate frames to obtain a complete candidate frame, wherein the frame selection operation comprises 3*3 convolution layers, an activation function, a classification function, a regression function, 1*1 convolution layers, a weighted non-maximum suppression algorithm and a clipping algorithm, namely, a predicted frame deduplication algorithm NMS in the existing frame selection network (RPN network) is improved to WSoft-NMS, so that the problem of missing and false detection of a vehicle detection frame is effectively relieved, and the overall accuracy and recall rate of vehicle pattern recognition are improved; and then executing a blocking operation on the complete candidate frames to divide each candidate frame in the complete candidate frames into modules with preset sizes, executing pixel point sampling on each module to obtain an output matrix, thereby carrying out regression and classification on the output matrix to determine vehicle coordinates, mapping the vehicle coordinates into image coordinates of an original image to complete recognition of the vehicle money, wherein the existing operation (RoIPooling operation) for obtaining the output matrix is not a blocking step, but is a pixel point retaining operation after finishing, the original RoIPooling is improved into a second convolution neural network (RoIAlign), the blocking operation is increased, the pixel deviation problem caused by RoIPooling is effectively relieved, the positioning precision of the vehicle detection frame is improved, and the overall accuracy and recall rate of the vehicle money recognition are improved.
Drawings
FIG. 1 is a flow chart of a vehicle model identification method according to an embodiment of the invention;
FIG. 2 is a schematic block diagram of a vehicle model identification device according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of an internal structure of an electronic device for implementing a vehicle style identification method according to an embodiment of the present invention;
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a vehicle style identification method. Referring to fig. 1, a flow chart of a vehicle model identification method according to an embodiment of the invention is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
In this embodiment, the vehicle style identification method includes:
S1: extracting vehicle features from the original image according to a preset feature extraction rule to form three feature graphs with different scales;
Specifically, in step S1, the original image is first converted into a preset size with the aspect ratio ensured to form a canonical image, and the specification of the canonical image is not particularly limited, and in this embodiment, the specification of the canonical image is an image of 1000×600 size.
After converting the original image into a canonical image of a preset size, performing vehicle feature extraction on the canonical image according to a preset feature extraction rule to form three feature images of different scales, including:
s11: inputting the canonical image into a feature extraction network to extract vehicle features in the canonical image; the feature extraction network adopts a VGG network in the embodiment; the vehicle features are feature values of a feature matrix in a feature map.
S12: inputting the canonical image into a first convolutional neural network for up-sampling based on the extracted vehicle features to obtain three feature maps with different scales; the first convolutional neural network is a 3*3 convolutional layer plus Mish convolutional neural network of an activation function (3*3 convolutional+ Mish activation function); the three feature maps with different scales comprise a first feature map, a second feature map and a third feature map; the dimensions of the second and third feature maps are two times and four times that of the first feature map, for example, if the first feature map (FMap 1) has a size of 60×40×512, the second feature map (FMap 2) and the third feature map (FMap 3) have a size of 120×80×512 and 240×160×512, respectively.
S2: according to three preset anchor frames, respectively executing frame selection operation on the three obtained feature images with different scales to generate candidate frames corresponding to the feature images with different scales, and merging the generated candidate frames to obtain a complete candidate frame, wherein the process comprises the following steps:
S21: creating a third convolutional neural network, training the third convolutional neural network by using preset training data to form a frame selection network, and respectively inputting three feature maps with different scales into the frame selection network; the frame selection network at least comprises 3*3 convolution layers, an activation function, a classification function, a regression function, a weighted non-maximum suppression algorithm and a clipping algorithm; the preset training data is preset in advance, and specific how to preset is not limited herein;
s22: enabling the three feature images with different scales to respectively pass through 3*3 convolution layers and activation functions to obtain three corresponding activation feature images;
S23: the three activation feature images are respectively subjected to the operation of a classification function and a regression function to obtain a classification matrix and a regression matrix of the three activation feature images, whether the three activation feature images are vehicle feature images or not is judged, if the three activation feature images are the vehicle feature images, coordinates of anchor frames are displayed, and three pre-candidate frame groups respectively corresponding to the three feature images with different scales are formed;
s24: respectively executing a weighted non-maximum suppression algorithm and a clipping algorithm on each pre-candidate frame in the three pre-candidate frame groups to obtain candidate frames corresponding to the feature images of the three different scales;
S25: and merging the candidate frames to form a complete candidate frame.
It should be noted that, before step S21, the preset anchor frames are divided into three groups, in this embodiment, the preset anchor frames (anchor boxes) are nine anchor frames, the nine anchor frames are divided into three groups, each group has three anchor frames, the nine anchor frames are obtained by 3 different sizes and 3 different ratios, specific dimensions and proportions are not particularly limited, in this embodiment, 3 dimensions are 8, 16, 32,3 different proportions are 1:1, 1:2, 2:1, the 9 anchor boxes obtained are 8×8,8×16, 16×8, 16×16, 16×32, 32×16, 32×32, 32×64, 64×32, respectively; then, the anchor frame selects three feature images with different scales, and the feature images are input into a frame selection network;
In this embodiment, the frame network at least includes 3*3 convolution layers, an activation function, a classification function, a regression function, 1*1 convolution layers, a weighted non-maximum suppression algorithm, and a clipping algorithm, also referred to as a WSoft-RPN network.
Specifically, step S24 includes:
s241: respectively carrying out confidence ranking in each pre-candidate frame group, and selecting the pre-candidate frame with the highest confidence as a central pre-candidate frame;
S242: calculating the intersection ratio of the pre-candidate frames except the center pre-candidate frame and the center pre-candidate frame in each pre-candidate frame group; the intersection ratio is abbreviated as IOU, IOU=I/U, wherein I is the intersection area of the pre-candidate frames except the center pre-candidate frame in the pre-candidate frame group and the center pre-candidate frame, and U is the union area of the pre-candidate frames except the center pre-candidate frame in the pre-candidate frame group and the center pre-candidate frame;
s243: updating the confidence scores of the rest pre-candidate frames in each pre-candidate frame group according to the threshold value of the cross ratio until all the pre-candidate frames in the pre-candidate frame group are selected;
S244: respectively carrying out confidence descending order according to the confidence scores of all the pre-candidate frames in each pre-candidate frame group, deleting the pre-candidate frames lower than a preset confidence threshold value, and selecting the pre-candidate frames higher than the preset confidence threshold value as candidate frames corresponding to the feature images with the three different scales; the preset confidence threshold is preset in advance, and the specific value is not particularly limited, and in this embodiment, the preset confidence threshold is 0.45.
Specifically, in the whole S2 process, taking the first feature map as an example, the second feature map and the third feature map are consistent with the first feature map, firstly FMap1 is input into a WSoft-RPN network, the input FMap is 60×40×512, then CM (3*3 convolution+ Mish activation function) operation is performed, the matrix size after CM operation is still 60×40×512, CS (1*1 convolution+sigmoid activation function) and conv (1*1 convolution) operations in cls (classify, classification function) and reg (regression, regression function) are performed to obtain a classification matrix and a regression matrix of candidate frames, the sizes of the classification matrix and the regression matrix are 60×40×6=60×40× 3*2 (3 represents the number of anchor frames (total 9 anchor frames), 3 groups are divided, 1 group (i.e. 3 groups) is predicted on each feature map, 2 represents whether the vehicle is represented by the feature map, 60×40×12=60×40×3×4) (3 represents the number of anchor frames (9 anchor frames are totally divided into 3 groups), 1 group (i.e. 3 groups) is predicted on each feature map), 4 represents the coordinates of each anchor frame (i.e. the coordinates x, y of the center point of the anchor frame and the width and height w, h of the anchor frame), a weighted soft non-maximum suppression algorithm is executed, namely a WSoft-NMS algorithm in a WSoft-RPN network removes repeated candidate frames, and finally all the preserved candidate frames are cut on FMap1 to obtain corresponding candidate frame feature map matrixes as candidate frames.
S3: performing a blocking operation on the full candidate frames to divide each candidate frame in the full candidate frames into modules of a preset size, and performing pixel point sampling on each module to obtain an output matrix;
Prior to this process of step S3, it comprises:
Inputting the complete candidate frame into a second convolutional neural network to perform a canonical operation on the complete candidate frame, the canonical operation being normalizing the size of the complete candidate frame; the second convolutional neural network is used for uniformly fixing the complete candidate frames (i.e., n candidate frames with different sizes, n being configurable) obtained in the step S2 to a preset size.
In this embodiment, the second convolutional neural network is RoIAlign networks, and in this embodiment, the preset size is 7*7, that is, N candidate frame feature map matrices with m×n×512 size are unified into 1 n×7×7×512 candidate frame feature map matrices, N is configurable, and N is 300 in this embodiment;
In one embodiment of the present invention, the second convolutional neural network includes a blocking layer, a pixel point sampling layer, and a rounding layer.
Step S3, a process including:
s31: partitioning each candidate frame in the complete candidate frames through a partitioning layer to form a module with a preset size;
S32: sampling the pixel points on the module by using a bilinear interpolation method through a pixel point sampling layer to form a pixel point group;
S33: the module performs a pixel preserving operation (MaxPooling operations) to preserve the pixel with the largest value in the pixel group to obtain an output matrix, which is also called a candidate frame feature map matrix, and the final output matrix size is n×7x7x512 because of n candidate frames in total.
Specifically, the procedure of inputting RoIAlign the network is that the specific value of n is not particularly limited, in this embodiment, n is 300, that is, assuming that the total number of inputted complete candidate frames is 300 (one candidate frame is taken as an example, and assuming that the size of the candidate frame is 20×30×512), firstly performing a blocking operation to divide the matrix (20×30×512) into modules with 7*7 fixed sizes, each module has a size of (20/7) ×30/7) =2.86×4.29, and then, performing pixel sampling on each block by using a bilinear interpolation method, assuming that the number of sampling points is set to be 4, namely, changing 2.86 x 4.29=12.27 pixels into 4 pixels, and finally, performing pixel retaining operation, namely MaxPooling operation, on each module, and retaining only the pixel with the largest value among the 4 pixels obtained by sampling to obtain a final output matrix (the size is 7 x 512), wherein the final output matrix is obtained by performing RoIAlign operation on 1 candidate frame. Since there are 300 total, the final output matrix size is 300×7×7×512.
The processing mode of the invention can solve the problems of pixel loss and deviation caused by the fact that the traditional second convolution neural network does not have a blocking step, and pixel point retaining operation is directly carried out after rounding. For example, in the conventional second convolutional neural network, the size of each module in the above embodiment is rounded to (20/7) ×2×4 instead of 2.86×4.29, and then MaxPooling operations (i.e. the pixel with the largest value among the 8 pixels is reserved) are performed, which causes pixel loss and deviation, thereby affecting the model effect.
S4: and carrying out regression and classification on the output matrix to determine vehicle coordinates, and mapping the vehicle coordinates into image coordinates of the original image to complete recognition of the vehicle style.
Specifically, the output matrix respectively carries out regression (reg) of the vehicle detection frame and classification (cls) of the vehicle model through two layers of activation layers (full connection+ Relu activation functions) and two different branch FC layers (full connection layers) and FCS layers (full connection+Softmax activation function layers) to predict vehicle coordinates, and then maps the predicted vehicle coordinates to coordinates on an original image, so that vehicle model identification of the image is realized.
According to the vehicle identification method provided by the invention, the original single-scale feature map is improved to be multi-scale, and the recall of vehicles with different scales is obviously enlarged, so that the overall recall rate of vehicle type identification is improved, the second convolution neural network without block operation is added with block operation to form the second convolution neural network with block operation, the pixel deviation problem is effectively relieved, the positioning precision of a vehicle detection frame is improved, the overall accuracy and recall rate of vehicle type identification are improved, and the frame selection network at least comprises 3*3 convolution layers, an activation function, a classification function, a regression function, a weighted non-maximum suppression algorithm and a clipping algorithm, so that the problem of missing recall and false detection of a vehicle detection frame can be effectively relieved, and the overall accuracy and recall rate of vehicle type identification are improved.
As shown in fig. 2, the present invention provides a vehicle model identification apparatus 100, which can be installed in an electronic device. Depending on the implemented functions, the vehicle model identification apparatus 100 may include a feature map acquisition module 101, a candidate frame generation module 102, an output matrix acquisition module 103, and a vehicle coordinate determination module 104. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The feature map obtaining module 101 is configured to perform vehicle feature extraction on the original image according to a preset feature extraction rule to form three feature maps with different scales;
The candidate frame generation module 102 is configured to perform a frame selection operation on three feature graphs with different scales according to three preset anchor frames, so as to generate candidate frames corresponding to the feature graphs with different scales, and combine the generated candidate frames to obtain a complete candidate frame;
An output matrix obtaining module 103, configured to perform a blocking operation on the complete candidate frames to divide each candidate frame in the complete candidate frames into modules of a preset size, and perform pixel point sampling on each module to obtain an output matrix;
the vehicle coordinate determining module 104 is configured to perform regression and classification on the output matrix to determine vehicle coordinates, and map the vehicle coordinates to image coordinates of the original image to complete recognition of the vehicle style.
As shown in fig. 3, the present invention provides an electronic apparatus 1 implementing a vehicle model identification method.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a car model identification program 12, stored in the memory 11 and executable on said processor 10.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of a car model identification program, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects respective parts of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device 1 and processes data by running or executing programs or modules (e.g., a car model identification program, etc.) stored in the memory 11, and calling data stored in the memory 11.
The bus may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 3 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
Further, the electronic device 1 may also comprise a network interface, optionally the network interface may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the electronic device 1 and other electronic devices.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The vehicle model identification program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, enable:
extracting vehicle features from the original image according to a preset feature extraction rule to form three feature graphs with different scales;
Respectively executing frame selection operation on three feature images with different scales according to three preset anchor frames to generate candidate frames corresponding to the feature images with the three different scales, and merging the generated candidate frames to obtain a complete candidate frame;
Performing a blocking operation on the full candidate frames to divide each candidate frame in the full candidate frames into modules of a preset size, and performing pixel point sampling on each module to obtain an output matrix;
And carrying out regression and classification on the output matrix to determine vehicle coordinates, and mapping the vehicle coordinates into image coordinates of the original image to complete recognition of the vehicle money.
Specifically, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein. It should be emphasized that, to further ensure the privacy and security of the vehicle style identification, the vehicle style identification data may also be stored in the nodes of the blockchain.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (8)

1. A vehicle style identification method, the method comprising:
extracting vehicle features from the original image according to a preset feature extraction rule to form three feature graphs with different scales;
Respectively executing frame selection operation on the three feature images with different scales according to three preset anchor frames to generate candidate frames corresponding to the feature images with different scales, and merging the generated candidate frames to obtain a complete candidate frame; the method comprises the following steps: creating a third convolutional neural network, training the third convolutional neural network by using preset training data to form a frame selection network, and respectively inputting the three feature maps with different scales into the frame selection network, wherein the frame selection network at least comprises 3*3 convolutional layers, an activation function, a classification function, a regression function, 1*1 convolutional layers, a weighted non-maximum suppression algorithm and a clipping algorithm;
Inputting the complete candidate frame into a second convolutional neural network to uniformly fix the complete candidate frame to a preset size; the second convolutional neural network is RoIAlign and comprises a block layer, a pixel point sampling layer and a rounding layer;
Performing a blocking operation on the full candidate frames to divide each candidate frame in the full candidate frames into modules of a preset size, and performing pixel point sampling on each module to obtain an output matrix; the method comprises the following steps: partitioning each candidate frame in the complete candidate frames through the partitioning layer to form a module with a preset size; sampling the pixel points of the module by the pixel point sampling layer by using a bilinear interpolation method to form a pixel point group; performing pixel point retaining operation on the module, and retaining the pixel point with the largest value in the pixel point group to obtain an output matrix;
and respectively carrying out regression of a vehicle detection frame and classification of vehicle styles on the output matrix through two activation layers, two different branch FC layers and two different FCS layers to determine vehicle coordinates, and mapping the vehicle coordinates into image coordinates of the original image to finish recognition of the vehicle styles.
2. The vehicle model identification method according to claim 1, wherein the process of extracting vehicle features from the original image according to a preset feature extraction rule to form three feature maps with different scales comprises:
Converting the original image into a standard image with a preset size;
inputting the canonical image into a feature extraction network to extract vehicle features in the canonical image;
Inputting the standard image into a first convolutional neural network for up-sampling based on the vehicle characteristics so as to obtain three characteristic diagrams with different scales; the three feature maps with different scales comprise a first feature map, a second feature map and a third feature map; the scale of the second characteristic diagram and the scale of the third characteristic diagram are respectively two times and four times that of the first characteristic diagram.
3. The vehicle style identification method of claim 2 wherein,
The first convolutional neural network is a 3*3 convolutional layer plus Mish convolutional activation function neural network.
4. The vehicle model identification method according to claim 1, wherein the process of performing a frame selection operation on the three feature maps of different scales for each of the three preset anchor frames to generate candidate frames corresponding to the three feature maps of different scales, further comprises:
The three feature images with different scales are respectively passed through the 3*3 convolution layers and the activation functions to obtain three corresponding activation feature images;
The three activation feature images are respectively subjected to the operation of the classification function and the regression function to obtain a classification matrix and a regression matrix of the three activation feature images, whether the three activation feature images are vehicle feature images or not is respectively judged, if the three activation feature images are the vehicle feature images, coordinates of the anchor frames are displayed, and three pre-candidate frame groups respectively corresponding to the three feature images with different scales are formed;
And respectively executing a weighted non-maximum suppression algorithm and a clipping algorithm on each pre-candidate frame in the three pre-candidate frame groups to obtain candidate frames corresponding to the feature graphs of the three different scales.
5. The vehicle style identification method according to claim 4, wherein the process of respectively performing a weighted non-maximum suppression algorithm and a clipping algorithm on each pre-candidate frame in the three pre-candidate frame groups to obtain candidate frames corresponding to the three feature maps of different scales includes:
respectively carrying out confidence ranking in each pre-candidate frame group, and selecting the pre-candidate frame with the highest confidence as a central pre-candidate frame;
Calculating the intersection ratio of the pre-candidate frames except the center pre-candidate frame in each pre-candidate frame group and the center pre-candidate frame;
updating the confidence scores of the rest pre-candidate frames in each pre-candidate frame group according to the threshold value of the cross ratio until all the pre-candidate frames in the pre-candidate frame group are selected;
And respectively carrying out confidence descending order according to the confidence scores of all the pre-candidate frames in each pre-candidate frame group, deleting the pre-candidate frames lower than a preset confidence threshold, and selecting the pre-candidate frames higher than the preset confidence threshold as candidate frames corresponding to the feature images with the three different scales.
6. A vehicle style identification device, the device comprising:
the feature map acquisition module is used for extracting vehicle features from the original image according to a preset feature extraction rule to form three feature maps with different scales;
The candidate frame generation module is used for respectively executing frame selection operation on the three feature images with different scales according to three preset anchor frames to generate candidate frames corresponding to the three feature images with different scales, and combining the generated candidate frames to obtain a complete candidate frame; the method comprises the following steps: creating a third convolutional neural network, training the third convolutional neural network by using preset training data to form a frame selection network, and respectively inputting the three feature maps with different scales into the frame selection network, wherein the frame selection network at least comprises 3*3 convolutional layers, an activation function, a classification function, a regression function, 1*1 convolutional layers, a weighted non-maximum suppression algorithm and a clipping algorithm;
The output matrix acquisition module is used for executing a blocking operation on the complete candidate frames to divide each candidate frame in the complete candidate frames into modules with preset sizes, and executing pixel point sampling on each module to acquire an output matrix; wherein before performing the partitioning operation on the full candidate box, the method further comprises: inputting the complete candidate frame into a second convolution neural network to uniformly fix the complete candidate frame to a preset size, wherein the second convolution neural network is RoIAlign networks and comprises a blocking layer, a pixel point sampling layer and a rounding layer; the method comprises the steps of dividing each candidate frame in the complete candidate frames into blocks through the block division layer to form a module with a preset size; sampling the pixel points of the module by the pixel point sampling layer by using a bilinear interpolation method to form a pixel point group; performing pixel point retaining operation on the module, and retaining the pixel point with the largest value in the pixel point group to obtain an output matrix;
And the vehicle coordinate determining module is used for respectively carrying out regression of a vehicle detection frame and classification of vehicle styles on the output matrix through two activating layers, two different branch FC layers and two different FCS layers so as to determine vehicle coordinates, and mapping the vehicle coordinates into image coordinates of the original image so as to finish recognition of the vehicle styles.
7. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the vehicle style identification method of any one of claims 1 to 5.
8. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the vehicle style identification method according to any one of claims 1 to 5.
CN202011505460.1A 2020-12-18 2020-12-18 Vehicle style identification method and device, electronic equipment and storage medium Active CN112580665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011505460.1A CN112580665B (en) 2020-12-18 2020-12-18 Vehicle style identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011505460.1A CN112580665B (en) 2020-12-18 2020-12-18 Vehicle style identification method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112580665A CN112580665A (en) 2021-03-30
CN112580665B true CN112580665B (en) 2024-04-19

Family

ID=75136090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011505460.1A Active CN112580665B (en) 2020-12-18 2020-12-18 Vehicle style identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112580665B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608441A (en) * 2016-01-13 2016-05-25 浙江宇视科技有限公司 Vehicle type identification method and system
US10140553B1 (en) * 2018-03-08 2018-11-27 Capital One Services, Llc Machine learning artificial intelligence system for identifying vehicles
CN109344695A (en) * 2018-08-14 2019-02-15 中山大学 A kind of target based on feature selecting convolutional neural networks recognition methods and device again
CN110443279A (en) * 2019-07-04 2019-11-12 南京邮电大学 A kind of unmanned plane image vehicle checking method based on lightweight neural network
CN110909800A (en) * 2019-11-26 2020-03-24 浙江理工大学 Vehicle detection method based on fast R-CNN improved algorithm
CN111062249A (en) * 2019-11-11 2020-04-24 北京百度网讯科技有限公司 Vehicle information acquisition method and device, electronic equipment and storage medium
CN111461083A (en) * 2020-05-26 2020-07-28 青岛大学 Rapid vehicle detection method based on deep learning
CN111680556A (en) * 2020-04-29 2020-09-18 平安国际智慧城市科技股份有限公司 Method, device and equipment for identifying vehicle type at traffic gate and storage medium
CN111695448A (en) * 2020-05-27 2020-09-22 东南大学 Roadside vehicle identification method based on visual sensor
US10818042B1 (en) * 2020-01-14 2020-10-27 Capital One Services, Llc Vehicle information photo overlay
CN112132033A (en) * 2020-09-23 2020-12-25 平安国际智慧城市科技股份有限公司 Vehicle type recognition method and device, electronic equipment and storage medium
CN112132216A (en) * 2020-09-22 2020-12-25 平安国际智慧城市科技股份有限公司 Vehicle type recognition method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170140237A1 (en) * 2015-11-13 2017-05-18 Hunter Engineering Company Methods For Vehicle Identification And Specification Recall With Localization Optimization For License Plate Recognition

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608441A (en) * 2016-01-13 2016-05-25 浙江宇视科技有限公司 Vehicle type identification method and system
US10140553B1 (en) * 2018-03-08 2018-11-27 Capital One Services, Llc Machine learning artificial intelligence system for identifying vehicles
CN109344695A (en) * 2018-08-14 2019-02-15 中山大学 A kind of target based on feature selecting convolutional neural networks recognition methods and device again
CN110443279A (en) * 2019-07-04 2019-11-12 南京邮电大学 A kind of unmanned plane image vehicle checking method based on lightweight neural network
CN111062249A (en) * 2019-11-11 2020-04-24 北京百度网讯科技有限公司 Vehicle information acquisition method and device, electronic equipment and storage medium
CN110909800A (en) * 2019-11-26 2020-03-24 浙江理工大学 Vehicle detection method based on fast R-CNN improved algorithm
US10818042B1 (en) * 2020-01-14 2020-10-27 Capital One Services, Llc Vehicle information photo overlay
CN111680556A (en) * 2020-04-29 2020-09-18 平安国际智慧城市科技股份有限公司 Method, device and equipment for identifying vehicle type at traffic gate and storage medium
CN111461083A (en) * 2020-05-26 2020-07-28 青岛大学 Rapid vehicle detection method based on deep learning
CN111695448A (en) * 2020-05-27 2020-09-22 东南大学 Roadside vehicle identification method based on visual sensor
CN112132216A (en) * 2020-09-22 2020-12-25 平安国际智慧城市科技股份有限公司 Vehicle type recognition method and device, electronic equipment and storage medium
CN112132033A (en) * 2020-09-23 2020-12-25 平安国际智慧城市科技股份有限公司 Vehicle type recognition method and device, electronic equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Vehicle Types Recognition in Night-Time Scene;Liew, W.,等;《Proceedings of the Multimedia University Engineering Conference》;第139-153页 *
基于多尺度特征融合CNN模型的车辆精细型号识别;刘廷建;顾乃杰;张孝慈;林传文;;计算机工程与应用;20180915;54(第18期);第154-160页 *
基于深度学习的车型识别与车辆检索研究;江昆鹏;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》(第1期);C034-984 *
复杂环境下基于深度学习的车辆识别定位应用研究;边瑞超;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》(第2期);C034-741 *

Also Published As

Publication number Publication date
CN112580665A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
WO2021151277A1 (en) Method and apparatus for determining severity of damage on target object, electronic device, and storage medium
CN112132216B (en) Vehicle type recognition method and device, electronic equipment and storage medium
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN112581522B (en) Method and device for detecting position of target in image, electronic equipment and storage medium
CN111476225B (en) In-vehicle human face identification method, device, equipment and medium based on artificial intelligence
CN112396005A (en) Biological characteristic image recognition method and device, electronic equipment and readable storage medium
CN111274937B (en) Tumble detection method, tumble detection device, electronic equipment and computer-readable storage medium
CN112200189B (en) Vehicle type recognition method and device based on SPP-YOLOv and computer readable storage medium
CN111639704A (en) Target identification method, device and computer readable storage medium
CN111931729B (en) Pedestrian detection method, device, equipment and medium based on artificial intelligence
CN112749653A (en) Pedestrian detection method, device, electronic equipment and storage medium
CN112132812B (en) Certificate verification method and device, electronic equipment and medium
CN114495060B (en) Road traffic marking recognition method and device
CN112528903B (en) Face image acquisition method and device, electronic equipment and medium
CN113487621A (en) Medical image grading method and device, electronic equipment and readable storage medium
CN112580665B (en) Vehicle style identification method and device, electronic equipment and storage medium
CN114118127B (en) Visual scene sign detection and recognition method and device
CN113792671A (en) Method and device for detecting face synthetic image, electronic equipment and medium
CN112434601B (en) Vehicle illegal detection method, device, equipment and medium based on driving video
CN113627394A (en) Face extraction method and device, electronic equipment and readable storage medium
CN112633134A (en) In-vehicle face recognition method, device and medium based on image recognition
CN111652226B (en) Picture-based target identification method and device and readable storage medium
CN114821216A (en) Method for modeling and using picture descreening neural network model and related equipment
CN114359645B (en) Image expansion method, device, equipment and storage medium based on characteristic area
CN112101279B (en) Target object abnormality detection method, target object abnormality detection device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant