Vehicle identification method

By combining the backbone network, local branch and global branch in the vehicle identification method, the overall, local fine-grained and global features are extracted and integrated, the problem of insufficient vehicle recognition accuracy in the existing technology is solved, and higher recognition accuracy and freedom are achieved Great.

CN119445321APending Publication Date: 2025-02-14NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411332477.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Existing vehicle recognition algorithms have problems with insufficient recognition accuracy when distinguishing visually similar vehicles and may ignore specific details of the vehicle.

Method used

A vehicle recognition method is adopted to extract overall features through the backbone network, multiple local features are extracted by local branches and synthesis and propagation using graph structures to obtain local fine-grained features, and global branches extract global features, and fuse these features to improve recognition accuracy.

Benefits of technology

It improves the accuracy and robustness of vehicle recognition, can more effectively distinguish visually similar vehicles, improves the recognition ability under environmental inconsistency, and ensures reliable vehicle recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445321A_ABST
    Figure CN119445321A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle identification method in the technical field of vehicle re-identification, and aims to solve the technical problems that the vehicle identification precision is low and visually similar vehicles cannot be distinguished. The method comprises the following steps: obtaining local fine-grained features by using a graph structure, and recognizing a vehicle through fusion features obtained by fusing the local fine-grained features and global features, thereby improving the recognition capability and robustness of a system, improving the effect of the system in coping with environmental inconsistency in the real world, ensuring reliable vehicle recognition, and improving the vehicle recognition efficiency. The accuracy and the key area identification capability are improved, and visually similar vehicles are distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a vehicle identification method and belongs to the technical field of vehicle re-identification. Background Art

[0003] Vehicle re-identification (Re-ID) requires matching the features of a query vehicle with a database of vehicle images to determine the identity (ID) of the target vehicle. This algorithm greatly simplifies the search process, saves time, and improves search efficiency. Therefore, vehicle re-identification has become an important component of the automatic management of intelligent transportation systems. The currently widely used deep learning algorithms focus on the global features of vehicles, which may ignore the specific details of the vehicle. Therefore, algorithms that emphasize global features may not be able to distinguish between visually similar vehicles. Summary of the invention

[0004] The purpose of this application is to overcome the deficiencies in the prior art and provide a vehicle identification method that improves attention to detail and improves vehicle identification accuracy.

[0005] In order to achieve the above objectives, this application is implemented by adopting the following technical solutions:

[0006] In a first aspect, the present application provides a vehicle identification method, comprising:

[0007] Acquire a vehicle image, and input the vehicle image into a pre-built and trained vehicle recognition system, wherein the vehicle recognition system includes a backbone network, a local branch, and a global branch; wherein,

[0008] The backbone network extracts overall features from the vehicle image;

[0009] The local branch extracts multiple local features from the overall feature, synthesizes and propagates the multiple local features using a graph structure, and obtains local fine-grained features;

[0010] The global branch extracts global features from the overall features;

[0011] The global features and the local fine-grained features are fused to obtain fused features, and the vehicle is identified through the fused features.

[0012] In some embodiments of the first aspect, the backbone network extracts overall features from the vehicle image, including:

[0013] The backbone network includes a pre-built and trained ResNet-50 network and an efficient channel attention module;

[0014] The ResNet-50 network extracts features from the vehicle image through multiple channels, and the efficient channel attention module adjusts the attention weight of each channel in real time according to the feature information of each channel;

[0015] The ResNet-50 network integrates the features output by each channel into overall features according to each channel and its corresponding attention weight.

[0016] In some embodiments of the first aspect, the efficient channel attention module adjusts the attention weight of each channel according to the feature information of each channel, including:

[0017] Starting from the input vehicle image, a vector is created independently for each channel in the ResNet-50 network using the global average pooling method;

[0018] The vector of each channel is used as the corresponding channel feature;

[0019] A local cross-channel interaction method is used to perform a one-dimensional convolution operation on each channel feature and its neighboring channel features;

[0020] Use the activation function to activate the one-dimensional convolution kernel corresponding to each channel to obtain the attention weight, which is calculated by the following formula:

[0021] ,

[0022] In the formula, is a one-dimensional convolution operation, is the size of the one-dimensional convolution kernel, is the channel characteristic, For the The size of the channel feature is The one-dimensional convolution kernel, is the activation function, For the The attention weight of channel features, is the number of channels for one-dimensional convolution operation, and are hyper parameters respectively.

[0023] In some embodiments of the first aspect, the synthesizing and propagating multiple local features using a graph structure to obtain local fine-grained features includes:

[0024] Process multiple local features into multiple vertex attributes;

[0025] Build a graph structure based on multiple vertex attributes;

[0026] The vertex attributes are synthesized and propagated within the graph structure through a graph convolutional network to obtain local fine-grained features.

[0027] In some embodiments of the first aspect, the global branch extracts a global feature from the overall feature, comprising:

[0028] The global branch includes a global average pooling layer, a convolutional layer and a fully connected layer;

[0029] The global average pooling layer performs pooling compression on the overall features to extract preliminary global features;

[0030] The convolutional layer propagates preliminary global features and then performs batch normalization to obtain perfect global features;

[0031] The fully connected layer integrates the perfected global features into the final global features.

[0032] In some embodiments of the first aspect,

[0033] The method for obtaining the global branch and the local branch is as follows:

[0034] Constructing an initial vehicle identification system, wherein the initial vehicle identification system includes an initial global branch and an initial local branch;

[0035] Input the training data set to the initial vehicle recognition system, the global branch outputs the global feature, the local branch outputs the local feature, the first vehicle label is identified according to the global feature, and the second vehicle label is identified according to the local feature;

[0036] Construct triple loss function and cross entropy loss function;

[0037] The triple loss function and the cross entropy loss function obtain a global branch loss according to the identified first vehicle label and the real label recorded in the training data set; the global branch loss is calculated according to the following formula:

[0038] ,

[0039] In the formula, is the global branch loss, is the triple loss function, is the triplet loss of the global branch, is the cross entropy loss function, is the cross entropy loss of the global branch;

[0040] The triple loss function and the cross entropy loss function obtain local branch loss according to the identified second vehicle label and the real label recorded in the training data set; the local branch loss is calculated according to the following formula:

[0041] ,

[0042] In the formula, is the local branch loss, is the triple loss of the local branch, is the cross entropy loss of the local branch;

[0043] The final loss is obtained according to the local branch loss and the global branch loss; the final loss is calculated according to the following formula:

[0044] ,

[0045] In the formula, For the final loss, To balance hyperparameters;

[0046] The initial global branch is constrained to be the final global branch, and the initial local branch is constrained to be the final local branch according to the final loss.

[0047] In some embodiments of the first aspect,

[0048] The cross entropy loss is as follows:

[0049] ,

[0050] In the formula, is the counting sequence number of the vehicle image, For the The true labels of the vehicle images, is the number of vehicle images in the training dataset, To identify the The probability that the vehicle image is the true label;

[0051] The triple loss function is as follows:

[0052] L t = ∑ l = 1 P ∑ i = 1 K [ α + max p = 1 ,..., K ‖ a l − p i ‖ 2 − min n = 1 ,... K , j = 1 ,..., P , i ≠ j ‖ a i − n j ‖ 2 ] + ,

[0053] In the formula, is the number of labels in the mini-batch random sampling, is the counting number of the label, is the number of vehicle images in the mini-batch random sampling, is a hyperparameter, is the anchor point, To find the maximum function, To find the minimum function, For the The anchor point of the label, is the feature vector of the positive sample, For the The feature vector of the positive sample of the vehicle image, is the feature vector of negative samples, is the counting sequence number of the vehicle image, For the Anchor points of vehicle images, For the The feature vector of the negative sample of the vehicle image, [ ] + is the hinge function.

[0054] In a second aspect, the present application also provides a computer device, comprising a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the vehicle identification method described in any embodiment of the first aspect are performed.

[0055] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the vehicle identification method described in any one of the embodiments of the first aspect.

[0056] In a fourth aspect, the present application further provides a computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of the vehicle identification method described in any embodiment of the first aspect are implemented.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] The vehicle recognition method provided in this embodiment obtains local fine-grained features by utilizing a graph structure, and identifies vehicles by fusion features obtained by fusing local fine-grained features with global features, thereby improving the recognition capability and robustness of the system, improving the effectiveness of the system in dealing with environmental inconsistencies in the real world, ensuring reliable vehicle recognition, improving accuracy and key area recognition capabilities, and achieving the ability to distinguish visually similar vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying any creative work.

[0060] Figure 1 is a flowchart of the steps of the vehicle identification method provided in this embodiment;

[0061] Figure 2 is a schematic diagram of the principle of a vehicle identification system in the vehicle identification method provided in this embodiment;

[0062] Figure 3 is a schematic diagram of the principle of an efficient channel attention module of the vehicle identification method provided in this embodiment;

[0063] Figure 4 This is a comparison chart of ablation experiments;

[0064] Figure 5 is a schematic block diagram of the principles of the computer device provided in this embodiment;

[0065] Figure 6 This is a comparison chart of the improvement of the Resnet50 network in this embodiment. DETAILED DESCRIPTION

[0066] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

[0067] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0068] Embodiment 1:

[0069] Figure 1 This is a flow chart of a vehicle identification method in the first embodiment of the present invention. This flow chart only shows the logical sequence of the method described in this embodiment. In other possible embodiments of the present invention, different Figure 1 The steps shown or described are accomplished in the order shown.

[0070] The vehicle identification method provided in this embodiment can be applied to a terminal and can be executed by a vehicle identification device, which can be implemented by software and / or hardware, and can be integrated in a terminal, such as any smart phone, tablet computer or computer device with communication function. Figure 1 The method of this implementation specifically includes the following steps:

[0071] Get a vehicle image and input it into a pre-built and trained vehicle recognition system. Figure 2 ,The vehicle identification system includes a backbone network, local branches and global branches; among them,

[0072] The backbone network extracts overall features from the vehicle image. The overall features contain but do not distinguish between local and global feature information. The overall features are the cornerstone of subsequent steps.

[0073] The local branch extracts multiple local features from the overall features, synthesizes and propagates multiple local features using the graph structure, and obtains local fine-grained features. The local fine-grained features further focus on the details of the vehicle image that are difficult to notice based on the original local features.

[0074] The global branch extracts global features from the overall features;

[0075] By fusing global features and local fine-grained features, the obtained fused features have richer vehicle detail features than the currently used global features, and the vehicle is identified by the obtained fused features; as one of the embodiments, the fused features are matched with a vehicle image database to obtain the vehicle ID.

[0076] The architecture of the backbone network, local branches and global branches can be implemented in the form of a feature extraction network known in the art and will not be described in detail here.

[0077] The advantage of the local branch is that it can capture deep vehicle attributes, and the holistic perspective of the global branch is also indispensable, for example, it includes features such as vehicle color and type.

[0078] The vehicle recognition method provided in the present embodiment can focus on the overall features of the vehicle to be identified as well as the detailed features of the minor details by respectively transferring the overall features to the local branch and the global branch for processing, and then fuses the local fine-grained features and the global features to identify the vehicle using the fused features. This allows the fused features to comprehensively and accurately reflect the characteristics of the vehicle. Furthermore, the vehicle recognition method provided in the present embodiment can be used to avoid the problem of ignoring specific details of the vehicle and effectively distinguish visually similar vehicles.

[0079] Deploying the vehicle identification method provided in this embodiment on a vehicle identification device can enhance its identification capability and robustness, improve its effectiveness in coping with environmental inconsistencies in the real world, and ensure reliable vehicle identification.

[0080] In the vehicle identification method provided in this embodiment, the vehicle identification system is essentially used as a vehicle identification model, including a backbone network, local branches and global branches. Therefore, this embodiment also provides a vehicle identification model method:

[0081] A training data set is obtained, the training data set includes vehicle images and their true labels; the vehicle images in the training data set are input into a vehicle recognition model; the local branch and the global branch output local fine-grained features and global features respectively; then 1. the vehicle is identified based on the fused features, the identification result is the vehicle label, and the various parameters of the vehicle recognition model are adjusted by comparing the vehicle label and the true label, or, 2. the vehicle is identified based on the local fine-grained features and the global features respectively, the identification result is the vehicle label, and the various parameters of the local branch and the global branch are adjusted by comparing the vehicle label and the true label; a verification data set is obtained to verify the accuracy of the model until sufficient accuracy is achieved.

[0082] Those skilled in the art may also train the vehicle recognition model in other ways, which will not be described in detail here.

[0083] Embodiment 2:

[0084] This embodiment provides a vehicle identification method. This embodiment is optimized on the basis of the first embodiment to improve the technical effect and refine the technical solution. For the contents not fully described in this embodiment, please refer to the first embodiment.

[0085] In a further but non-limiting embodiment of the present application, a ResNet50 network structure is used as the backbone network. The conventional ResNet50 has a 50-layer deep structure, which can extract more complex and rich image feature information than the traditional convolutional neural network. This depth advantage helps to improve the accuracy of target detection and classification.

[0086] In order to further improve the feature extraction capability of the ResNet50 network and adjust the feature weights more flexibly, as one of the embodiments, refer to Figure 6 , omitting the down sampling procedure in the fourth layer of the conventional ResNet50 network to obtain a more prominent feature map. In addition, this embodiment also integrates an efficient channel attention module ECA in the remaining framework of ResNet50 to introduce the attention ability of specific information, so that when the backbone network extracts the overall features from the vehicle image, it controls the channel weight distribution in the ResNet50 network through ECA, selectively emphasizes the prominent information channel, instead of evenly distributing the focus to the entire scene, which can make it easier to highlight the features in the vehicle image and improve the efficiency of subsequent processing, especially local branches. The ResNet50 network is composed of multiple layers of networks, and each layer of the network is regarded as each channel that can be controlled by the efficient channel attention module ECA. When each layer of the ResNet50 network extracts features from the vehicle image, the efficient channel attention module ECA calculates the corresponding attention weight of each layer according to the feature information of each layer of the network, and finally the ResNet50 network integrates the features of each layer of the network into the overall features according to the corresponding attention weight. Figure 4In the figure, Conv is the convolution operation and relu is the activation operation.

[0087] As one of the embodiments, please refer to Figure 3 , the efficient channel attention module adjusts the attention weight of each channel through the feature information of each channel, which can be expanded into the following schemes:

[0088] Starting from the input vehicle image, a vector is created independently for each channel in the ResNet-50 network using the global average pooling method;

[0089] The vector of each channel is used as the corresponding channel feature;

[0090] A local cross-channel interaction method is used to perform a one-dimensional convolution operation on each channel feature and the channel features of its neighborhood; wherein the size of the one-dimensional convolution kernel is adaptively selected by a specific function;

[0091] Use the activation function to activate the one-dimensional convolution kernel corresponding to each channel to obtain the attention weight, which is calculated by the following formula:

[0092] ,

[0093] In the formula, is a one-dimensional convolution operation, is the size of the one-dimensional convolution kernel, is the channel characteristic, For the The size of the channel feature is The one-dimensional convolution kernel, is the activation function, For the The attention weight of channel features, is the number of channels for one-dimensional convolution operation, and are hyper parameters respectively.

[0094] This embodiment uses the sigmoid activation function to activate the one-dimensional convolution kernel corresponding to each channel.

[0095] Figure 3 In it, C, H, and W are the dimensions of the features.

[0096] Some deep residual networks use compression and excitation modules SE, while in this embodiment, the ECA module is used to mention the excitation module SE. Through the one-dimensional convolution of the ECA module, the problem that the dimensionality reduction operation in the SE module may have an adverse effect on the prediction of channel attention and increase the complexity of the model is solved. The ECA module is an enhanced, lightweight attention module derived from the SE module. Compared with other attention modules, this module only adds a few additional parameters, the amount of calculation is negligible, but the performance is significantly improved.

[0097] This embodiment also improves the local branch, constructs a specific graph structure to obtain the final local features, and then inputs them into the graph convolution network. In a further but non-limiting embodiment of the present application, multiple local features are processed into multiple vertex attributes;

[0098] Build a graph structure based on multiple vertex attributes;

[0099] The vertex attributes are synthesized and propagated within the graph structure through a graph convolutional network to obtain local fine-grained features.

[0100] As one of the embodiments, the graph convolutional network is connected to the fourth layer of the backbone network, and the graph features of the fourth layer of the backbone network are accessed and extracted through a deep bottleneck. These features are input into the convolutional network graph of the vehicle structure, and the graph features of the fourth layer of the backbone network are divided into multiple sub-regions. Each region is used as a node, and then enters the graph convolutional network to analyze the vehicle structure, realizing information fusion and communication between neighborhood graph nodes, thereby promoting the learning of structured information.

[0101] Each convolutional layer of the graph convolutional network only processes the first-order neighborhood information. By stacking several convolutional layers, multi-order neighborhood information transmission can be achieved. The mathematical expression of the activation matrix of each layer of the graph convolutional network is as follows:

[0102] ,

[0103] In the formula, It is The activation matrix of the layer, yes The activation matrix of the next layer, is a nonlinear activation function, Add self-connectivity to the adjacency matrix of the undirected graph G, , is the adjacency matrix of the undirected graph G, is the identity matrix, for The degree matrix of For specific The trainable weight matrix of the layer.

[0104] This embodiment also makes improvements to the global branch. The global branch structure can be referred to Figure 2 ,The global branch includes at least a global average pooling layer, a convolutional layer, and a fully connected layer;

[0105] Among them, the global average pooling layer performs pooling compression on the overall features to extract preliminary global features for extracting global features and attributes of broad flat areas; the convolution layer propagates preliminary global features and then performs batch normalization to improve the feature set, and the fully connected layer integrates the improved global features into the final global features. As one embodiment, finally, the final global feature output can be performed by using the cross entropy loss function through the fully connected layer.

[0106] in addition, Figure 2 The Layer in the figure is the layer in the ResNet-50 network.

[0107] This embodiment also provides a training method for a vehicle identification system, which mainly focuses on the training of global branches and local branches, and constructs an initial vehicle identification system. The initial vehicle identification system includes an initial global branch and an initial local branch. The parameters of the global branch and the local branch in the initial vehicle identification system are original.

[0108] Input the training data set to the initial vehicle recognition system, the global branch outputs global features, the local branch outputs local features, the first vehicle label is identified according to the global features, and the second vehicle label is identified according to the local features; in the following, the loss function is specified according to the error between the first vehicle label and the second vehicle label and the true label, and the loss function is used to constrain and regulate the various parameters in the global branch and the local branch:

[0109] Construct triple loss function and cross entropy loss function;

[0110] The triple loss function and the cross entropy loss function obtain the global branch loss according to the identified first vehicle label and the true label recorded in the training data set; the global branch loss is calculated according to the following formula:

[0111] ,

[0112] In the formula, is the global branch loss, is the triple loss function, is the triplet loss of the global branch, is the cross entropy loss function, is the cross entropy loss of the global branch;

[0113] The triple loss function and the cross entropy loss function obtain the local branch loss according to the identified second vehicle label and the real label recorded in the training data set; the local branch loss is calculated according to the following formula:

[0114] ,

[0115] In the formula, is the local branch loss, is the triple loss of the local branch, is the cross entropy loss of the local branch;

[0116] The final loss is obtained based on the local branch loss and the global branch loss; the final loss is calculated according to the following formula:

[0117] ,

[0118] In the formula, For the final loss, To balance hyperparameters;

[0119] The initial global branch is constrained to the final global branch according to the final loss, and the initial local branch is constrained to the final local branch according to the final loss.

[0120] This embodiment adopts a multi-task learning strategy, using two loss functions to simultaneously influence the branch structure. By balancing the weight ratio of different losses relative to the total loss, the model can obtain a more robust feature mapping method, thereby improving the performance of the system.

[0121] As one example, the cross entropy loss is as follows:

[0122] ,

[0123] In the formula, is the counting sequence number of the vehicle image, For the The true labels of the vehicle images, is the number of vehicle images in the training dataset, To identify the The probability that the vehicle image is the true label;

[0124] The cross entropy loss function can guide the branch structure or the global structure to learn a feature space that accommodates the interface between each class, thereby having favorable classification characteristics.

[0125] in, , is the output score of the classification layer in the global branch or local branch (such as the fully connected layer in the global branch), For the The output scores for each vehicle image.

[0126] The traditional triple loss metric learning method relies on random sampling of training samples. Its limitation is that only some easily identifiable samples can be collected, so it is impossible to effectively train an expressive re-identification (re-ID) model. This embodiment also improves the triple loss function, and this embodiment adopts the hard triple loss method. The triple loss of difficult samples is an improved triple loss function. It can focus on more difficult triple samples during training and greatly improve the convergence effect of the network. The anchor point, the most difficult positive sample, and the most difficult negative sample constitute a most difficult triple. The triple loss function of difficult samples is as follows:

[0127] L t = ∑ l = 1 P ∑ i = 1 K [ α + max p = 1 ,..., K ‖ a l − p i ‖ 2 − min n = 1 ,... K , j = 1 ,..., P , i ≠ j ‖ a i − n j ‖ 2 ] + ,

[0128] In the formula, is the number of labels in the mini-batch random sampling, is the counting number of the label, is the number of vehicle images in the mini-batch random sampling, and the triple loss function randomly samples each mini-batch identities (i.e., labels) and instances (i.e., vehicle images), we get batch size, is a hyperparameter, which indicates the minimum margin between positive and negative pairs. is the anchor point, To find the maximum function, To find the minimum function, For the The anchor point of the label, is the feature vector of the positive sample, For the The feature vector of the positive sample of the vehicle image, is the feature vector of negative samples, is the counting sequence number of the vehicle image, For the Anchor points of vehicle images, For the The feature vector of the negative sample of the vehicle image, [ ] + is the hinge function.

[0129] In addition, this embodiment also improves the ResNet-50 network. When constructing the initial vehicle recognition system, the ImageNet pre-trained parameters on the ResNet-50 architecture are used to initialize the network. The adaptive moment estimation algorithm is used to optimize the model parameters. In order to protect the integrity of the image data, the step size parameter of the last bottleneck layer of ResNet-50 is adjusted to 1.

[0130] In addition, this embodiment adds an attention block to each bottleneck layer. Throughout the experiment, the resolution of the input vehicle image was kept at 256×256 pixels. This embodiment also uses a variety of data augmentation techniques, such as random horizontal flipping, random cropping, and random erasing, to enhance the model's resilience to data differences; the probability of each technique is 0.5. When the initial vehicle recognition system is trained, the batch size of the stochastic gradient descent SGD optimizer in the training dataset is 64. The training time span is 120 epochs, which includes the application of label smoothing to prevent overfitting. The learning rate is initially set to 0.00003 and is scheduled to be reduced by 10 times at the 40th and 80th training. A warm-up strategy is used in the first 10 epochs to gradually increase the learning rate from 0.00003 to 0.0003. In the validation phase using the validation dataset, the Euclidean distance measurement method is used to evaluate the similarity index between the query image and the database image.

[0131] In order to evaluate the performance of the vehicle identification method provided in this embodiment, experiments were conducted on two open data sets: VeRi-776 and VehicleID using the vehicle identification system trained in the vehicle identification method. Experimental items: (1) PROVID; (2) RAM; (3) VAMI; (4) TAMR; (5) LOMO; (6) AAVER; (7) QD DLF; (8) PRN; (9) SAVER; (10) AGW. The comparison indicators of the VeRi-776 experimental results are mAP, and Rank-1 and Rank-5 in mAP. The comparison indicators of the VehicleID experimental results are Test-800, Test-1600 and Test-2400, as well as Rank-1 and Rank-5 therein.

[0132] The experimental results of the trained vehicle recognition system on the VeRi-776 dataset are shown in Table 1.

[0133]

[0134] In the comparative analysis listed in Table 1, the vehicle recognition method provided in this embodiment has significant improvements over the traditional LOMO algorithm, with the mean average precision (mAP) significantly increased by 65.9%, Rank-1 increased by 69.8%, and Rank-5 increased by 51.6%, proving the accuracy advantage of the vehicle recognition method provided in this embodiment. In addition, compared with methods such as VAMI, AAVER, and QD DLF that use multi-faceted feature extraction, the vehicle recognition method provided in this embodiment has significant competitiveness, which indirectly illustrates that combining the attention mechanism with the graph convolutional network can effectively improve the model's ability to recognize overall and fine-grained vehicle features.

[0135]

[0136] The vehicle recognition method provided in this embodiment is rigorously tested on the VehicleID benchmark dataset, which is divided into three scale subsets: small, medium and large, containing 800, 1600 and 2400 images respectively, namely Test-800, Test-1600 and Test-2400. Table 2 summarizes the results, and the data shows that the vehicle recognition method provided in this embodiment surpasses other competing methods in terms of performance indicators. Although other methods, such as AAVER and AGW, use attention mechanisms to locate salient local features, they often rely on complex attention frameworks. The efficient channel attention module ECA attention mechanism adopted in this study can significantly improve performance. The excellent performance of the vehicle recognition method provided in this embodiment in all three test sets demonstrates its robustness and adaptability.

[0137] This embodiment also conducts an ablation experiment to determine the role of each component in the vehicle identification system. The ablation experiment is used to determine the most effective structural configuration. The ablation experiment is based on the VeRi-776 dataset. Figure 4 In the table and figure, the baseline is the basic model framework of the pre-built and trained vehicle recognition system. The baseline does not contain the graph convolutional network GCN and the efficient channel attention module ECA. The Baseline+ECA is the basic model framework that includes ECA. The Baseline+GCN is the basic model framework that includes GCN. ATGC-Net is a complete vehicle recognition system. The Matching Rate is the evaluation indicator, and the higher the better.

[0138]

[0139] Compared with the Baseline, after adding ECA, the mAP, Rank-1 and Rank-5 of Baseline+ECA increased by 3.0%, 0.9% and 0.2% respectively. This is because the Resnet50 network in Baseline+ECA contains the features of the middle layer and the last layer. Therefore, more effective global feature extraction can be obtained. Compared with the Baseline, the mAP, Rank-1 and Rank-5 of Baseline+GCN increased by 3.4%, 1.2% and 0.5% respectively. This is because the use of GCN can better obtain the internal relationship of the vehicle through the graph structure. Compared with the Baseline, the Rank-1 of ATGC-Net increased by 1.7% and the mAP increased by 5.2%. It can be seen that there is a complementary effect between the two ECAs and GCN. Compared with Example 1, the vehicle recognition method provided in this embodiment

[0140] In summary, compared with Example 1, the vehicle identification method provided in this embodiment combines an efficient channel attention module and a graph convolutional network and its associated processing steps, thereby improving the level of detail of the extracted features and the recognition accuracy of the vehicle.

[0141] Embodiment three:

[0142] This embodiment provides a computer device, including a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the vehicle identification method provided in Embodiment 1 or 2 are performed.

[0143] The computer device may be a server or an electronic terminal. As one embodiment, refer to Figure 5 , the computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data obtained and generated in the vehicle identification method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the vehicle identification method provided in embodiment one or two is implemented.

[0144] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0145] The computer device provided in this embodiment has the same technical effects as those in Embodiment 1 or 2, which will not be described in detail here.

[0146] Embodiment 4:

[0147] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the vehicle identification method provided in the first or second embodiment are implemented.

[0148] The computer-readable storage medium provided in this embodiment has the same technical effects as those in Embodiment 1 or 2, and will not be described in detail here.

[0149] Embodiment five:

[0150] This embodiment provides a computer program product, on which a computer program is stored, and when the program is executed by a processor, the steps of the vehicle identification method provided in Embodiment 1 or Embodiment 2 are implemented. The computer program product provided in this embodiment can be transmitted, distributed and downloaded in the form of a signal via the Internet.

[0151] The computer program product provided in this embodiment has the same technical effects as those in Embodiment 1 or 2, and will not be described in detail here.

[0152] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0156] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0157] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A vehicle identification method, characterized in that: include, Acquire a vehicle image, and input the vehicle image into a pre-built and trained vehicle recognition system, wherein the vehicle recognition system includes a backbone network, a local branch, and a global branch; wherein, The backbone network extracts overall features from the vehicle image; The local branch extracts multiple local features from the overall feature, synthesizes and propagates the multiple local features using a graph structure, and obtains local fine-grained features; The global branch extracts global features from the overall features; The global features and the local fine-grained features are fused to obtain fused features, and the vehicle is identified through the fused features.

2. The vehicle identification method according to claim 1, characterized in that: The backbone network extracts overall features from the vehicle image, including: The backbone network includes a pre-built and trained ResNet-50 network and an efficient channel attention module; The ResNet-50 network extracts features from the vehicle image through multiple channels, and the efficient channel attention module adjusts the attention weight of each channel in real time according to the feature information of each channel; The ResNet-50 network integrates the features output by each channel into overall features according to each channel and its corresponding attention weight.

3. The vehicle identification method according to claim 2, characterized in that: At the same time, the efficient channel attention module adjusts the attention weight of each channel according to the feature information of each channel. include, Starting from the input vehicle image, a vector is created independently for each channel in the ResNet-50 network using the global average pooling method; The vector of each channel is used as the corresponding channel feature; A local cross-channel interaction method is used to perform a one-dimensional convolution operation on each channel feature and its neighboring channel features; Use the activation function to activate the one-dimensional convolution kernel corresponding to each channel to obtain the attention weight, which is calculated by the following formula: , In the formula, is a one-dimensional convolution operation, is the size of the one-dimensional convolution kernel, is the channel characteristic, For the The size of the channel feature is The one-dimensional convolution kernel, is the activation function, For the The attention weight of channel features, is the number of channels for one-dimensional convolution operation, and are hyper parameters respectively.

4. The vehicle identification method according to claim 1, characterized in that: The method uses the graph structure to synthesize and propagate multiple local features to obtain local fine-grained features, including: Process multiple local features into multiple vertex attributes; Build a graph structure based on multiple vertex attributes; The vertex attributes are synthesized and propagated within the graph structure through a graph convolutional network to obtain local fine-grained features.

5. The vehicle identification method according to claim 1, characterized in that: The global branch extracts global features from the overall features, including: The global branch includes a global average pooling layer, a convolutional layer and a fully connected layer; The global average pooling layer performs pooling compression on the overall features to extract preliminary global features; The convolutional layer propagates preliminary global features and then performs batch normalization to obtain perfect global features; The fully connected layer integrates the perfected global features into the final global features.

6. The vehicle identification method according to claim 1, characterized in that: The method for obtaining the global branch and the local branch is as follows: Constructing an initial vehicle identification system, wherein the initial vehicle identification system includes an initial global branch and an initial local branch; Input the training data set to the initial vehicle recognition system, the global branch outputs the global feature, the local branch outputs the local feature, the first vehicle label is identified according to the global feature, and the second vehicle label is identified according to the local feature; Construct triple loss function and cross entropy loss function; The triple loss function and the cross entropy loss function obtain a global branch loss according to the identified first vehicle label and the true label recorded in the training data set; The global branch loss is calculated according to the following formula: , In the formula, is the global branch loss, is the triple loss function, is the triplet loss of the global branch, is the cross entropy loss function, is the cross entropy loss of the global branch; The triple loss function and the cross entropy loss function obtain local branch loss according to the identified second vehicle label and the real label recorded in the training data set; the local branch loss is calculated according to the following formula: , In the formula, is the local branch loss, is the triple loss of the local branch, is the cross entropy loss of the local branch; The final loss is obtained according to the local branch loss and the global branch loss; the final loss is calculated according to the following formula: , In the formula, For the final loss, To balance hyperparameters; The initial global branch is constrained to be the final global branch, and the initial local branch is constrained to be the final local branch according to the final loss.

7. The vehicle identification method according to claim 6, characterized in that: The cross entropy loss is as follows: , In the formula, is the counting sequence number of the vehicle image, For the The true labels of the vehicle images, is the number of vehicle images in the training dataset, To identify the The probability that the vehicle image is the true label; The triple loss function is as follows: , In the formula, is the number of labels in the mini-batch random sampling, is the counting number of the label, is the number of vehicle images in the mini-batch random sampling, is a hyperparameter, is the anchor point, To find the maximum function, To find the minimum function, For the The anchor point of the label, is the feature vector of the positive sample, For the The feature vector of the positive sample of the vehicle image, is the feature vector of negative samples, is the counting sequence number of the vehicle image, For the Anchor points of vehicle images, For the The feature vector of the negative sample of the vehicle image, is the hinge function.

8. A computer device, characterized in that: The method comprises a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the vehicle identification method according to any one of claims 1 to 7 are executed.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the vehicle identification method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the vehicle identification method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Bullet train head recognition system based on fine-grained target detection

    CN121170268A

  • High-speed train head recognition system based on fine-grained target detection

    CN121170268B