CN114708575A - Vehicle identification method, device and storage medium - Google Patents

Vehicle identification method, device and storage medium Download PDF

Info

Publication number
CN114708575A
CN114708575A CN202210459060.4A CN202210459060A CN114708575A CN 114708575 A CN114708575 A CN 114708575A CN 202210459060 A CN202210459060 A CN 202210459060A CN 114708575 A CN114708575 A CN 114708575A
Authority
CN
China
Prior art keywords
vehicle
network
training sample
image training
vehicle image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210459060.4A
Other languages
Chinese (zh)
Inventor
李亚东
吴学纯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Yuncong Tianfu Artificial Intelligence Technology Co ltd
Original Assignee
Sichuan Yuncong Tianfu Artificial Intelligence Technology 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 Sichuan Yuncong Tianfu Artificial Intelligence Technology Co ltd filed Critical Sichuan Yuncong Tianfu Artificial Intelligence Technology Co ltd
Priority to CN202210459060.4A priority Critical patent/CN114708575A/en
Publication of CN114708575A publication Critical patent/CN114708575A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

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

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a vehicle identification method, a vehicle identification device and a storage medium, and aims to solve the technical problems that the existing method for identifying a vehicle by using a deep learning network is easy to cause overlarge matrix of a deep learning classifier and poor identification precision of vehicle types. To this end, the vehicle identification method of the present invention includes the steps of: obtaining a vehicle image training sample set, and adding a label to each vehicle image training sample in the vehicle image training sample set; constructing a vehicle identification model; training a vehicle identification model by using a vehicle image training sample set and a label corresponding to each vehicle image training sample in the vehicle image training sample set; and inputting the vehicle image to be recognized into the trained vehicle recognition model to obtain the vehicle information corresponding to the vehicle image to be recognized. Thus, the recognition accuracy is improved.

Description

Vehicle identification method, device and storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, and particularly provides a vehicle identification method, a vehicle identification device and a storage medium.
Background
With the rising of economy and the continuous rising of the quality of life of people, vehicles become a part which is difficult to be cut in the life of people. Vehicle identification is one of the most important aspects of intelligent transportation, and plays a very important role in various fields of our daily lives.
The existing method for recognizing the vehicle by utilizing the deep learning network mainly obtains vehicle information through a feature recognition network, and the method easily causes the problems of overlarge matrix of a deep learning classifier and poor recognition accuracy of the vehicle type.
Accordingly, there is a need in the art for a new vehicle identification solution to address the above-mentioned problems.
Disclosure of Invention
In order to overcome the defects, the invention is provided to solve or at least partially solve the technical problem that the existing method for identifying the vehicle by using the deep learning network is easy to cause an overlarge deep learning classifier matrix and cause poor identification accuracy of the vehicle type. The invention provides a vehicle identification method, a vehicle identification device and a storage medium.
In a first aspect, the present invention provides a vehicle identification method comprising the steps of: obtaining a vehicle image training sample set, and adding a label to each vehicle image training sample in the vehicle image training sample set; constructing a vehicle identification model, wherein the vehicle identification model comprises a main network, a license plate branch network and a vehicle attribute branch network; training the vehicle recognition model by using the vehicle image training sample set and the label corresponding to each vehicle image training sample in the vehicle image training sample set; and inputting the vehicle image to be recognized into the trained vehicle recognition model to obtain the vehicle information corresponding to the vehicle image to be recognized.
In one embodiment, the vehicle identification model comprises a backbone network, a license plate branch network and a vehicle attribute branch network; constructing the vehicle identification model includes: taking a ResNet-101 network architecture as the backbone network; and connecting the output layer of the ResNet-101 network architecture with the input layers of the license plate branch network and the vehicle attribute branch network respectively to construct and obtain the vehicle identification model.
In one embodiment, the tag comprises a first tag and a second tag; training the vehicle recognition model by using the vehicle image training sample set and the label corresponding to each vehicle image training sample in the vehicle image training sample set comprises: training the main network and the license plate branch network by using the vehicle image training sample set and the first label corresponding to each vehicle image training sample in the vehicle image training sample set; keeping the weight of the main network unchanged, and training the vehicle attribute branch network by using the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set.
In one embodiment, the first tag is a license plate tag; the training of the main network and the license plate branch network by using the first label corresponding to each vehicle image training sample in the vehicle image training sample set comprises the following steps: inputting the vehicle image training sample set into the backbone network to obtain a vehicle feature vector; inputting the vehicle feature vector into the license plate branch network to obtain preset license plate information; calculating a loss function based on the preset license plate information and the first label; and respectively updating the weights of the main network and the license plate branch network based on the loss function until the loss function is converged, and finishing the training of the main network and the license plate branch network.
In one embodiment, the vehicle attribute branching network includes a vehicle type branching network, a vehicle direction branching network, a vehicle color branching network, a vehicle brand branching network, and a vehicle usage branching network; the second tags include a vehicle type tag, a vehicle direction tag, a vehicle color tag, a vehicle brand tag, and a vehicle use tag; training the vehicle attribute branch network by using the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set comprises: step S1, randomly selecting any one of the vehicle type branch network, the vehicle direction branch network, the vehicle color branch network, the vehicle brand branch network and the vehicle use branch network; step S2, training the selected branch network based on the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set; step S3, keeping the weight of the backbone network unchanged, and repeatedly executing the foregoing steps S1 to S2 until all the branch networks in the vehicle attribute branch networks are completely trained.
In one embodiment, the step S2 includes: inputting the vehicle image training sample set into a backbone network to obtain a vehicle feature vector; inputting the vehicle feature vector into the selected branch network to obtain preset attribute information; calculating a second loss function based on the preset attribute information and the second label; and updating the weight of the selected branch network based on the second loss function until the second loss function is converged, and finishing the training of the selected branch network.
In one embodiment, the vehicle attribute branching network includes a convolutional layer, a pooling layer, a linear layer, and a softmax layer connected in this order, wherein the convolutional layer is implemented by the first four layers of a Resnet network.
In a second aspect, the present invention provides a vehicle identification device comprising: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is configured to acquire a vehicle image training sample set and add a label to each vehicle image training sample in the vehicle image training sample set; a building module configured to build a vehicle identification model, the vehicle identification model comprising a backbone network, a license plate branch network, and a vehicle attribute branch network; a training module configured to train the vehicle recognition model using the vehicle image training sample set and a label corresponding to each vehicle image training sample in the vehicle image training sample set; and the recognition module is configured to input the vehicle image to be recognized into the trained vehicle recognition model to obtain the vehicle information corresponding to the vehicle image to be recognized.
In a third aspect, an electronic device is provided, comprising a processor and a storage means adapted to store a plurality of program codes adapted to be loaded and run by the processor to perform the vehicle identification method of any of the preceding claims.
In a fourth aspect, a computer readable storage medium is provided, having stored therein a plurality of program codes adapted to be loaded and run by a processor to perform the vehicle identification method of any of the preceding claims.
One or more technical schemes of the invention at least have one or more of the following beneficial effects:
the invention provides a vehicle identification method, firstly obtaining a vehicle image training sample set, adding a label to each vehicle image training sample in the vehicle image training sample set, then constructing a vehicle identification model, training the vehicle identification model by using the labels corresponding to each vehicle image training sample in the vehicle image training sample set and the vehicle image training sample set, and finally inputting the vehicle image to be identified into the vehicle identification model which completes the training to obtain the vehicle information corresponding to the vehicle image to be identified, thus utilizing a plurality of network models to identify different information of the vehicle, thus compared with the prior art which utilizes one network model to identify the vehicle information, the technical problem of poor identification precision caused by overlarge classifier matrix can be avoided, meanwhile, the requirement of the constructed vehicle identification model on the training data is smaller, thereby the precision of the vehicle identification model obtained by training is higher, the problem of overlarge classifier matrix is avoided, and therefore vehicle identification precision and identification efficiency are improved.
Firstly, training a main network and a license plate branch network in a vehicle recognition model, keeping the weight of the main network not updated after the main network and the license plate branch network are trained, and further training a vehicle attribute branch network.
Drawings
The disclosure of the present invention will become more readily understood with reference to the accompanying drawings. As is readily understood by those skilled in the art: these drawings are for illustrative purposes only and are not intended to constitute a limitation on the scope of the present invention. Moreover, in the drawings, like numerals are used to indicate like parts, and in which:
FIG. 1 is a flow chart illustrating the main steps of a vehicle identification method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a vehicle identification model according to one embodiment of the invention;
FIG. 3 is a schematic diagram of a license plate branch network according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the complete structure of a vehicle identification model according to an embodiment of the invention
FIG. 5 is a schematic diagram of a vehicle attribute branch network according to one embodiment of the present invention;
fig. 6 is a schematic diagram of the main structure of a vehicle identification device according to an embodiment of the present invention.
List of reference numerals
11: an acquisition module; 12: building a module; 13: a training module; 14: and identifying the module.
Detailed Description
Some embodiments of the invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention.
In the description of the present invention, a "module" or "processor" may include hardware, software, or a combination of both. A module may comprise hardware circuitry, various suitable sensors, communication ports, memory, may comprise software components such as program code, or may be a combination of software and hardware. The processor may be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and/or signal processing functionality. The processor may be implemented in software, hardware, or a combination thereof. Non-transitory computer-readable storage media include any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random-access memory, and so forth. The term "a and/or B" denotes all possible combinations of a and B, such as a alone, B alone or a and B. The term "at least one A or B" or "at least one of A and B" means similar to "A and/or B" and may include only A, only B, or both A and B. The singular forms "a", "an" and "the" may include the plural forms as well.
The existing method for recognizing the vehicle by utilizing the deep learning network mainly obtains vehicle information through a feature recognition network, and the method easily causes the problems of overlarge matrix of a deep learning classifier and poor recognition accuracy of the vehicle type. The method comprises the steps of firstly obtaining a vehicle image training sample set, adding a label to each vehicle image training sample in the vehicle image training sample set, then constructing a vehicle identification model, training the vehicle identification model by using the vehicle image training sample set and the label corresponding to each vehicle image training sample in the vehicle image training sample set, and finally inputting the vehicle image to be identified into the vehicle identification model which completes training to obtain vehicle information corresponding to the vehicle image to be identified.
Referring to fig. 1, fig. 1 is a flow chart illustrating main steps of a vehicle identification method according to an embodiment of the present invention. As shown in fig. 1, the vehicle identification method in the embodiment of the invention mainly includes the following steps S101 to S104.
Step S101: and obtaining a vehicle image training sample set, and adding a label to each vehicle image training sample in the vehicle image training sample set. Specifically, the vehicle image training sample set in the present application includes a plurality of vehicle image samples for training, and in this step, a label may be added to each vehicle image training sample set in the vehicle image training sample set.
Step S102: and constructing a vehicle identification model, wherein the vehicle identification model comprises a backbone network, a license plate branch network and a vehicle attribute branch network. Specifically, the vehicle identification model constructed by the method comprises a backbone network, a license plate branch network and a vehicle attribute branch network. The main network is used for extracting vehicle characteristic vectors, the license plate branch network is used for extracting license plate information of vehicles, and the vehicle attribute branch network is used for extracting attribute information of vehicles such as vehicle types, vehicle directions, vehicle colors, vehicle brands and vehicle purposes.
Step S103: and training a vehicle identification model by using the label corresponding to each vehicle image training sample in the vehicle image training sample set. Specifically, model training is mainly performed on a main network and a license plate branch network, and after the main network and the license plate branch network are trained, a vehicle attribute branch network is trained.
Step S104: and inputting the vehicle image to be recognized into the trained vehicle recognition model to obtain the vehicle information corresponding to the vehicle image to be recognized. Specifically, after the vehicle identification model is trained based on the foregoing steps, the image of the vehicle to be identified may be input into the trained vehicle identification model, so as to obtain the vehicle information corresponding to the image of the vehicle to be identified. The vehicle information here refers to the license plate number of the vehicle and vehicle attribute information, which may be information such as the type of the vehicle, the direction of the vehicle, the color of the vehicle, the brand of the vehicle, and the use of the vehicle.
Based on the steps S101 to S104, a vehicle image training sample set is obtained first, a label is added to each vehicle image training sample in the vehicle image training sample set, a vehicle identification model is then constructed, a vehicle identification model is trained by using the labels corresponding to each vehicle image training sample in the vehicle image training sample set and the vehicle image training sample set, and finally a vehicle image to be identified is input into the vehicle identification model after training is completed, so that vehicle information corresponding to the vehicle image to be identified is obtained.
In one embodiment, the vehicle identification model comprises a backbone network, a license plate branch network and a vehicle attribute branch network; constructing the vehicle identification model includes: a ResNet-101 network architecture is used as a backbone network; and connecting the output layer of the ResNet-101 network architecture with the input layers of the license plate branch network and the vehicle attribute branch network respectively to construct and obtain a vehicle identification model. Specifically, as shown in fig. 2, the vehicle identification model in the present application includes a backbone network, a license plate branch network, and a vehicle attribute branch network, wherein an output layer of the backbone network is connected to input layers of the license plate branch network and the vehicle attribute branch network, respectively. So, will realize through a plurality of networks the discernment of vehicle information, can discern through every network and obtain different information, avoided causing the too big problem of classifier matrix, simultaneously, vehicle discernment is carried out simultaneously to a plurality of networks is favorable to improving recognition efficiency.
Generally, the backbone network in the present application may be a network such as a reset, a VGG, or a transformer, in addition to the ResNet-101 network architecture, but is not limited thereto.
Specifically, as shown in fig. 3, the license plate branch network in the present application may include a pooling layer, a linear layer, and an output layer, but is not limited thereto, and may also be other convolutional networks capable of recognizing vehicle license plate information.
In one embodiment, the tag comprises a first tag and a second tag; the training of the vehicle recognition model by using the label corresponding to each vehicle image training sample in the vehicle image training sample set comprises the following steps: training a main network and a license plate branch network by utilizing a vehicle image training sample set and a first label corresponding to each vehicle image training sample in the vehicle image training sample set; keeping the weight of the main network unchanged, and training the vehicle attribute branch network by using the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set. Specifically, in the process of training the vehicle recognition model, a trunk network and a license plate branch network in the vehicle recognition model are trained, after the trunk network and the license plate branch network are trained, the weight of the trunk network is kept not to be updated, and then the vehicle attribute branch network is trained.
In one embodiment, the first tag is a license plate tag; the training of the main network and the license plate branch network by using the first label corresponding to each vehicle image training sample in the vehicle image training sample set comprises the following steps: inputting the vehicle image training sample set into a backbone network to obtain a vehicle characteristic vector; inputting the vehicle characteristic vector into a license plate branch network to obtain preset license plate information; calculating a loss function based on preset license plate information and the first label; and respectively updating the weights of the main network and the license plate branch network based on the loss function until the loss function is converged, and finishing the training of the main network and the license plate branch network. Specifically, when a backbone network and a license plate branch network are trained simultaneously by using a first label corresponding to each vehicle image training sample in a vehicle image training sample set and a vehicle image training sample set, each sample in the vehicle image training sample set is firstly sequentially input into the backbone network to obtain a vehicle feature vector, then the vehicle feature vector is used as the input of the license plate branch network, the output obtained by the license plate branch network based on the input is preset license plate information, and then a first loss function is calculated based on the preset license plate information and the first label. The loss function in the application can be a cross entropy loss function, and the trained main network and the license plate branch network are obtained by adjusting the weights of the main network and the license plate branch network until the calculated first loss function is converged.
In one embodiment, and as particularly shown in fig. 4, the vehicle attribute branching network includes a vehicle type branching network, a vehicle direction branching network, a vehicle color branching network, a vehicle brand branching network, and a vehicle use branching network, and the second tag includes a vehicle type tag, a vehicle direction tag, a vehicle color tag, a vehicle brand tag, and a vehicle use tag. In particular, the vehicle direction branch network is used for identifying a vehicle direction, wherein the vehicle direction may be an angle of the vehicle relative to the camera, specifically including a front side, a back side, a left side, a right side, and the like. The vehicle brand branch network is used for identifying the brand of a vehicle, and the vehicle brand can be public, BMW, Honda and the like. The vehicle use branch network is used for identifying the use of vehicles, and the vehicle use specifically comprises highway passenger transport, public transportation passenger transport, taxi passenger transport, tourism passenger transport, fire fighting and the like.
Training the vehicle attribute branch network by using the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set can be implemented based on the following steps S1 to S3.
Step S1, randomly selecting any one of a vehicle type branch network, a vehicle direction branch network, a vehicle color branch network, a vehicle brand branch network, and a vehicle use branch network. Specifically, any one of the branch networks is selected from all the branch networks in the vehicle attribute network.
And step S2, training the selected branch network based on the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set. Specifically, in the training process, a vehicle image training sample set can be input into a backbone network to obtain a vehicle feature vector, the vehicle feature vector is input into a selected branch network to obtain preset attribute information, a second loss function is calculated based on the preset attribute information and a second label, and the weight of the selected branch network is updated based on the second loss function until the second loss function converges, so that the training of the selected branch network is completed.
And S3, keeping the weight of the main network unchanged, and repeatedly executing the steps S1 to S2 until all the branch networks in the vehicle attribute branch networks are completely trained. Specifically, the training mode of the other branch networks is the same as the training of the vehicle attribute branch network selected in the previous step, the weight of the main network is kept unchanged, and the main network and the other branch networks are taken as branches to train the other branch networks.
For example, in step S1, taking the selected vehicle type branch network as an example, in step S2, the selected vehicle type branch network may be trained by using the vehicle type labels corresponding to the vehicle image training samples in the vehicle image training sample set and the vehicle image training sample set. In step S3, training may be continued on any one of the remaining vehicle direction branch network, vehicle color branch network, vehicle brand branch network, and vehicle use branch network until training of all branch networks is completed.
In addition, as shown in fig. 4, the vehicle attribute branch network in the present application may further include a special vehicle branch network and a sub-brand branch network, where the sub-brand branch network main user identifies what the sub-brand of the vehicle is. The training modes of these two networks are the same as those of the branch network, and are not described herein.
In one embodiment, as shown in fig. 5 in particular, the vehicle attribute branching network includes a convolutional layer, a pooling layer, a linear layer and a softmax layer connected in sequence, wherein the convolutional layer is implemented by the first four layers of the Resnet network, and the linear layer is mainly used for dimension reduction. Since the convolution accuracy of the Resnet network is high, the accuracy of identifying the vehicle attribute can be further improved by using the first four layers of the Resnet network as convolution layers in the present application.
It should be noted that, although the foregoing embodiments describe each step in a specific sequence, those skilled in the art will understand that, in order to achieve the effect of the present invention, different steps do not necessarily need to be executed in such a sequence, and they may be executed simultaneously (in parallel) or in other sequences, and these changes are all within the protection scope of the present invention.
Further, the invention also provides a vehicle identification device.
Referring to fig. 6, fig. 6 is a main structural block diagram of a vehicle recognition device according to an embodiment of the present invention. As shown in fig. 6, the vehicle recognition apparatus in the embodiment of the present invention mainly includes an acquisition module 11, a construction module 12, a training module 13, and a recognition module 14. In some embodiments, one or more of acquisition module 11, construction module 12, training module 13, and recognition module 14 may be combined together into one module. In some embodiments, the obtaining module 11 may be configured to obtain a vehicle image training sample set, and add a label to each vehicle image training sample in the vehicle image training sample set. The building module 12 may be configured to build a vehicle identification model that includes a backbone network, a license plate affiliation network, and a vehicle attribute affiliation network. The training module 13 may be configured to train the vehicle identification model using the vehicle image training sample set and the label corresponding to each vehicle image training sample in the vehicle image training sample set. The recognition module 14 may be configured to input the image of the vehicle to be recognized into the trained vehicle recognition model, and obtain vehicle information corresponding to the image of the vehicle to be recognized. In one embodiment, the description of the specific implementation function may refer to steps S101 to S104.
For the vehicle identification device described above to be used for executing the embodiment of the vehicle identification method shown in fig. 1, the technical principles, the solved technical problems, and the generated technical effects of the two are similar, and it can be clearly understood by those skilled in the art that for convenience and brevity of description, the specific working process and related descriptions of the vehicle identification device may refer to the content described in the embodiment of the vehicle identification method, and are not repeated herein.
It will be understood by those skilled in the art that all or part of the flow of the method according to the above-described embodiment may be implemented by a computer program, which may be stored in a computer-readable storage medium and used to implement the steps of the above-described embodiments of the method when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying said computer program code, medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunications signal, software distribution medium, or the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
Furthermore, the invention also provides electronic equipment. In an embodiment of the electronic device according to the invention, the electronic device comprises a processor and a storage device, the storage device may be configured to store a program for executing the vehicle identification method of the above-mentioned method embodiment, and the processor may be configured to execute the program in the storage device, the program including but not limited to the program for executing the vehicle identification method of the above-mentioned method embodiment. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and specific technical details are not disclosed.
Further, the invention also provides a computer readable storage medium. In one computer-readable storage medium embodiment according to the present invention, a computer-readable storage medium may be configured to store a program that executes the vehicle identification method of the above-described method embodiment, and the program may be loaded and executed by a processor to implement the above-described vehicle identification method. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The computer readable storage medium may be a storage device formed by including various electronic devices, and optionally, the computer readable storage medium is a non-transitory computer readable storage medium in the embodiment of the present invention.
Further, it should be understood that, since the configuration of each module is only for explaining the functional units of the apparatus of the present invention, the corresponding physical devices of the modules may be the processor itself, or a part of software, a part of hardware, or a part of a combination of software and hardware in the processor. Thus, the number of individual modules in the figures is merely illustrative.
Those skilled in the art will appreciate that the various modules in the apparatus may be adaptively split or combined. Such splitting or combining of specific modules does not cause the technical solutions to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (10)

1. A vehicle identification method, characterized by comprising the steps of:
obtaining a vehicle image training sample set, and adding a label to each vehicle image training sample in the vehicle image training sample set;
constructing a vehicle identification model, wherein the vehicle identification model comprises a main network, a license plate branch network and a vehicle attribute branch network;
training the vehicle recognition model by using the vehicle image training sample set and the label corresponding to each vehicle image training sample in the vehicle image training sample set;
and inputting the vehicle image to be recognized into the trained vehicle recognition model to obtain vehicle information corresponding to the vehicle image to be recognized.
2. The vehicle identification method according to claim 1, wherein constructing a vehicle identification model includes:
taking a ResNet-101 network architecture as the backbone network;
and connecting the output layer of the ResNet-101 network architecture with the input layers of the license plate branch network and the vehicle attribute branch network respectively to construct and obtain the vehicle identification model.
3. The vehicle identification method according to claim 1, wherein the tag includes a first tag and a second tag; training the vehicle recognition model by using the label corresponding to each vehicle image training sample in the vehicle image training sample set comprises:
training the main network and the license plate branch network by using the vehicle image training sample set and the first label corresponding to each vehicle image training sample in the vehicle image training sample set;
keeping the weight of the main network unchanged, and training the vehicle attribute branch network by using the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set.
4. The vehicle identification method of claim 3, wherein the first tag is a license plate tag; the training of the main network and the license plate branch network by using the first label corresponding to each vehicle image training sample in the vehicle image training sample set comprises the following steps:
inputting the vehicle image training sample set into the backbone network to obtain a vehicle feature vector;
inputting the vehicle feature vector into the license plate branch network to obtain preset license plate information;
calculating a loss function based on the preset license plate information and the first label;
and respectively updating the weights of the main network and the license plate branch network based on the loss function until the loss function is converged, and finishing the training of the main network and the license plate branch network.
5. The vehicle identification method according to claim 3, wherein the vehicle-attribute branching network includes a vehicle-type branching network, a vehicle-direction branching network, a vehicle-color branching network, a vehicle-brand branching network, and a vehicle-use branching network; the second tags include a vehicle type tag, a vehicle direction tag, a vehicle color tag, a vehicle brand tag, and a vehicle use tag; training the vehicle attribute branch network by using the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set comprises:
step S1, randomly selecting any one of the vehicle type branch network, the vehicle direction branch network, the vehicle color branch network, the vehicle brand branch network and the vehicle use branch network;
step S2, training the selected branch network based on the vehicle image training sample set and the second label corresponding to each vehicle image training sample in the vehicle image training sample set;
step S3, keeping the weight of the backbone network unchanged, and repeatedly executing the foregoing steps S1 to S2 until all the branch networks in the vehicle attribute branch networks are completely trained.
6. The vehicle identification method according to claim 5, wherein the step S2 includes:
inputting the vehicle image training sample set into a backbone network to obtain a vehicle feature vector;
inputting the vehicle feature vector into the selected branch network to obtain preset attribute information;
calculating a second loss function based on the preset attribute information and the second label;
and updating the weight of the selected branch network based on the second loss function until the second loss function is converged, and finishing the training of the selected branch network.
7. The vehicle identification method according to claim 2, wherein the vehicle attribute branching network includes a convolutional layer, a pooling layer, a linear layer, and a softmax layer, which are connected in this order, wherein the convolutional layer is implemented by the first four layers of a Resnet network.
8. A vehicle identification device characterized by comprising:
the system comprises an acquisition module, a comparison module and a processing module, wherein the acquisition module is configured to acquire a vehicle image training sample set and add a label to each vehicle image training sample in the vehicle image training sample set;
a building module configured to build a vehicle identification model, the vehicle identification model comprising a backbone network, a license plate branch network, and a vehicle attribute branch network;
a training module configured to train the vehicle recognition model using the vehicle image training sample set and a label corresponding to each vehicle image training sample in the vehicle image training sample set;
and the recognition module is configured to input the vehicle image to be recognized into the trained vehicle recognition model to obtain the vehicle information corresponding to the vehicle image to be recognized.
9. An electronic device comprising a processor and a storage means adapted to store a plurality of program codes, characterized in that said program codes are adapted to be loaded and run by said processor to perform the vehicle identification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a plurality of program codes are stored, characterized in that the program codes are adapted to be loaded and run by a processor to perform the vehicle identification method according to any one of claims 1 to 7.
CN202210459060.4A 2022-04-27 2022-04-27 Vehicle identification method, device and storage medium Pending CN114708575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210459060.4A CN114708575A (en) 2022-04-27 2022-04-27 Vehicle identification method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210459060.4A CN114708575A (en) 2022-04-27 2022-04-27 Vehicle identification method, device and storage medium

Publications (1)

Publication Number Publication Date
CN114708575A true CN114708575A (en) 2022-07-05

Family

ID=82176652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210459060.4A Pending CN114708575A (en) 2022-04-27 2022-04-27 Vehicle identification method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114708575A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116453071A (en) * 2023-04-17 2023-07-18 北京睿芯通量科技发展有限公司 Identification method and device of vehicle attribute information, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116453071A (en) * 2023-04-17 2023-07-18 北京睿芯通量科技发展有限公司 Identification method and device of vehicle attribute information, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110674756B (en) Human body attribute recognition model training method, human body attribute recognition method and device
CN108229292A (en) target identification method, device, storage medium and electronic equipment
CN108197326A (en) A kind of vehicle retrieval method and device, electronic equipment, storage medium
CN105787867B (en) The method and apparatus of processing video image based on neural network algorithm
CN110321761B (en) Behavior identification method, terminal equipment and computer readable storage medium
CN110209857B (en) Vehicle multi-attribute identification method, device and medium based on neural network structure search
CN109190504B (en) Automobile image data processing method and device and readable storage medium
CN114708575A (en) Vehicle identification method, device and storage medium
CN111046213B (en) Knowledge base construction method based on image recognition
CN112102424A (en) License plate image generation model construction method, generation method and device
CN114419363A (en) Target classification model training method and device based on label-free sample data
CN113326826A (en) Network model training method and device, electronic equipment and storage medium
CN109874018A (en) Image encoding method, system, terminal and storage medium neural network based
CN112651324A (en) Method and device for extracting semantic information of video frame and computer equipment
CN115114329A (en) Method and device for detecting data stream abnormity, electronic equipment and storage medium
CN116311504A (en) Small sample behavior recognition method, system and equipment
CN113723515B (en) Moire pattern recognition method, device, equipment and medium based on image recognition
CN116363457A (en) Task processing, image classification and data processing method of task processing model
CN113723431B (en) Image recognition method, apparatus and computer readable storage medium
CN115374944A (en) Model reasoning method and device, electronic equipment and storage medium
CN113392859A (en) Method and device for determining type of city functional area
CN112417260A (en) Localized recommendation method and device and storage medium
CN116205916B (en) Method and device for detecting defects of small electric power sample, computer equipment and storage medium
CN116385751A (en) Large-scale self-supervision pre-training learning method and system for automatic driving scene
CN116501909A (en) Vehicle retrieval method, device, equipment and medium based on multitask learning

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