Vehicle identification method, server and computer-readable storage medium

Through the two-level recognition method, the backbone network and candidate vehicle attribute characteristics are used to solve the problem of low accuracy in overseas vehicle attribute recognition, and higher accuracy in vehicle attribute recognition is achieved.

CN113657180BActive Publication Date: 2024-11-05ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110839619.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-23
Publication Date
2024-11-05
Estimated Expiration
2041-07-23

AI Technical Summary

Technical Problem

In the field of intelligent transportation, the standards for vehicle model classification in different overseas regions are not unified, resulting in increased difficulty in identifying overseas vehicle attributes and low recognition accuracy.

Method used

Using a two-level recognition method, firstly extract the shallow features of the vehicle image through the backbone network for the first level recognition, and obtain the vehicle attribute type. If the recognition result is inaccurate, the candidate vehicle attribute features will be used for the second level recognition to improve the vehicle attribute recognition. Accuracy.

Benefits of technology

The two-level recognition method significantly improves the accuracy of vehicle attribute recognition, adapts to the vehicle identification needs in different regions, and improves the accuracy of identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113657180B_ABST
    Figure CN113657180B_ABST
Patent Text Reader

Abstract

The present application discloses a vehicle identification method, a server and a computer-readable storage medium, the vehicle identification method comprising: obtaining a vehicle image containing a vehicle to be detected; based on the vehicle image, performing a first-level identification on the vehicle attribute characteristics of the vehicle to be detected, obtaining attribute identification information of the vehicle to be detected, the attribute identification information at least including the attribute type of the vehicle to be detected; in response to the attribute identification information satisfying a first preset condition, performing a second-level identification based on the vehicle attribute characteristics and the candidate vehicle attribute characteristics, the candidate vehicle attribute characteristics being vehicle attribute characteristics pre-set for the attribute type of the vehicle to be detected. In the above manner, the present application can improve the vehicle identification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a vehicle identification method, a server and a computer-readable storage medium. Background Art

[0002] With the development of artificial intelligence technology, artificial intelligence technology plays an important role in the field of intelligent transportation and can identify vehicle attribute information in monitoring scenarios. With the increase in vehicle types and the gradual rise of the overseas intelligent transportation market, the demand for overseas vehicle attribute identification is increasing. The standards for vehicle model classification in different overseas regions are not unified, and it is impossible to obtain attribute information such as the model or logo of overseas vehicles by analyzing the vehicle series, which makes it more difficult to identify vehicle attributes and has lower recognition accuracy. Summary of the invention

[0003] The present application provides a vehicle identification method, a server and a computer-readable storage medium, which can improve the vehicle identification accuracy.

[0004] In order to solve the above technical problems, the technical solution adopted in this application is: to provide a vehicle identification method, which includes: obtaining a vehicle image containing a vehicle to be detected; based on the vehicle image, performing a first-level identification on the vehicle attribute characteristics of the vehicle to be detected, and obtaining attribute identification information of the vehicle to be detected, and the attribute identification information at least includes the attribute type of the vehicle to be detected; in response to the attribute identification information satisfying a first preset condition, performing a second-level identification based on the vehicle attribute characteristics and candidate vehicle attribute characteristics, and the candidate vehicle attribute characteristics are vehicle attribute characteristics pre-set for the attribute type of the vehicle to be detected.

[0005] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a server, including a processor, which is used to execute instructions to implement the vehicle identification method in the above technical solution.

[0006] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium, which is used to store instructions / program data, and the instructions / program data can be executed to implement the vehicle identification method in the above technical solution.

[0007] Through the above scheme, the beneficial effects of the present application are: obtaining a vehicle image containing a vehicle to be detected, performing a first-level recognition on the vehicle attribute characteristics of the vehicle to be detected based on the vehicle image, obtaining attribute recognition information of the vehicle to be detected, and in response to the attribute recognition information satisfying a first preset condition, performing a second-level recognition based on the vehicle attribute characteristics and the attribute characteristics of the candidate vehicles; by performing two-level recognition on the vehicle attribute characteristics of the vehicle to be detected, the accuracy of vehicle attribute recognition can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0009] Figure 1 It is a flow chart of an embodiment of a vehicle identification method provided by the present application;

[0010] Figure 2 is a flow chart of another embodiment of the vehicle identification method provided by the present application;

[0011] Figure 3 It is a structural diagram of the backbone network, coarse-grained branch network and fine-grained branch network provided by this application;

[0012] Figure 4 It is a structural diagram of an embodiment of a server provided by the present application;

[0013] Figure 5 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0015] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a vehicle identification method provided by the present application, and the vehicle identification method includes:

[0016] Step 11: Obtain a vehicle image containing the vehicle to be detected.

[0017] Before identifying the attributes of a vehicle, it is necessary to first obtain the information of the vehicle image; in a specific embodiment, the vehicle image can be obtained from a video image containing a vehicle, firstly obtaining a video image containing the vehicle to be detected, and then using a target detection network to detect and locate the vehicle in the video image, obtaining the bounding box coordinates of the target vehicle, thereby obtaining a vehicle image containing the vehicle to be detected. Among them, before using the target detection network for detection and positioning, the detection network can be trained using training data to obtain a mature target detection network, and then the vehicle in the video image is detected by the trained target detection network; specifically, the target detection network can be a yolov4 detection network, and in other embodiments, the target detection network can also be other convolutional networks, and its type can be selected according to actual conditions.

[0018] Step 12: Based on the vehicle image, perform a first level recognition on the vehicle attribute features of the vehicle to be detected to obtain attribute recognition information of the vehicle to be detected.

[0019] After acquiring the vehicle image, the vehicle attribute features of the vehicle to be detected are first-level identified according to the vehicle image to obtain attribute identification information including at least the attribute type of the vehicle to be detected. In a specific embodiment, the vehicle attribute features may include fine-grained features and coarse-grained features. Before the first-level identification of the vehicle attribute features of the vehicle to be detected, the shallow features of the vehicle image may be extracted using the backbone network. It can be understood that the vehicle image may be input into the backbone network, and then the shallow features of the vehicle image may be extracted using the backbone network, and then the extracted shallow features may be identified. Specifically, the shallow features of the vehicle image may be understood as fuzzy features of the vehicle image, which may include coarse-grained features and fine-grained features to be extracted. The backbone network may use, but is not limited to, convolutional neural networks such as ResNet and DLA. In order to reduce the subsequent amount of calculation, the output image containing shallow features may be output using the backbone network with a size ratio of 1:16 to the input vehicle image. The size may be adjusted according to actual conditions.

[0020] Step 13: In response to the attribute recognition information satisfying the first preset condition, a second level recognition is performed based on the vehicle attribute characteristics and the candidate vehicle attribute characteristics.

[0021] The first preset condition may be a standard for judging the accuracy of the attribute identification information identified at the first level. When the attribute identification information satisfies the first preset condition, it means that the result of the first level identification is not accurate. At this time, a second level identification is performed based on the vehicle attribute characteristics and the candidate vehicle attribute characteristics. By using the two-level identification of the vehicle attribute characteristics of the vehicle to be detected, the accuracy of vehicle attribute identification can be improved. Among them, the candidate vehicle attribute characteristics are vehicle attribute characteristics pre-set for the attribute type of the vehicle to be detected. In a specific embodiment, the candidate vehicle attribute characteristics may be a feature database storing corresponding vehicle attribute types, and the vehicle attribute characteristics may be subjected to a second level identification in the feature database.

[0022] Taking the identification of vehicle logo features as an example, if the identified vehicle logo is inaccurate, that is, the first preset condition is met, then the candidate vehicle attribute features set for the vehicle logo type will be used for a second level of identification with the inaccurately identified vehicle logo features to obtain a more accurate result.

[0023] In this embodiment, a vehicle image including a vehicle to be detected is acquired, and based on the vehicle image, a first-level recognition is performed on the vehicle attribute characteristics of the vehicle to be detected to obtain attribute recognition information of the vehicle to be detected. In response to the attribute recognition information satisfying a first preset condition, a second-level recognition is performed based on the vehicle attribute characteristics and the attribute characteristics of candidate vehicles. By performing two-level recognition on the vehicle attribute characteristics of the vehicle to be detected, the accuracy of vehicle attribute recognition can be improved.

[0024] See also Figure 2 , Figure 2 : is a flow chart of another embodiment of the vehicle identification method provided by the present application, the vehicle identification method comprising:

[0025] It can be understood that the "first" and "second" mentioned below are only distinguished in name and are not limitations. The first-level identification and the second-level identification are not limited in order. In other embodiments, other identification methods or sequences may be used for vehicle identification.

[0026] Step 21: Use the fine-grained branch network to identify the first feature and obtain the first vehicle attribute category of the vehicle to be detected.

[0027] Specifically, vehicle attribute features may include coarse-grained features and fine-grained features. Coarse-grained features may contain multiple coarse-grained sub-features, and fine-grained features may include multiple fine-grained sub-features. Coarse-grained features may be overall features of the entire vehicle image area, or features that can be clearly distinguished, such as vehicle model or vehicle color. The fine-grained features of the vehicle are regional features of the vehicle component area in the entire vehicle image, or detailed features that cannot be clearly distinguished, such as vehicle logos, license plates, lights, windows or rearview mirrors.

[0028] Furthermore, the first-level identification of vehicle attribute characteristics of the vehicle to be detected may include using a neural network to identify the vehicle attribute characteristics. The neural network may include a fine-grained branch network. The first characteristic of the vehicle is identified through the fine-grained branch network to obtain its corresponding first vehicle attribute category. It can be understood that the first feature identified by the fine-grained branch network is a fine-grained feature. For example, the vehicle logo feature is identified and its type is identified as "Volkswagen". At this time, the first vehicle attribute category obtained is "Volkswagen".

[0029] In a specific embodiment, Figure 3 As shown, the neural network may include a coarse-grained branch network and a fine-grained branch network. Based on the vehicle image, the coarse-grained branch network and the fine-grained branch network are used to extract the coarse-grained features and the fine-grained features of the vehicle to be detected. Specifically, after the shallow features of the vehicle image are extracted using the backbone network, the extracted shallow features are input into the coarse-grained branch network and the fine-grained branch network respectively, so as to extract the corresponding vehicle attribute features using the coarse-grained branch network and the fine-grained branch network, and extract the coarse-grained features and the fine-grained features of the vehicle respectively. Specifically, the coarse-grained branch network can use but is not limited to the VGG or ResNet network, and the fine-grained branch network can use but is not limited to the yolov3 detection network.

[0030] When identifying vehicle attribute features through a coarse-grained branch network, there may be multiple coarse-grained features of the vehicle, that is, it is necessary to simultaneously identify multiple coarse-grained sub-features of the vehicle, such as vehicle model or vehicle color. In this case, the coarse-grained branch network may include multiple coarse-grained sub-networks, each coarse-grained sub-network corresponding to the extraction of a coarse-grained sub-feature, and at this time, multiple coarse-grained sub-networks can be used to extract multiple coarse-grained sub-features respectively; similarly, when identifying vehicle attribute features through a fine-grained branch network, there may be multiple fine-grained features of the vehicle, that is, it is necessary to simultaneously identify multiple fine-grained sub-features of the vehicle. In this case, the fine-grained branch network may include multiple fine-grained sub-networks, each fine-grained sub-network corresponding to the extraction of a fine-grained sub-feature, and at this time, multiple fine-grained sub-networks can be used to extract multiple fine-grained sub-features respectively. In this way, it is possible to achieve multi-task simultaneous extraction of multiple attribute features, thereby improving the efficiency of feature recognition.

[0031] On the one hand, when using a coarse-grained branch network to perform the first-level recognition of coarse-grained features, the correlation between coarse-grained features and fine-grained features can be referred to. Taking the coarse-grained feature as the vehicle model as an example, different vehicle models may have different positions of the vehicle logo, license plate or headlights. At this time, when identifying the vehicle model category, the coarse-grained features of the vehicle can be obtained based on the fine-grained features such as the vehicle logo, so that the output coarse-grained feature results are more accurate.

[0032] In a specific embodiment, Figure 3 As shown in FIG, the coarse-grained features and the fine-grained features can be cascaded and fused to obtain fused features. The effect of feature extraction is improved by fusing the coarse-grained branch network with the fine-grained branch network. Specifically, the shallow features are first input into the coarse-grained branch network to extract the coarse-grained features. Then, the fine-grained features and the coarse-grained features are cascaded and finally the fused features are output. The specific fusion method is shown in the following formula (1):

[0033] F fus =Concat(F C ,F′ fin ) (1)

[0034] Among them, F fus is the fusion feature, Concat(·) represents the cascade feature, and F C is the coarse-grained feature, F′ fin is the fine-grained feature F fin Features obtained by 1×1 convolution operation.

[0035] On the other hand, when using the fine-grained branch network for fine-grained feature recognition, taking the car logo as an example, the category and position of the car logo also have a certain correlation with the coarse-grained features (such as the car model). For example, the car model of mini cars is relatively fixed. At this time, the car model can be used to assist in the positioning and classification of the car logo, and the coarse-grained features are used to perform self-attention weighting on the fine-grained features, thereby improving the accuracy of vehicle attribute feature extraction.

[0036] In a specific embodiment, the coarse-grained features are used to guide the feature extraction of fine-grained features based on the attention mechanism. Specifically, the coarse-grained features and the fine-grained features are cascaded and fused to obtain fused features. The fused features are then used to perform self-attention weighting on the fine-grained features to obtain the vehicle attribute features of the vehicle to be detected. The specific weighting steps are shown in the following formula (2):

[0037]

[0038] in, represents the cross product operation, F att is the self-attention weight.

[0039] Specifically, the fusion feature can be used to multiply the attention weight with the fine-grained feature to complete the self-attention weighting of the fine-grained feature. The specific steps are as follows:

[0040] (1) Perform global mean pooling operation on the fused features;

[0041] (2) Obtain the fully connected features of the pooled features after the global mean pooling operation, and normalize the fully connected features;

[0042] (3) Perform full-connection processing on the normalized fully-connected features to obtain self-attention weights;

[0043] (4) Use the above formula (3) to multiply the self-attention weight and the fine-grained feature to obtain the vehicle attribute characteristics of the vehicle to be detected.

[0044] In a specific embodiment, the fine-grained branch network may include a pooling layer and two fully connected layers (including a first fully connected layer and a second fully connected layer). The fused features are first input into the pooling layer to obtain the pooling features processed by the global mean pooling operation. Indicates, where m is the fusion feature F fus The number of channels; then the pooled features processed by the global mean pooling operation are input into the first fully connected layer to obtain the fully connected features. In other words, n is the number of channels in the first fully connected layer. Specifically, in order to maintain the stability of the attention gradient, the fully connected features are also calculated. f1 remove Then, the softmax calculation is performed again to obtain the calculated fully connected features. Finally, the calculated fully connected features are input into the second fully connected layer for normalization, and finally the self-attention weights are obtained:

[0045]

[0046] Among them, W1 and W2 are the parameters of the first fully connected layer and the second fully connected layer respectively.

[0047] Step 22: In response to the first vehicle attribute category satisfying the second preset condition, further identifying the second feature using a secondary classification network to determine a second vehicle attribute category of the vehicle to be detected.

[0048] In a specific embodiment, the second feature is a local feature of the first feature, and the first vehicle attribute category may include the first vehicle attribute category and the corresponding coordinate value, for example, the car logo category is the Volkswagen logo and the coordinate position of the Volkswagen logo in the entire vehicle image; when using the secondary classification network for secondary classification, the coordinate information contained in the first vehicle attribute category can be used to obtain the regional image (i.e., the second feature) where the corresponding feature is located, such as the car logo regional image, and then the regional image is input into the secondary classification network, so as to further identify the regional image using the secondary classification network, determine the second vehicle attribute category of the vehicle to be detected, and then determine the second vehicle attribute category as the attribute identification information of the vehicle to be detected.

[0049] Furthermore, a second preset condition is used to determine whether secondary classification is required. In a specific embodiment, the second preset condition may include that the second vehicle attribute category is a preset vehicle model category, that is, to determine whether the vehicle model is a preset model. If the vehicle model is the preset model, the step of further identifying the second feature using a secondary classification network is executed.

[0050] In a specific embodiment, the attribute identification information of the vehicle to be detected also includes a second reference value of a second vehicle attribute category. At this time, the second preset condition may also include: the second reference value is less than a second reference value threshold; or the second vehicle attribute category is a vehicle type category other than the preset vehicle type category, and the second reference value is less than the second reference value threshold.

[0051] Specifically, the second reference value is the confidence corresponding to the obtained second vehicle attribute category. The preset vehicle model may be a small car, and a small car may be a vehicle with a length of less than five meters, such as a sedan, SUV, MPV or pickup truck, etc.; first determine whether the vehicle is a small car. When the vehicle model is a small car, the fine-grained feature area contained in the vehicle image accounts for a small proportion of the picture, and the accuracy of the first vehicle attribute category identified by the above is low. At this time, there is no need to perform confidence (i.e., the second reference value) judgment, and the secondary classification network is directly used to further identify the second feature; when the vehicle model is not the preset small car model, for example, a large car, then it is further determined whether the second reference value is less than the second reference value threshold, that is, whether the result of the first vehicle attribute category is accurate.

[0052] When the second reference value is less than the second reference value threshold, it means that the accuracy of the first vehicle attribute category is not high at this time, and it is likely to be misjudged. In this case, the secondary classification network is used to perform secondary classification on the first vehicle attribute category to correct the first vehicle attribute category. Specifically, the secondary classification network can be a network such as VGG or ResNet, and the confidence level is generally in the range of 0 to 1. In this case, the second reference value threshold can be set to 0.7. When the second reference value is greater than 0.7, it means that the result of the first vehicle attribute category is relatively accurate. The specific value of the second reference value threshold can be set according to actual conditions.

[0053] Furthermore, the above is an explanation of a method of first determining the vehicle model and then determining the confidence level. In other embodiments, the vehicle model may not be determined, and the confidence level of the first vehicle attribute category may be determined directly. When the confidence level of the first vehicle attribute category is less than the second reference value threshold, the first vehicle attribute category may be corrected; or, the confidence level of the first vehicle attribute category may not be determined, and the first vehicle attribute category may be directly classified for secondary classification to improve accuracy.

[0054] Step 23: Determine the second vehicle attribute category as the attribute identification information of the vehicle to be detected.

[0055] The first vehicle attribute category may include multiple fine-grained sub-features, so when the confidence judgment is performed on the first vehicle attribute category, the confidence judgment is performed on each fine-grained sub-feature contained therein separately, and then the fine-grained sub-features with confidences less than the second reference value threshold are separately input into the secondary classification network, thereby performing secondary classification to obtain the corresponding second fine-grained sub-features. It can be understood that in other embodiments, the confidence judgment can also be performed on the multiple coarse-grained sub-features included in the first vehicle attribute category, and when the confidence is low, the coarse-grained sub-feature is subjected to secondary classification.

[0056] After the attribute identification information is obtained through the first level identification, the confidence of the attribute identification information output by the first level identification is judged to determine whether the attribute category of the vehicle to be detected in the identified attribute identification information is accurate and whether the attribute identification information meets the first preset condition, that is, whether the confidence of the attribute identification information is less than the first reference value threshold. The specific steps are as follows:

[0057] Step 24: Determine whether the first reference value of the attribute identification information is less than a first reference value threshold.

[0058] The attribute identification information includes a first reference value of the attribute type of the vehicle to be detected. The first reference value is the confidence of the attribute category. The setting of the first reference value threshold is the same as the setting of the second reference value threshold, which will not be repeated here.

[0059] In a specific embodiment, corresponding to the vehicle attribute features including coarse-grained features and fine-grained features, the attribute identification information identified through the first level of recognition may include coarse-grained feature categories and fine-grained feature categories. The confidence of the coarse-grained feature categories and the fine-grained feature categories may be judged respectively, that is, whether the coarse-grained feature categories and the fine-grained feature categories are less than the first reference value threshold. If the confidence of both is greater than / equal to the first reference value threshold, it means that the results of the coarse-grained feature categories and the fine-grained feature categories are relatively accurate. At this time, the second level of recognition is no longer performed, and the attribute identification information is directly output.

[0060] Step 25: In response to the first reference value being less than the first reference value threshold, performing a second level recognition based on the vehicle attribute feature and the candidate vehicle attribute feature.

[0061] Perform the second level identification of vehicle attribute features. The specific steps are as follows:

[0062] (1) Obtaining vehicle attribute features pre-set for the attribute type of the vehicle to be detected from the candidate vehicle attribute features as the target vehicle attribute features.

[0063] For example, if the confidence level of the result of determining the vehicle logo type is low, a second level recognition of the vehicle logo is required. In this case, the candidate vehicle attribute features corresponding to the preset logo can be obtained, and then the candidate vehicle attribute features can be compared.

[0064] In a specific embodiment, the feature database can be used to perform the second-level recognition on the vehicle attribute feature. The feature database can include multiple sub-feature databases. At this time, the pre-set candidate vehicle attribute feature is the total feature database including each sub-feature database, and the target vehicle attribute feature is the sub-feature database in the total feature database; it can be understood that the vehicle attribute feature includes coarse-grained features (including multiple coarse-grained sub-features) and fine-grained features (including multiple fine-grained sub-features). The coarse-grained sub-features correspond to the sub-feature database one-to-one, and the fine-grained sub-features correspond to the sub-feature database one-to-one, that is, each coarse-grained sub-feature corresponds to a specific sub-feature database, and each fine-grained sub-feature corresponds to a specific sub-feature database. For example, if the fine-grained feature logo of the vehicle is to be recognized at the second level, the logo of the current vehicle can be recognized in the corresponding logo feature database (that is, the target vehicle attribute feature); specifically, when the corresponding attribute feature is not recognized in the feature database, the attribute feature can be stored in the feature database to update the feature database and expand the query range of the feature database.

[0065] (2) Determine the similarity between the vehicle attribute characteristics of the vehicle to be detected and the attribute characteristics of each target vehicle.

[0066] The vehicle attribute features can be compared with the target attribute features in the corresponding feature database for similarity, and then the target attribute features with the highest similarity can be found, and then the size of the highest similarity can be judged to determine whether the target vehicle attribute features are accurate; in a specific embodiment, before using the feature database for comparison, attribute feature samples are obtained, a feature database is constructed, and then the feature database is used for similarity comparison.

[0067] (3) In response to the similarity being greater than a similarity threshold, the attribute type of the to-be-detected vehicle in the attribute identification information is determined to be the attribute type corresponding to the attribute feature of the target vehicle with the greatest similarity.

[0068] Taking the similarity threshold of 80% as an example, the specific value of the similarity threshold can be set according to the actual situation. The similarity between the target vehicle attribute feature and the vehicle attribute feature in the feature database is up to 95%. If it is greater than 80%, it means that the accuracy of the target vehicle attribute feature is qualified and the highest. At this time, the attribute type of the vehicle to be detected in the attribute identification information is determined as the attribute type corresponding to the target vehicle attribute feature with the greatest similarity.

[0069] (4) If the determined similarities are all less than the similarity threshold, the feature area image of the vehicle attribute feature of the vehicle to be detected is determined as the recognition result of the second level recognition.

[0070] All similarities are less than the similarity threshold, that is, the candidate vehicle attribute features with the highest similarity selected are all less than the similarity threshold, which means that the comparison has failed and the accurate attribute type cannot be matched in the feature database. In this case, the feature area image corresponding to the vehicle attribute category that has not been successfully matched is used as the recognition result of the second-level recognition, so as to facilitate the subsequent labeling of the attribute type corresponding to the feature area image; specifically, the step of determining the feature area image of the vehicle attribute feature of the vehicle to be detected as the recognition result of the second-level recognition also includes: labeling the attribute type of the vehicle attribute feature of the vehicle to be detected, determining the labeled vehicle attribute feature as the candidate vehicle attribute feature, that is, updating the candidate vehicle attribute feature (that is, the feature database), and the labeling process can be manually participated in, that is, manually determining the real attribute category of the feature area image, and then labeling the attribute type, and finally entering the labeled attribute type and the corresponding vehicle attribute feature into the feature database to update the feature database.

[0071] Specifically, there may be two situations in which the matching fails. Taking the Honda car logo to be identified as an example, one situation is that the attribute features of the Honda car logo are not stored in the car logo feature database. Another situation is that the attribute features of the Honda car logo exist in the car logo feature database, but the matching effect is not good. For example, the angle of the car logo area image of the vehicle image to be identified is different from the angle of the Honda corresponding car logo image stored in the car logo database. This situation may also lead to matching failure. At this time, it is necessary to manually identify the car logo area image to identify the Honda car logo, and then identify the attribute type of the feature to identify "Honda". Finally, the feature vector, car logo area image and car logo attribute category "Honda" in the vehicle attribute features in this case are all registered in the car logo feature database, so as to timely update the feature database, expand the matching range of vehicle attribute recognition, and improve the accuracy of vehicle attribute recognition.

[0072] In a specific embodiment, in the process of marking the vehicle attribute features and inputting them into the feature database to update the feature database, the feature vector corresponding to the vehicle attribute features input into the feature database needs to be re-acquired, that is, returning to the first level recognition step of the vehicle image, re-acquiring the feature vector of the extracted vehicle attribute features, and then storing the acquired feature vector of the vehicle attribute features and the identified attribute type into the feature database. It can be understood that in a specific embodiment, the key-value storage method can be used to store the identified attribute features as the numerical value and the feature vector corresponding to the vehicle attribute features as the keyword key, and store them together in the corresponding feature database, so as to facilitate the subsequent comparison and recognition of the vehicle attribute features using the feature database; the same vehicle attribute feature has a situation where different feature vectors correspond to it. For example, for the "Toyota" car logo, there may be corresponding images of the car logo area at multiple different angles, and then multiple different feature vectors correspond to it. Through the above-mentioned key-value storage method, the corresponding vehicle attribute features can be compared according to different feature vectors.

[0073] In this embodiment, fusion and attention mechanisms are used to make the coarse-grained branch network and the fine-grained branch network cooperate with each other, and the correlation between the fine-grained attributes and the coarse-grained attributes is referred to to improve the accuracy of the extracted vehicle attribute features; at the same time, when the confidence of the identified first vehicle attribute category is low, the corresponding vehicle attribute features are secondary classified, and when the confidence of the second vehicle attribute category after the secondary classification is still low, a second-level recognition is performed, and a similarity comparison is performed in the feature database. When the comparison is still unsuccessful, the vehicle attribute features are identified and updated to the feature database, so as to timely update the feature database, expand the comparison range of vehicle attribute recognition, improve the accuracy of vehicle attribute recognition, realize the online learning function of the feature database, and quickly support new attribute categories.

[0074] See also Figure 4 , Figure 4 It is a structural diagram of an embodiment of a server provided in the present application. The server 40 includes a processor 41, and the processor 41 is used to execute instructions to implement the vehicle identification method in the above technical solution.

[0075] See also Figure 5 , Figure 5 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 50 is used to store instructions / program data 51, and the instructions / program data 51 can be executed to implement the vehicle identification method in the above technical solution.

[0076] The computer-readable storage medium 50 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other media that can store program codes.

[0077] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0078] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0080] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A vehicle identification method, characterized in that: include: Acquire a vehicle image containing a vehicle to be detected; Based on the vehicle image, a first level recognition is performed on the vehicle attribute features of the vehicle to be detected to obtain attribute recognition information of the vehicle to be detected, wherein the attribute recognition information at least includes an attribute type of the vehicle to be detected; In response to the attribute identification information satisfying a first preset condition, performing a second level identification based on the vehicle attribute feature and a candidate vehicle attribute feature, the candidate vehicle attribute feature being a vehicle attribute feature preset for an attribute type of the vehicle to be detected; Before performing the first level recognition of the vehicle attribute features of the vehicle to be detected based on the vehicle image, the method further includes: Based on the vehicle image, extracting coarse-grained features and fine-grained features of the vehicle to be detected, wherein the coarse-grained features of the vehicle to be detected are extracted using a coarse-grained branch network, and the fine-grained features of the vehicle to be detected are extracted using a fine-grained branch network; Cascadingly fusing the coarse-grained features and the fine-grained features to obtain fused features; The fused features are used to perform self-attention weighting on the fine-grained features to obtain vehicle attribute features of the vehicle to be detected.

2. The method according to claim 1, characterized in that The attribute identification information also includes a first reference value of the attribute type of the vehicle to be detected; The first preset condition includes that the first reference value is less than a first reference value threshold.

3. The vehicle identification method according to claim 1, characterized in that: The first level identification of the vehicle attribute characteristics of the vehicle to be detected includes: Using a fine-grained branch network to identify the first feature, and obtaining a first vehicle attribute category of the vehicle to be detected; In response to the first vehicle attribute category satisfying a second preset condition, further identifying a second feature using a secondary classification network to determine a second vehicle attribute category of the to-be-detected vehicle, wherein the second feature is a local feature of the first feature; The second vehicle attribute category is determined as the attribute identification information of the vehicle to be detected.

4. The vehicle identification method according to claim 3, characterized in that: The second preset condition includes that the second vehicle attribute category is a preset vehicle type category.

5. The method according to claim 3, characterized in that The attribute identification information of the vehicle to be detected further includes a second reference value of the second vehicle attribute category; The second preset condition includes: The second reference value is less than a second reference value threshold; or The second vehicle attribute category is a vehicle type category other than a preset vehicle type category, and the second reference value is less than the second reference value threshold.

6. The vehicle identification method according to claim 1, characterized in that: The method of using the fusion feature to perform self-attention weighting on the fine-grained feature to obtain the vehicle attribute feature of the vehicle to be detected includes: Performing a global mean pooling operation on the fused features; Obtaining fully connected features of the pooled features after the global mean pooling operation, and normalizing the fully connected features; Perform full connection processing on the normalized fully connected features to obtain the self-attention weights; The self-attention weight is multiplied by the fine-grained feature to obtain the vehicle attribute feature of the vehicle to be detected.

7. The vehicle identification method according to claim 1, characterized in that: The second level identification based on the vehicle attribute features and the candidate vehicle attribute features comprises: Acquire a vehicle attribute feature pre-set for the attribute type of the to-be-detected vehicle from the candidate vehicle attribute features as the target vehicle attribute feature; Determining the similarity between the vehicle attribute characteristics of the vehicle to be detected and the attribute characteristics of each of the target vehicles; In response to the similarity being greater than a similarity threshold, the attribute type of the to-be-detected vehicle in the attribute identification information is determined as the attribute type corresponding to the attribute feature of the target vehicle with the greatest similarity.

8. The vehicle identification method according to claim 7, characterized in that: Also includes: If the determined similarities are all smaller than the similarity threshold, the feature region image of the vehicle attribute feature of the to-be-detected vehicle is determined as the recognition result of the second-level recognition.

9. The vehicle identification method according to claim 8, characterized in that: If the determined second similarities are all less than the similarity threshold, the feature area image of the vehicle attribute feature of the to-be-detected vehicle is determined as the recognition result of the second level recognition, further comprising: The vehicle attribute features of the to-be-detected vehicle are labeled with attribute types, and the labeled vehicle attribute features are determined as the candidate vehicle attribute features.

10. A server, characterized in that: The invention comprises a processor, wherein the processor is used to execute instructions to implement the vehicle identification method according to any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: Used to store instructions / program data, which can be executed to implement the vehicle identification method according to any one of claims 1 to 9.