Vehicle re-identification method based on multidirectional feature and position sensing fusion

By constructing a vehicle re-identification network that integrates multi-directional features and location awareness, the accuracy and robustness issues of vehicle re-identification in complex scenarios are solved, enabling accurate identification of key parts of vehicles and differentiation of similar vehicle models.

CN121545124APending Publication Date: 2026-02-17WUXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511431253.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing vehicle re-identification technologies struggle to effectively utilize the spatial location information of key vehicle components in complex scenarios, fail to balance local fine-grained textures with global structural information, and are insufficient in capturing multi-directional features, resulting in decreased recognition performance and poor robustness.

Method used

A vehicle re-identification network architecture integrating multi-directional features and location awareness is constructed. The location encoding module enhances location sensitivity, the DOConv convolutional module performs complementary extraction of local and global features, and the multi-directional feature module captures multi-dimensional features. The network is trained by combining classification and metric branch loss functions.

Benefits of technology

It improves the accuracy and robustness of vehicle re-identification, enabling more precise vehicle identification under varying lighting conditions, occlusion, and extreme viewing angles, and enhancing the ability to distinguish between similar vehicle models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545124A_ABST
    Figure CN121545124A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle re-identification method based on multidirectional feature and position perception fusion, relates to the technical field of image processing, and realizes multidimensional feature interaction optimization through position coding module structured modeling (horizontal-vertical direction tensor initialization); a DOConv module performs global-local collaboration (capture of fine-grained textures by deep convolution + integration of a global structure by traditional convolution) and deep separable convolution multidirectional feature capture (a square kernel focuses on local details, horizontal bar-shaped kernel extraction depends on a horizontal long distance, and vertical bar-shaped kernel analyzes vertical spatial distribution); the three collaboratively guide a network to accurately focus a vehicle body identification area, suppress background noise interference and enhance robustness to illumination, shielding, extreme viewing angles and similar vehicle types, so that richer feature information is integrated, the problems caused by intra-class similarity and intra-class difference can be further relieved, the robustness of the model is enhanced, and in the aspect of quantitative indexes, the accuracy of the model is improved. And the current advanced comparison method is also exceeded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a vehicle re-identification method based on the fusion of multi-directional features and position awareness. Background Technology

[0002] Since the beginning of the 21st century, urbanization and motorization have continuously driven explosive growth in global road traffic. With the upgrading of smart city construction and public safety needs, efficient vehicle monitoring and management has become one of the core challenges of modern transportation systems. In the field of traffic management, tasks such as real-time tracking of suspicious vehicle trajectories, identification of vehicles with cloned / obscured license plates, prevention of traffic accident chains, and improvement of crime investigation efficiency all rely on the ability to quickly and accurately locate target vehicles from massive amounts of surveillance data. However, traditional manual patrols or single-camera license plate recognition systems face multiple bottlenecks: the contradiction between the deluge of image data and limited manpower leads to response delays and increased false negative rates; complex scene interference (such as rain, fog, backlight, and multiple overlapping targets) further weakens the reliability of key identifiers such as license plates.

[0003] Against this backdrop, Vehicle Re-Identification (VeReID) technology has emerged. Through a deep learning-driven cross-camera image retrieval mechanism, it can achieve full-domain tracking based on vehicle appearance features (color, model, trim, spatiotemporal trajectory, etc.) without relying on license plate integrity, providing a breakthrough solution for intelligent transportation, security investigation, and urban operation and maintenance. This technology not only significantly reduces the cost of manual intervention but also improves recognition timeliness to the second level, becoming an indispensable "digital eye" in the intelligent transportation system.

[0004] Vehicle re-identification is essentially a highly challenging cross-modal image retrieval problem. Its goal is to achieve accurate matching of the same vehicle across interference from viewpoint, lighting, and occlusion in a distributed camera network. Although deep learning technology has significantly improved VeReID performance, practical applications still face systemic challenges: the reliance on license plates is a significant limitation. While license plates are a core component of traditional identification, they are prone to failure in real-world scenarios. Low-resolution surveillance networks result in insufficient license plate pixels for character reconstruction (especially in high-speed, telephoto scenarios). Dynamic lighting changes exacerbate glare and shadow interference. Furthermore, cloned, damaged, or obscured license plates account for over 65% of vehicle-related cases. These factors force vehicle identification to shift towards appearance-based alternatives. Appearance feature extraction faces a double dilemma: on the one hand, significant intra-class differences mean the same vehicle presents drastically different appearances under different camera views (e.g., from the side). Changes in waistline and headlight shape when shooting from directly behind, motion blur, or modifications (such as stickers and ornaments) further amplify visual differences. On the other hand, high inter-class similarity, family design of the same brand of car models, and similar body colors lead to visual confusion. Traditional convolutional models have difficulty capturing subtle distinguishing features (such as car logo texture, wheel style, and annual inspection label position). Existing methods are insufficient in modeling spatial structural information (such as the relative position of parts), multi-scale texture (global outline + local details), and long-distance dependence of multiple views, which exacerbates the mismatch rate in extreme lighting and partially occluded scenarios. The generalization bottleneck in complex scenarios is prominent. Real monitoring environments include variables such as cross-camera resolution differences, background noise interference, and multi-target interactive occlusion. Existing models lack adaptive attention mechanisms to focus on key distinguishing areas, resulting in limited robustness in complex urban scenarios (tunnels, overpasses, and dense traffic).

[0005] In summary, the core challenge of vehicle re-identification has shifted from the early question of "whether it can be identified" to "how to achieve a balance between high accuracy, real-time performance, and generalization in real-world noise." Solving this problem requires a systematic breakthrough: building a deep fusion network of global and local features to capture the complementarity between vehicle structure and fine-grained texture; designing an adaptive attention mechanism to dynamically suppress background interference; developing spatiotemporal semantic enhancement metric learning to integrate vehicle trajectory patterns and visual feature distribution; and improving domain adaptability through training on large-scale heterogeneous datasets.

[0006] In practical applications, existing technologies still have significant limitations: First, they do not adequately utilize the spatial location information of key vehicle components, making it difficult for models to accurately focus on identification areas such as vehicle logos and headlights. They are also susceptible to background noise interference, especially at extreme viewing angles, where the loss of spatial features leads to a decline in recognition performance. Second, traditional convolutional methods struggle to balance local fine-grained texture and global structural information during feature extraction, resulting in weak differentiation of similar vehicle models and difficulty in effectively mitigating confusion caused by intra-class differences (appearance changes of the same vehicle from different viewing angles) and inter-class similarities (different vehicle models or similar colors). Third, they fail to adequately capture the multi-directionality of vehicle features, failing to fully extract long-distance dependencies in the horizontal direction, spatial distribution in the vertical direction, and local detail features. This leads to poor model robustness in complex scenarios such as changes in lighting and partial occlusion, making it difficult to improve cross-camera matching accuracy. These issues mean that existing vehicle re-identification methods still have considerable room for optimization in practical applications. Summary of the Invention

[0007] To address the above technical problems, this invention provides a vehicle re-identification method based on the fusion of multi-directional features and location awareness, comprising the following steps:

[0008] S1. Construct a vehicle re-identification network architecture that integrates multi-directional features and location awareness. The backbone network of this architecture consists of five stages: Conv1, Conv2_x, Conv3_x, Conv4_x, and Conv5_x. This network architecture includes a location encoding module, a multi-directional feature extraction module, and a DOConv convolution module.

[0009] The position encoding module initializes the horizontal and vertical position encoding tensors to obtain the output feature map after fusing position information. The DOConv convolution module includes depthwise convolution and conventional convolution. Through parameterization and kernel combination mechanisms, depthwise convolution captures local fine-grained features and uses channel-independent convolution, with each input channel corresponding to a dedicated convolution kernel, focusing on the features of local vehicle components. Conventional convolution integrates global structural features and performs cross-channel weighted fusion on the output of depthwise convolution to model the global structural dependencies of the vehicle. The multi-directional feature extraction module is used to capture the vehicle's horizontal long-distance dependencies, vertical spatial distribution, and local detail features.

[0010] S2. Construct the classification branch loss function and the metric branch loss function;

[0011] S3. Obtain the Veri-776 dataset and train the vehicle re-identification network architecture of the multi-directional feature and location-aware fusion network constructed in step S1.

[0012] The technical solution further defined in this invention is:

[0013] Furthermore, in the position encoding module of step S1, the position encoding tensors in both the horizontal and vertical directions are initialized using a truncated normal distribution, as follows:

[0014] P H P V ~N trunc (μ=0,σ=0.02)

[0015] Among them, P H P represents the horizontal position encoding tensor; V N represents the vertical position encoding tensor; trunc (·) indicates a truncated normal distribution; μ represents the mean, which takes a value of 0; σ represents the standard deviation, which takes a value of 0.02;

[0016] The position encoding tensor is then expanded to match the size of the input feature map, resulting in a 1×C×S shape. h ×S w This corresponds to each position in the feature map and is represented as follows:

[0017] P H_expanded =Expand(P H ,target_shape=(1,C,W,W))

[0018] P V_expanded =Expand(P V ,target_shape=(1,C,W,W))

[0019] Where Expand(·) represents the expansion operation, P H_expanded P represents the horizontally expanded tensor. V_expanded S represents the vertically extended tensor. h S represents the height dimension of the feature map. w Represents the width dimension of the feature map;

[0020] Extended position encoding and input feature map Element-by-element addition is represented as:

[0021] F out =F+P H_expanded +P V_expanded

[0022] Among them, F out This represents the output feature map after fusing location information. This feature map contains the vehicle's position information in the horizontal and vertical directions.

[0023] As described above, in the vehicle re-identification method based on the fusion of multi-directional features and position awareness, the DOConv convolution module in step S1 uses depthwise convolution to capture local fine-grained features. Channel-independent convolution is employed, with each input channel corresponding to a dedicated convolution kernel, focusing on the features of local vehicle components. This is represented as follows:

[0024]

[0025] Among them, P′ c,d The output of the depthwise convolution represents the intermediate features, where c represents the input channel index, d represents the depth factor index, and D corresponds to the parameterized depth multiplier D. mul ;D c,i,d This represents the depthwise convolution kernel, where i represents the spatial index of the convolution kernel, and the dimension is... C in P represents the number of channels in the feature map input to the current layer, where M and N represent the spatial size of the convolution kernel; c,j This represents the feature value at the j-th spatial location of the c-th channel of the input feature; This represents the spatial convolution operation.

[0026] As mentioned earlier, in a vehicle re-identification method based on the fusion of multi-directional features and location awareness, the DOConv convolutional module integrates global structural features through traditional convolution, performs cross-channel weighted fusion on the output of depthwise convolution, and models the global structural dependency of the vehicle, which is represented as:

[0027]

[0028] Among them, O o This represents the feature output by a traditional convolution, where o represents the output channel index, corresponding to C. out W o,d,c This represents a traditional convolutional kernel with dimension . The symbol · represents a weighted summation operation.

[0029] As described above, a vehicle re-identification method based on multi-directional feature and location-aware fusion performs feature fusion and dimensionality regularization in the DOConv convolutional module. It fuses the original features and enhanced features, integrating them through channel-dimensional concatenation, as shown below:

[0030] F c =Concat(X, P) c,d O o )

[0031] Among them, F c The fused features are represented by X; X represents the original input feature map; Concat(·) represents the channel dimension concatenation operation, which is used to integrate the original features, depthwise convolutional features, and traditional convolutional features.

[0032] As described above, a vehicle re-identification method based on multi-directional feature and location awareness fusion is described. In step S1, the multi-directional feature extraction module uses differentiated convolutional kernels for directional capture and forms a comprehensive feature expression that combines global and local information through feature fusion and dimension regularization. The multi-directional feature extraction module includes three parallel depthwise separable convolutional branches. Each branch extracts directional features through an independent convolutional mechanism in the main channel. Square regions use square convolutional kernels to capture local detail features through depthwise convolution. Horizontal regions use horizontal strip convolutional kernels to capture horizontal long-distance dependencies through depthwise convolution. The original input and the features from the three branches are then concatenated along the channel dimension to obtain the fused features.

[0033] As described above, a vehicle re-identification method based on the fusion of multi-directional features and position awareness uses a square convolution kernel in the multi-directional feature extraction module. Local detailed features are captured through depthwise convolution, as shown below:

[0034]

[0035] Among them, F s ∈R C×H×W This indicates a square feature output, where C, H, and W represent the number of channels, height, and width of the feature, respectively. Indicates the channel index; Indicates the floor operation; K s,c This represents a square convolution kernel for the c-th channel. Since the number of groups g = C, it achieves independent convolution for each channel; the padding parameter p s =[k s / 2] is used to ensure that the output size matches the input, k s The square convolution kernel size is represented by i; i and j represent the height and width indices of the feature map, respectively; m and n represent the square convolution kernel K. s,c The internal local indices, m and n, correspond to the height and width directions of the convolution kernel, respectively;

[0036] Horizontal strip convolution kernels are used in the horizontal direction. By capturing long-range horizontal dependencies through depthwise convolution, it can be represented as:

[0037]

[0038] Among them, F h ∈R C×H×W Indicates horizontal output, K h,c This represents the horizontal convolution kernel of the c-th channel, with padding parameter p. h =(0, [k b / 2]) is used to ensure that the horizontal scale remains unchanged, k b Indicates the dimension in the horizontal direction;

[0039] Vertical direction uses horizontal strip convolution kernel Capturing long-range vertical dependencies through depthwise convolutions is represented as follows:

[0040]

[0041] Among them, F v ∈R C×H×W Indicates vertical output, K v,c This represents the horizontal convolution kernel of the c-th channel, with padding parameter p. v =([k c [ / 2], 0) are used to ensure that the vertical scale remains unchanged, k c Indicates the vertical dimension;

[0042] Next, the original input and the three-branch features are concatenated along the channel dimension to obtain the fused features, represented as:

[0043] F merge =Concat(X, F) s F h F v )∈R 4C×H×W

[0044] Concat(·) represents the channel dimension concatenation operation.

[0045] As described above, a vehicle re-identification method based on the fusion of multi-directional features and location awareness is used in the multi-directional feature extraction module. After obtaining the fused features, a 1×1 convolutional layer is used for channel compression to achieve dimensionality regularization and feature recombination. The calculation is as follows:

[0046]

[0047] Where W∈R C×4C×1×1 c' represents the weights of the 1×1 convolution kernel, and c' represents the fused feature map F. merge,c’ Channel index, b∈R C The bias is represented by BN(·), the batch normalization operation is represented by BN(·), and the final operation F is represented by BN(·). out ∈R C×H×W Consistent with the input dimension.

[0048] As described above, in a vehicle re-identification method based on the fusion of multi-directional features and location awareness, the classification branch loss function in step S2 is expressed as:

[0049]

[0050] Among them, L cls The cross-entropy loss value represents the classification branch. This represents the true label distribution of the i-th category. Let represent the model's predicted probability for the i-th category, and Q represent the number of categories in the training.

[0051] As described above, in a vehicle re-identification method based on the fusion of multi-directional features and location awareness, the metric branch loss function in step S2 is expressed as:

[0052]

[0053] Where P represents the number of identities, K represents the number of samples for each identity, d represents the distance threshold, P(a) represents the positive sample set for each anchor point, N(a) represents the negative sample set for each anchor point, and x a Indicates the anchor point, x p x represents the extracted embedding of positive samples. n d represents the extraction embedding of negative samples, and d() represents the Euclidean distance.

[0054] The beneficial effects of this invention are:

[0055] In this invention, a position encoding module enhances the model's sensitivity to position and guides feature learning, enabling the network to utilize spatial information more effectively. The DOConv convolution is split into "channel-wise depthwise convolution + cross-channel traditional convolution," resulting in more efficient parameter utilization and forming complementary "local-global" features, thus improving the distinguishability of similar vehicle models. The multi-directional feature extraction module extracts local details, horizontal long-distance dependencies, and vertical spatial distribution features using square, horizontal, and vertical convolution kernels, respectively. After fusion and dimensionality regularization, it provides comprehensive feature representation, improving the accuracy and robustness of cross-scene vehicle matching. This invention exhibits superior performance in vehicle re-identification and greater accuracy in vehicle recognition. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the overall process of the present invention;

[0057] Figure 2 This is a schematic diagram of the vehicle re-identification network architecture based on a multi-directional feature and location awareness fusion network in an embodiment of the present invention;

[0058] Figure 3 This is a schematic diagram of the location encoding module in an embodiment of the present invention;

[0059] Figure 4 This is a schematic diagram of the DOConv convolution module in an embodiment of the present invention;

[0060] Figure 5 This is a schematic diagram of the structure of the multi-directional feature extraction module in an embodiment of the present invention. Detailed Implementation

[0061] This embodiment provides a vehicle re-identification method based on the fusion of multi-directional features and location awareness, such as... Figure 1 As shown, it includes the following steps:

[0062] S1. Construct a vehicle re-identification network architecture based on multi-directional feature and position-aware fusion network (MFPAF-Net). The backbone network of this architecture has five stages, namely Conv1, Conv2_x, Conv3_x, Conv4_x and Conv5_x. The network architecture includes a position encoding module, a multi-directional feature extraction module and a DOConv convolution module.

[0063] like Figure 2 As shown, in the vehicle re-identification network architecture based on Multi-directional Feature and Position-Aware Fusion Network (MFPAF-Net), the position encoding module is located before the feature input, improving the model's ability to perceive positional information. After processing by the fourth-stage network, it generates spatial features with richer semantics. The 3×3 ordinary convolution in Conv4_x is replaced with the DOConv convolution module, which uses channel-independent convolution, with each input channel corresponding to a dedicated convolution kernel, focusing on the features of local vehicle components. Then, a multi-directional feature extraction module is introduced, which uses differentiated convolution kernels for directional capture. Through feature fusion and dimensionality regularization, a comprehensive feature expression that combines global and local information is formed. Finally, the vehicle identity prediction result is obtained after processing by a loss function.

[0064] The location encoding module can enhance the model's location awareness capability, and its structure is as follows: Figure 3 As shown, by initializing the position encoding tensor, positional information is added in both the horizontal and vertical directions. This targeted feature enhancement helps improve the model's ability to recognize different types of vehicles. Through the position-enhanced feature map, the model can more accurately capture key parts of the vehicle, such as the logo, headlights, and license plate. The positional information of these parts plays a crucial role in vehicle identification. In addition, the position encoding module not only enhances the model's sensitivity to position but also enables the network to utilize spatial information more effectively by guiding feature learning.

[0065] The position encoding module initializes the position encoding tensor. Both the horizontal and vertical position encoding tensors are initialized using a truncated normal distribution, represented as follows:

[0066] P H P V~N trunc (μ=0,σ=0.02)

[0067] Among them, P H P represents the horizontal position encoding tensor; V N represents the vertical position encoding tensor; trunc (·) indicates a truncated normal distribution; μ represents the mean, which is 0; σ represents the standard deviation, which is 0.02.

[0068] The position encoding tensor is then expanded to match the size of the input feature map, resulting in a 1×C×S shape. h ×S w This allows it to correspond to each location in the feature map, represented as:

[0069] P H_expanded =Expand(P H ,target_shape=(1,C,W,W))

[0070] P V_expanded =Expand(P V ,target_shape=(1,C,W,W))

[0071] Where Expand(·) represents the expansion operation, P H_expanded P represents the horizontally expanded tensor. V_expanded S represents the vertically extended tensor. h S represents the height dimension of the feature map. w This represents the width dimension of the feature map.

[0072] Extended position encoding and input feature map Element-by-element addition is represented as:

[0073] F out =F+P H_expanded +P V_expanded

[0074] Among them, F out This represents the output feature map after fusing location information. This feature map contains the vehicle's position information in the horizontal and vertical directions, which helps the model to more accurately capture the spatial features of key parts of the vehicle.

[0075] The DOConv convolution module addresses the shortcomings of traditional convolution through "depthmographic overparameterization" and "kernel combination" mechanisms. The network structure is as follows: Figure 4As shown, its core design is: to capture local details with deep convolution and integrate the global structure with traditional convolution, and to provide sufficient feature learning space through overparameterization to maintain inference efficiency; at the same time, deep convolution focuses on local components and traditional convolution associates with the global structure, forming complementary "local-global" features, improving the differentiation of similar vehicle models, especially improving the recognition of vehicles without license plates.

[0076] The DOConv convolution module addresses the shortcomings of traditional convolution through "depth convolution overparameterization" and "kernel combination" mechanisms. It captures fine-grained local features using depth convolution, employing channel-independent convolution where each input channel corresponds to a dedicated convolution kernel, focusing on the features of local vehicle components. This can be represented as:

[0077]

[0078] Among them, P′ c,d The output of the depthwise convolution represents the intermediate feature, c represents the input channel index, and d represents the depth factor index (corresponding to D). mul (which is an overparameterized depth multiplier); D c,i,d This represents the depthwise convolution kernel, where i represents the spatial index of the convolution kernel, and the dimension is... C in P represents the number of channels in the feature map input to the current layer, where M and N represent the spatial size of the convolution kernel; c,j This represents the feature value at the j-th spatial location of the c-th channel of the input feature; This represents the spatial convolution operation.

[0079] Traditional convolution integrates global structural features, performs cross-channel weighted fusion of the output of depthwise convolution, and models the global structural dependencies of the vehicle, represented as:

[0080]

[0081] Among them, O o This represents the feature output by a traditional convolution, where o represents the output channel index (corresponding to C). out );W o,d,c This represents a traditional convolutional kernel with dimension . The symbol · represents a weighted summation operation.

[0082] Finally, feature fusion and dimensionality normalization are performed. The original features and enhanced features are merged and integrated by concatenating the original features and targeted enhanced features through channel dimension, as shown below:

[0083] F c =Concat(X, P) c,d O o )

[0084] Among them, P cThe fused features are represented by X; X represents the original input feature map; Concat(·) represents the channel dimension concatenation operation, which is used to integrate the original features, depthwise convolutional features, and traditional convolutional features.

[0085] The network structure of the multi-directional feature extraction module is as follows: Figure 5 As shown, this module uses depthwise separable convolution as its core architecture. Through a customized convolution kernel structure and feature fusion mechanism, it achieves accurate extraction and efficient encoding of multi-dimensional features of vehicle images. Its core design logic is: to capture the global structure and local detail discrimination of vehicle features in the horizontal and vertical directions using differentiated convolution kernels, and to form a comprehensive feature expression that combines global and local information through feature fusion and dimension regularization.

[0086] The multi-directional feature extraction module uses differentiated convolution kernels for directional capture and forms a comprehensive feature representation that combines global and local information through feature fusion and dimension regularization. The multi-directional feature extraction module includes three parallel depthwise separable convolution branches, each of which extracts directional features through the "main channel independent convolution" mechanism.

[0087] A square region is used with a square convolution kernel, and local detailed features are captured through depthwise convolution, represented as:

[0088]

[0089] Among them, F s ∈R C×H×W This indicates a square feature output, where C, H, and W represent the number of channels, height, and width of the feature, respectively. Indicates the channel index; Indicates the floor operation; K s,c This represents the square convolution kernel for the c-th channel (since the number of groups g = C, independent convolution is achieved channel by channel); the padding parameter p s =[k s / 2] is used to ensure that the output size matches the input, k s The square convolution kernel size is represented by ; i and j represent the height (vertical dimension) and width (horizontal dimension) indexes of the feature map, respectively; m and n represent the square convolution kernel K. s,c The internal local indices, m and n, correspond to the height and width directions of the convolution kernel, respectively.

[0090] Horizontal strip convolution kernels are used in the horizontal direction. By capturing long-range horizontal dependencies through depthwise convolution, it can be represented as:

[0091]

[0092] Among them, F h ∈RC×H×W Indicates horizontal output, K h,c This represents the horizontal convolution kernel of the c-th channel, with padding parameter p. h =(0, [k b / 2]) is used to ensure that the horizontal scale remains unchanged, k b Indicates the dimension in the horizontal direction.

[0093] Vertical direction uses horizontal strip convolution kernel Capturing long-range vertical dependencies through depthwise convolutions is represented as follows:

[0094]

[0095] Among them, F v ∈R C×H×W Indicates vertical output, K v,c This represents the horizontal convolution kernel of the c-th channel, with padding parameter p. v =([k c [ / 2], 0) are used to ensure that the vertical scale remains unchanged, k c Indicates the dimension in the vertical direction.

[0096] In the feature fusion stage, the original input and the three-branch features are concatenated along the channel dimension to obtain the fused features, represented as:

[0097] F merge =Concat(X, F) s F h F v )∈R 4C×H×W

[0098] Where Concat(.) represents the channel-level concatenation operation, which integrates the original features and the directional features, F merge It retains its integrity across multiple scales and directions.

[0099] To achieve dimension regularization and feature reorganization, a 1×1 convolutional layer is used for channel compression, which is calculated as follows:

[0100]

[0101] Where W∈R C×4C×1×1 c' represents the weights of the 1×1 convolution kernel, and c' represents the fused feature map F. merge,c’ Channel index, b∈R C The bias is represented by BN(.), the batch normalization operation is represented by BN(.), and the final operation is F. out ∈R C×H×W Consistent with the input dimension, this ensures that the module can be seamlessly embedded into existing networks.

[0102] S2. Construct classification branch loss function and metric branch loss function to improve the extraction effect of important features and the generalization ability of the model.

[0103] The classification branch loss function is expressed as:

[0104]

[0105] Among them, L cls The cross-entropy loss value represents the classification branch. This represents the true label distribution of the i-th category. Let represent the model's predicted probability for the i-th category, and Q represent the number of categories in the training.

[0106] The branch loss function is expressed as:

[0107]

[0108] Where P represents the number of identities, K represents the number of samples for each identity, d represents the distance threshold, P(a) represents the positive sample set for each anchor point, N(a) represents the negative sample set for each anchor point, and x a Indicates the anchor point, x p x represents the extracted embedding of positive samples. n d represents the extraction embedding of negative samples, and d() represents the Euclidean distance.

[0109] S3. Obtain the Veri-776 dataset and train the vehicle re-identification network architecture of the multi-directional feature and location-aware fusion network constructed in step S1. During training, the mAP, CMC1, and CMC5 indices increase to a certain extent and the network tends to stabilize.

[0110] The experimental data selected included the Veri-776 dataset, which contains 776 vehicle identities. This dataset was used to train and test the proposed MFPAF-Net network model. The Veri-776 training dataset contained 576 identities and 37,778 images. The test dataset contained 200 identities and 11,579 images, of which 1,678 images were used as queries, and the remaining images were used as gallery images for matching query images.

[0111] To set up the training strategy, this invention uses the PyTorch framework to implement the network model and implements it on a workstation with an NVIDIA GTX 4090 GPU. During training, the Adam algorithm is used to optimize the loss function. The image patch size, training batch size, and initial learning rate are set to 256×256, 48, and 0.0001, respectively. The number of training epochs is 160. When the epochs are 45, 90, and 135, the learning rate is divided by 0.1.

[0112] After model training, the prediction results of vehicle identity can be obtained through the output layer of the network; as shown in Table 1, through comparative experiments, it can be found that the MFPAF-Net method performs better on the Veri-776 dataset.

[0113] Table 1. Evaluation results of vehicle re-identification using different methods on Veri-776.

[0114]

[0115] This embodiment's method achieves multi-dimensional feature interaction optimization through structured modeling (horizontal-vertical tensor initialization) using a location encoding module; global-local collaboration of the DOConv convolution module (deep convolution captures fine-grained texture + traditional convolution integrates global structure) and multi-directional feature capture of depth-separable convolution (square kernel focuses on local details, horizontal bar kernel extracts horizontal long-distance dependencies, and vertical bar kernel resolves vertical spatial distribution); the collaboration of these three modules guides the network to accurately focus on the vehicle body identification region (vehicle logo, license plate, etc.), suppresses background noise interference, and enhances robustness to lighting, occlusion, extreme viewing angles, and similar vehicle models.

[0116] The method in this embodiment performs better in vehicle re-identification tasks. It integrates richer feature information, which can further alleviate the problems caused by intra-class similarity and intra-class difference, enhance the robustness of the model, and surpass current state-of-the-art comparison methods in terms of quantitative indicators.

[0117] In addition to the embodiments described above, the present invention may have other implementations. All technical solutions formed by equivalent substitution or equivalent transformation fall within the protection scope claimed by the present invention.

Claims

1. A vehicle re-identification method based on multi-directional feature and location-aware fusion, characterized in that: The method comprises the following steps: S1, constructing a vehicle re-identification network architecture of a multi-directional feature and position perception fusion network, wherein a backbone network of the network architecture has five stages, namely, Conv1_x, Conv2_x, Conv3_x, Conv4_x and Conv5_x, and the network architecture comprises a position encoding module, a multi-directional feature extraction module and a DOConv convolution module; The position encoding module is used for initializing horizontal and vertical direction position encoding tensors to obtain an output feature map after fusing position information; the DOConv convolution module comprises a depth convolution and a traditional convolution, the depth convolution is used for capturing local fine-grained features through a hyper-parameterization and kernel combination mechanism, and the depth convolution adopts a channel independent convolution, each input channel corresponds to a dedicated convolution kernel, and the depth convolution focuses on local component features of a vehicle; the traditional convolution integrates global structure features, performs cross-channel weighted fusion on an output of the depth convolution, and models global structure dependencies of the vehicle; and the multi-directional feature extraction module is used for capturing horizontal long-distance dependencies, vertical spatial distribution and local detail features of the vehicle; S2, constructing a classification branch loss function and a metric branch loss function; S3, obtaining a Veri-776 dataset to train the vehicle re-identification network architecture of the multi-directional feature and position perception fusion network constructed in step S1. 2.The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 1, characterized in that: In the position encoding module of step S1, the horizontal and vertical direction position encoding tensors are both initialized by using a truncated normal distribution, and are expressed as: P H , P V ~ N trunc (μ = 0, σ = 0.02) where P H represents the horizontal position encoding tensor; P V represents the vertical position encoding tensor; N trunc (·) represents truncated normal distribution; μ represents the mean value, which is 0; σ represents the standard deviation, which is 0.02; The position encoding tensor is then expanded to match the size of the input feature map, with the expanded shape being 1 x C x S h x S w , corresponding to each position of the feature map, and is represented as: P H_expanded =Expand(P H , target_shape=(1, C, W, W)) P V_expanded =Expand(P V , target_shape=(1, C, W, W)) where Expand( ) represents an expansion operation, P H_expanded represents a horizontal expansion tensor, P V _ expanded represents a vertical expansion tensor, S h represents a height dimension of the feature map, S w represents a width dimension of the feature map; Extended position encodings with input feature maps Element-wise addition is performed, denoted as: F out = F + P H_expanded + P V_expanded where F out represents the output feature map after fusing the position information, which contains the position information of the vehicle in the horizontal and vertical directions. 3.The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 1, characterized in that: In the DOConv convolution module of step S1, the depth convolution is used for capturing local fine-grained features, and the depth convolution adopts a channel independent convolution, each input channel corresponds to a dedicated convolution kernel, and the depth convolution focuses on local component features of a vehicle, and is expressed as: where P' = P - P0 c,d represents the intermediate feature of the deep convolution output, c represents the input channel index, d represents the depth index, and corresponds to the over-parameterized depth multiplier D mul ; D c,i,d represents the deep convolution kernel, i represents the spatial position index of the convolution kernel, and the dimension is C in represents the number of channels of the feature map input to the current layer, M and N represent the spatial size of the convolution kernel; Pc, j represents the feature value of the jth spatial position of the cth channel of the input feature; represents the spatial convolution operation. 4.The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 3, characterized in that: In the DOConv convolution module, the traditional convolution integrates global structure features, performs cross-channel weighted fusion on an output of the depth convolution, and models global structure dependencies of the vehicle, and is expressed as: where O o denotes the feature of traditional convolution output, o denotes the output channel index, corresponding to C out ; W o,d,c denotes the traditional convolution kernel, with the dimension of The symbol · denotes the weighted summation operation.

5. The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 4, characterized in that: In the DOConv convolution module, feature fusion and dimension regularization are performed, original features and enhanced features are fused, and the original features and the directional enhanced features are integrated through channel dimension splicing, and are expressed as: F c = Concat(X, P' c,d , O o ) wherein F c is the fused feature; X represents the original input feature map; and Concat(·) represents a channel dimension concatenation operation for integrating the original feature, the deep convolutional feature, and the traditional convolutional feature. 6.The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 1, characterized in that: In the multi-directional feature extraction module of step S1, directional capturing is performed by using differentiated convolution kernels, and comprehensive feature expression with global and local information is formed through feature fusion and dimension regularization; the multi-directional feature extraction module comprises three parallel depth separable convolution branches, each branch extracts directional features through a main channel independent convolution mechanism, a square region adopts a square convolution kernel, and local detail features are captured through a depth convolution; a horizontal direction adopts a horizontal strip convolution kernel, and horizontal long-distance dependencies are captured through a depth convolution; and the original input and the three-branch features are spliced along a channel dimension to obtain fused features.

7. The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 6, characterized in that: In the multi-directional feature extraction module, a square region adopts a square convolution kernel, and local detail features are captured through a depth convolution, and are expressed as: wherein F s ∈ R C×H×W represents a square feature output, C, H, W represent the channel number, height and width of the feature respectively; represents a channel index; represents a floor operation; K s,c represents a square convolution kernel of the c-th channel, since the number of groups g=C, independent convolution is realized for each channel; the padding parameter p s =[k s / 2] is used to ensure that the output size is consistent with the input, k s represents the size of the square convolution kernel; i and j represent the height and width direction indexes of the feature map respectively; m and n represent the local indexes inside the square convolution kernel K s,c , m and n correspond to the height direction and width direction of the convolution kernel respectively; The horizontal direction adopts a horizontal bar convolution kernel Capture horizontal long-distance dependencies by deep convolution, represented as: where F h ∈ R C×H×W denotes the horizontal output, K h,c denotes the horizontal convolution kernel of the c-th channel, the padding parameter p h = (0, [k b / 2]) is used to ensure scale invariance in the horizontal direction, k b denotes the horizontal dimension; Horizontal bar convolution kernel is adopted in vertical direction Capture vertical long distance dependency by deep convolution, represented as: where F v ∈ R C×H×W represents vertical output, K v,c represents a horizontal convolution kernel of the c-th channel, the padding parameter p v = ([k c / 2], 0) is used to ensure scale invariance in the vertical direction, k c represents the vertical direction size; Then, the original input and the three-branch features are spliced along a channel dimension to obtain fused features, and are expressed as: F merge = Concat(X, F s , F h , F v ) e R 4C×H×W wherein, Concat(·) represents a channel dimension splicing operation. 8.The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 7, characterized in that: In the multi-direction feature extraction module, after the fusion features are obtained, a 1x1 convolution layer is used for channel compression to realize dimension regularization and feature reorganization, and the calculation is as follows: where W ∈ R C×4C×1×1 denotes a 1x1 convolution kernel weight, c' denotes a channel index of the fused feature map F merge,c , b ∈ R C denotes a bias, BN(·) denotes a batch normalization operation, and the final operation F out ∈ R C×H×W is consistent with the input dimension. 9.The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 1, characterized in that: In the step S2, the classification branch loss function is represented as: where L cls represents the cross-entropy loss value of the classification branch, represents the real label distribution of the i-th class, represents the prediction probability of the i-th class by the model, and Q represents the number of classes in training.

10. The vehicle re-identification method based on multi-directional feature and location perception fusion according to claim 9, characterized in that: In the step S2, the measurement branch loss function is represented as: where P denotes the number of body parts, K denotes the number of samples per identity, d identifies the distance threshold, P(a) denotes the positive sample set for each anchor, N(a) denotes the negative sample set for each anchor, x a denotes an anchor, x p denotes the extracted embedding of a positive sample, x n denotes the extracted embedding of a negative sample, d() denotes the Euclidean distance.