A vehicle re-identification method

By using a view-aware feature unit selection method, redundant feature units are dynamically selected and deleted, solving the problem of intra-class differences caused by viewpoint changes in vehicle re-identification and improving the accuracy and efficiency of vehicle re-identification.

CN117935185BActive Publication Date: 2026-07-17BEIJING JIAOTONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JIAOTONG UNIV
Filing Date
2024-01-28
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing vehicle re-identification technologies face challenges such as significant intra-class differences and recognition difficulties under different viewpoints, especially for vehicles of the same model, where image differences are substantial under different viewpoints, increasing the difficulty of accurate identification.

Method used

A view-aware feature unit selection method is adopted. By calculating the active feature units under each view, redundant feature units are dynamically selected and deleted. The vehicle feature distance is calculated using common active feature units, thereby improving the recognition accuracy.

Benefits of technology

It significantly improves the accuracy and efficiency of vehicle re-identification, especially in multi-view environments, ensuring the consistency and reliability of vehicle features and enhancing the recognition efficiency of vehicle monitoring and management systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117935185B_ABST
    Figure CN117935185B_ABST
Patent Text Reader

Abstract

This invention provides a vehicle re-identification method, belonging to the field of vehicle recognition. The method includes: constructing a vehicle re-identification network; acquiring a historical dataset, inputting vehicle images into the vehicle re-identification network to obtain vehicle features represented in vector form within the images; then, based on a view-aware feature unit selection method, selecting active feature units for each viewpoint; using a query image as the first image and any image from the image library as the second image, obtaining active feature units for each image, identifying overlapping active feature units as common active feature units, calculating the distance between vehicle features in the first and second images based on the common active feature units, finding and selecting the second image closest to the vehicle features in the first image, and identifying the target vehicle. This invention improves the accuracy of the model and the efficiency of vehicle recognition by selecting appropriate feature units to measure distances to vehicle images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of vehicle recognition, and specifically relates to a vehicle re-identification method. Background Technology

[0002] In traffic monitoring systems, vehicle re-identification plays a crucial role in locating, monitoring, and criminal investigation of target vehicles, typically involving the retrieval and positioning of vehicles across multiple cameras. A traditional, straightforward solution is to use license plate information to distinguish different vehicles. However, in real-world scenarios, license plate images in surveillance videos often lack clarity and accuracy, making it difficult to identify and categorize vehicles using license plate information in such situations. Therefore, vehicle image-based re-identification technology has significant practical implications.

[0003] With the development of deep neural networks, vehicle re-identification technology based on vehicle images has made significant progress. The application of convolutional neural networks has greatly propelled this advancement. Despite these significant advancements, many challenges remain. For example, the same vehicle may appear distorted from different perspectives due to varying shooting angles; furthermore, vehicles may be obscured by other objects, or difficult to identify due to changes in lighting and image resolution limitations. Particularly for vehicles of the same model with highly similar appearances, differentiation often relies on subtle local features. In general, these issues lead to significant intra-class variability in vehicle re-identification, meaning the same vehicle can appear drastically different under different conditions, complicating accurate identification.

[0004] In existing technologies, researchers have proposed many methods, such as vehicle re-identification methods based on multiple perspectives and vehicle re-identification methods based on perspective invariance. Some scholars have proposed a direction-invariant feature fusion module, which aligns extracted local features based on vehicle keypoint information from different perspectives; others have proposed a perspective-aware metric learning method, which learns two feature spaces under the same and different perspectives respectively; still others have learned an embedding network based on parsing perspective awareness to achieve perspective awareness and feature alignment in vehicle re-identification; some scholars have introduced a multi-branch network based on common regions to solve the intra-class distance problem, which extracts and fuses global and local detail features to highlight intra-class differences; still others have proposed a generative adversarial network with cross-perspectives to learn vehicle image features from different perspectives and infer cross-perspective images; some scholars have learned an adversarial bidirectional LSTM network to infer global vehicle representations from images of visible perspectives; and some scholars have proposed a perspective-aware multi-view inference model to better optimize pairwise distance metric learning. However, all of the above-mentioned works have improved the model in terms of feature extraction or other aspects, while there is relatively little work on solving the viewpoint problem in the measurement stage, which has limited effect on improving the efficiency and accuracy of vehicle recognition models. Summary of the Invention

[0005] In view of the above-mentioned defects or deficiencies in the prior art, the present invention aims to provide a vehicle re-identification method that improves the accuracy of the model and the efficiency of vehicle recognition by selecting appropriate feature units to perform distance measurement on vehicle images.

[0006] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0007] A vehicle re-identification method, the method comprising:

[0008] Step S1: Construct a vehicle re-identification network;

[0009] Step S2: Obtain vehicle images from the historical dataset and input the vehicle images into the vehicle re-identification network to obtain the vehicle features represented in vector form contained in the images; and select active feature units from the vehicle features based on the view-aware feature unit selection method, wherein the active feature unit is the feature unit in the image under that view that has the ability to distinguish the vehicle identity.

[0010] Step S3: Use the queried image as the first image and any image from the image library as the second image. Input the two images into the vehicle re-identification network to obtain the active feature units of the two images from their respective viewpoints. Define the two viewpoints of the first image and the second image as a viewpoint pair and identify the overlapping active feature units in the current viewpoint pair as common active feature units.

[0011] Step S4: Calculate the distance between vehicle features in the first image and the second image based on the common active feature units under the current viewpoint;

[0012] Step S5: Traverse all images in the image library, calculate the distance between the vehicle features of the first image and all second images, find and select the second image that is closest to the vehicle features in the first image, and identify the target vehicle based on the selected second image in the image library.

[0013] As a preferred embodiment of the present invention, the feature unit selection method based on view perception in step S2 includes:

[0014] Step S21: Set the number of vehicle viewpoints to N, and encode each viewpoint sequentially from 0 to (N-1);

[0015] Step S22: Calculate the average activation value and / or activation value variance of different feature units in all vehicle features under each viewpoint;

[0016] Step S23: Set the average activation value and / or activation value variance threshold, and select the feature units with an average activation value greater than the average activation value threshold and / or an activation value variance less than the activation value variance threshold as active feature units in the current view.

[0017] As a preferred embodiment of the present invention, the step of calculating the average activation value of different feature units in all vehicle features under each viewpoint includes: defining F vi For the vehicle features in the i-th image from the v-th viewpoint, F vi Composed of C feature units, F vi The expression is:

[0018]

[0019] In equation (1), Let represent the activation value of the j-th feature unit in the i-th image from the v-th vehicle's perspective, and C be the number of feature units contained in the feature vector.

[0020] Any vehicle's perspective v corresponds to a view containing K v The training data subset S of the images v :

[0021]

[0022] In equation (2), v represents the vehicle's perspective, and K v This represents the number of images viewed from the perspective of the v-th vehicle.

[0023] The formula for calculating the average activation value of the c-th feature unit of all vehicle features corresponding to all images under the v-th vehicle's viewpoint is:

[0024]

[0025] In equation (4), This represents the average activation value of the c-th feature unit among all vehicle features from the v-th vehicle's perspective. This represents the activation value of the c-th feature unit in the i-th image from the v-th vehicle's perspective.

[0026] As a preferred embodiment of the present invention, the step of calculating the variance of activation values ​​of different feature units in all vehicle features under each viewpoint includes: defining F vi For the vehicle features in the i-th image from the v-th viewpoint, F vi Composed of C feature units, F vi The expression is:

[0027]

[0028] In equation (1), Let represent the activation value of the j-th feature unit in the i-th image from the v-th vehicle's perspective, and C be the number of feature units contained in the feature vector.

[0029] Any vehicle's perspective v corresponds to a view containing K v The training data subset S of the images v :

[0030]

[0031] In equation (2), v represents the vehicle's perspective, and K v This represents the number of images viewed from the perspective of the v-th vehicle.

[0032] The formula for calculating the variance of the activation value of the c-th feature unit of all vehicle features corresponding to all images under the v-th vehicle's viewpoint is:

[0033]

[0034] In equation (5), Let V represent the variance of the activation values ​​of the c-th feature unit among all vehicle features in the v-th vehicle's view. This represents the activation value of the c-th feature unit in the i-th image from the v-th vehicle's perspective.

[0035] In a preferred embodiment of the present invention, when the historical dataset is the VeRi-776 dataset, the average activation value threshold is 2% to 4%, and the activation value variance threshold is 95% to 99%.

[0036] In a preferred embodiment of the present invention, step S3 further includes: assigning the value of the remaining non-overlapping active feature units to 0.

[0037] In a preferred embodiment of the present invention, the formula for calculating the distance between vehicle features in the first image and the second image is as follows:

[0038]

[0039] In equation (10), d v,w This describes the method for calculating the distance between viewpoints v and w; v is the vehicle's viewpoint in the first image, and w is the vehicle's viewpoint in the second image. These represent whether the c-th feature unit is a common active unit for views v and w, respectively; d c Let represent the distance between the c-th feature units in the first and second images, and .

[0040]

[0041] In equation (9), D(•) represents the method of distance measurement; and These represent the activation values ​​of the c-th feature units in the first image q and the second image g, respectively.

[0042] In a preferred embodiment of the present invention, the distance measurement method uses Euclidean distance or cosine distance.

[0043] The technical solutions provided in the embodiments of the present invention have the following beneficial effects:

[0044] The vehicle re-identification method can intelligently identify and activate the most recognizable feature units from different perspectives, which can significantly improve the accuracy of vehicle identification, especially in multi-view environments, ensuring the consistency and reliability of vehicle features. By calculating the distance between common active feature units from different perspectives, it can efficiently identify and match target vehicles, effectively improving the efficiency and accuracy of vehicle re-identification, and has important practical significance in vehicle monitoring and management systems.

[0045] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a flowchart of the vehicle re-identification method according to an embodiment of the present invention;

[0048] Figure 2 This is a schematic diagram of the vehicle re-identification method according to an embodiment of the present invention;

[0049] Figure 3 This is a diagram of the vehicle re-identification network framework in the vehicle re-identification method described in this embodiment of the invention;

[0050] Figure 4 This is a flowchart of the feature unit selection method based on view perception as described in an embodiment of the present invention;

[0051] Figure 5 It is the distance distribution between anchored samples and positive and negative samples in the baseline method of existing technology;

[0052] Figure 6 This refers to the distance distribution between the anchored sample and the positive and negative samples in the feature unit selection method based on view perception described in this embodiment of the invention. Detailed Implementation

[0053] After discovering the aforementioned problems, the inventors of this application conducted in-depth research on existing vehicle recognition methods. The research revealed that existing deep neural network-based vehicle recognition methods typically focus on discriminative regions, such as vehicle markings, vehicle inspection signs, and headlights. By comparing subtle differences in these specific regions, they identify the same vehicle in different scenarios. However, specific regions differ from different viewpoints, leading to significant distances between the same vehicles from different perspectives. On one hand, because different viewpoints contain different information, the specific regions the network focuses on also differ, resulting in greater differences between the same vehicles from different viewpoints. On the other hand, vehicles of the same model appear extremely similar from the same viewpoint, distinguishable only by subtle differences, leading to similarity between vehicles of the same model but different identities from the same viewpoint. These two problems, mapped onto the measurement stage, manifest as greater distances between the same vehicles in the feature space from different viewpoints, while different vehicles are closer together from the same viewpoint, ultimately making it difficult to separate distant positive samples from closer negative samples.

[0054] It should be noted that the defects in the above-mentioned prior art solutions are all the result of the inventors' practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present invention in the following text should be the inventors' contributions to the present invention.

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can also be combined with each other.

[0056] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0057] Following the above in-depth analysis, this invention proposes a vehicle re-identification method based on Viewpoint-aware Channel Selection (VCS). This method addresses the issue in the measurement stage, improving the recognition efficiency and accuracy of the vehicle re-identification model. Specifically, firstly, based on studies of interpretable neural networks, it is known that each convolutional kernel in a convolutional neural network possesses specific semantic information. Therefore, the information contained in each feature unit of the feature vector extracted by the vehicle re-identification feature extraction network can be inferred. Then, each feature unit is treated as a specific visual concept, such as headlight type, Volkswagen logo, Toyota logo, etc. Next, statistical methods are used to explore the relationship between feature units and various viewpoints. Then, feature units appearing simultaneously in two viewpoints are used to measure the distance between two images. Finally, by using the static viewpoint selection feature units of the compared images, the image with the closest feature distance is found from the image database dataset, thereby improving the accuracy of the re-identification task.

[0058] like Figure 1 and Figure 2 As shown, the vehicle re-identification method described in this embodiment of the invention aims to solve the problem caused by changes in viewing angle, and includes the following steps:

[0059] Step S1: Construct the vehicle re-identification network.

[0060] In this step, such as Figure 3As shown, the basic structure of the vehicle re-identification network includes an image input interface, a backbone network, an aggregation layer, and an output interface. The image input interface is used to input images into the backbone network, which extracts feature maps from the images. The aggregation layer performs pooling and aggregation on the feature maps, and the output interface outputs the aggregated image. When the vehicle re-identification network re-identifies a vehicle, it inputs the image into the backbone network through the image input interface to extract feature maps M. c ∈R C×W×H After passing the feature map to the aggregation layer, the vehicle feature vector F∈R is obtained. C×1×1 The feature vector is used for loss calculation. Model optimization is performed based on the identity loss and triplet loss functions commonly used in re-identification tasks. The gradient is backpropagated to the backbone network to train it to focus on salient features in the image. During the testing phase of metric learning, the re-identification task uses vehicle feature vectors for distance calculation. These vehicle feature vectors represent the network's understanding of image information, i.e., the probability of each visual concept existing. By comparing the information in each dimension of the vehicle feature vectors, it is determined whether two images belong to the same vehicle, as vehicles with the same identity share similar appearance features. Common aggregation methods used in aggregation layers include max pooling, average pooling, attention pooling, and global average pooling. Global average pooling (GAP) is typically used as the aggregation layer in vehicle re-identification networks. It calculates the average value of all pixels in each feature unit as the activation value for that visual concept or feature unit. Compared to using fully connected layers for classification tasks, choosing an aggregation layer strengthens the correspondence between feature maps and categories; the feature map can then be interpreted as a class confidence map.

[0061] The vehicle re-identification network described in this step has a basic structure that belongs to the prior art, and in the choice of structure, it uses an aggregation layer instead of a fully connected layer to achieve the classification task.

[0062] Step S2: Obtain vehicle images from the historical dataset and input the vehicle images into the vehicle re-identification network to obtain the vehicle features represented in vector form contained in the images; then, based on the view-aware feature unit selection method, select active feature units from the vehicle features for each view, wherein the active feature unit is a feature unit in the image at that view that has the ability to distinguish the vehicle identity.

[0063] In this step, the historical datasets include the VeRi-776 dataset, the VERI-Wild dataset, the VehicleID dataset, etc.

[0064] The vehicle images are images viewed from a specific perspective, and each image itself possesses the attribute of a viewpoint. The vehicle features are vectors based on the images, with one vector corresponding to each image. These vectors have different dimensions depending on the number of vehicle features. Each vehicle feature, i.e., the vector, contains multiple feature units, and each feature unit has a different level of activity relative to different viewpoints.

[0065] The feature unit mentioned is the feature unit contained in the vehicle features identified by the vehicle re-identification network. Each convolutional layer in the vehicle re-identification network extracts information at different granularities. Shallow networks extract simple texture and color information, while deep networks extract complex object component information. The concepts identified are mostly some key details of the vehicle, such as vehicle identification, vehicle inspection, vehicle scratches, and vehicle outline. Since GAP uses a single value to represent a feature... Figure 1 The information is multi-dimensional, so the value can be considered as the activation of a certain visual feature. The same vehicle will have similar values ​​in this visual feature. For example, the i-th unit is a visual feature used to identify the Volkswagen logo; in this visual feature, the activation values ​​for the same vehicle are similar. However, during the recognition process, it is not necessary to associate the feature unit with the visual feature; it is only necessary to focus on which vehicle's viewpoint the visual feature is associated with.

[0066] The view-aware feature selection (VCS) method addresses the issue of significant intra-class differences caused by viewpoint. Since the vehicle re-identification network focuses only on key information within each image and not on intra-class differences, this embodiment employs the VCS method to solve this problem. Specifically, as... Figure 4 As shown, the VCS method includes the following steps:

[0067] Step S21: Set the number of vehicle viewpoints to N, and encode each viewpoint sequentially from 0 to (N-1).

[0068] In this step, the number of viewpoints depends on the selected image dataset. Generally, N = 8, encoded as 0-7. The VehicleID dataset only has two viewpoints for vehicles, front and rear, so the encoding is 0-1.

[0069] Step S22: Calculate the average activation value of different feature units in all vehicle features under each viewpoint.

[0070] In this step, the feature vector representing vehicle features is defined as follows: Define F vi F represents the feature vector of the i-th image from the v-th viewpoint, i.e., the vehicle feature; each image corresponds to one feature vector. vi It consists of C feature units; F represents the activation value of the c-th feature unit in the i-th image from the v-th vehicle's viewpoint. Specifically, F vi The expression is:

[0071]

[0072] In equation (1), C is the number of feature units contained in the feature vector.

[0073] Any vehicle's perspective v corresponds to a view containing K v The training data subset S of the images v :

[0074]

[0075] In equation (2), v represents the vehicle's perspective, and K v F represents the number of images from the perspective of the v-th vehicle; vi This represents the feature vector extracted from the image input into the neural network. Its purpose is to calculate the average activation value and / or activation value variance of different feature units under different viewpoints through activation values.

[0076] The total training dataset S from N vehicle perspectives train The expression is:

[0077] S train =[S0,S1,...,S N-1 (3)

[0078] In equation (3), N represents the number of vehicle viewpoints. The VehicleID dataset contains only two subsets, S0 and S1.

[0079] The formulas for calculating the average activation value and activation value variance of the c-th feature unit corresponding to all vehicle features in all images from the vehicle's perspective are as follows:

[0080]

[0081]

[0082] In equations (4) and (5), and Let represent the average activation value and the variance of the activation value of the c-th feature unit among all vehicle features in the v-th vehicle's view, respectively; This represents the activation value of the c-th feature unit in the i-th image from the v-th vehicle's perspective.

[0083] Step S23: Set the average activation value threshold and select the feature units with an average activation value greater than the average activation value threshold as active feature units in the current view.

[0084] In this step, feature units whose activation value variance is less than the activation value variance threshold are designated as inactive feature units from the current perspective.

[0085] In this step, an activation value variance threshold can also be set, and feature units whose activation value variance is less than the activation value variance threshold are considered inactive feature units in the current view. Alternatively, in a preferred embodiment, both an average activation value threshold and an activation value variance threshold can be set simultaneously, and feature units that simultaneously satisfy the condition of an average activation value greater than the average activation value threshold and an activation value variance less than the activation value variance threshold are considered inactive feature units in the current view.

[0086] Because the historical dataset contains some special vehicle types (large buses and trucks), it is difficult to activate some feature units with specific visual concepts. These units usually exhibit characteristics of large variance and small mean.

[0087]

[0088]

[0089] In equations (6) and (7), Mean v and Var v Let represent the average activation value and the variance of the activation value for each feature unit in the v-th view, respectively.

[0090] This step uses percentiles to set the average activation value threshold and / or activation value variance threshold. The average activation value and / or activation value variance are used as the basis for selecting active feature units, thereby filtering out inactive feature units. On the VeRi-776 dataset, the average activation value threshold is typically between 2% and 4%, and the activation value variance threshold is around 95% to 99%. The standard for whether a unit is active is defined as follows:

[0091]

[0092] In equation (8), α is the average activation value threshold and β is the activation value variance threshold.

[0093] Step S3: Use the query image as the first image and any image from the image library as the second image. Input the two images into the vehicle re-identification network to obtain the active feature units of the two images from their respective viewpoints. Define the two viewpoints of the first image and the second image as a viewpoint pair, and identify the overlapping active feature units in the current viewpoint pair as common active feature units.

[0094] In this step, the viewpoint pair refers to two arbitrary viewpoints corresponding to two images, which are called viewpoint pair P. v =[v i ,v j ], where vi ,v j ∈V. The image under each viewpoint pair contains important feature units relative to that viewpoint pair, that is, some feature units shared by the two viewpoints.

[0095] Images from different perspectives contain different key information. For example, a front-view image only contains the visual concept of the vehicle's front, making it difficult to observe information about the vehicle's rear. In multi-view vehicle data, using all feature units to compare image differences will widen the distance between the target vehicle and positive samples from different perspectives, and narrow the distance between the target vehicle and negative samples from the same perspective, thus affecting the accuracy of vehicle re-identification. This embodiment uses common feature units to measure the distance between image features, thereby solving the problems of intra-class dissimilarity and inter-class similarity caused by perspective.

[0096] Non-public visible feature units are considered non-overlapping active feature units, or "redundant" units, within this viewpoint pair. This is because if unique feature information from two different viewpoints is used for distance measurement, it will increase the distance between positive samples from different viewpoints. Here, "redundancy" refers to the viewpoint pair itself; for other viewpoint pairs, it might be a crucial feature unit. Removing feature units that are unimportant to a specific scene improves the recognition accuracy for that scene. The specific operation of "removal" is to force the feature unit to have a value of 0, that is, to assign 0 to all other non-overlapping active feature units. This phenomenon occurs because, for a specific scene, feature units that identify elements outside that scene often interfere with the recognition of that scene; these are considered interfering or redundant units within that scene.

[0097] In scene recognition, scene labels are required as monitoring information, making dynamic selection of feature units impossible. However, the aforementioned method can be applied to address vehicle re-identification issues caused by viewpoint. This is because, given viewpoint information, exploring the relationship between each feature unit and the viewpoint provides prior information about the feature units: certain feature information is either absent or has a low probability of existence at that viewpoint. This embodiment utilizes this prior information to address viewpoint-related problems. Specifically, different viewpoint pairs of two images are considered as a scene, and overlapping active feature units are identified as important feature units. For example, in front-rear viewpoint pairs, the vehicle's outline, color, and roof rack are all important units because they are common to both viewpoints. Vehicle inspection information can be defined as a redundant unit, active only in frontal images, and using feature units from vehicle inspection information during measurement increases the differences between the same vehicle from different viewpoints. The assessment of whether information belongs to a common area is not based on spatial information but rather addresses the problem at the feature unit level.

[0098] Step S4: Calculate the distance between vehicle features in the first image and the second image based on the common active feature units under the current viewpoint.

[0099] In this step, overlapping active feature units are used to calculate distance. Redundant feature units in the viewpoint alignment are removed, and only active feature units in overlapping areas are retained for comparison. For example, active feature units present in the front viewpoint include vehicle inspection, interior trim, and headlights. Simultaneously, active feature units also include some common feature units, such as contours, vehicle color, and texture. When comparing the front viewpoint image with the rear viewpoint image, active feature units unique to the front viewpoint image, such as vehicle inspection units, should be excluded, and common and overlapping active feature units (such as color and texture) should be retained as the basis for distance measurement. Existing metric learning methods use all feature units to calculate distance, which implicitly introduces the problem of intra-class dissimilarity, i.e., large feature distances across different viewpoints. In this embodiment, however, the meaning of each feature unit is not explained; instead, the important elements within the viewpoint are found by exploring the relationship between feature units and the viewpoint.

[0100] Specifically, the calculation of the distance between vehicle features in the first and second images is aided by incorporating viewpoint information. Redundant active feature units in different viewpoint pairs are dynamically deleted, while overlapping active feature units between the two viewpoints are retained. This dynamic deletion is achieved by setting the remaining non-overlapping active feature units to 0. The distance d between each unit is... c Formula for calculating the distance between the first and second images using the c-th unit:

[0101]

[0102] In equation (9), D(•) represents the method of distance measurement, such as Euclidean distance or cosine distance. and Let represent the activation values ​​of the c-th feature units in the first image and the second image, respectively. Finally, let d be the distance between the first image from the v-th vehicle's perspective and the second image from the w-th vehicle's perspective. v,w Represented as:

[0103]

[0104] Where d v,w This describes the method for calculating the distance between the viewpoint and v and w. These represent whether the c-th unit is a common active unit for viewpoints v and w, respectively.

[0105] Step S5: Traverse all images in the image library, calculate the distance between the vehicle features of the first image and all second images, find and select the second image that is closest to the vehicle features in the first image, and identify the target vehicle based on the selected second image in the image library.

[0106] The vehicle re-identification method provided in this embodiment of the invention trains a vehicle orientation classifier on the VeRi-776 dataset using a ResNet-50 network. The classifier is then used to obtain vehicle orientations from the VERI-Wild and VehicleID datasets. This orientation classifier is an eight-classifier with an accuracy exceeding 85%. However, it fails to accurately distinguish between left-front, right-front, and front vehicle orientations. This issue is due to data quality; some vehicle orientations are indeed difficult to discern. Nevertheless, the classifier's accuracy does not significantly impact subsequent work. Visual analysis reveals that the viewpoint classifier frequently identifies incorrect front and left-front views, again due to data quality issues. Some vehicle orientations fall between front and left-front views. However, the classifier accurately identifies all front-rear-side viewpoints.

[0107] The VERI-Wild dataset is a large-scale vehicle re-identification dataset with images containing more complex backgrounds. Table 1 shows a performance comparison between the baseline model and the method of this embodiment on three test sets of different sizes. The test results show that the vehicle re-identification method based on VCS in this embodiment achieves mAP of 88.07%, 83.89%, and 77.98% on small, medium, and large test sets, respectively. Compared with the baseline, this embodiment improves accuracy by 1.36%, 1.62%, and 1.86%, respectively. It achieves accuracy improvements of -0.1%, 0.2%, and 0.3% on the Rank-1 metric, and 0.1%, 0.1%, and 0.1% on the Rank-5 metric, respectively. This embodiment shows significant improvement on the VERI-Wild dataset, reflecting the greater effectiveness of VCS in handling multi-view problems with complex images.

[0108] Table 1 compares the performance of the VCS method and the baseline method in this embodiment on the VERI-Wild dataset.

[0109]

[0110] The performance of the proposed method on the VeRi-776 dataset is demonstrated through experiments, as shown in Table 2. The baseline model utilizes the backbone network to obtain image feature vectors, and these feature vectors are used to evaluate the model's performance on the test set. The backbone network includes ResNet-50, ResNet-101, and Vision Transformer. The VCS method of the present invention is compared with the baseline. The first row shows the experimental results of the baseline model, and the second row shows the experimental results of the proposed method. The VCS model was tested on three different feature extraction backbone networks: ResNet-50, ResNet-101, and TransReID. Compared with the baseline model, the mAP of the VCS method is improved by 0.49%, 0.89%, and 0.70%, respectively.

[0111] Table 2 shows that the VCS method improved the Rank-1 metric of vehicle re-identification by 0.1%, 0.1%, and 0.3% in ResNet-50, ResNet-101, and TransReID, respectively. The results indicate that the VCS-based vehicle re-identification method in this embodiment outperforms all other methods. The VeRi-776 dataset contains vehicles with multiple orientations, which makes cell selection difficult. Furthermore, for algorithm simplicity, image distance is calculated using all cells in scenes with the same viewpoint; however, in scenes with different viewpoints, the same mean and variance thresholds are used for cell selection for each viewpoint pair. These factors contribute to the relatively small improvement in the model's performance.

[0112] Table 2 compares the performance of the VCS method and the baseline method in this embodiment on the VeRi-776 dataset.

[0113]

[0114] Unlike the VeRi-776 dataset, the VehicleID dataset has less variation in image perspective, simply categorized into front and back views. Previous work divided the VehicleID test set into query images and gallery images, with each query image having only one positive sample image in the gallery. This embodiment's VCS-based vehicle re-identification method significantly improves overall re-identification performance, but shows less improvement in Rank-1 accuracy. The model in this embodiment's VCS-based vehicle re-identification method swaps query images with gallery images to increase the difficulty of re-identification. Table 3 shows the results of the baseline and this embodiment's VCS-based vehicle re-identification method on the test set. The backbone network uses ResNet-50 as the feature extraction network. Experimental results show that the mAP of this embodiment's VCS-based vehicle re-identification method is 91.43%, 87.51%, and 86.34% on small, medium, and large datasets, respectively, representing improvements of 0.7%, 0.33%, and 0.58% compared to the baseline. The VCS Rank-1 metric improved by 0.5% and 0.3% on small and large datasets, respectively. Experimental results show that the VCS-based vehicle re-identification method in this embodiment is more suitable for handling complex vehicle scene tasks.

[0115] Table 3 compares the performance of the VCS method and the baseline method in this embodiment on the VehicleID dataset.

[0116]

[0117] Compared to other methods for handling multi-view problems, the vehicle re-identification method based on VCS in this embodiment outperforms other methods, as shown in Table 4. The VANet method compresses the image into two feature spaces: one for the same viewpoint and the other for different viewpoints, thus solving the multi-view problem. Compared to this classic method, the vehicle re-identification method based on VCS in this embodiment outperforms it in all metrics, improving the mAP by 14.3%, Rank-1 accuracy by 7%, and Rank-5 accuracy by 5%. This vehicle re-identification method based on VCS in this embodiment also shows a stable improvement over the baseline method, improving the mAP by 0.5% and achieving good results in Rank-1 and Rank-5.

[0118] Table 4. Experimental comparison results of the VCS method in this embodiment on VeRi-776.

[0119]

[0120] like Figure 5-6As shown, the distance distribution of sample pairs on the view-aware feature selection (VCS) method in the VeRi-776 dataset is statistically analyzed and visualized. Figure 5 Represented as the sample pair distance distribution of the baseline method. Figure 6 This is represented by the sample pair distance distribution in the VCS method. From Figure 5 As can be seen, the overall distribution of anchored samples and positive samples is smaller than that of anchored samples and negative samples, so positive and negative samples can be separated relatively easily, thus achieving the re-identification task. However, there is an overlap between positive and negative sample pairs. Within this range, the model has difficulty distinguishing between positive and negative samples. The main reason for this problem is the intra-class difference and inter-class similarity caused by perspective. The appearance of the same vehicle varies greatly from different perspectives, resulting in positive sample pairs with large feature distances. Conversely, the appearance of different vehicles of the same model varies little from the same perspective, resulting in negative sample pairs with small feature distances. These two situations lead to an overlap between the two distance distributions. Figure 5-6 It can be seen that the crossover range of the distance distribution of positive and negative sample pairs in the VCS method is smaller than that in the baseline method. This indicates that the VCS method improves the accuracy of the vehicle re-identification task, and also shows that VCS solves the multi-view problem in the vehicle re-identification task to a certain extent.

[0121] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed, and is not intended to limit the scope of the claimed invention, but merely to illustrate preferred embodiments of the invention. Those skilled in the art should understand that the scope of the invention is not limited to the specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A vehicle re-identification method, characterized in that, The method includes: Step S1: Construct a vehicle re-identification network; Step S2: Obtain vehicle images from the historical dataset and input the vehicle images into the vehicle re-identification network to obtain the vehicle features represented in vector form contained in the images; and select active feature units from the vehicle features based on the view-aware feature unit selection method, wherein the active feature unit is the feature unit in the image under that view that has the ability to distinguish the vehicle identity. Step S3: Use the queried image as the first image and any image from the image library as the second image. Input the two images into the vehicle re-identification network to obtain the active feature units of the two images from their respective viewpoints. Define the two viewpoints of the first image and the second image as a viewpoint pair and identify the overlapping active feature units in the current viewpoint pair as common active feature units. Step S4: Calculate the distance between vehicle features in the first image and the second image based on the common active feature units under the current viewpoint; Step S5: Traverse all images in the image library, calculate the distance between the vehicle features of the first image and all second images, find and select the second image that is closest to the vehicle features in the first image, and identify the target vehicle based on the selected second image in the image library.

2. The vehicle re-identification method according to claim 1, characterized in that, The view-aware feature unit selection method described in step S2 includes: Step S21: Set the number of vehicle viewpoints to N, and encode each viewpoint sequentially from 0 to (N-1); Step S22: Calculate the average activation value and / or activation value variance of different feature units in all vehicle features under each viewpoint; Step S23: Set the average activation value and / or activation value variance threshold, and select the feature units with an average activation value greater than the average activation value threshold and / or an activation value variance less than the activation value variance threshold as active feature units in the current view.

3. The vehicle re-identification method according to claim 2, characterized in that, The calculation of the average activation value of different feature units among all vehicle features in each viewpoint includes: defining F vi For the first v From the perspective of the first i Vehicle features in an image, F vi Depend on C Composed of 10 feature units, F vi The expression is: (1) In equation (1), Indicates the first v From the perspective of the first i The first image j The activation values ​​of each feature unit. C It is the number of feature units contained in the feature vector; Any vehicle view v Corresponding to a containing K v A subset of training data for the images S v : (2) In equation (2), v Represents the vehicle's perspective. K v Representing the v Number of images from the perspective of each vehicle; No. The first vehicle feature corresponding to all images from the vehicle's perspective. The formula for calculating the average activation value of each feature unit is: (4) In equation (4), Indicates the first Among all vehicle features from the perspective of a single vehicle, the first... The average activation value of each feature unit. Indicates the first From the perspective of the vehicle, the first The first image The activation value of each feature unit.

4. The vehicle re-identification method according to claim 3, characterized in that, The calculation of the variance of activation values ​​of different feature units in all vehicle features under each viewpoint includes: defining F vi For the first v From the perspective of the first i Vehicle features in an image, F vi Depend on C Composed of 10 feature units, F vi The expression is: (1) In equation (1), Indicates the first From the perspective of the vehicle, the first i The first image j The activation values ​​of each feature unit. C It is the number of feature units contained in the feature vector; Any vehicle view v Corresponding to a containing K v A subset of training data for the images S v : (2) In equation (2), v Represents the vehicle's perspective. K v Representing the v Number of images from the perspective of each vehicle; No. The first vehicle feature corresponding to all images from the vehicle's perspective. The formula for calculating the variance of activation values ​​of a feature unit is: (5) In equation (5), Indicates the first Among all vehicle features from the perspective of a vehicle, the first... The variance of activation values ​​of each feature unit; Indicates the first From the perspective of the vehicle, the first The first image The activation value of each feature unit.

5. The vehicle re-identification method according to claim 2, characterized in that, When the historical dataset is the VeRi-776 dataset, the average activation value threshold is 2%~4%, and the activation value variance threshold is 95%~99%.

6. The vehicle re-identification method according to claim 2, characterized in that, Step S3 also includes: assigning the value 0 to the remaining non-overlapping active feature units.

7. The vehicle re-identification method according to claim 6, characterized in that, The formula for calculating the distance between vehicle features in the first image and the second image is as follows: (10) In equation (10), Indicates perspective and Distance calculation method; This is the vehicle's perspective in the first image. This is the vehicle's perspective in the second image; , They represent the first Each feature unit corresponds to the viewpoint and Is it a public active unit? d c Represents the first and second images. c The distance between feature units, and, (9) In equation (9), Methods for representing distance metrics; and Representing the first image q Second image g The The activation value of each feature unit.

8. The vehicle re-identification method according to claim 7, characterized in that, The distance measurement method uses Euclidean distance or cosine distance.