Triple attention unsupervised vehicle re-identification method, system, device and medium

Through the triple attention unsupervised vehicle re-identification method, the combination of feature extraction and classification networks is used to solve the identification difficulties of traditional vehicle re-identification in complex scenarios, and achieve higher accuracy and robustness.

CN119007138BActive Publication Date: 2024-12-24ANHUI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411487950.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2024-12-24
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Traditional vehicle re-identification methods are limited by factors such as viewing angle, lighting and vehicle changes in complex scenarios, making it difficult to achieve accurate identification.

Method used

The triple attention unsupervised vehicle re-identification method is adopted to perform multi-angle feature extraction and clustering processing on the vehicle image through the feature extraction network, and combined with the classification network to determine the comprehensive similarity of the feature, and select the reference vehicle image that meets the preset matching conditions for recognition.

Benefits of technology

Improves the accuracy and robustness of vehicle re-identification, and can accurately identify vehicles under multiple cameras, different scenes and lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007138B_ABST
    Figure CN119007138B_ABST
Patent Text Reader

Abstract

The present invention provides a triple attention unsupervised vehicle re-identification method, system, device and medium, the method comprising: inputting a plurality of reference vehicle images and a vehicle image to be checked into a feature extraction network in a re-identification model, forming a target feature from a first feature, a second feature and a third feature corresponding to the reference vehicle image, and forming a feature to be checked from a first feature, a second feature and a third feature corresponding to the vehicle image to be checked; determining the feature comprehensive similarity between the vehicle image to be checked and each reference vehicle image through a classification network in the re-identification model according to the target feature and the feature to be checked; and selecting a vehicle image whose feature comprehensive similarity with the vehicle image to be checked meets a preset matching condition from a plurality of reference vehicle images through a classification network in the re-identification model according to the feature comprehensive similarity. The present invention can improve the accuracy of vehicle re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle image recognition technology, and in particular to a triple-attention unsupervised vehicle re-identification method, system, device and medium. Background Art

[0002] With the continuous development of social transportation, vehicle re-identification based on deep learning has gradually attracted widespread attention as a key recognition technology. In traditional vehicle re-identification methods, there are many limitations in recognition based on vehicle features such as color and shape. For example, in multiple cameras, different scenes and lighting conditions, traditional vehicle re-identification methods are usually limited by factors such as viewing angle, lighting and vehicle changes, resulting in limited accuracy and robustness in complex scenes. In multi-lane scenes, the acquired vehicle images may present multiple directions, viewing angles and partial occlusions. Traditional vehicle re-identification methods are difficult to cope with these complex situations. Therefore, there is room for improvement. Summary of the invention

[0003] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a triple attention unsupervised vehicle re-identification method, system, device and medium, which is used to improve the problem in the prior art that vehicle images are limited by factors such as viewing angle, lighting and vehicle changes, making it difficult to re-identify vehicles.

[0004] To achieve the above objectives and other related objectives, the present invention provides a triple attention unsupervised vehicle re-identification method, the method comprising:

[0005] Acquire a to-be-checked vehicle image and a plurality of reference vehicle images;

[0006] Inputting the plurality of reference vehicle images and the vehicle image to be checked into a feature extraction network in a re-identification model; extracting the first feature, the second feature and the third feature of the reference vehicle image to form a target feature, and extracting the first feature, the second feature and the third feature of the vehicle image to be checked to form a feature to be checked;

[0007] According to the target feature and the feature to be checked, determining the comprehensive feature similarity between the vehicle image to be checked and each of the reference vehicle images through a classification network in the re-identification model;

[0008] According to the comprehensive feature similarity, a reference vehicle image whose comprehensive feature similarity with the vehicle image to be checked meets a preset matching condition is selected from the plurality of reference vehicle images through the classification network in the re-identification model.

[0009] In one embodiment of the present invention, the step of extracting the first feature of the reference vehicle image includes:

[0010] The reference vehicle image is rotated counterclockwise along the height direction to obtain the rotation feature;

[0011] Performing dynamic convolution processing on the rotation feature through the dynamic convolution module of the feature extraction network to obtain an intermediate feature;

[0012] By using the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the dimension of the width direction to obtain a reduced dimension feature;

[0013] Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights;

[0014] The attention weight is added to the rotation feature, and the addition result is rotated clockwise to obtain the first feature.

[0015] In one embodiment of the present invention, the step of extracting the second feature of the reference vehicle image comprises:

[0016] The reference vehicle image is rotated counterclockwise along the width direction to obtain the rotation feature;

[0017] Performing dynamic convolution processing on the rotation feature through the dynamic convolution module of the feature extraction network to obtain an intermediate feature;

[0018] Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the height direction to obtain dimension reduction features;

[0019] Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights;

[0020] The attention weight is added to the rotation feature, and the addition result is rotated clockwise to obtain a second feature.

[0021] In one embodiment of the present invention, the step of extracting the third feature of the reference vehicle image includes:

[0022] Maintaining the initial orientation of the reference vehicle image to obtain the preserved features;

[0023] Performing dynamic convolution processing on the retained features to obtain intermediate features through the dynamic convolution module of the feature extraction network;

[0024] Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the dimension of the channel to obtain dimension reduction features;

[0025] Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights;

[0026] The attention weight is added to the retained feature to obtain a third feature.

[0027] In one embodiment of the present invention, the step of determining the comprehensive feature similarity between the vehicle image to be checked and each of the reference vehicle images through a classification network in the re-identification model according to the target feature and the feature to be checked comprises:

[0028] Clustering the features to be checked corresponding to the plurality of reference vehicle images through the classification network in the re-identification model to obtain a plurality of clustering regions;

[0029] Selecting a feature to be checked corresponding to a certain reference vehicle image through the classification network and recording it as a target feature to be checked, obtaining a cluster center of a cluster area where the target feature to be checked is located and recording it as a target cluster center;

[0030] Calculate the cosine distance between the target feature to be checked and other features to be checked through the classification network, record the features to be checked corresponding to the cosine distance that meets the threshold distance as adjacent features to be checked, and obtain the cluster center of the cluster area where the adjacent features to be checked are located, which is recorded as the adjacent cluster center;

[0031] Subtracting the neighboring cluster center from the target cluster center through the classification network, recording the subtraction result as the control direction, multiplying the control direction by a preset fusion parameter, and adding the multiplication result to the target feature to be checked to obtain the supporting feature to be checked;

[0032] The classification network determines the comprehensive similarity of features between the vehicle image to be checked and each of the reference vehicle images according to the target feature and the supporting features to be checked corresponding to the features to be checked.

[0033] In one embodiment of the present invention, the step of selecting, from the plurality of reference vehicle images, a vehicle image whose comprehensive feature similarity with the to-be-checked vehicle image satisfies a preset matching condition through a classification network in the re-identification model according to the comprehensive feature similarity comprises:

[0034] Sorting the plurality of reference vehicle images according to their comprehensive feature similarities with the vehicle image to be checked, to obtain a sorting table, wherein the sorting table includes corresponding relationships between the reference vehicle images and the comprehensive feature similarities;

[0035] Among the multiple benchmark vehicle images, several of the benchmark vehicle images are selected in sequence through the classification network in the order of the comprehensive feature similarity in the sorting table from large to small, or the multiple benchmark vehicle images corresponding to the comprehensive feature similarity in the sorting table that is greater than a preset threshold similarity are selected through the classification network.

[0036] In one embodiment of the present invention, the re-identification model is trained by the following method:

[0037] Obtaining a training sample set, wherein vehicle images in the training sample set are provided with corresponding vehicle labels;

[0038] Selecting different batches of training vehicle images from the training sample set;

[0039] Inputting different batches of the training vehicle images into a vehicle recognition model to be trained for training, and determining the recognition loss value of the target loss function of the vehicle recognition model to be trained; wherein the vehicle recognition model comprises a feature extraction network and a classification network, the feature extraction network is connected to the classification network, the target loss function comprises the total loss of feature learning losses corresponding to the first feature, the second feature and the third feature on the feature extraction network, and the classification loss corresponding to the test feature on the classification network; the first feature, the second feature and the third feature of the vehicle image in the training sample set form the test feature;

[0040] Based on the recognition loss value, the parameters of the vehicle recognition model to be trained are adjusted to obtain a re-recognition model.

[0041] The present invention also proposes a triple attention unsupervised vehicle re-identification system, the system comprising:

[0042] An acquisition unit, used for acquiring a to-be-checked vehicle image and a plurality of reference vehicle images;

[0043] An extraction unit is used to input the plurality of reference vehicle images and the vehicle image to be checked into a feature extraction network in a re-identification model; extract the first feature, the second feature and the third feature of the reference vehicle image to form a target feature, and extract the first feature, the second feature and the third feature of the vehicle image to be checked to form a feature to be checked;

[0044] A processing unit, configured to determine, based on the target feature and the feature to be checked, a comprehensive feature similarity between the vehicle image to be checked and each of the reference vehicle images through a classification network in the re-identification model;

[0045] A selection unit is used to select, based on the feature comprehensive similarity, a reference vehicle image whose feature comprehensive similarity with the vehicle image to be checked meets a preset matching condition from the multiple reference vehicle images through the classification network in the re-identification model.

[0046] The present invention further provides an electronic device, comprising:

[0047] one or more processors;

[0048] A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the triple attention unsupervised vehicle re-identification method as described in any one of the above items.

[0049] The present invention also proposes a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer is enabled to execute any of the triple attention unsupervised vehicle re-identification methods described above.

[0050] As described above, the triple attention unsupervised vehicle re-identification method, system, device and medium of the present invention have the following beneficial effects: the present invention performs feature processing on the vehicle image in the channel domain and the spatial domain through the re-identification model to obtain more refined vehicle features, thereby improving the accuracy of vehicle re-identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1 A schematic diagram of the steps of a triple attention unsupervised vehicle re-identification method provided by an embodiment of the present invention.

[0053] Figure 2 A structural block diagram of a feature extraction network in a re-identification model provided by an embodiment of the present invention.

[0054] Figure 3 A visualization diagram of clustering results of vehicle images provided by an embodiment of the present invention.

[0055] Figure 4 A structural block diagram of an expansion module in a classification network in a re-identification model provided by an embodiment of the present invention.

[0056] Figure 5A structural block diagram of a triple attention unsupervised vehicle re-identification system provided by an embodiment of the present invention.

[0057] Figure 6 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0059] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0060] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0061] See also Figures 1 to 6 The present invention provides a triple attention unsupervised vehicle re-identification method, system, device and medium, which can be applied to the field of image recognition technology, for example, the field of vehicle re-identification technology. The present invention performs feature processing on vehicle images in the channel domain and the spatial domain through a re-identification model to obtain more refined vehicle features, thereby improving the accuracy of vehicle re-identification.

[0062] See also Figure 1 ,The present invention proposes a triple attention unsupervised vehicle re-identification method, which may include the following steps.

[0063] Step S10: Acquire a to-be-checked vehicle image and a plurality of reference vehicle images.

[0064] Step S20, input multiple reference vehicle images and the vehicle image to be checked into the feature extraction network in the re-identification model; extract the first feature, the second feature and the third feature of the reference vehicle image to form the target feature, and extract the first feature, the second feature and the third feature of the vehicle image to be checked to form the feature to be checked.

[0065] Step S30: According to the target features and the features to be checked, the comprehensive similarity of features between the image of the vehicle to be checked and each reference vehicle image is determined through the classification network in the re-identification model.

[0066] Step S40: According to the comprehensive feature similarity, a reference vehicle image whose comprehensive feature similarity with the image to be checked meets a preset matching condition is selected from multiple reference vehicle images through the classification network in the re-identification model.

[0067] The above steps are described in detail below through specific embodiments.

[0068] Step S10: Acquire a to-be-checked vehicle image and a plurality of reference vehicle images.

[0069] In one embodiment of the present invention, a plurality of vehicle images are obtained, and the plurality of vehicle images can be divided into vehicle images to be checked and reference vehicle images. The plurality of vehicle images can be obtained by taking photos by a plurality of cameras in different scenes and under different lighting conditions. The vehicle images taken under different scenes and under different lighting conditions have different lane scenes, different shooting angles and different lighting intensities. The plurality of vehicle images mentioned above are input into a vehicle recognition model to be trained for training, and a re-recognition model can be obtained after the vehicle re-recognition model to be trained is trained. Since the training object of the vehicle recognition model to be trained is vehicle images with different lane scenes, different shooting angles and different lighting intensities, the re-recognition model can improve the recognition accuracy of vehicle images.

[0070] Specifically, the vehicle image to be checked refers to the vehicle image that needs to be tested (re-identified), and the reference vehicle image can be regarded as a vehicle image library. For a vehicle image to be checked that needs to be re-identified, the vehicle image to be checked can be input into the vehicle recognition model, and the vehicle recognition model will find several vehicle images that are most similar to the vehicle image to be checked from multiple reference vehicle images.

[0071] Step S20, input multiple reference vehicle images and the vehicle image to be checked into the feature extraction network in the re-identification model; extract the first feature, the second feature and the third feature of the reference vehicle image to form the target feature, and extract the first feature, the second feature and the third feature of the vehicle image to be checked to form the feature to be checked.

[0072] In one embodiment of the present invention, Figure 1 and Figure 2As shown, first, multiple reference vehicle images and the vehicle image to be checked can be input into the feature extraction network in the re-identification model. Secondly, feature extraction is performed on the height and channel of the vehicle image to be checked to obtain the first feature of the vehicle image to be checked. Feature extraction is performed on the width and channel of the vehicle image to be checked to obtain the second feature of the vehicle image to be checked. Feature extraction is performed on the height and width of the vehicle image to be checked to obtain the third feature of the vehicle image to be checked. The first feature, the second feature, and the third feature corresponding to the vehicle image to be checked can form the feature to be checked.

[0073] Similarly, if Figure 1 and Figure 2 As shown, feature extraction is performed on the height and channel of the reference vehicle image to obtain the first feature of the reference vehicle image. Feature extraction is performed on the width and channel of the reference vehicle image to obtain the second feature of the vehicle image to be checked. Feature extraction is performed on the height and width of the reference vehicle image to obtain the third feature of the reference vehicle image. The first feature, the second feature, and the third feature corresponding to the reference vehicle image can be formed into features to be checked.

[0074] Step S30: According to the target features and the features to be checked, the comprehensive similarity of features between the image of the vehicle to be checked and each reference vehicle image is determined through the classification network in the re-identification model.

[0075] In one embodiment of the present invention, for the similarity between the vehicle image to be checked and multiple reference vehicle images, the classification network in the re-identification model can determine the comprehensive feature similarity between the vehicle image to be checked and each reference vehicle image based on the target features and the features to be checked.

[0076] Step S40: According to the comprehensive feature similarity, a reference vehicle image whose comprehensive feature similarity with the image to be checked meets a preset matching condition is selected from multiple reference vehicle images through the classification network in the re-identification model.

[0077] In one embodiment of the present invention, the target feature and the feature to be checked are compared to determine the comprehensive similarity of the features between the vehicle image to be checked and each reference vehicle image. Then, a vehicle image whose comprehensive similarity of the features with the vehicle image to be checked meets a preset matching condition is selected from the multiple reference vehicle images. For example, the preset matching condition may be a threshold similarity. When the comprehensive similarity of the features between a reference vehicle image and the vehicle image to be checked is greater than or equal to the threshold similarity, the reference vehicle image may be selected as the re-identification image corresponding to the vehicle image to be checked.

[0078] In one embodiment of the present invention, Figure 1 and Figure 2As shown, the feature extraction network can copy the reference vehicle image into three copies, so as to extract features from the three reference vehicle images in terms of height and channel, width and channel, and height and width. Similarly, the feature extraction network can also copy the image of the vehicle to be checked into three copies, so as to extract features from the three images of the vehicle to be checked in terms of height and channel, width and channel, and height and width.

[0079] Specifically, Figure 2 As shown, since the processing process of the feature extraction network for the reference vehicle image and the vehicle image to be checked is similar, in the following embodiments, only the feature extraction of the reference vehicle image in terms of height and channel, width and channel, and height and width is used for explanation, and the feature extraction of the vehicle image to be checked is similar to the feature extraction of the reference vehicle image.

[0080] See also Figure 1 and Figure 2 In one embodiment of the present invention, in step S20, extracting the first feature of the reference vehicle image may include the following steps.

[0081] Step S210: rotate the reference vehicle image counterclockwise along the height direction to obtain a rotation feature.

[0082] Step S211: Perform dynamic convolution processing on the rotation feature through the dynamic convolution module of the feature extraction network to obtain the intermediate feature.

[0083] Step S212: Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the width direction to obtain reduced-dimensional features.

[0084] Step S213: Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights.

[0085] Step S214: add the attention weight to the rotation feature, and rotate the addition result clockwise to obtain the first feature.

[0086] Specifically, Figure 2 As shown, the reference vehicle image Make 3 copies. , respectively , and , , , They represent the channel, height, and width of the reference vehicle image respectively. Figure 2 In the first branch, we have the benchmark vehicle image. At height and Channel on interaction.

[0087] First, the benchmark vehicle image Along the height direction ( ), which is the benchmark vehicle image Along The axis rotates counterclockwise to obtain the rotation feature, which can be expressed as . Second, rotate the feature by The dynamic convolution layer is The dynamic convolution layer (DW Conv) performs dynamic convolution processing to obtain the intermediate features. Secondly, the intermediate features are pooled in the width direction through the mixed pooling layer (MixPool). On the , the maximum pooling and average pooling are performed to obtain the dimension reduction feature, which can be expressed as . Secondly, the reduced dimension features are processed by the multilayer perceptron module (MLP) with a fully connected layer and a nonlinear activation function to generate attention weights. Then, the attention weights are added to the rotated features, and the result is rotated clockwise to obtain the first feature .

[0088] Specifically, the MixPool layer performs the maximum pooling and average pooling operations on the primary dimension of the intermediate features, and then merges the two pooling results along the same dimension. The MixPool layer can effectively reduce the number of primary dimensions of the intermediate features to 2. The MixPool layer can not only reduce the dimensional depth of the intermediate features, making the processing process efficient, but also ensure that the important information of the intermediate features is maintained, as follows: .

[0089] in, represents the first degree splicing operation along the intermediate feature, and represent the maximum pooling and average pooling operations respectively, and This means that both pooling operations are processed along the first dimension of the intermediate features. Through the processing of the mixed pooling layer, the first dimension of the intermediate features is condensed into a result of only two layers by two different pooling representations.

[0090] Specifically, the multi-layer perceptron module (MLP) consists of a series of fully connected layers, and a nonlinear activation function is applied after each fully connected layer. The multi-layer perceptron module (MLP) processes the reduced-dimensional features output by the MixPool layer in two steps. First, the reduced-dimensional features are linearly transformed, for example , Expressed as a weight matrix, is the input vector, is the bias term. Secondly, after the linear transformation of the dimensionality reduction feature, the activation function can be applied, which can be expressed as The multi-layer perceptron module (MLP) can perform repeated linear changes on the reduced-dimensional features and apply activation functions to gradually abstract and fuse the reduced-dimensional features, and finally generate feature representations that can be used to calculate attention weights.

[0091] See also Figure 1 and Figure 2 In one embodiment of the present invention, in step S20, extracting the second feature of the reference vehicle image may include the following steps.

[0092] Step S220: rotate the reference vehicle image counterclockwise along the height direction to obtain a rotation feature.

[0093] Step S221: Perform dynamic convolution processing on the rotation feature through the dynamic convolution module of the feature extraction network to obtain the intermediate feature.

[0094] Step S222: Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the height direction to obtain dimensionality reduction features.

[0095] Step S223: Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights.

[0096] Step S224: add the attention weight to the rotation feature, and rotate the addition result clockwise to obtain the second feature.

[0097] Specifically, Figure 2 As shown, in Figure 2 In the second branch, there is a benchmark vehicle image In width and Channel on interaction.

[0098] First, the benchmark vehicle image Along the width direction ( ), which is the benchmark vehicle image Along The axis rotates counterclockwise to obtain the rotation feature, which can be expressed as . Second, rotate the feature by The dynamic convolution layer is The dynamic convolution layer (DW Conv) performs dynamic convolution processing to obtain the intermediate features. Secondly, the intermediate features are pooled in the height direction through the mixed pooling layer (MixPool). On the , the maximum pooling and average pooling are performed to obtain the dimension reduction feature, which can be expressed as . Secondly, the dimension reduction features are processed by the multilayer perceptron module (MLP) with a fully connected layer and a nonlinear activation function to generate attention weights. Then, the attention weights are added to the rotation features, and the addition result is rotated clockwise to obtain the second feature .

[0099] See also Figure 1 and Figure 2 In one embodiment of the present invention, in step S20, extracting the third feature of the reference vehicle image may include the following steps.

[0100] Step S230: Maintain the initial direction of the reference vehicle image to obtain the preserved features.

[0101] Step S231: Perform dynamic convolution processing on the retained features through the dynamic convolution module of the feature extraction network to obtain intermediate features.

[0102] Step S232: Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the channel dimension to obtain dimensionality reduction features.

[0103] Step S233: Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights.

[0104] Step S234: Add the attention weight to the retained feature to obtain the third feature.

[0105] Specifically, Figure 2 As shown, in Figure 2 The third branch is about the benchmark vehicle image At height and width on interaction.

[0106] First, the benchmark vehicle image Keep along the initial direction to obtain the maintained feature. The maintained feature can be expressed as . Secondly, keep the features by The dynamic convolution layer is The dynamic convolution layer (DW Conv) is used to perform dynamic convolution processing to obtain intermediate features. Secondly, the mixed pooling layer (MixPool) performs maximum pooling and average pooling processing on the intermediate features in the channel dimension to obtain dimensionality reduction features. The dimensionality reduction features can be expressed as . Secondly, the reduced dimension features are processed by the multilayer perceptron module (MLP) with a fully connected layer and nonlinear activation function to generate attention weights. Then, the attention weights are added to the retained features to obtain the third feature .

[0107] Specifically, in Figure 2 After completing the feature processing of the three branches, the first feature generated by each branch can be , Second feature and the third feature Perform parallel concatenation (Concat) operations to combine them to form a larger and richer feature representation For example, the first feature, the second feature, and the third feature corresponding to the reference vehicle image form the target feature, and the first feature, the second feature, and the third feature corresponding to the to-be-checked vehicle image form the to-be-checked feature.

[0108] It can be seen that connecting the first feature, the second feature, and the third feature in parallel not only combines the advantages of each branch in terms of different spatial and dimensional focus points, but also retains the original shape format of each feature when the vehicle image is input, so that the output features of the feature extraction network are consistent with the input tensor and the input vehicle image in shape, and the feature extraction of the vehicle image is significantly enhanced. The output features of the feature extraction network carry the attention-weighted features that integrate the interaction of height, width, and channels, providing a feature tensor with more information and stronger representation capabilities for the classification task of the re-identification model.

[0109] See also Figure 1 , Figure 3 and Figure 4 In one embodiment of the present invention, in step S30, based on the target features and the features to be checked, the comprehensive similarity of features between the vehicle image to be checked and each reference vehicle image is determined through a classification network in the re-identification model, which may include the following steps.

[0110] Step S310: clustering the features to be checked corresponding to the multiple reference vehicle images through the classification network in the re-identification model to obtain multiple clustering regions.

[0111] Step S320: select a feature to be checked corresponding to a certain reference vehicle image through a classification network and record it as a target feature to be checked, obtain the cluster center of the cluster area where the target feature to be checked is located, and record it as the target cluster center.

[0112] Step S330, calculate the cosine distance between the target feature to be checked and other features to be checked through the classification network, record the features to be checked corresponding to the cosine distance that meets the threshold distance as adjacent features to be checked, and obtain the cluster center of the cluster area where the adjacent features to be checked are located, which is recorded as the adjacent cluster center.

[0113] Step S340: subtract the neighboring cluster center from the target cluster center through the classification network, record the subtraction result as the control direction, multiply the control direction by the preset fusion parameter, and add the multiplication result to the target feature to be checked to obtain the supporting feature to be checked.

[0114] Step S350: Determine the comprehensive feature similarity between the vehicle image to be checked and each reference vehicle image according to the target feature and the supporting features to be checked corresponding to the features to be checked through the classification network.

[0115] See also Figure 3 In one embodiment of the present invention, the feature extraction network in the re-identification model can extract features from the vehicle image to obtain vehicle features corresponding to the vehicle image. The classification network in the re-identification model can classify the vehicle features of the vehicle image, such as Figure 3 As shown in FIG. 1 , by classifying the vehicle features of different vehicle images, a clustering result visualization diagram can be obtained. In the clustering result visualization diagram, similar vehicle images correspond to similar vehicle features, so clustering can improve the efficiency of vehicle re-identification.

[0116] See also Figure 3 In one embodiment of the present invention, clustering of vehicle features corresponding to vehicle images may cause problems with individual clusters or unclear mixed clusters. Specifically, there may be unclear boundaries of sub-clusters within clusters, or misclassification of samples between similar clusters, or inaccurate clustering due to insufficient embedded information. The above problems make it difficult for the re-identification model to accurately distinguish vehicle features corresponding to different vehicle images, thereby affecting the performance of the re-identification task. To this end, this embodiment is improved through steps S310 to S350.

[0117] In addition, since the purpose of the present invention is to select a vehicle image whose comprehensive feature similarity with the vehicle image to be checked meets the preset matching conditions from multiple reference vehicle images, the vehicle features corresponding to the multiple reference vehicle images are clustered to improve the efficiency and accuracy of vehicle re-identification.

[0118] See also Figure 3 and Figure 4 In one embodiment of the present invention, for the feature to be checked corresponding to the vehicle image to be checked , the corresponding supporting features to be checked can be generated through linear difference operation , to enhance the context features corresponding to each vehicle image to be checked. ,in It controls the direction. It is the control degree and two important factors for feature expansion of the features to be checked in the vehicle image to be checked.

[0119] In one embodiment of the present invention, in the control direction In the adjacent clusters, there may be vehicle features corresponding to the misclassified vehicle images to be checked, so some supporting features to be checked located between two adjacent clusters can be created.

[0120] First, the classification network in the re-identification model clusters the features to be checked corresponding to multiple reference vehicle images to obtain multiple clustering regions. Second, the features to be checked corresponding to a reference vehicle image are recorded as target features to be checked, and the cluster center of the clustering region where the target features to be checked are located can be obtained and recorded as the target cluster center. . Secondly, the cosine similarity (cosine distance) between the target feature to be checked and other features to be checked is calculated, and the feature to be checked corresponding to the cosine distance that meets the threshold distance is recorded as the adjacent feature to be checked corresponding to the target feature to be checked. After obtaining multiple adjacent features to be checked corresponding to the target feature to be checked, the cluster centers of the clustering areas where the multiple adjacent features to be checked are located can be obtained and recorded as the adjacent cluster centers. When the number of neighboring features to be checked is one, the neighboring cluster center corresponds to the center of a cluster area. When the number of neighboring features to be checked is When the neighboring cluster center Corresponding to The center of the cluster area.

[0121] Afterwards, the expansion direction of the target feature to be checked can be determined as a direction vector pointing from the target cluster center to multiple neighboring cluster centers, so that the supporting features to be checked corresponding to the target feature to be checked not only reflect the attributes of the cluster area corresponding to the target feature to be checked, but also integrate the attributes of the cluster areas corresponding to multiple neighboring features to be checked. Control direction The following formula can be satisfied: .

[0122] For example, when the number of neighboring features to be checked is one, the target feature to be checked can be moved toward the neighboring cluster center. Expand the features and generate corresponding support features to be checked , to enhance the context features corresponding to each vehicle image to be checked. When the number of neighboring features to be checked is At this time, the target feature to be checked can be oriented Nearby cluster centers Expand the features and generate corresponding support features to be checked By generating the corresponding Support features to be checked , in order to enhance the context features corresponding to each vehicle image to be checked. This not only enriches the amount of information contained in the data of the vehicle image to be checked, but also provides multi-angle context feature enhancement for the re-identification model.

[0123] In one embodiment of the present invention, the control degree On, the degree of control Determines the neighboring clustering area in supporting the feature to be checked The degree of integration in If the value is set too high, it will cause the support of unchecked features. It is far away from the clustering area of ​​the target feature to be checked, and if the control degree If the setting is too small, the generated support features are unchecked. There is almost no difference from the target feature to be checked. Therefore, a gradual approach can be used to update the control degree The value range of As the training progresses, more context information is gradually introduced. Specifically, the degree of control can be Considered as a variable that grows logarithmically with the number of training iterations, satisfying , here Represents the ratio of the current number of iterations to the total number of iterations, It is the initial setting value.

[0124] See also Figure 1 In one embodiment of the present invention, in step S40, the step of selecting a vehicle image whose comprehensive feature similarity with the to-be-checked vehicle image satisfies a preset matching condition from multiple reference vehicle images through a classification network in a re-identification model according to the comprehensive feature similarity may include steps S410 and S420.

[0125] Step S410 can be represented as sorting a plurality of reference vehicle images according to their comprehensive feature similarities with the vehicle image to be checked, to obtain a sorting table, wherein the sorting table includes the corresponding relationship between the reference vehicle images and the comprehensive feature similarities.

[0126] Step S420 can be represented as selecting a number of benchmark vehicle images in sequence from a plurality of benchmark vehicle images through a classification network in descending order of the comprehensive feature similarity in the sorting table, or selecting a plurality of benchmark vehicle images corresponding to the comprehensive feature similarity in the sorting table that is greater than a preset threshold similarity through a classification network.

[0127] In one embodiment of the present invention, the top sequence with the highest comprehensive feature similarity can be selected from the sorting table. results, or the comprehensive similarity of features is above the preset threshold All the above results satisfy the following formula.

[0128] .

[0129] , or ;

[0130] , .

[0131] in, Expressed as The similarity ranking of the vehicle images to be checked among multiple benchmark vehicle images, Expressed as The feature comprehensive similarity of the to-be-checked feature of the to-be-checked vehicle image and the reference feature of the j-th reference vehicle image among multiple reference vehicle images. In other cases, or . Indicates that the match is successful, that is, The feature comprehensive similarity of the to-be-checked features of the to-be-checked vehicle images and the reference features of the jth reference vehicle image among multiple reference vehicle images , or the benchmark feature of the jth benchmark vehicle image is at the top with the highest comprehensive feature similarity Among the results, the jth reference vehicle image can be used as the Re-identification images of vehicles to be checked. Indicates that the match failed, that is, The feature comprehensive similarity of the to-be-checked features of the to-be-checked vehicle images and the reference features of the jth reference vehicle image among multiple reference vehicle images , or the benchmark feature of the jth benchmark vehicle image is not at the top with the highest feature comprehensive similarity The jth reference vehicle image cannot be used as the first Re-identification images of vehicles to be checked.

[0132] See also Figure 1 In one embodiment of the present invention, the training method of the re-identification model may include the following steps.

[0133] Step S510: obtaining a training sample set, wherein the vehicle images in the training sample set are provided with corresponding vehicle labels.

[0134] Step S520: Select different batches of training vehicle images from the training sample set.

[0135] Step S530, input different batches of training vehicle images into the vehicle recognition model to be trained for training, and determine the recognition loss value of the target loss function of the vehicle recognition model to be trained; wherein the vehicle recognition model includes a feature extraction network and a classification network, the feature extraction network is connected to the classification network, and the target loss function includes the feature learning loss corresponding to the first feature, the second feature and the third feature on the feature extraction network, and the total loss of the classification loss corresponding to the test feature on the classification network; the first feature, the second feature and the third feature of the vehicle image in the training sample set form the test feature.

[0136] Step S540: Based on the recognition loss value, adjust the parameters of the vehicle recognition model to be trained to obtain a re-recognition model.

[0137] In one embodiment of the present invention, the training vehicle images in the training sample set can be recorded as , ,in Indicates the training set The feature extraction network extracts features from the training vehicle images to obtain the corresponding test features. For the test features of the training vehicle images, we can use The algorithm assigns pseudo labels to the training vehicle images to obtain the dataset , ,in , It is Pseudo labels for training vehicle images, is the total number of clusters corresponding to the training vehicle images.

[0138] In one embodiment of the present invention, a cluster memory library can be constructed , which aims to capture and save the feature information of training vehicle images captured by cameras at different times and locations. In the training, vehicle images from different cameras can be compared to see if they belong to the same vehicle. You can update it in the following ways.

[0139] ,in, Cluster Memory Library The entries, storing Updated feature centroids of clustered regions, is the update rate, for The clustering area The feature centroid of the iteration.

[0140] In one embodiment of the present invention, The loss function trains the feature extraction network in the vehicle recognition model to be trained, and the feature extraction loss corresponding to the feature extraction network is , satisfying the following formula.

[0141] ,in, Cluster Memory Class Library The entries, and With the same pseudo-label, Represented as two vectors and The cosine similarity between them. In addition, the vehicle recognition model to be trained will consider training vehicle images in positive samples and negative samples, in order to better distinguish positive samples from negative samples, with stronger correlation between positive samples and weaker correlation between negative samples. That is, Can be The positive sample of It can also be Negative samples.

[0142] In one embodiment of the present invention, the classification loss corresponding to the classification network in the vehicle recognition model to be trained is , which satisfies the following formula.

[0143] .

[0144] Specifically, for the test features corresponding to the training vehicle images, the corresponding supporting test features can be generated through linear interpolation operations, and the classification loss The purpose is to ensure that after the test feature is expanded, the deviation between the supported test feature and the test feature is small. Figure 3 In this way, more points of the same color can be gathered together. Denote as the initial test feature, Expressed as A cluster area of ​​a cluster area (For example, in Figure 3The test feature that is most similar to the initial test feature in the top circle area in . Expressed as A cluster area of ​​a cluster area (For example, in Figure 3 The test feature that is most dissimilar to the initial test feature in the circled area at the top of is a hyperparameter.

[0145] Specifically, the recognition loss value of the target loss function in the vehicle recognition model to be trained includes the feature extraction loss and classification loss , which satisfies the following formula.

[0146] ,in is the weight parameter.

[0147] See also Figure 5 In one embodiment of the present invention, a triple attention unsupervised vehicle re-identification system may be proposed, which may include an acquisition unit 110, an extraction unit 120, a processing unit 130 and a selection unit 140.

[0148] The acquisition unit 110 is used to acquire a to-be-checked vehicle image and a plurality of reference vehicle images.

[0149] The extraction unit 120 is used to input multiple reference vehicle images and the vehicle image to be checked into the feature extraction network in the re-identification model; extract the first feature, the second feature and the third feature of the reference vehicle image to form the target feature, and extract the first feature, the second feature and the third feature of the vehicle image to be checked to form the feature to be checked.

[0150] The processing unit 130 is used to determine the comprehensive similarity of features between the to-be-checked vehicle image and each reference vehicle image through a classification network in the re-identification model according to the target features and the to-be-checked features.

[0151] The selection unit 140 is used to select a reference vehicle image whose comprehensive feature similarity with the vehicle image to be checked meets a preset matching condition from multiple reference vehicle images through a classification network in the re-identification model according to the comprehensive feature similarity.

[0152] See also Figure 6 In one embodiment of the present invention, the electronic device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a triple attention unsupervised vehicle re-identification program.

[0153] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 12 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 12 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of triple attention unsupervised vehicle re-identification, etc., but also can be used to temporarily store data that has been output or is to be output.

[0154] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 1, and uses various interfaces and lines to connect various components of the entire electronic device 1, and executes or executes programs or modules (such as a power battery capacity correction program, etc.) stored in the memory 12, and calls data stored in the memory 12 to execute various functions of the electronic device 1 and process data.

[0155] The processor 13 executes the operating system of the electronic device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above triple attention unsupervised vehicle re-identification method.

[0156] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition unit 110, an extraction unit 120, a processing unit 130, and a selection unit 140.

[0157] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium, and the computer-readable storage medium can be non-volatile or volatile. The above-mentioned software function module is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to perform part of the functions of the power battery capacity correction method described in each embodiment of the present application.

[0158] In summary, the present invention discloses a triple attention unsupervised vehicle re-identification method, system, device and medium. The present invention performs feature processing on vehicle images in the channel domain and spatial domain through a re-identification model to obtain more refined vehicle features, thereby improving the accuracy of vehicle re-identification. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.

[0159] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A triple attention unsupervised vehicle re-identification method, characterized in that: The method comprises: Acquire a to-be-checked vehicle image and a plurality of reference vehicle images; Inputting the plurality of reference vehicle images and the vehicle image to be checked into a feature extraction network in a re-identification model; extracting the first feature, the second feature and the third feature of the reference vehicle image to form a target feature, and extracting the first feature, the second feature and the third feature of the vehicle image to be checked to form a feature to be checked; According to the target feature and the feature to be checked, determining the comprehensive feature similarity between the vehicle image to be checked and each of the reference vehicle images through a classification network in the re-identification model; According to the feature comprehensive similarity, a reference vehicle image whose feature comprehensive similarity with the image to be checked meets a preset matching condition is selected from the plurality of reference vehicle images through a classification network in the re-identification model; The step of extracting the first feature of the reference vehicle image comprises: The reference vehicle image is rotated counterclockwise along the height direction to obtain the rotation feature; Performing dynamic convolution processing on the rotation feature through the dynamic convolution module of the feature extraction network to obtain an intermediate feature; Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the width direction to obtain dimension reduction features; Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights; Adding the attention weight to the rotation feature, and rotating the addition result clockwise to obtain a first feature; The step of extracting the second feature of the reference vehicle image comprises: The reference vehicle image is rotated counterclockwise along the width direction to obtain the rotation feature; Performing dynamic convolution processing on the rotation feature through the dynamic convolution module of the feature extraction network to obtain an intermediate feature; Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the height direction to obtain dimension reduction features; Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights; Adding the attention weight to the rotation feature, and rotating the addition result clockwise to obtain a second feature; The step of extracting the third feature of the reference vehicle image comprises: Maintaining the initial orientation of the reference vehicle image to obtain the preserved features; Performing dynamic convolution processing on the retained features to obtain intermediate features through the dynamic convolution module of the feature extraction network; Through the hybrid pooling module of the feature extraction network, the intermediate features are subjected to maximum pooling and average pooling processing in the dimension of the channel to obtain dimension reduction features; Through the multi-layer perceptron module of the feature extraction network, the dimension reduction features are processed by a full connection layer and a nonlinear activation function to generate attention weights; Adding the attention weight to the retained feature to obtain a third feature; The step of determining the comprehensive similarity of features between the vehicle image to be checked and each of the reference vehicle images through a classification network in the re-identification model according to the target features and the features to be checked comprises: Clustering the features to be checked corresponding to the plurality of reference vehicle images through the classification network in the re-identification model to obtain a plurality of clustering regions; Selecting a feature to be checked corresponding to a certain reference vehicle image through the classification network and recording it as a target feature to be checked, obtaining a cluster center of a cluster area where the target feature to be checked is located and recording it as a target cluster center; Calculate the cosine distance between the target feature to be checked and other features to be checked through the classification network, record the features to be checked corresponding to the cosine distance that meets the threshold distance as adjacent features to be checked, and obtain the cluster center of the cluster area where the adjacent features to be checked are located, which is recorded as the adjacent cluster center; Subtracting the neighboring cluster center from the target cluster center through the classification network, recording the subtraction result as the control direction, multiplying the control direction by a preset fusion parameter, and adding the multiplication result to the target feature to be checked to obtain the supporting feature to be checked; The classification network determines the comprehensive similarity of features between the vehicle image to be checked and each of the reference vehicle images according to the target feature and the supporting features to be checked corresponding to the features to be checked.

2. The triple attention unsupervised vehicle re-identification method according to claim 1, characterized in that: The step of selecting a vehicle image whose comprehensive feature similarity with the to-be-checked vehicle image satisfies a preset matching condition from the plurality of reference vehicle images through a classification network in the re-identification model according to the comprehensive feature similarity comprises: Sorting the plurality of reference vehicle images according to their comprehensive feature similarities with the vehicle image to be checked, to obtain a sorting table, wherein the sorting table includes corresponding relationships between the reference vehicle images and the comprehensive feature similarities; Among the multiple benchmark vehicle images, several of the benchmark vehicle images are selected in sequence through the classification network in the order of the comprehensive feature similarity in the sorting table from large to small, or the multiple benchmark vehicle images corresponding to the comprehensive feature similarity in the sorting table that is greater than a preset threshold similarity are selected through the classification network.

3. The triple attention unsupervised vehicle re-identification method according to claim 1, characterized in that: The re-identification model is trained by the following method: Obtaining a training sample set, wherein vehicle images in the training sample set are provided with corresponding vehicle labels; Selecting different batches of training vehicle images from the training sample set; Inputting different batches of the training vehicle images into a vehicle recognition model to be trained for training, and determining the recognition loss value of the target loss function of the vehicle recognition model to be trained; wherein the vehicle recognition model comprises a feature extraction network and a classification network, the feature extraction network is connected to the classification network, the target loss function comprises the total loss of feature learning losses corresponding to the first feature, the second feature and the third feature on the feature extraction network, and the classification loss corresponding to the test feature on the classification network; the first feature, the second feature and the third feature of the vehicle image in the training sample set form the test feature; Based on the recognition loss value, the parameters of the vehicle recognition model to be trained are adjusted to obtain a re-recognition model.

4. A triple attention unsupervised vehicle re-identification system, characterized in that: The system comprises: An acquisition unit, used for acquiring a to-be-checked vehicle image and a plurality of reference vehicle images; An extraction unit is used to input the plurality of reference vehicle images and the vehicle image to be checked into a feature extraction network in a re-identification model; extract the first feature, the second feature and the third feature of the reference vehicle image to form a target feature, and extract the first feature, the second feature and the third feature of the vehicle image to be checked to form a feature to be checked; Among them, the reference vehicle image is rotated counterclockwise along the height direction to obtain a rotation feature; the rotation feature is dynamically convolved through the dynamic convolution module of the feature extraction network to obtain an intermediate feature; the intermediate feature is subjected to maximum pooling and average pooling in the width direction through the hybrid pooling module of the feature extraction network to obtain a reduced dimension feature; the reduced dimension feature is subjected to a full connection layer and a nonlinear activation function through the multi-layer perceptron module of the feature extraction network to generate an attention weight; the attention weight is added to the rotation feature, and the addition result is rotated clockwise to obtain a first feature; Among them, the reference vehicle image is rotated counterclockwise along the width direction to obtain a rotation feature; the rotation feature is dynamically convolved through the dynamic convolution module of the feature extraction network to obtain an intermediate feature; the intermediate feature is subjected to maximum pooling and average pooling in the height direction through the hybrid pooling module of the feature extraction network to obtain a reduced dimension feature; the reduced dimension feature is subjected to a full connection layer and a nonlinear activation function through the multi-layer perceptron module of the feature extraction network to generate an attention weight; the attention weight is added to the rotation feature, and the addition result is rotated clockwise to obtain a second feature; Among them, the initial direction of the reference vehicle image is maintained to obtain the maintained feature; the dynamic convolution module of the feature extraction network is used to perform dynamic convolution processing on the maintained feature to obtain the intermediate feature; the mixed pooling module of the feature extraction network is used to perform maximum pooling and average pooling processing on the channel dimension to obtain the reduced dimension feature; the multi-layer perceptron module of the feature extraction network is used to perform full connection layer and nonlinear activation function processing on the reduced dimension feature to generate the attention weight; the attention weight is added to the maintained feature to obtain the third feature; A processing unit, configured to determine, based on the target feature and the feature to be checked, a comprehensive feature similarity between the vehicle image to be checked and each of the reference vehicle images through a classification network in the re-identification model; wherein, through the classification network in the re-identification model, clustering processing is performed on the features to be checked corresponding to the multiple reference vehicle images to obtain multiple clustering areas; through the classification network, a feature to be checked corresponding to a certain reference vehicle image is selected and recorded as a target feature to be checked, and the cluster center of the clustering area where the target feature to be checked is located is obtained and recorded as the target clustering center; through the classification network, the cosine distance between the target feature to be checked and other features to be checked is calculated, and the features to be checked corresponding to the cosine distance satisfying the threshold distance are recorded as adjacent features to be checked, and the cluster center of the clustering area where the adjacent features to be checked are located is obtained and recorded as the adjacent clustering center; through the classification network, the adjacent clustering center is subtracted from the target clustering center, and the subtraction result is recorded as the control direction, the control direction is multiplied by a preset fusion parameter, and the multiplication result is added to the target feature to be checked to obtain the supporting feature to be checked; through the classification network, according to the target feature and the supporting features to be checked corresponding to the feature to be checked, the comprehensive feature similarity between the vehicle image to be checked and each of the reference vehicle images is determined; A selection unit is used to select, based on the feature comprehensive similarity, a reference vehicle image whose feature comprehensive similarity with the vehicle image to be checked meets a preset matching condition from the multiple reference vehicle images through the classification network in the re-identification model.

5. An electronic device, characterized in that: It includes a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the triple attention unsupervised vehicle re-identification method as described in any one of claims 1-3.

6. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to enable a computer to execute the triple attention unsupervised vehicle re-identification method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Fast hash vehicle retrieval method based on multi-task deep learning

    CN107885764A

  • Vehicle re-identification method and device, medium and electronic equipment

    CN117935180A

  • Method and system of inspecting vehicle

    US20230206414A1