CN112861567B - Vehicle type classification method and device - Google Patents

Vehicle type classification method and device Download PDF

Info

Publication number
CN112861567B
CN112861567B CN201911102143.2A CN201911102143A CN112861567B CN 112861567 B CN112861567 B CN 112861567B CN 201911102143 A CN201911102143 A CN 201911102143A CN 112861567 B CN112861567 B CN 112861567B
Authority
CN
China
Prior art keywords
vehicle
vehicle type
character information
identified
motor vehicle
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
CN201911102143.2A
Other languages
Chinese (zh)
Other versions
CN112861567A (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.)
Shanghai Goldway Intelligent Transportation System Co Ltd
Original Assignee
Shanghai Goldway Intelligent Transportation System 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 Shanghai Goldway Intelligent Transportation System Co Ltd filed Critical Shanghai Goldway Intelligent Transportation System Co Ltd
Priority to CN201911102143.2A priority Critical patent/CN112861567B/en
Publication of CN112861567A publication Critical patent/CN112861567A/en
Application granted granted Critical
Publication of CN112861567B publication Critical patent/CN112861567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
    • 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
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/63Scene text, e.g. street names
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/28Character recognition specially adapted to the type of the alphabet, e.g. Latin alphabet
    • G06V30/287Character recognition specially adapted to the type of the alphabet, e.g. Latin alphabet of Kanji, Hiragana or Katakana characters

Abstract

The application provides a vehicle type classification method and device, belongs to the technical field of computers, and is applied to electronic equipment, wherein the method comprises the following steps: preliminary classifying pictures containing the motor vehicles to be identified through a preset coarse-granularity classification model to obtain a first vehicle type of the motor vehicles to be identified; if the first vehicle type is a preset vehicle type, performing secondary classification on the picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-granularity classification model is pre-trained and completed based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-granularity classification model comprises a corresponding relation between image features and the vehicle type of the motor vehicle; and determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type. By adopting the method and the device, the accuracy of vehicle type classification can be improved.

Description

Vehicle type classification method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for classifying vehicle models.
Background
The traffic control authorities have different regulations for different types of motor vehicles, such as a travel-prohibited route and a parking-permitted position. The vehicle type comprises a sedan, a minibus, a passenger car, a bus and a pick-up truck. In order to ensure road safety, rolling stock violating the management regulations may be detected by identifying the type of the rolling stock.
In the related art, an electronic device for detecting a motor vehicle violating a management rule may acquire a picture containing a motor vehicle to be identified by monitoring cameras installed on both sides of a road. Then, the electronic equipment can classify the vehicle type of the motor vehicle to be identified through a preset convolutional neural network and the picture to obtain a target vehicle type of the motor vehicle to be identified. And then, the electronic equipment can judge whether the target vehicle type is a preset vehicle type, and if the target vehicle type is the preset vehicle type, the electronic equipment can judge that the motor vehicle to be identified violates the management rule.
However, by the convolutional neural network and the picture containing the motor vehicle to be recognized, the passenger car and the bus similar in appearance cannot be classified, and therefore, the model of the motor vehicle is classified based on the convolutional neural network as the coarse-grained classification model, resulting in low accuracy of model classification.
Disclosure of Invention
An object of the embodiment of the application is to provide a vehicle type classification method and device, so as to improve accuracy of vehicle type classification. The specific technical scheme is as follows:
in a first aspect, a vehicle type classification method is provided and applied to an electronic device, and the method includes:
Preliminary classifying pictures containing the motor vehicles to be identified through a preset coarse-granularity classification model to obtain a first vehicle type of the motor vehicles to be identified;
if the first vehicle type is a preset vehicle type, performing secondary classification on the picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-granularity classification model is pre-trained based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle type of the motor vehicle;
and determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type.
Optionally, if the first vehicle model is a preset vehicle model, the method further includes:
extracting a face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified;
identifying character information contained in the face image area;
determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information;
The determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type comprises:
and if the second vehicle type is the same as the third vehicle type, taking the second vehicle type as the target vehicle type of the motor vehicle to be identified.
Optionally, if the second vehicle type is different from the third vehicle type, the method further includes:
determining a first confidence level of the second vehicle model based on the fine-grained classification model and the image containing the motor vehicle to be identified;
determining a second confidence level of the third vehicle type based on the corresponding relation between the character information and the vehicle type and the character information;
if the first confidence level is greater than the second confidence level, the second model is taken as a target model of the motor vehicle to be identified;
and if the first confidence level is smaller than the second confidence level, the third vehicle model is taken as the target vehicle model of the motor vehicle to be identified.
Optionally, the number of the character information is multiple, and determining the second confidence level of the third vehicle type based on the correspondence between the character information and the vehicle type and the character information includes:
for each piece of character information, if the corresponding relation between the pre-stored character information and the vehicle type is found, the vehicle type corresponding to the character information is determined to be successfully matched with the character;
Calculating the proportion value of the number of the character information of which the corresponding vehicle type is the same vehicle type in the character information of which the character matching is successful, and obtaining the proportion value corresponding to different vehicle types;
and taking the maximum value in the proportional values corresponding to the different vehicle types as a second confidence level, and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
Optionally, if the vehicle type corresponding to the character information is found in the corresponding relation between the pre-stored character information and the vehicle type, determining that the character matching is successful includes:
if a target road level corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road level, determining that the character matching is successful, wherein the road level comprises a road level or an urban road level;
and determining the vehicle type corresponding to the target road level according to the corresponding relation between the target road level and the pre-stored road level and the vehicle type, and obtaining the vehicle type corresponding to the character information.
In a second aspect, there is provided a vehicle type classification apparatus applied to an electronic device, the apparatus including:
The first classification module is used for carrying out preliminary classification on pictures containing the motor vehicles to be identified through a preset coarse-grained classification model to obtain a first vehicle type of the motor vehicles to be identified;
the second classification module is used for secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model when the first vehicle model is a preset vehicle model, so as to obtain a second vehicle model of the motor vehicle to be identified, wherein the fine-grained classification model is pre-trained and completed based on an image sample and the vehicle model of the motor vehicle contained in the fine-grained classification model, and the fine-grained classification model comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle model of the motor vehicle;
and the first determining module is used for determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type.
Optionally, the apparatus further includes:
the extraction module is used for extracting a face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified when the first vehicle type is a preset vehicle type;
the recognition module is used for recognizing character information contained in the face image area;
The second determining module is used for determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information;
the first determining module is further configured to, when the second vehicle model is the same as the third vehicle model, take the second vehicle model as the target vehicle model of the motor vehicle to be identified.
Optionally, the apparatus further includes:
the second classification module is further configured to determine a first confidence level of the second vehicle model based on the fine-grained classification model and the image including the motor vehicle to be identified;
the second determining module is further configured to determine a second confidence level of the third vehicle type based on the correspondence between the character information and the vehicle type and the character information;
a third determining module configured to, when the second vehicle type is different from the third vehicle type and the first confidence level is greater than the second confidence level, take the second vehicle type as a target vehicle type of the motor vehicle to be identified;
the third determining module is further configured to, when the second vehicle type is different from the third vehicle type and the first confidence level is smaller than the second confidence level, use the third vehicle type as the target vehicle type of the motor vehicle to be identified.
Optionally, the second determining module includes:
the first determining submodule is used for determining that the character matching is successful if the vehicle type corresponding to the character information is found in the corresponding relation between the prestored character information and the vehicle type for each character information when the number of the character information is multiple;
the calculation sub-module is used for calculating the proportion value of the number of the character information of the same vehicle type in the character information of which the character matching is successful to the number of the character information of which the character matching is successful to obtain the proportion value corresponding to different vehicle types;
and the second determining submodule is used for taking the maximum value in the proportion values corresponding to different vehicle types as a second confidence level and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
Optionally, the first determining submodule includes:
a third determining submodule, configured to determine that character matching is successful when a target road level corresponding to the character information is found in a correspondence between pre-stored character information and road levels, where the road levels include a road level or an urban road level;
and the fourth determining submodule is used for determining the vehicle type corresponding to the target road level according to the corresponding relation between the target road level and the pre-stored road level and the vehicle type and obtaining the vehicle type corresponding to the character information.
In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of any of the first aspect when executing a program stored on a memory.
In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any of the first aspects.
According to the vehicle type classification method and device, through a preset coarse-granularity classification model, a picture containing a motor vehicle to be identified is subjected to preliminary classification, and a first vehicle type of the motor vehicle to be identified is obtained; if the first vehicle type is a preset vehicle type, performing secondary classification on a picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-granularity classification model is pre-trained based on an image sample and the included vehicle type of the motor vehicle, and comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle type of the motor vehicle; and determining a target vehicle type of the motor vehicle to be identified according to the second vehicle type.
When the first vehicle type is a preset vehicle type which is easy to classify wrongly, the picture containing the motor vehicle to be identified is classified secondarily through the fine-granularity classification model, so that a second vehicle type of the motor vehicle to be identified is obtained, and a target vehicle type of the motor vehicle to be identified is determined according to the second vehicle type, and therefore accuracy of vehicle type classification can be improved.
Of course, not all of the above-described advantages need be achieved simultaneously in practicing any one of the products or methods of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a vehicle type classification method provided in an embodiment of the present application;
fig. 2 is a flowchart of a vehicle type classification method provided in an embodiment of the present application;
fig. 3a is a schematic diagram of a face image area according to an embodiment of the present application;
FIG. 3b is a schematic diagram of another face image area according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a vehicle type classification method provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a vehicle type classification device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The embodiment of the application provides a vehicle type classification method, which is applied to electronic equipment, wherein the electronic equipment can be any electronic equipment with a searching function and a calculating function, such as an electronic computer and a tablet personal computer. The electronic device may be connected to monitoring cameras installed on both sides of the road, and recognize the type of the rolling stock running on the road based on pictures including the rolling stock obtained by the monitoring cameras, thereby detecting rolling stock violating the management regulation in the road. Vehicle types include sedans, minibuses, buses, and pick-up trucks.
The embodiment of the application provides a method for classifying a vehicle type of a motor vehicle by electronic equipment based on a coarse-granularity classification model and a fine-granularity classification model, as shown in fig. 1, wherein the specific processing process comprises the following steps:
step 101, performing preliminary classification on a picture containing the motor vehicle to be identified through a preset coarse-granularity classification model to obtain a first vehicle type of the motor vehicle to be identified.
The electronic device may be preset with a coarse-granularity classification model, such as a convolutional neural network, and a support vector machine.
In an implementation, the electronic device may take a photograph of the road through the monitoring camera to obtain a road picture, and then the electronic device may determine whether the road picture includes the motor vehicle, that is, determine whether the road picture includes the motor vehicle to be identified.
If the road picture contains the motor vehicle to be identified, the electronic equipment can carry out preliminary classification on the picture containing the motor vehicle to be identified through a preset coarse granularity classification model to obtain a first vehicle type of the motor vehicle to be identified. If the road picture does not contain the motor vehicle to be identified, the electronic device may not perform subsequent processing.
In the embodiment of the application, the electronic device may determine whether the picture includes the motor vehicle through a preset target detection algorithm. The target detection algorithm may be any algorithm with an image recognition function, such as fast R-CNN (fast Recurrent-Convolutional Neural Networks, faster circular convolutional neural network), YOLO (You Only Look Once, real-time target detection system), which embodiments of the present application are not limited in detail. The specific steps of primarily classifying the pictures containing the motor vehicle to be identified by the electronic equipment through the coarse-granularity classification model are not limited.
Step 102, if the first vehicle model is a preset vehicle model, performing secondary classification on the picture containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle model of the motor vehicle to be identified.
The fine-granularity classification model is pre-trained based on the image sample and the model of the motor vehicle, and comprises a corresponding relation between image features and the model of the motor vehicle, such as an attention model and a support vector machine. In this embodiment, the preset vehicle type may be a bus or a passenger car. The preset vehicle type can be one or more of buses, interurban buses, tourist buses and school buses.
In an implementation, the electronic device may determine whether the first vehicle model is a preset vehicle model. If the first vehicle model is a preset vehicle model, the electronic device may determine an image area of the motor vehicle to be identified in the picture containing the motor vehicle to be identified, and then generate a default size picture containing a preset size of the image area. And then, the electronic equipment can input the picture with the default size into a preset fine-granularity classification model, and the output result of the fine-granularity classification model is the second model of the motor vehicle to be identified, so that the picture containing the motor vehicle to be identified is secondarily classified. If the first vehicle model is not the preset vehicle model, the electronic equipment does not need to perform subsequent processing.
For example, if the first vehicle type is a passenger car or a bus, the electronic device may determine an image area of the motor vehicle to be identified in a picture containing the motor vehicle to be identified. The electronic device may then generate a default size picture containing the image area in 224 x 224 size, where the image area other than the image area may be filled with black pixels. And then, the electronic equipment can input the picture with the default size into a fine-granularity classification model, and the output result of the fine-granularity classification model is a passenger car, namely a second vehicle type of the motor vehicle to be identified is the passenger car, so that the secondary classification of the picture of the motor vehicle to be identified is completed. If the first vehicle type is a car, the electronic device can determine that the first vehicle type is not a preset vehicle type, and the electronic device can not perform subsequent processing.
And step 103, determining a target vehicle type of the motor vehicle to be identified according to the second vehicle type.
In practice, the manner in which the electronic device determines the target vehicle type of the motor vehicle to be identified according to the second vehicle type may be varied, and in one possible implementation, the electronic device may directly take the second vehicle type as the target vehicle type of the motor vehicle to be identified. In another possible implementation manner, the electronic device may detect the vehicle type of the motor vehicle to be identified in other manners, compare the obtained detection result with the second vehicle type, and determine the target vehicle type of the motor vehicle to be identified according to the comparison result, where the specific processing procedure will be described in detail later.
In this embodiment of the present application, after determining the target vehicle type of the motor vehicle to be identified, the electronic device may determine whether the motor vehicle to be identified violates the management rule according to the target vehicle type and a preset violation determination rule. The rule of violation judgment may be that in a road picture taken by a certain monitoring camera, the model of the motor vehicle to be identified may not be a passenger car. Violation determination rules may also be used so that within a certain period of time the model of the motor vehicle to be identified may not be a passenger car.
For example, when the target vehicle type is a passenger car, the electronic device determines that the passenger car should not appear in the current road according to a preset rule for determining violation, and then the electronic device may determine that the motor vehicle to be identified violates the management rule.
In one possible implementation, the electronic device may determine whether the target vehicle type is a preset vehicle type, and send a preset alarm message when the target vehicle type is the preset vehicle type, so as to prompt that there is a motor vehicle violating the management rule. Alternatively, the electronic device may acquire the license plate number of the motor vehicle to be identified so as to record the motor vehicle violating the management regulation by recording the license plate number.
In the embodiment of the application, a picture containing a motor vehicle to be identified is initially classified through a preset coarse-granularity classification model to obtain a first vehicle type of the motor vehicle to be identified; if the first vehicle type is a preset vehicle type, performing secondary classification on the picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified; and determining a target vehicle type of the motor vehicle to be identified according to the second vehicle type. When the first vehicle type is a preset vehicle type which is easy to classify wrongly, the picture containing the motor vehicle to be identified is classified secondarily through the fine-granularity classification model, so that a second vehicle type of the motor vehicle to be identified is obtained, and a target vehicle type of the motor vehicle to be identified is determined according to the second vehicle type, and therefore accuracy of vehicle type classification can be improved.
Optionally, the electronic device may detect the vehicle type of the motor vehicle to be identified by performing semantic analysis on the text in the picture containing the motor vehicle to be identified, to obtain a detection result, and then determine the target vehicle type according to a comparison result of the detection result and the second vehicle type. As shown in fig. 2, the specific processing procedure includes:
step 201, extracting a face image area of the motor vehicle to be identified from a picture containing the motor vehicle to be identified.
The automobile face image area is an image area containing an automobile face to be identified, and the automobile face to be identified comprises a radiator barrier, an automobile lamp, a front windshield glass and the like.
The specific implementation manner of extracting the face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified by the electronic device can adopt any face extraction manner in the related art, and is not limited herein.
Step 202, character information contained in the face image area is recognized.
The electronic device may be preset with a text recognition algorithm, where the text recognition algorithm may be any algorithm with a text recognition function, for example, OCR (Optical Character Recognition ), attention OCR (optical character recognition based on attention mechanism), and embodiments of the present application are not specifically limited.
In an implementation, the electronic device may identify character information contained in the face image region through a text recognition algorithm.
In one possible implementation, the specific processing procedure from step 201 to step 202 may be: the electronic equipment can determine a license plate image area corresponding to the license plate in a picture containing the motor vehicle to be identified, then the electronic equipment can fill gray pixels in the license plate image area, expand the license plate image area according to the coordinates of the license plate image area and a preset proportion, and determine a face image area.
The electronic device may determine an image area containing the text in the face image area, and correct the display direction of the text in the image area by means of radon hough (radon hough) transformation. Then, dividing the corrected image area by a projection histogram mode to obtain a plurality of pictures containing single-row characters; and then, the electronic equipment can identify the picture containing the single-row characters through a character identification algorithm to obtain character information contained in the face image area.
The electronic device recognizes the face image area shown in fig. 3a through a character recognition algorithm, so that character information can be obtained: chong Zhou, huayang. The electronic device recognizes the face image area shown in fig. 3b through a character recognition algorithm, so that character information can be obtained: dew-regulating village, 116 roads, baixiang village, old people hospitals and new people hospitals.
Step 203, determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information.
The electronic device may be preset with a semantic analysis Algorithm, where The semantic analysis Algorithm may be any Algorithm with a function of semantic analysis and character matching, for example, KMP Algorithm (The Knuth-Morris-Pratt Algorithm, knudster-Morris-prate operation), and BM Algorithm (Boyer-Moore string search Algorithm), which are not specifically limited in The embodiments of The present application.
In implementation, the electronic device may search for target character information matched with the character information included in the face image area in a correspondence between the pre-stored character information and the vehicle type, and use the vehicle type corresponding to the target character information as a third vehicle type of the motor vehicle to be identified.
In one possible implementation manner, the electronic device may match character information contained in the face image area with character information contained in a corresponding relationship between the character information and the vehicle type through a semantic analysis algorithm.
And 204, if the second vehicle type is the same as the third vehicle type, taking the second vehicle type as a target vehicle type of the motor vehicle to be identified.
In an implementation, the electronic device may determine whether the second vehicle model is the same as the third vehicle model, and if the second vehicle model is the same as the third vehicle model, the electronic device may use the second vehicle model or the third vehicle model as a target vehicle model of the motor vehicle to be identified.
If the second vehicle type is different from the third vehicle type, the electronic device can select the second vehicle type or the third vehicle type as a target vehicle type of the motor vehicle to be identified according to a preset selection rule, and detailed description will be given later on in the specific processing process.
In this embodiment of the present application, since the face area of the bus or the bus is provided with the text slogan in general, the information such as the start point, the end point, the approach station, the line number and the like of the bus or the bus is marked. Therefore, the electronic device may extract a face image area of the motor vehicle to be identified from the picture including the motor vehicle to be identified, identify character information included in the face image area, and then determine a third vehicle type of the motor vehicle to be identified according to the correspondence between the character information and the vehicle type and the character information. When the second vehicle type is the same as the third vehicle type, the second vehicle type or the third vehicle type is used as a target vehicle type, the third vehicle type of the motor vehicle to be identified is acquired based on a text semantic analysis mode, and then the target vehicle type of the motor vehicle to be identified is determined through a mode of cross verification with a classification result of the fine-granularity classification model, so that the accuracy of vehicle type classification can be improved.
Optionally, if the second vehicle type is different from the third vehicle type, the specific processing procedure of the electronic device for selecting the second vehicle type or the third vehicle type as the target vehicle type of the motor vehicle to be identified according to the preset selection rule may include:
the electronic device is able to determine not only the second vehicle type but also a first confidence level of the second vehicle type based on the fine-grained classification model and the image comprising the motor vehicle to be identified; the electronic device can determine not only a third vehicle type of the motor vehicle to be identified, but also a second confidence level of the third vehicle type based on the corresponding relation between the character information and the vehicle type and the character information.
The electronic device may compare the first confidence level to a second confidence level and, if the first confidence level is greater than the second confidence level, treat the second model as a target model of the motor vehicle to be identified. And if the first confidence level is smaller than the second confidence level, taking the third vehicle type as a target vehicle type of the motor vehicle to be identified.
For example, the second vehicle type is a passenger car, the third vehicle type is a bus, the first confidence level of the second vehicle type is 0.8, the second confidence level of the third vehicle type is 0.9, the electronic device may compare the first confidence level with the second confidence level, determine that the first confidence level is less than the second confidence level, and then the electronic device may use the third vehicle type bus as a target vehicle type of the motor vehicle to be identified.
In the embodiment of the application, the electronic device may compare the first confidence level of the second vehicle type and the second confidence level of the third vehicle type when the second vehicle type determined by the fine-granularity classification model and the picture containing the motor vehicle to be identified is different from the third vehicle type determined by the semantic analysis algorithm and the character information, and determine the vehicle type with the larger corresponding confidence level as the target vehicle type, thereby improving accuracy of vehicle type classification.
The embodiment of the application provides a setting process of a fine-grained classification model, which specifically comprises the following steps: each channel of the convolution layer in the fine-grained classification model represents a certain visual feature, or a certain local area of the motor vehicle to be identified. Wherein visual features such as texture of the heat dissipating grill, contour of fog lamp, local area such as upper half of car face, car lamp shape, direction indicator lamp, car logo. In order to facilitate the representation of all the features of a certain local area of an object to be identified by a certain convolution layer, it is necessary to perform cluster merging on the channels, and assign weights to each channel so as to perform a weighted calculation of the channels.
It can be understood that, due to the limitation of the convolutional neural network output layer, the coarse-granularity classification model cannot accurately classify the vehicle types with similar shapes such as buses and buses, while the fine-granularity classification model can find the components with differentiation in the motor vehicles by clustering the channels with similar peak corresponding areas and weighting and adding the channels of the same class, learn finer image features and calculate the confidence level of classification results of different vehicle types, so that fine vehicle type classification can be realized, and the classification accuracy of similar vehicle types is effectively improved.
In this embodiment of the present application, a specific implementation manner of training the fine-grained classification model based on the image sample and the model of the motor vehicle included therein may be any model training manner in the related art, which is not limited herein.
Optionally, when the number of character information included in the face image area is multiple, the electronic device determines, based on the correspondence between the character information and the vehicle type and the character information, a third vehicle type of the motor vehicle to be identified and a implementation manner of a second confidence level of the third vehicle type, as shown in fig. 4, specifically including:
step 401, for each piece of character information, if a vehicle type corresponding to the character information is found in the corresponding relation between the pre-stored character information and the vehicle type, determining that the character matching is successful.
The electronic device may store a corresponding relationship between character information and a vehicle type in advance, where the corresponding relationship between the character information and the vehicle type may be that a vehicle type corresponding to character information of "bus", "connection vehicle" or "travel" is a passenger car, and a vehicle type corresponding to character information of "line", "bus", "party pioneer number" or "coin" is a bus.
In implementation, the electronic device may match, according to a semantic analysis algorithm, the character information with character information included in a correspondence between the character information and a vehicle type for each character information included in the face image area. If the target character information matched with the character information exists, the electronic equipment takes the vehicle type corresponding to the target character information as the vehicle type corresponding to the character information, determines to find the vehicle type corresponding to the character information, and determines that the character matching is successful.
If there is no target character information matching the character information, the electronic device may determine that the character matching fails. Therefore, the electronic equipment can determine character information of successful character matching and corresponding vehicle types.
Step 402, calculating the ratio value of the number of the character information of the same vehicle type to the number of the character information of the character matching success in the character information of the character matching success, and obtaining the ratio value corresponding to different vehicle types.
In implementation, the electronic device may determine the number of character information with successful character matching, determine the number of character information with the same vehicle type as the corresponding vehicle type in the character information with successful character matching, and then calculate a ratio value of the number of character information with the same vehicle type as the corresponding vehicle type to the number of character information with successful character matching, so as to obtain the ratio value corresponding to different vehicle types.
For example, the electronic device may determine that the number of character information with successful character matching is 5, and determine that the number of character information with the corresponding vehicle type being a bus is 1, and the number of character information with the corresponding vehicle type being a bus is 4, among the character information with successful character matching. Then, the electronic equipment can calculate the proportion value of the number of the character information of the bus corresponding to the vehicle type to the number of the character information successfully matched with the characters, and the proportion value corresponding to the bus is 0.2. The electronic equipment can calculate the proportion value of the number of the character information of the passenger car corresponding to the vehicle type to the number of the character information successfully matched with the characters, and the proportion value corresponding to the passenger car is 0.8.
And step 403, taking the maximum value in the proportional values corresponding to different vehicle types as a second confidence level, and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
For example, the electronic device may use the maximum value 0.8 of the ratio values 0.2 and 0.8 corresponding to different vehicle types as the second confidence level, and use the vehicle type passenger car corresponding to the ratio value 0.8 as the third vehicle type of the motor vehicle to be identified.
In the embodiment of the application, the electronic device may perform character matching on the character information according to the corresponding relationship between the character information and the vehicle type for each character information. And then, calculating the proportion value of the number of the character information of the same vehicle type corresponding to the character information of which the character matching is successful to the number of the character information of the same vehicle type, so as to obtain the proportion value corresponding to different vehicle types. And taking the maximum value in the proportional values corresponding to different vehicle types as a second confidence level, and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified. Because the maximum value in the proportional values corresponding to different vehicle types is used as the second confidence level, and the vehicle type corresponding to the maximum value is used as the third vehicle type of the motor vehicle to be identified, the accuracy of vehicle type classification can be improved.
Optionally, an implementation manner for performing character matching on character information included in a face image area by using electronic equipment according to a corresponding relationship between the character information and a vehicle type is provided in an embodiment of the present application, including:
step one, if a target road level corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road level, the character matching is determined to be successful.
The electronic device may store a correspondence between character information and a road level in advance, where the road level includes a road level or an urban road level. The electronic equipment can acquire the corresponding relation between the character information and the road level by acquiring a pre-stored national bus database. The electronic device may further store a corresponding relationship between the road level and the vehicle type in advance, where the corresponding relationship between the road level and the vehicle type, for example, the vehicle type corresponding to the urban road level is a bus, and the vehicle type corresponding to the road level is a passenger car. In this embodiment, the road level may also be one or more of a city, a bus line, and a bus station, which is not specifically limited in this embodiment.
In implementation, the electronic device may match, according to a semantic analysis algorithm, the character information with the character information included in the correspondence between the character information and the road level for each character information included in the face image area. If the target character information matched with the character information exists, the electronic equipment takes the road level corresponding to the target character information as the road level corresponding to the character information, determines to find the road level corresponding to the character information, and determines that the character matching is successful.
If there is no target character information matching the character information, the electronic device may determine that the character matching fails.
For example, as shown in fig. 3a, the electronic device may determine, according to a semantic analysis algorithm and a correspondence between the character information and the road level, that the target road level corresponding to the character information is a city. As shown in fig. 3b, the electronic device may determine, according to a semantic analysis algorithm and a corresponding relationship between the character information and the road level, that the target road level corresponding to the character information is a bus route, and similarly, for the character information "accent village", "hundred auspicious village", "old people hospital", "new people hospital", the electronic device may determine that the target road level corresponding to the character information is a bus stop.
And step two, determining the vehicle type corresponding to the target road level according to the target road level and the corresponding relation between the pre-stored road level and the vehicle type, and obtaining the vehicle type corresponding to the character information.
In implementation, the electronic device may use the vehicle type corresponding to the target road level as the vehicle type corresponding to the character information in the pre-stored correspondence between the road level and the vehicle type.
For example, based on the face image area shown in fig. 3a, the electronic device may use a model passenger car corresponding to the target road level city as a model corresponding to the character information "Chongzhou" and "Huayang". Based on the face image area shown in fig. 3b, the electronic device can use the vehicle type bus corresponding to the bus route of the target road level as the vehicle type corresponding to the character information 116 road.
Therefore, the electronic equipment can determine character information of successful character matching and corresponding vehicle types.
In the embodiment of the application, if the electronic device finds the target road level corresponding to the character information in the corresponding relation between the character information and the road level, the character matching is determined to be successful. Then, the electronic equipment can determine the vehicle type corresponding to the target road level according to the corresponding relation between the pre-stored road level and the vehicle type, and obtain the vehicle type corresponding to the character information. Therefore, the electronic equipment can determine the target road level corresponding to the character information based on the preset national bus database, and further determine the vehicle type corresponding to the target road level based on the corresponding relation between the road level and the vehicle type, so that the accuracy of determining the vehicle type corresponding to the character information is improved. The third vehicle type and the second confidence level of the third vehicle type are conveniently determined according to the vehicle type corresponding to the character information, so that the accuracy of vehicle type classification can be improved.
The embodiment of the application also provides a vehicle type classification device, as shown in fig. 5, which is applied to electronic equipment, and the device comprises:
the first classification module 510 is configured to perform preliminary classification on a picture including a motor vehicle to be identified through a preset coarse-granularity classification model, so as to obtain a first model of the motor vehicle to be identified;
the second classification module 520 is configured to, when the first vehicle model is a preset vehicle model, perform secondary classification on the picture including the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle model of the motor vehicle to be identified, where the fine-grained classification model is pre-trained based on an image sample and a vehicle model of the motor vehicle included in the image sample, and the fine-grained classification model includes a correspondence between image features of each part of the motor vehicle and the vehicle model of the motor vehicle;
a first determining module 530, configured to determine, according to the second vehicle model, a target vehicle model of the motor vehicle to be identified.
Optionally, the apparatus further includes:
the extraction module is used for extracting a face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified when the first vehicle type is a preset vehicle type;
The recognition module is used for recognizing character information contained in the face image area;
the second determining module is used for determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information;
the first determining module is further configured to, when the second vehicle model is the same as the third vehicle model, take the second vehicle model as the target vehicle model of the motor vehicle to be identified.
Optionally, the apparatus further includes:
the second classification module is further configured to determine a first confidence level of the second vehicle model based on the fine-grained classification model and the image including the motor vehicle to be identified;
the second determining module is further configured to determine a second confidence level of the third vehicle type based on the correspondence between the character information and the vehicle type and the character information;
a third determining module configured to, when the second vehicle type is different from the third vehicle type and the first confidence level is greater than the second confidence level, take the second vehicle type as a target vehicle type of the motor vehicle to be identified;
the third determining module is further configured to, when the second vehicle type is different from the third vehicle type and the first confidence level is smaller than the second confidence level, use the third vehicle type as the target vehicle type of the motor vehicle to be identified.
Optionally, the second determining module includes:
the first determining submodule is used for determining that the character matching is successful if the vehicle type corresponding to the character information is found in the corresponding relation between the prestored character information and the vehicle type for each character information when the number of the character information is multiple;
the calculation sub-module is used for calculating the proportion value of the number of the character information of the same vehicle type in the character information of which the character matching is successful to the number of the character information of which the character matching is successful to obtain the proportion value corresponding to different vehicle types;
and the second determining submodule is used for taking the maximum value in the proportion values corresponding to different vehicle types as a second confidence level and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
Optionally, the first determining submodule includes:
a third determining submodule, configured to determine that character matching is successful when a target road level corresponding to the character information is found in a correspondence between pre-stored character information and road levels, where the road levels include a road level or an urban road level;
and the fourth determining submodule is used for determining the vehicle type corresponding to the target road level according to the corresponding relation between the target road level and the pre-stored road level and the vehicle type and obtaining the vehicle type corresponding to the character information.
According to the vehicle type classification device provided by the embodiment of the application, the pictures containing the motor vehicles to be identified are initially classified through the preset coarse-granularity classification model, so that a first vehicle type of the motor vehicles to be identified is obtained; if the first vehicle type is a preset vehicle type, performing secondary classification on a picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-granularity classification model is pre-trained based on an image sample and the included vehicle type of the motor vehicle, and comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle type of the motor vehicle; and determining a target vehicle type of the motor vehicle to be identified according to the second vehicle type.
The embodiment of the present application further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 perform communication with each other through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to execute the program stored in the memory 603, and implement the following steps:
Preliminary classifying pictures containing the motor vehicles to be identified through a preset coarse-granularity classification model to obtain a first vehicle type of the motor vehicles to be identified;
if the first vehicle type is a preset vehicle type, performing secondary classification on the picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-granularity classification model is pre-trained based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle type of the motor vehicle;
and determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type.
Optionally, if the first vehicle model is a preset vehicle model, the method further includes:
extracting a face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified;
identifying character information contained in the face image area;
determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information;
The determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type comprises:
and if the second vehicle type is the same as the third vehicle type, taking the second vehicle type as the target vehicle type of the motor vehicle to be identified.
Optionally, if the second vehicle type is different from the third vehicle type, the method further includes:
determining a first confidence level of the second vehicle model based on the fine-grained classification model and the image containing the motor vehicle to be identified;
determining a second confidence level of the third vehicle type based on the corresponding relation between the character information and the vehicle type and the character information;
if the first confidence level is greater than the second confidence level, the second model is taken as a target model of the motor vehicle to be identified;
and if the first confidence level is smaller than the second confidence level, the third vehicle model is taken as the target vehicle model of the motor vehicle to be identified.
Optionally, the number of the character information is multiple, and determining the second confidence level of the third vehicle type based on the correspondence between the character information and the vehicle type and the character information includes:
for each piece of character information, if the corresponding relation between the pre-stored character information and the vehicle type is found, the vehicle type corresponding to the character information is determined to be successfully matched with the character;
Calculating the proportion value of the number of the character information of which the corresponding vehicle type is the same vehicle type in the character information of which the character matching is successful, and obtaining the proportion value corresponding to different vehicle types;
and taking the maximum value in the proportional values corresponding to the different vehicle types as a second confidence level, and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
Optionally, if the vehicle type corresponding to the character information is found in the corresponding relation between the pre-stored character information and the vehicle type, determining that the character matching is successful includes:
if a target road level corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road level, determining that the character matching is successful, wherein the road level comprises a road level or an urban road level;
and determining the vehicle type corresponding to the target road level according to the corresponding relation between the target road level and the pre-stored road level and the vehicle type, and obtaining the vehicle type corresponding to the character information.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided herein, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the vehicle type classification methods described above.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the vehicle type classification methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (10)

1. A vehicle type classification method, characterized in that it is applied to an electronic device, the method comprising:
preliminary classifying pictures containing the motor vehicles to be identified through a preset coarse-granularity classification model to obtain a first vehicle type of the motor vehicles to be identified;
if the first vehicle type is a preset vehicle type, performing secondary classification on the picture containing the motor vehicle to be identified through a preset fine-granularity classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-granularity classification model is pre-trained based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle type of the motor vehicle;
determining a target vehicle type of the motor vehicle to be identified according to the second vehicle type;
if the first vehicle model is a preset vehicle model, the method further comprises:
Extracting a face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified;
identifying character information contained in the face image area;
determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information;
the determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type comprises:
and if the second vehicle type is the same as the third vehicle type, taking the second vehicle type as the target vehicle type of the motor vehicle to be identified.
2. The method of claim 1, wherein if the second vehicle model is different from the third vehicle model, the method further comprises:
determining a first confidence level of the second vehicle model based on the fine-grained classification model and the image containing the motor vehicle to be identified;
determining a second confidence level of the third vehicle type based on the corresponding relation between the character information and the vehicle type and the character information;
if the first confidence level is greater than the second confidence level, the second model is taken as a target model of the motor vehicle to be identified;
And if the first confidence level is smaller than the second confidence level, the third vehicle model is taken as the target vehicle model of the motor vehicle to be identified.
3. The method of claim 2, wherein the character information is a plurality of, and wherein determining the second confidence level of the third vehicle model based on the correspondence of the character information to the vehicle model and the character information comprises:
for each piece of character information, if the corresponding relation between the pre-stored character information and the vehicle type is found, the vehicle type corresponding to the character information is determined to be successfully matched with the character;
calculating the proportion value of the number of the character information of which the corresponding vehicle type is the same vehicle type in the character information of which the character matching is successful, and obtaining the proportion value corresponding to different vehicle types;
and taking the maximum value in the proportional values corresponding to the different vehicle types as a second confidence level, and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
4. The method according to claim 3, wherein if the vehicle type corresponding to the character information is found in the correspondence between the pre-stored character information and the vehicle type, determining that the character matching is successful includes:
If a target road level corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road level, determining that the character matching is successful, wherein the road level comprises a road level or an urban road level;
and determining the vehicle type corresponding to the target road level according to the corresponding relation between the target road level and the pre-stored road level and the vehicle type, and obtaining the vehicle type corresponding to the character information.
5. A vehicle type classification apparatus, characterized by being applied to an electronic device, the apparatus comprising:
the first classification module is used for carrying out preliminary classification on pictures containing the motor vehicles to be identified through a preset coarse-grained classification model to obtain a first vehicle type of the motor vehicles to be identified;
the second classification module is used for secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model when the first vehicle model is a preset vehicle model, so as to obtain a second vehicle model of the motor vehicle to be identified, wherein the fine-grained classification model is pre-trained and completed based on an image sample and the vehicle model of the motor vehicle contained in the fine-grained classification model, and the fine-grained classification model comprises the corresponding relation between the image characteristics of each part of the motor vehicle and the vehicle model of the motor vehicle;
The first determining module is used for determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type;
the extraction module is used for extracting a face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified when the first vehicle type is a preset vehicle type;
the recognition module is used for recognizing character information contained in the face image area;
the second determining module is used for determining a third vehicle type of the motor vehicle to be identified according to the corresponding relation between the pre-stored character information and the vehicle type and the character information;
the first determining module is further configured to, when the second vehicle model is the same as the third vehicle model, take the second vehicle model as the target vehicle model of the motor vehicle to be identified.
6. The apparatus of claim 5, wherein the apparatus further comprises:
the second classification module is further configured to determine a first confidence level of the second vehicle model based on the fine-grained classification model and the image including the motor vehicle to be identified;
the second determining module is further configured to determine a second confidence level of the third vehicle type based on the correspondence between the character information and the vehicle type and the character information;
A third determining module configured to, when the second vehicle type is different from the third vehicle type and the first confidence level is greater than the second confidence level, take the second vehicle type as a target vehicle type of the motor vehicle to be identified;
the third determining module is further configured to, when the second vehicle type is different from the third vehicle type and the first confidence level is smaller than the second confidence level, use the third vehicle type as the target vehicle type of the motor vehicle to be identified.
7. The apparatus of claim 6, wherein the second determining module comprises:
the first determining submodule is used for determining that the character matching is successful if the vehicle type corresponding to the character information is found in the corresponding relation between the prestored character information and the vehicle type for each character information when the number of the character information is multiple;
the calculation sub-module is used for calculating the proportion value of the number of the character information of the same vehicle type in the character information of which the character matching is successful to the number of the character information of which the character matching is successful to obtain the proportion value corresponding to different vehicle types;
and the second determining submodule is used for taking the maximum value in the proportion values corresponding to different vehicle types as a second confidence level and taking the vehicle type corresponding to the maximum value as a third vehicle type of the motor vehicle to be identified.
8. The apparatus of claim 7, wherein the first determination submodule comprises:
a third determining submodule, configured to determine that character matching is successful when a target road level corresponding to the character information is found in a correspondence between pre-stored character information and road levels, where the road levels include a road level or an urban road level;
and the fourth determining submodule is used for determining the vehicle type corresponding to the target road level according to the corresponding relation between the target road level and the pre-stored road level and the vehicle type and obtaining the vehicle type corresponding to the character information.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
CN201911102143.2A 2019-11-12 2019-11-12 Vehicle type classification method and device Active CN112861567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911102143.2A CN112861567B (en) 2019-11-12 2019-11-12 Vehicle type classification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911102143.2A CN112861567B (en) 2019-11-12 2019-11-12 Vehicle type classification method and device

Publications (2)

Publication Number Publication Date
CN112861567A CN112861567A (en) 2021-05-28
CN112861567B true CN112861567B (en) 2024-01-05

Family

ID=75984307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911102143.2A Active CN112861567B (en) 2019-11-12 2019-11-12 Vehicle type classification method and device

Country Status (1)

Country Link
CN (1) CN112861567B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657180A (en) * 2021-07-23 2021-11-16 浙江大华技术股份有限公司 Vehicle identification method, server and computer readable storage medium
CN113516104B (en) * 2021-08-09 2023-08-29 上海高德威智能交通系统有限公司 Commercial passenger car identification method and device, electronic equipment and storage medium
CN113723258A (en) * 2021-08-24 2021-11-30 广州邦讯信息系统有限公司 Dangerous goods vehicle image identification method and related equipment thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105938560A (en) * 2016-03-23 2016-09-14 吉林大学 Convolutional-neural-network-based vehicle model refined classification system
CN106845478A (en) * 2016-12-30 2017-06-13 同观科技(深圳)有限公司 The secondary licence plate recognition method and device of a kind of character confidence level
WO2018119684A1 (en) * 2016-12-27 2018-07-05 深圳前海达闼云端智能科技有限公司 Image recognition system and image recognition method
CN109002820A (en) * 2018-06-27 2018-12-14 迪蒙智慧交通(深圳)有限公司 A kind of licence plate recognition method, device and relevant device
CN109145759A (en) * 2018-07-25 2019-01-04 腾讯科技(深圳)有限公司 Vehicle attribute recognition methods, device, server and storage medium
CN109657664A (en) * 2017-10-12 2019-04-19 杭州海康威视数字技术股份有限公司 A kind of recognition methods, device and the electronic equipment of license plate type

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105938560A (en) * 2016-03-23 2016-09-14 吉林大学 Convolutional-neural-network-based vehicle model refined classification system
WO2018119684A1 (en) * 2016-12-27 2018-07-05 深圳前海达闼云端智能科技有限公司 Image recognition system and image recognition method
CN106845478A (en) * 2016-12-30 2017-06-13 同观科技(深圳)有限公司 The secondary licence plate recognition method and device of a kind of character confidence level
CN109657664A (en) * 2017-10-12 2019-04-19 杭州海康威视数字技术股份有限公司 A kind of recognition methods, device and the electronic equipment of license plate type
CN109002820A (en) * 2018-06-27 2018-12-14 迪蒙智慧交通(深圳)有限公司 A kind of licence plate recognition method, device and relevant device
CN109145759A (en) * 2018-07-25 2019-01-04 腾讯科技(深圳)有限公司 Vehicle attribute recognition methods, device, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于多分支卷积神经网络的车辆图像比对方法;蔡晓东;甘凯今;杨超;王丽娟;;电视技术(11);全文 *

Also Published As

Publication number Publication date
CN112861567A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN112861567B (en) Vehicle type classification method and device
US9082038B2 (en) Dram c adjustment of automatic license plate recognition processing based on vehicle class information
JP5127392B2 (en) Classification boundary determination method and classification boundary determination apparatus
CN110706261A (en) Vehicle violation detection method and device, computer equipment and storage medium
CN109190488B (en) Front vehicle door opening detection method and device based on deep learning YOLOv3 algorithm
KR101973933B1 (en) Method and Apparatus for Detecting Boarding Number
CN107730896A (en) Licence plate recognition method and device
CN110909598B (en) Non-motor vehicle lane traffic violation driving identification method based on deep learning
CN108960074B (en) Small-size pedestrian target detection method based on deep learning
US20190332873A1 (en) Device and Method for Object Recognition of an Input Image for a Vehicle
CN113052159A (en) Image identification method, device, equipment and computer storage medium
CN111898491A (en) Method and device for identifying reverse driving of vehicle and electronic equipment
KR102089298B1 (en) System and method for recognizing multinational license plate through generalized character sequence detection
CN115810134A (en) Image acquisition quality inspection method, system and device for preventing car insurance from cheating
CN116645646A (en) Method and system for detecting and early warning parking abnormality
CN114724107B (en) Image detection method, device, equipment and medium
CN114882393B (en) Road reverse running and traffic accident event detection method based on target detection
CN112115928B (en) Training method and detection method of neural network based on illegal parking vehicle labels
CN112949341A (en) Information obtaining method and device, electronic equipment and storage medium
Hamzah et al. Parking Violation Detection on The Roadside of Toll Roads with Intelligent Transportation System Using Faster R-CNN Algorithm
CN111723601A (en) Image processing method and device
KR101698266B1 (en) Apparatus and Method for detecting intelligent high-speed multi-object
CN111738185B (en) Target identification method, device and equipment
CN114155476B (en) AEB (automatic Emergency bank) accident scene identification method, device, equipment and medium
CN114913232B (en) Image processing method, device, equipment, medium and product

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