CN112861567A - Vehicle type classification method and device - Google Patents

Vehicle type classification method and device Download PDF

Info

Publication number
CN112861567A
CN112861567A CN201911102143.2A CN201911102143A CN112861567A CN 112861567 A CN112861567 A CN 112861567A CN 201911102143 A CN201911102143 A CN 201911102143A CN 112861567 A CN112861567 A CN 112861567A
Authority
CN
China
Prior art keywords
vehicle type
vehicle
character information
motor vehicle
identified
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.)
Granted
Application number
CN201911102143.2A
Other languages
Chinese (zh)
Other versions
CN112861567B (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

Images

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

Landscapes

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

Abstract

The application provides a vehicle type classification method and a vehicle type classification device, belongs to the technical field of computers, and is applied to electronic equipment, wherein the method comprises the following steps: preliminarily classifying pictures containing the motor vehicle to be identified through a preset coarse-grained 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, secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-grained classification model is trained in advance based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model comprises a corresponding relation between image characteristics 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 means of the vehicle type classification method and device, accuracy of vehicle type classification can be improved.

Description

Vehicle type classification method and device
Technical Field
The application relates to the technical field of computers, in particular to a vehicle type classification method and device.
Background
The traffic control department has different control regulations for different types of motor vehicles, such as routes for which driving is prohibited and locations for which parking is permitted. Wherein, the vehicle type includes car, minibus, passenger train, bus and pick up car. In order to ensure road safety, rolling stock violating regulatory regulations may be detected by identifying the type of the rolling stock.
In the related art, the electronic device for detecting a motor vehicle violating the management regulations may acquire a picture containing the motor vehicle to be identified by monitoring cameras installed on both sides of the road. Then, the electronic device can classify the vehicle type of the motor vehicle to be identified through a preset convolutional neural network and the picture to obtain the target vehicle type of the motor vehicle to be identified. Then, the electronic device may determine whether the target vehicle type is a preset vehicle type, and if the target vehicle type is the preset vehicle type, the electronic device may determine that the motor vehicle to be recognized violates a management regulation.
However, the passenger cars and buses with similar shapes cannot be classified through the convolutional neural network and the pictures containing the motor vehicles to be recognized, and therefore, the models of the motor vehicles are classified based on the convolutional neural network as a coarse-grained classification model, which results in low accuracy of vehicle model classification.
Disclosure of Invention
The embodiment of the application aims to provide a vehicle type classification method and device so as to improve the accuracy of vehicle type classification. The specific technical scheme is as follows:
in a first aspect, a vehicle type classification method is provided, which is applied to an electronic device, and includes:
preliminarily classifying pictures containing the motor vehicle to be identified through a preset coarse-grained 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, secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-grained classification model is trained in advance based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model 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 type is a preset vehicle type, the method further includes:
extracting a car face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified;
recognizing character information contained in the car 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 a 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 type 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 higher than the second confidence level, the second vehicle type is used as the target vehicle type of the motor vehicle to be identified;
and if the first confidence level is less than the second confidence level, taking the third vehicle type as the target vehicle type of the motor vehicle to be identified.
Optionally, the 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 character information, 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, the character matching is determined to be successful;
calculating a ratio value of the number of character information of which the corresponding vehicle type is the same vehicle type to the number of character information of which the character matching is successful in the character information of which the character matching is successful to obtain the ratio values 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 correspondence between the pre-stored character information and the vehicle type, determining that the character matching is successful includes:
if the target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, determining that the character matching is successful, wherein the road grade comprises a highway grade or an urban road grade;
and determining the vehicle type corresponding to the target road grade according to the target road grade, the pre-stored corresponding relationship between the road grade and the vehicle type, and obtaining the vehicle type corresponding to the character information.
In a second aspect, a vehicle type classification apparatus is provided, which is applied to an electronic device, and includes:
the first classification module is used for preliminarily classifying pictures containing the motor vehicle to be recognized through a preset coarse-grained classification model to obtain a first vehicle type of the motor vehicle to be recognized;
the second classification module is used for performing secondary classification on the picture containing the motor vehicle to be recognized through a preset fine-grained classification model when the first vehicle type is a preset vehicle type to obtain a second vehicle type of the motor vehicle to be recognized, wherein the fine-grained classification model is trained in advance based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model comprises a corresponding relation between image characteristics of each part of the motor vehicle and the vehicle type 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 comprises:
the extracting module is used for extracting a vehicle 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 car 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 use the second vehicle type as a target vehicle type of the motor vehicle to be identified when the second vehicle type is the same as the third vehicle type.
Optionally, the apparatus further comprises:
the second classification module is further used for determining a first confidence level of the second vehicle type based on the fine-grained classification model and the image containing 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 corresponding relationship between the character information and the vehicle type and the character information;
a third determining module, configured to take the second vehicle type as a target vehicle type of the motor vehicle to be identified when the second vehicle type is different from the third vehicle type and the first confidence level is greater than the second confidence level;
the third determining module is further configured to use the third vehicle type as the target vehicle type of the motor vehicle to be identified when the second vehicle type is different from the third vehicle type and the first confidence level is less than the second confidence level.
Optionally, the second determining module includes:
the first determining sub-module is used for determining that the character matching is successful 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 for each character information when the number of the character information is multiple;
the calculation submodule is used for 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 values corresponding to different vehicle types;
and the second determining submodule is used for 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, the first determining sub-module includes:
the third determining submodule is used for determining that the character matching is successful when a target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, wherein the road grade comprises a highway grade or an urban road grade;
and the fourth determining submodule is used for determining the vehicle type corresponding to the target road grade according to the target road grade, the pre-stored corresponding relation between the road grade and the vehicle type, and obtaining the vehicle type corresponding to the character information.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein 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 adapted to perform the method steps of any of the first aspects when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program 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 provided by the embodiment of the application, the pictures containing the motor vehicles to be recognized are preliminarily classified through the preset coarse-grained classification model, and the first vehicle type of the motor vehicles to be recognized is obtained; if the first vehicle type is a preset vehicle type, secondarily classifying the picture containing the motor vehicle to be recognized through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be recognized, wherein the fine-grained classification model is trained in advance based on the image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model 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.
When the first vehicle type is a preset vehicle type which is easy to be classified wrongly, the pictures containing the motor vehicle to be recognized are secondarily classified through the fine-grained classification model to obtain a second vehicle type of the motor vehicle to be recognized, and the target vehicle type of the motor vehicle to be recognized is determined according to the second vehicle type, so that the accuracy of vehicle type classification can be improved.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method 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 used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
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 according to an embodiment of the present application;
fig. 3a is a schematic view of a car face image area according to an embodiment of the present disclosure;
FIG. 3b is a schematic view of another car face image region according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a vehicle type classification method according to 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 technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
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 search function and a calculation function, such as an electronic computer and a tablet computer. The electronic device may be connected to monitoring cameras installed on both sides of a road, and identify a type of a rolling stock running on the road based on a picture including the rolling stock acquired by the monitoring cameras, thereby detecting the rolling stock violating a management regulation on the road. The vehicle types include cars, vans, buses, and pick-up trucks.
The embodiment of the application provides a method for classifying vehicle types of motor vehicles by electronic equipment based on a coarse-grained classification model and a fine-grained classification model, as shown in fig. 1, the specific processing process comprises the following steps:
step 101, preliminarily classifying the 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 electronic device may be preset with a coarse-grained classification model, such as a convolutional neural network, and a support vector machine.
In implementation, the electronic device may capture a road through the monitoring camera to obtain a road picture, and then the electronic device may determine whether the road picture includes a motor vehicle, that is, whether the road picture includes a motor vehicle to be identified.
If the road picture contains the motor vehicle to be identified, the electronic equipment can preliminarily classify the picture containing the motor vehicle to be identified through a preset coarse-grained 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 do subsequent processing.
In the embodiment of the application, the electronic device can judge whether the picture contains the motor vehicle through a preset target detection algorithm. The target detection algorithm may be any algorithm having an image recognition function, such as fast R-CNN (fast recovery-Convolutional Neural Networks), YOLO (young Only Look one, real-time target detection system), and the embodiments of the present application are not limited specifically. The embodiment of the application does not limit the specific steps of preliminarily classifying the pictures containing the motor vehicles to be identified by the electronic equipment through the coarse-grained classification model.
And 102, if the first vehicle type is a preset vehicle type, secondarily classifying the pictures containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be identified.
The fine-grained classification model is trained in advance based on the image sample and the vehicle type of the motor vehicle, and comprises a corresponding relation between image features and the vehicle type of the motor vehicle, such as an attention model and a support vector machine. In the embodiment of the application, the preset vehicle type can be a bus or a passenger car. The preset vehicle type can also be one or more of a bus, an intercity bus, a tourist bus and a school bus.
In an implementation, the electronic device may determine whether the first vehicle type is a preset vehicle type. If the first vehicle type is the preset vehicle type, the electronic device can 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 the preset size of the image area. And then, the electronic equipment can input the default size picture into a preset fine-grained classification model, and the output result of the fine-grained classification model is the second vehicle type 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 type is not the preset vehicle type, the electronic device may not 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 region with a size of 224 x 224, and the image region in the default size picture other than the image region may be filled with black pixels. Then, the electronic device may input the default-size picture into a fine-grained classification model, and an output result of the fine-grained classification model is a passenger car, that is, a second model of the motor vehicle to be identified is the passenger car, so as to complete secondary classification of the picture of the motor vehicle to be identified. If the first vehicle type is a car, the electronic device may determine that the first vehicle type is not the preset vehicle type, and the electronic device may not perform subsequent processing.
And 103, determining the target vehicle type of the motor vehicle to be identified according to the second vehicle type.
In implementation, the electronic device may determine the target vehicle type of the motor vehicle to be identified according to the second vehicle type in various ways, and in a feasible implementation, the electronic device may directly use 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 another manner, 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 detailed processing procedure will be described later.
In the embodiment of the application, after the target vehicle type of the motor vehicle to be recognized is determined, the electronic device may determine whether the motor vehicle to be recognized violates the management rule according to the target vehicle type and the preset violation determination rule. The rule for judging the violation can be that in a road picture shot by a certain monitoring camera, the vehicle type of the motor vehicle to be identified cannot be a passenger car. The rule for judging the violation can be that the type of the motor vehicle to be identified cannot be a passenger car within a certain time period.
For example, when the target vehicle type is a passenger car, the electronic device determines that the passenger car should not appear on the current road according to a preset violation determination rule, and then the electronic device may determine that the motor vehicle to be identified violates the management rule.
In a feasible implementation manner, the electronic device may determine whether the target vehicle type is a preset vehicle type, and send a preset alarm message to prompt that there is a motor vehicle violating the management rule when the target vehicle type is the preset vehicle type. 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, the pictures containing the motor vehicle to be identified are preliminarily classified through a preset coarse-grained classification model, so that a first vehicle type of the motor vehicle to be identified is obtained; if the first vehicle type is a preset vehicle type, secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be identified; and determining the 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 be classified wrongly, the pictures containing the motor vehicle to be recognized are secondarily classified through the fine-grained classification model to obtain a second vehicle type of the motor vehicle to be recognized, and the target vehicle type of the motor vehicle to be recognized is determined according to the second vehicle type, so that the accuracy of vehicle type classification can be improved.
Optionally, the electronic device may detect the vehicle type of the motor vehicle to be recognized by performing semantic analysis on characters in the picture containing the motor vehicle to be recognized to obtain a detection result, and then determine the target vehicle type according to a comparison result between the detection result and the second vehicle type. As shown in fig. 2, the specific processing procedure includes:
step 201, extracting a vehicle face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified.
The automobile face image area comprises an automobile face to be identified, and the automobile face to be identified comprises parts such as a radiator grille, an automobile lamp and a front windshield glass.
The specific implementation manner of the electronic device extracting the car face image region of the motor vehicle to be identified from the picture containing the motor vehicle to be identified may adopt any car face extraction manner in the related art, which is not limited herein.
In step 202, character information included in the car face image area is identified.
The electronic device may be preset with a text Recognition algorithm, and the text Recognition algorithm may be any algorithm having a text Recognition function, such as an OCR (Optical Character Recognition), an attention OCR (Optical Character Recognition based on an attention mechanism), and the embodiment of the present application is not limited in particular.
In implementation, the electronic device may recognize character information included in the car face image region through a character recognition algorithm.
In a possible implementation manner, the specific processing procedure of step 201 to step 202 may be: the electronic equipment can determine a license plate image area corresponding to a license plate in a picture containing a motor vehicle to be recognized, then the electronic equipment can fill gray pixels in the license plate image area, expand the license plate image area according to a preset proportion according to coordinates of the license plate image area, and determine a vehicle face image area.
The electronic device may determine an image region including characters in the car face image region, and correct a display direction of the characters in the image region by radon hough transform. Then, dividing the corrected image area in a projection histogram mode to obtain a plurality of pictures containing single-line characters; and then, the electronic equipment can identify the picture containing the single-line characters through a character identification algorithm to obtain the character information contained in the car face image area.
The electronic device identifies the car face image area shown in fig. 3a through a character identification algorithm, and obtains character information: chongzhou and Huayang. The electronic device recognizes the car face image area shown in fig. 3b through a character recognition algorithm, and may obtain character information: zuolu village, 116 Lu village, Baixiangcun village, old people hospital and new people hospital.
And 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, and The semantic analysis Algorithm may be any Algorithm having a semantic analysis and character matching function, such as a KMP Algorithm (The Knuth-Morris-Pratt Algorithm, knudt-Morris-practim operation), and a BM Algorithm (Boyer-Moore character string search Algorithm), which are not specifically limited in The embodiment of The present application.
In implementation, the electronic device may search for target character information matching the character information included in the vehicle face image area from among the pre-stored correspondence between the 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 recognized.
In a possible implementation manner, the electronic device may match, through a semantic analysis algorithm, character information included in the vehicle face image area and character information included in a correspondence relationship between the character information and the vehicle type.
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 type is the same as the third vehicle type, and if the second vehicle type is the same as the third vehicle type, the electronic device may use the second vehicle type or the third vehicle type as a target vehicle type of the motor vehicle to be recognized.
If the second vehicle type is different from the third vehicle type, the electronic device may select the second vehicle type or the third vehicle type as the target vehicle type of the motor vehicle to be recognized according to a preset selection rule, and a detailed description will be given later on a specific processing procedure.
In the embodiment of the application, because the face area of the passenger car or the bus is provided with the character slogan under the general condition, the information such as the starting point, the terminal point, the approach station, the line number and the like of the passenger car or the bus can be conveniently identified. Therefore, the electronic device may extract a face image region of the motor vehicle to be recognized from the picture containing the motor vehicle to be recognized, recognize character information contained in the face image region, and then determine a third vehicle type of the motor vehicle to be recognized according to the correspondence relationship 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 obtained based on a text semantic analysis mode, and then the target vehicle type of the motor vehicle to be identified is determined in a mode of cross verification with a classification result of a fine-grained 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 electronic device selects the second vehicle type or the third vehicle type according to a preset selection rule, and the specific processing procedure as the target vehicle type of the motor vehicle to be recognized may include:
the electronic equipment can 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 containing the motor vehicle to be identified; the electronic device can determine not only a third vehicle type of the motor vehicle to be recognized, but also 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.
The electronic device may compare the first confidence level and the second confidence level and, if the first confidence level is greater than the second confidence level, treat the second vehicle type as the target vehicle type for the motor vehicle to be identified. And if the first confidence level is less than the second confidence level, the third vehicle type is taken as the target vehicle type of the motor vehicle to be recognized.
For example, the second vehicle type is a passenger vehicle, 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 and the second confidence level, determine that the first confidence level is less than the second confidence level, and then the electronic device may take the bus of the third vehicle type as the target vehicle type of the motor vehicle to be identified.
In the embodiment of the application, when a second vehicle type determined by a fine-grained classification model and a picture containing a motor vehicle to be recognized is different from a third vehicle type determined by a semantic analysis algorithm and character information, the electronic equipment can compare a first confidence level of the second vehicle type with a second confidence level of the third vehicle type, and determine the vehicle type with a higher corresponding confidence level as a target vehicle type, so that the accuracy of vehicle type classification can be improved.
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 convolutional layer in the fine-grained classification model represents a certain visual feature, or a certain local area of the motor vehicle to be identified. Among them, visual features such as the texture of a heat dissipation grill, the outline of a fog light, and local areas such as the upper half of a car face, the shape of a car light, a turn signal, a car logo. In order to represent all the features of a local area of an object to be identified by a certain convolution layer, clustering and merging of channels and weight distribution to each channel are required to perform weighting calculation of the channels.
It can be understood that due to the limitation of the convolutional neural network output layer, the coarse-grained classification model cannot correctly classify bus and passenger car models with similar appearances, and the fine-grained classification model can find parts with discrimination in motor vehicles by clustering channels with similar areas corresponding to peak values and performing weighted addition on channels of the same category, so as to learn more precise image characteristics and calculate the confidence level of classification results of different vehicle models, so that precise vehicle type classification can be realized, and the classification accuracy of similar vehicle types can be effectively improved.
In the embodiment of the present application, any model training mode in the related art may be adopted for the specific implementation mode of training the fine-grained classification model based on the image sample and the vehicle type of the motor vehicle included in the image sample, and is not limited herein.
Optionally, an embodiment of the present application provides an implementation manner that, when there are a plurality of pieces of character information included in the car face image area, the electronic device determines, based on the correspondence between the character information and the car type and the character information, a third car type of the motor vehicle to be recognized and a second confidence level of the third car type, as shown in fig. 4, specifically includes:
step 401, for each character information, if the vehicle type corresponding to the character information is found in the correspondence between the pre-stored character information and the vehicle type, it is determined that the character matching is successful.
The electronic device may be pre-stored with a corresponding relationship between the character information and the vehicle type, where the corresponding relationship between the character information and the vehicle type may be that the vehicle type corresponding to the character information "shift bus", "plug-in bus", "travel" is a passenger car, and the vehicle type corresponding to the character information "route", "bus", "party member pioneer number", and "coin insertion" is a bus.
In implementation, the electronic device may match, for each character information included in the vehicle face image region, the character information with character information included in a correspondence relationship between the character information and the vehicle type according to a semantic analysis algorithm. And 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 that matches the character information, the electronic device may determine that the character matching failed. Therefore, the electronic equipment can determine the character information of which the character matching is successful and the corresponding vehicle type.
And 402, calculating a ratio value of the number of the character information of which the corresponding vehicle type is the same vehicle type to the number of the character information of which the character matching is successful in the character information of which the character matching is successful to obtain the ratio values corresponding to different vehicle types.
In implementation, the electronic device may determine the number of character information of which the character matching is successful, determine the number of 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 then calculate a ratio value of the number of character information of which the corresponding vehicle type is the same vehicle type to the number of character information of which the character matching is successful, so as to obtain the ratio values corresponding to different vehicle types.
For example, the electronic device may determine that the number of character information of which the character matching is successful is 5, and in the character information of which the character matching is successful, determine that the number of character information of which the corresponding vehicle type is a bus is 1, and the number of character information of which the corresponding vehicle type is a bus is 4. Then, the electronic device can calculate a ratio value of the number of the character information of which the corresponding bus type is the bus to the number of the character information of which the character matching is successful, and the ratio value corresponding to the bus is 0.2. The electronic device can calculate a ratio value of the number of the character information of which the corresponding vehicle type is the passenger car to the number of the character information of which the character matching is successful, and the ratio 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 take the maximum value 0.8 of the scale values 0.2, 0.8 corresponding to different vehicle types as the second confidence level, and take the vehicle type passenger car corresponding to the scale value 0.8 as the third vehicle type of the motor vehicle to be identified.
In the embodiment of the application, the electronic equipment can perform character matching on each character information according to the corresponding relation between the character information and the vehicle type. And then, calculating a ratio value of the number of the character information of which the corresponding vehicle type is the same vehicle type to the number of the character information of which the character matching is successful according to the character information of which the character matching is successful, and obtaining the ratio values 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. 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, so that the accuracy of vehicle type classification can be improved.
Optionally, an embodiment of the present application provides an implementation manner for performing character matching on character information included in a car face image area by an electronic device according to a correspondence between the character information and a car type, where the implementation manner includes:
step one, if the target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, the successful character matching is determined.
The electronic device may store a correspondence between the character information and a road level in advance, where the road level includes a highway level or an urban road level. The electronic device may obtain the correspondence between the character information and the road level by obtaining a pre-stored national public transportation database. The electronic device may further pre-store a correspondence between road levels and vehicle types, where the correspondence between road levels and vehicle types is, for example, a bus type corresponding to an urban road level, and a bus type corresponding to a highway level. In the embodiment of the present application, the road level may also be one or more of a city, a bus route, and a bus stop, and the embodiment of the present application is not particularly limited.
In implementation, the electronic device may match, for each character information included in the car face image region, the character information with character information included in a correspondence relationship between the character information and a road level according to a semantic analysis algorithm. And if the target character information matched with the character information exists, the electronic equipment takes the road grade corresponding to the target character information as the road grade corresponding to the character information, determines to find the road grade corresponding to the character information, and determines that the character matching is successful.
If there is no target character information that matches the character information, the electronic device may determine that the character matching failed.
For example, as shown in fig. 3a, the character information "chongzhou" and "huayang" may be determined, by the electronic device, that the target road level corresponding to the character information is a city according to a semantic analysis algorithm and a correspondence between the character information and the road level. 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 "tonglucun", "baixiangcun", "senior citizen hospital", and "new citizen hospital", the electronic device may determine that the corresponding target road level is a bus stop.
And step two, determining the vehicle type corresponding to the target road grade according to the target road grade and the corresponding relation between the pre-stored road grade and the vehicle type, and obtaining the vehicle type corresponding to the character information.
In an implementation, the electronic device may set a vehicle type corresponding to the target road level as a vehicle type corresponding to the character information, in the correspondence relationship between the road level and the vehicle type stored in advance.
For example, based on the face image area shown in fig. 3a, the electronic device may use a passenger car model corresponding to the target road level city as a passenger car model corresponding to the character information "chongzhou" and "huayang". Based on the car face image area shown in fig. 3b, the electronic device may use the model bus corresponding to the target road-level bus route as the model corresponding to the character information "116 routes".
Therefore, the electronic equipment can determine the character information of which the character matching is successful and the corresponding vehicle type.
In the embodiment of the application, if the electronic device finds the target road level corresponding to the character information in the corresponding relationship between the character information and the road level, it is determined that the character matching is successful. Then, the electronic device may determine the vehicle type corresponding to the target road level according to the pre-stored correspondence between the 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 grade corresponding to the character information based on the preset national public transport database, further determine the vehicle type corresponding to the target road grade based on the corresponding relation between the road grade and the vehicle type, and improve the accuracy of determining the vehicle type corresponding to the character information. The third vehicle type and the second confidence level of the third vehicle type can be conveniently determined according to the vehicle type corresponding to the character information, and therefore the accuracy of vehicle type classification can be improved.
An embodiment of the present application further provides a vehicle type classification device, as shown in fig. 5, the device is applied to an electronic device, and the device includes:
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-grained classification model to obtain a first vehicle type of the motor vehicle to be identified;
a second classification module 520, configured to perform secondary classification on the picture including the to-be-recognized motor vehicle through a preset fine-grained classification model when the first vehicle type is a preset vehicle type, so as to obtain a second vehicle type of the to-be-recognized motor vehicle, where the fine-grained classification model is trained in advance based on an image sample and a vehicle type 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 type of the motor vehicle;
a first determining module 530, configured to determine a target vehicle type of the motor vehicle to be identified according to the second vehicle type.
Optionally, the apparatus further comprises:
the extracting module is used for extracting a vehicle 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 car 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 use the second vehicle type as a target vehicle type of the motor vehicle to be identified when the second vehicle type is the same as the third vehicle type.
Optionally, the apparatus further comprises:
the second classification module is further used for determining a first confidence level of the second vehicle type based on the fine-grained classification model and the image containing 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 corresponding relationship between the character information and the vehicle type and the character information;
a third determining module, configured to take the second vehicle type as a target vehicle type of the motor vehicle to be identified when the second vehicle type is different from the third vehicle type and the first confidence level is greater than the second confidence level;
the third determining module is further configured to use the third vehicle type as the target vehicle type of the motor vehicle to be identified when the second vehicle type is different from the third vehicle type and the first confidence level is less than the second confidence level.
Optionally, the second determining module includes:
the first determining sub-module is used for determining that the character matching is successful 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 for each character information when the number of the character information is multiple;
the calculation submodule is used for 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 values corresponding to different vehicle types;
and the second determining submodule is used for 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, the first determining sub-module includes:
the third determining submodule is used for determining that the character matching is successful when a target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, wherein the road grade comprises a highway grade or an urban road grade;
and the fourth determining submodule is used for determining the vehicle type corresponding to the target road grade according to the target road grade, the pre-stored corresponding relation between the road grade 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 recognized are preliminarily classified through the preset coarse-grained classification model, so that the first vehicle type of the motor vehicles to be recognized is obtained; if the first vehicle type is a preset vehicle type, secondarily classifying the picture containing the motor vehicle to be recognized through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be recognized, wherein the fine-grained classification model is trained in advance based on the image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model 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.
The embodiment of the present application further provides an electronic device, as shown in fig. 6, which includes 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 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
preliminarily classifying pictures containing the motor vehicle to be identified through a preset coarse-grained 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, secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-grained classification model is trained in advance based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model 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 type is a preset vehicle type, the method further includes:
extracting a car face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified;
recognizing character information contained in the car 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 a 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 type 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 higher than the second confidence level, the second vehicle type is used as the target vehicle type of the motor vehicle to be identified;
and if the first confidence level is less than the second confidence level, taking the third vehicle type as the target vehicle type of the motor vehicle to be identified.
Optionally, the 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 character information, 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, the character matching is determined to be successful;
calculating a ratio value of the number of character information of which the corresponding vehicle type is the same vehicle type to the number of character information of which the character matching is successful in the character information of which the character matching is successful to obtain the ratio values 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 correspondence between the pre-stored character information and the vehicle type, determining that the character matching is successful includes:
if the target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, determining that the character matching is successful, wherein the road grade comprises a highway grade or an urban road grade;
and determining the vehicle type corresponding to the target road grade according to the target road grade, the pre-stored corresponding relationship between the road grade and the vehicle type, and obtaining the vehicle type corresponding to the character information.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the vehicle type classification methods described above.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, 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, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (12)

1. A vehicle type classification method is applied to electronic equipment, and the method comprises the following steps:
preliminarily classifying pictures containing the motor vehicle to be identified through a preset coarse-grained 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, secondarily classifying the picture containing the motor vehicle to be identified through a preset fine-grained classification model to obtain a second vehicle type of the motor vehicle to be identified, wherein the fine-grained classification model is trained in advance based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model 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.
2. The method of claim 1, wherein if the first vehicle type is a preset vehicle type, the method further comprises:
extracting a car face image area of the motor vehicle to be identified from the picture containing the motor vehicle to be identified;
recognizing character information contained in the car 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 a target vehicle type of the motor vehicle to be identified.
3. The method of claim 2, wherein if the second vehicle type is different from the third vehicle type, the method further comprises:
determining a first confidence level of the second vehicle type 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 higher than the second confidence level, the second vehicle type is used as the target vehicle type of the motor vehicle to be identified;
and if the first confidence level is less than the second confidence level, taking the third vehicle type as the target vehicle type of the motor vehicle to be identified.
4. The method of claim 3, wherein the character information is plural, and the determining the second confidence level of the third vehicle type based on the character information and the correspondence between the character information and the vehicle type comprises:
for each character information, 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, the character matching is determined to be successful;
calculating a ratio value of the number of character information of which the corresponding vehicle type is the same vehicle type to the number of character information of which the character matching is successful in the character information of which the character matching is successful to obtain the ratio values 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.
5. The method of claim 4, wherein determining that the character matching is successful if the vehicle type corresponding to the character information is found in the pre-stored correspondence between the character information and the vehicle type comprises:
if the target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, determining that the character matching is successful, wherein the road grade comprises a highway grade or an urban road grade;
and determining the vehicle type corresponding to the target road grade according to the target road grade, the pre-stored corresponding relationship between the road grade and the vehicle type, and obtaining the vehicle type corresponding to the character information.
6. A vehicle type classification device, applied to an electronic apparatus, comprising:
the first classification module is used for preliminarily classifying pictures containing the motor vehicle to be recognized through a preset coarse-grained classification model to obtain a first vehicle type of the motor vehicle to be recognized;
the second classification module is used for performing secondary classification on the picture containing the motor vehicle to be recognized through a preset fine-grained classification model when the first vehicle type is a preset vehicle type to obtain a second vehicle type of the motor vehicle to be recognized, wherein the fine-grained classification model is trained in advance based on an image sample and the vehicle type of the motor vehicle contained in the image sample, and the fine-grained classification model comprises a corresponding relation between image characteristics of each part of the motor vehicle and the vehicle type 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.
7. The apparatus of claim 6, further comprising:
the extracting module is used for extracting a vehicle 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 car 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 use the second vehicle type as a target vehicle type of the motor vehicle to be identified when the second vehicle type is the same as the third vehicle type.
8. The apparatus of claim 7, further comprising:
the second classification module is further used for determining a first confidence level of the second vehicle type based on the fine-grained classification model and the image containing 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 corresponding relationship between the character information and the vehicle type and the character information;
a third determining module, configured to take the second vehicle type as a target vehicle type of the motor vehicle to be identified when the second vehicle type is different from the third vehicle type and the first confidence level is greater than the second confidence level;
the third determining module is further configured to use the third vehicle type as the target vehicle type of the motor vehicle to be identified when the second vehicle type is different from the third vehicle type and the first confidence level is less than the second confidence level.
9. The apparatus of claim 8, wherein the second determining module comprises:
the first determining sub-module is used for determining that the character matching is successful 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 for each character information when the number of the character information is multiple;
the calculation submodule is used for 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 values corresponding to different vehicle types;
and the second determining submodule is used for 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.
10. The apparatus of claim 9, wherein the first determination submodule comprises:
the third determining submodule is used for determining that the character matching is successful when a target road grade corresponding to the character information is found in the corresponding relation between the pre-stored character information and the road grade, wherein the road grade comprises a highway grade or an urban road grade;
and the fourth determining submodule is used for determining the vehicle type corresponding to the target road grade according to the target road grade, the pre-stored corresponding relation between the road grade and the vehicle type, and obtaining the vehicle type corresponding to the character information.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
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 true CN112861567A (en) 2021-05-28
CN112861567B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516104A (en) * 2021-08-09 2021-10-19 上海高德威智能交通系统有限公司 Commercial passenger car identification method and device, electronic equipment and storage medium
CN113657180A (en) * 2021-07-23 2021-11-16 浙江大华技术股份有限公司 Vehicle identification method, server and computer readable 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
蔡晓东;甘凯今;杨超;王丽娟;: "基于多分支卷积神经网络的车辆图像比对方法", 电视技术, no. 11 *

Cited By (5)

* 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
CN113516104A (en) * 2021-08-09 2021-10-19 上海高德威智能交通系统有限公司 Commercial passenger car identification method and device, electronic equipment and 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
CN113723258B (en) * 2021-08-24 2024-05-28 广州邦讯信息系统有限公司 Dangerous goods vehicle image recognition method and related equipment thereof

Also Published As

Publication number Publication date
CN112861567B (en) 2024-01-05

Similar Documents

Publication Publication Date Title
US20210192227A1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
US9082038B2 (en) Dram c adjustment of automatic license plate recognition processing based on vehicle class information
US11380104B2 (en) Method and device for detecting illegal parking, and electronic device
CN112861567B (en) Vehicle type classification method and device
US9870708B2 (en) Methods for enabling safe tailgating by a vehicle and devices thereof
KR102089298B1 (en) System and method for recognizing multinational license plate through generalized character sequence detection
CN104766042A (en) Method and apparatus for and recognizing traffic sign board
CN107004353B (en) Traffic violation management system and traffic violation management method
CN108960074B (en) Small-size pedestrian target detection method based on deep learning
CN113052159A (en) Image identification method, device, equipment and computer storage medium
CN111369801B (en) Vehicle identification method, device, equipment and storage medium
CN111898491A (en) Method and device for identifying reverse driving of vehicle and electronic equipment
CN107004351B (en) Traffic violation management system and traffic violation management method
CN107463941A (en) A kind of vehicle owner identification method and device
CN116645646A (en) Method and system for detecting and early warning parking abnormality
CN115834838A (en) Method, device and medium for monitoring in tunnel
CN115019263A (en) Traffic supervision model establishing method, traffic supervision system and traffic supervision method
CN116721396A (en) Lane line detection method, device and storage medium
CN116030663A (en) Vehicle early warning method and device, electronic equipment and storage medium
CN114882448B (en) Vehicle monitoring method and electronic equipment
CN115880632A (en) Timeout stay detection method, monitoring device, computer-readable storage medium, and chip
CN110634120A (en) Vehicle damage judgment method and device
CN114724107A (en) Image detection method, device, equipment and medium
Hamzah et al. Parking Violation Detection on The Roadside of Toll Roads with Intelligent Transportation System Using Faster R-CNN Algorithm
KR102435435B1 (en) System for searching numbers of vehicle and pedestrian based on artificial intelligence

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