A target re-identification method, device, medium and product

By constructing a multi-branch visual state space model, the global features and multi-grained target features of the target image are extracted, and the correlation between features is optimized, the problems of insufficient globality, computing efficiency, resource consumption and feature representation of feature extraction in the prior art are solved, and efficient and robust target re-identification effect is achieved.

CN119380006BActive Publication Date: 2025-04-15ROCKET FORCE UNIV OF ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411960772.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-15
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing target re-identification technology has shortcomings in the globality of feature extraction, computing efficiency, resource consumption, and diversity and robustness of feature representations, which limits its application in a wider range of scenarios.

Method used

By constructing a multi-branch visual state space model, including a strong baseline module, a multi-grained feature extractor module, a ranking-aware triple regularization module and a training inference module, the global features and multi-grained target features of the target image are extracted and the correlation between features is optimized.

Benefits of technology

It improves the efficiency of target re-identification, reduces resource consumption during the identification process, enhances the diversity and robustness of features, and thus improves the detection accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380006B_ABST
    Figure CN119380006B_ABST
Patent Text Reader

Abstract

The present application discloses a target re-identification method, device, medium and product, which relates to the field of target re-identification. The method includes: obtaining a query image and a target image; constructing a multi-branch visual state space model; inputting the query image and the target image into the multi-branch visual state space model respectively to obtain a target image ranking result; and obtaining a target re-identification result based on the target image ranking result. Among them, the strong baseline module extracts the global features of the target image; the multi-granularity feature extractor module extracts the multi-granularity target features of the query image based on the global features; the ranking-aware triplet regularization module determines the similarity between the multi-granularity target features and optimizes the correlation between the multi-granularity target features; and the training reasoning module obtains the target image ranking result. The present application can solve the problems existing in the prior art in terms of the globality of feature extraction, computational efficiency, resource consumption, and diversity and robustness of feature representation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target re-identification, and in particular to a target re-identification method, device, medium and product. Background Art

[0002] In the field of object re-identification, existing technologies are mainly based on deep learning frameworks, including Convolutional Neural Networks (CNNs) and Transformer models. CNNs capture local features of the target through local receptive fields, while Transformer models use self-attention mechanisms to process global features, avoid downsampling and bias, and capture complex, global, and detailed patterns.

[0003] Although existing CNNs and Transformer models have made some progress in object re-identification tasks, they still have some shortcomings and deficiencies:

[0004] (1) Limitations of CNNs: CNNs mainly focus on local features, and the fixed receptive field limits the capture of global context, which is crucial for distinguishing subtly different objects. In addition, the inductive bias and downsampling operations in CNNs often lead to the loss of key detailed information, which is detrimental to the object re-identification task.

[0005] (2) Scalability issues of Transformer models: Although Transformer models perform well in processing global features, their memory and computational requirements grow quadratically when the input sequence length increases, which limits their use in practical applications with limited hardware resources.

[0006] (3) Computational efficiency and resource consumption: Existing object re-identification methods often require a lot of computing resources and memory when processing high-resolution images, which is impractical in resource-constrained environments.

[0007] (4) Diversity and robustness of feature representation: The existing technology still needs to be improved in terms of diversity and robustness of feature representation, especially when facing complex scenes such as occlusion and lighting changes.

[0008] In summary, existing target re-identification techniques have shortcomings in the globality of feature extraction, computational efficiency, resource consumption, and diversity and robustness of feature representation, which limit their application in a wider range of scenarios. Summary of the invention

[0009] The purpose of this application is to provide a target re-identification method, device, medium and product that can solve the problems existing in the prior art in terms of the globality of feature extraction, computational efficiency, resource consumption, and diversity and robustness of feature representation.

[0010] To achieve the above objectives, this application provides the following solutions:

[0011] In a first aspect, the present application provides a target re-identification method, comprising:

[0012] Obtain the query image and the target image;

[0013] Constructing a multi-branch visual state space model; the multi-branch visual state space model includes: a strong baseline module, a multi-granularity feature extractor module, a ranking-aware triplet regularization module and a training and reasoning module; the strong baseline module includes a linear layer and a plurality of bidirectional visual state space blocks; the multi-granularity feature extractor module includes a plurality of branches and a bidirectional visual state space block;

[0014] The query image and the target image are respectively input into the multi-branch visual state space model to obtain the target image ranking result; wherein the strong baseline module is used to extract the global features of the target image; the multi-granularity feature extractor module is used to extract the multi-granularity target features of the query image based on the global features; the ranking-aware triplet regularization module is used to determine the similarity between the multi-granularity target features, and optimize the correlation between the multi-granularity target features based on the similarity; the training and inference module is used to train and optimize the parameters of the multi-branch visual state space model, and is used to obtain the target image ranking result based on the correlation between the optimized multi-granularity target features;

[0015] A target re-identification result is obtained based on the target image sorting result.

[0016] Optionally, a multi-branch visual state space model is constructed, including:

[0017] Acquire a training data set; the training data set includes image data and target identification and camera ID data corresponding to the image data;

[0018] An initial strong baseline module is constructed based on the visual state space model, and an initial multi-granularity feature extractor module, an initial ranking-aware triplet regularization module, and a training and reasoning module are constructed to obtain an initial model.

[0019] The initial model is trained using the training data set until the total loss function value of the initial model reaches a minimum, and the trained initial model is used as the multi-branch visual state space model.

[0020] Optionally, the process of extracting the global features of the target image by the strong baseline module includes:

[0021] In the multi-granularity feature extractor module, the target image is segmented into a plurality of patches according to a set step size;

[0022] Converting the plurality of patches into multi-dimensional image tokens by linear projection, uniformly inserting a plurality of category tokens between the multi-dimensional image tokens, and adding token sequence position information and image scene information to obtain initial features;

[0023] Inputting the initial features into the bidirectional visual state space block to obtain output features;

[0024] The linear layer is used to perform dimension reduction processing on the output features, and the output features after the dimension reduction processing are concatenated into the global features.

[0025] Optionally, the process of extracting multi-granularity target features of the query image based on the global features by the multi-granularity feature extractor module comprises:

[0026] In the multi-granularity feature extractor module, segmenting the global features into class tokens and image tokens;

[0027] Based on the fusion sampling rate, adjacent category tokens are fused to obtain fused category tokens;

[0028] The image token and the fused category token are fused according to the principle of uniform distribution to obtain an intermediate feature;

[0029] The bidirectional visual state space block is used to process the intermediate features to obtain the multi-granularity target features.

[0030] Optionally, the ranking-aware triplet regularization module determines the similarity between multi-granularity target features, and optimizes the correlation between the multi-granularity target features based on the similarity, comprising:

[0031] In the rank-aware triplet regularization module, determining a similarity matrix between multi-granularity target features in each branch of the multi-granularity feature extractor module;

[0032] A rank-aware triplet regularization loss function is constructed based on the similarity matrix, and the rank-aware triplet regularization loss function is used to optimize the correlation between multi-granularity target features.

[0033] Optionally, constructing a ranking-aware triplet regularization loss function based on the similarity matrix includes:

[0034] Minimize the similarity index coefficient between the similarity matrices corresponding to each pair of branches, and construct the intra-class diversity constraint loss function and the inter-class diversity constraint loss function based on the minimized similarity index coefficient;

[0035] The ranking-aware triplet regularization loss function is constructed based on the intra-class diversity constraint loss function and the inter-class diversity constraint loss function; the ranking-aware triplet regularization loss function is expressed as:

[0036] ;

[0037] In the formula, represents the value of the rank-aware triplet regularization loss function, represents the value of the intra-class diversity constraint loss function, Represents the value of the inter-class diversity constraint loss function.

[0038] Optionally, the loss function implanted in the training reasoning module is expressed as:

[0039] ;

[0040] In the formula, represents the loss function value, represents the number of branches in the multi-granularity feature extractor module, represents the triplet loss, represents the category loss, Represents the first The target features obtained by the branches are represents the hyperparameter, Represents the value of the rank-aware triplet regularization loss function.

[0041] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the target re-identification methods described above.

[0042] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the target re-identification methods described above.

[0043] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any one of the target re-identification methods described above.

[0044] According to the specific embodiments provided in this application, this application has the following technical effects:

[0045] The present application provides a method, device, medium and product for target re-identification. By constructing a multi-branch visual state space model including a strong baseline module, a multi-granularity feature extractor module, a ranking-aware triplet regularization module and a training and reasoning module, the efficiency of target re-identification can be improved and resource consumption in the recognition process can be reduced; and by adopting a multi-granularity feature extractor module to extract multi-granularity target features of a query image based on global features, target features can be extracted from different levels. The ranking-aware triplet regularization module is used to determine the similarity between multi-granularity target features, and the correlation between multi-granularity target features is optimized based on the similarity, which can enhance feature diversity and thus improve the robustness of model detection, solving the problems existing in the diversity and robustness of feature representation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1 A flowchart of a target re-identification method provided in one embodiment of the present application;

[0048] Figure 2 A schematic diagram of the structure of a multi-branch visual state space model provided in one embodiment of the present application;

[0049] Figure 3 A schematic diagram of a bidirectional visual state space block structure provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of an image segmentation process provided in an embodiment of the present application;

[0051] Figure 5 A schematic diagram of the structure of a multi-granularity feature extractor module provided in one embodiment of the present application;

[0052] Figure 6 A schematic diagram of a ranking-aware triplet regularization module provided in an embodiment of the present application;

[0053] Figure 7 A schematic diagram of a strong baseline module provided in an embodiment of the present application;

[0054] Figure 8 A schematic diagram of a visualization result array obtained by using the target re-identification method provided by the present application;

[0055] Fig. 9A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

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

[0057] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0058] In an exemplary embodiment, the present application provides a target re-identification method, which is executed by a computer device, specifically, a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, the method is applied to a server as an example for description. Figure 1 As shown, the target re-identification method includes:

[0059] Step 100: Obtain a query image and a target image.

[0060] Step 101: Construct a multi-branch visual state space model. Figure 2 As shown, the constructed multi-branch visual state space model includes: a strong baseline module (such as Figure 7 As shown in ), multi-granularity feature extractor module (as Figure 5 ), rank-aware triplet regularization module (as shown in Figure 6 The strong baseline module includes a linear layer and multiple bidirectional visual state space blocks. The multi-granularity feature extractor module includes multiple branches and bidirectional visual state space blocks.

[0061] Step 102: Input the query image and the target image into the multi-branch visual state space model respectively to obtain the target image ranking result. Among them, the strong baseline module is used to extract the global features of the target image. The multi-granularity feature extractor module is used to extract the multi-granularity target features of the query image based on the global features. The ranking-aware triplet regularization module is used to determine the similarity between the multi-granularity target features, and optimize the correlation between the multi-granularity target features based on the similarity. The training inference module is used to train and optimize the parameters of the multi-branch visual state space model, and is used to obtain the target image ranking result based on the correlation between the optimized multi-granularity target features. For example, sorting is performed according to cosine similarity: using the extracted features, the cosine similarity between the query image and each image in the target image set is calculated, and then the target image set is sorted according to the similarity to achieve target re-identification.

[0062] Step 103: Obtain a target re-identification result based on the target image ranking result. For example, according to the target image ranking result, output the target image that is most similar to the query image to complete the target re-identification task.

[0063] In another exemplary embodiment of the present application, in order to further improve the accuracy of target re-identification, in this embodiment, the implementation process of the above step 101 includes:

[0064] Step 1011: Acquire a training data set. The training data set mainly collects and preprocesses a target re-identification data set for training, which includes image data and its corresponding target identification and camera ID data.

[0065] Step 1012: construct an initial strong baseline module based on the visual state space model, and construct an initial multi-granularity feature extractor module, an initial ranking-aware triplet regularization module and a training inference module to obtain an initial model.

[0066] For example: Based on the Mamba model, a strong baseline module for extracting robust features is constructed, which can process the input image and generate the initial feature representation.

[0067] Based on the strong baseline module, a multi-granularity feature extractor (MGFE) module is introduced to extract target features from different levels through a multi-branch architecture to enhance the diversity and robustness of features.

[0068] In order to further improve the diversity of features, the Ranking-aware Triplet Regularization (RATR) module is introduced to enhance the discriminability of features learned by different branches by optimizing the ranking relevance of features.

[0069] Step 1013: The initial model is trained using the training data set until the total loss function value of the initial model reaches a minimum, and the trained initial model is used as the multi-branch visual state space model. The training of the constructed initial model using the training data set mainly includes feature extraction, calculation and optimization of the loss function, and updating of model parameters to minimize the total loss function.

[0070] In another exemplary embodiment of the present application, the strong baseline module is the basis of the entire multi-branch visual state space model. Based on this, the process of extracting the global features of the target image using the strong baseline module includes:

[0071] (11) In the multi-granularity feature extractor module, the target image is segmented into multiple patches according to the set step size. For example, Figure 3 As shown. Given a target image , firstly divide the target image into Patches , each patch size is , the step length is Among them, the number of patches The calculation formula can be expressed as:

[0072] .

[0073] In the formula, represents the set of real numbers, Indicates the height of the target image By length and step length The number of patches after segmentation, Indicates the width of the target image By length and step length The number of patches after segmentation.

[0074] (12) Through linear projection Convert multiple patches to dimensional image tokens and evenly insert them between multi-dimensional image tokens Category Tokens , and add token sequence position information and image scene information , in order to retain the location information and integrate the scene information. The final initial feature is :

[0075] .

[0076] In the formula, represents the linear projection function, Indicates Patches, Indicates Class tokens, represents the concatenation vector, , , , Respectively represent ,..., Image token. represents the hyperparameter that controls the intensity of image scene information, Indicates the category of the scene. Indicates scene information, that is, the corresponding image is in the Obtained in a scenario.

[0077] (13) Input the initial features into the bidirectional visual state space block to obtain the output features. The structure of the bidirectional visual state space block is as follows: Figure 4 shown.

[0078] (14) Use the linear layer to reduce the dimension of the output features, and then concatenate the output features after dimension reduction into global features.

[0079] For example: In order to transform the input (i.e. the initial features ) is mapped to the latent representation space using Bi-direction Mamba Block (BiMB). Blocks, input is converted to output Then, a linear layer (LL) is used to transform The dimension of the normalized category tokens is reduced to the original , and concatenated into dimensions Global features , global features The determination process is as follows:

[0080] .

[0081] In the formula, represents normalization, and Both represent two intermediate state features, LL() represents linear layer processing, Represents bidirectional visual state-space block processing. is the middle number, .

[0082] In another exemplary embodiment of the present application, in order to improve the multi-granularity of the strong baseline module feature, the multi-granularity feature extractor module is implemented through a multi-branch architecture (such as Figure 5 As shown in Figure 2), features are extracted from multiple levels. Based on this, the multi-granularity feature extractor module extracts multi-granularity target features of the query image based on global features, including:

[0083] (22) In the multi-granularity feature extractor module, the global features are segmented into category tokens and image tokens.

[0084] (23) Based on the fusion sampling rate, adjacent category tokens are fused to obtain fused category tokens.

[0085] (24) Image tokens and fused category tokens are fused according to the principle of uniform distribution to obtain intermediate features.

[0086] (25) A bidirectional visual state space block is used to process intermediate features to obtain granular target features.

[0087] Based on the description of steps (22) to (25) above, assume that there are branches, denoted as , each branch is based on the output Extracting features with multiple granularities , which can be expressed as:

[0088] .

[0089] In the formula, Indicates A multi-granularity feature extractor with multiple branches.

[0090] For example, for the branch , first output Split into category tokens and image token ,have:

[0091] .

[0092] Based on the fusion sampling rate , by fusing adjacent The category token will Merge into fusion class token :

[0093] .

[0094] in, . Indicates the fusion strategy, such as taking the average, maximum, or minimum. Fusion category token and the previous image token According to the principle of uniform distribution, mix again to obtain intermediate features , and then through two additional BiMB processes, the final target feature is obtained .

[0095] Based on the above description, the Multi-Granularity Feature Extractor (MGFE) can be used to obtain Target features of different granularities , each target feature All are normalized, dimensionally reduced, and concatenated. To ensure that each granular feature contributes equally, the dimensions of the concatenated features are set to be consistent. , the dimension reduction factor is , the final multi-granularity target feature The dimension is maintained as , and the above-mentioned characteristics The dimensions are consistent.

[0096] In another exemplary embodiment of the present application, in order to improve the diversity and robustness of each granularity of the strong baseline module based on the visual state space model, in this embodiment, a ranking-aware triplet regularization module is used to determine the similarity between multi-granularity target features, and a process of optimizing the correlation between multi-granularity target features based on the similarity includes:

[0097] (31) In the rank-aware triplet regularization module, a similarity matrix between multi-granular target features in each branch of the multi-granular feature extractor module is determined.

[0098] (32) A ranking-aware triplet regularization loss function is constructed based on the similarity matrix, and the ranking-aware triplet regularization loss function is used to optimize the correlation between multi-granularity target features.

[0099] (32-1) Minimize the similarity index coefficient between the similarity matrices corresponding to each pair of branches, and construct the intra-class diversity constraint loss function and the inter-class diversity constraint loss function based on the minimized similarity index coefficient.

[0100] (32-2) A ranking-aware triplet regularization loss function is constructed based on the intra-class diversity constraint loss function and the inter-class diversity constraint loss function.

[0101] Based on the description of steps (31) and (32) above, for example, given a small batch of image data containing multi-granular features ,in and They represent the different categories of objects and the number of images of each object in the mini-batch.

[0102] First, calculate the branch The feature similarity matrix ,have:

[0103] .

[0104] In the formula, represents the cosine similarity between two features, Indicates Features With Features The feature similarity matrix between .

[0105] Then, considering the intra-class and inter-class diversity, we expect that the feature rankings obtained by different branches are different in terms of both intra-class and inter-class rankings. Kendall's Tau (KTau) is a metric that measures the correlation between the rankings of two sequences. and , their KTau can be expressed as :

[0106]

[0107] In the formula, is the number of combinations, is a sign function, and Is a sequence Elements of and Is a sequence The range of KTau is , where a smaller value indicates a lower consistency in the ranking order between the two sequences. Therefore, in order to encourage the diversity of features learned by each branch, the goal can be determined to minimize KTau between the similarity matrices of features learned by each pair of branches. Based on this, the above problem can be solved from two perspectives: intra-class diversity and inter-class diversity, and the initial intra-class diversity constraint loss and the initial inter-class diversity constraint loss are proposed:

[0108] .

[0109] In the formula, and They represent the initial intra-class diversity constraint loss value and the initial inter-class diversity constraint loss value respectively. Representation characteristics The positive sample index set (excluding itself), Representation characteristics The negative sample index set, and . , Both represent similarity matrices.

[0110] However, due to the existence of the sign function, KTau is non-differentiable, so the initial intra-class diversity constraint loss and the initial inter-class diversity constraint loss determined above cannot be optimized. To solve this problem, the sign function can be replaced by the hyperbolic tangent function to obtain a differentiable KTau, denoted as :

[0111] .

[0112] In the formula, is a hyperparameter that controls the smoothness of the ranking correlation. Considering that each feature is The differentiable KTau is calculated based on the similarity between each feature and the centroid of the negative features, thus reducing the calculation of each feature to only negative features. Based on this, we define the sequence for:

[0113] .

[0114] In the formula, Indicates branches in a small batch No. Features in the negative class ( ). Through the differentiable KTau, the initial intra-class diversity constraint loss and the initial inter-class diversity constraint loss given above can be transformed into the final optimizable and efficient loss function, namely the intra-class diversity constraint loss and the inter-class diversity constraint loss, which are:

[0115] .

[0116] Based on the above, the proposed rank-aware triplet regularization loss can be expressed as:

[0117] .

[0118] In the formula, represents the value of the rank-aware triplet regularization loss function, represents the value of the intra-class diversity constraint loss function, Represents the value of the inter-class diversity constraint loss function.

[0119] In another exemplary embodiment of the present application, the training and reasoning module is mainly responsible for the training and reasoning of the entire multi-branch visual state space model. In the training mode, the overall loss function used is:

[0120] .

[0121] In the formula, represents the loss function value, represents the triplet loss, represents the class loss. represents a hyperparameter used to balance the weight of the ranking-aware triplet regularization loss. , respectively using triplet loss and category loss Training optimization is performed. The category loss uses the cross entropy loss with label smoothing, while the triplet loss uses a hard margin method instead of a soft margin.

[0122] In test mode, all features , after L2 normalization, they are concatenated.

[0123] Based on the above description, this application proposes a strong baseline architecture based on a visual state space model for target re-identification tasks. This architecture uses a variant of the Mamba model and achieves effective extraction and representation of target features through a carefully designed network structure and training strategy.

[0124] This application introduces multiple category tokens and uses a multi-branch visual state space model to extract multi-granular features of the target, thereby enhancing the model's ability to capture detailed information of the target.

[0125] This application designs a multi-granularity feature extractor (MGFE), which adopts a multi-branch architecture and category token fusion technology to form multi-granular features, thereby improving the model's discriminative ability and fine-grained coverage of the target.

[0126] This application designs a ranking-aware triplet regularization (RATR) technology, which reduces the redundancy of multi-branch features by considering intra-class and inter-class diversity constraints, enhances the diversity of multi-granularity features, and ensures the robustness of target features.

[0127] In another exemplary embodiment of the present application, in order to verify the effectiveness of the present application, different target re-identification models [RGA-SC (Relation-Aware Global Attention Spatial Channel), MSINet (Multi-Scale Interaction Network), MGN (Multiple Granularity Network), ABDNet (Attentive but DiverseNetwork), TransReID (Transformer for ReID), AAformer (Auto-Aligned Transformer)] were used to conduct experiments on two standard datasets in the field of pedestrian re-identification, MSMT17 and DukeMTMC-reID. The experimental results are shown in Table 1 below.

[0128] Table 1 Experimental results in the person re-identification task

[0129]

[0130] In Table 1, mAP (Mean Average Precision) and Rank-1 are two commonly used indicators for evaluating the performance of information retrieval systems. Among them, mAP (Mean Average Precision) is an indicator to measure the overall performance of a model on multiple categories. It calculates the average precision of the model at different recall levels. Rank-1 refers to the proportion of the most likely category (i.e. the first-ranked category) returned by the model for a given input sample that is consistent with the true category.

[0131] Furthermore, the visualization results on the DukeMTMC-reID dataset are as follows: Figure 8 As shown in the figure. Through the Grad-CAM technology, it is possible to intuitively show how each model focuses on the key areas of the target. Figure 8 As shown in the figure, even when the target is occluded, the multi-branch visual state space model provided by the present application can still focus on the key parts of the target and extract distinguishing features. This result not only intuitively demonstrates the benefits of the present application, but also further confirms the robustness and accuracy of the multi-branch visual state space model provided by the present application in complex environments. Figure 8 Part (a) to Figure 8Part (d) of the figure shows the Grad-CAM visualization of the multi-branch visual state space model (three branches) and the visualization of the correlation between different category tokens and image tokens. The first column shows the original image and the overall Grad-CAM visualization results. The second column shows the Grad-CAM visualization results of the three branches. The next seven columns show the feature map visualization results of the 12 category labels (marked with red boxes) of the first branch, the 6 category labels (marked with green boxes) of the second branch, and the 3 category labels (marked with blue boxes) of the third branch.

[0132] In summary, compared with the prior art, this application has the following advantages:

[0133] 1. Multi-granularity feature extraction to solve the problem of detail loss: This application introduces a multi-granularity feature extractor (MGFE) to extract target features from different levels, solving the contradiction of detail information loss in traditional models when processing high-resolution images. This method not only enhances the model's ability to capture subtle differences between individuals, but also improves the accuracy of target re-identification in changing scenes and perspectives.

[0134] 2. Ranking-aware Triplet Regularization to enhance feature diversity: This application adopts the Ranking-aware Triplet Regularization (RATR) module to reduce the redundancy of feature extraction in the multi-branch structure and enhance the diversity of multi-granular features from the perspective of intra-class and inter-class. This regularization technology ensures the discrimination of intra-class features and the good separation of inter-class features, thereby improving the robustness of the target re-identification task.

[0135] 3. Efficient computational complexity to solve resource limitation problem: Compared with the traditional deformer-based method, the computational complexity of the method based on the visual state space model architecture in the inference stage of this application is almost linear with the number of input tokens, which effectively solves the contradiction of processing large-scale target search tasks in a resource-constrained environment. This advantage makes this application more feasible and efficient in practical applications.

[0136] 4. Lower number of parameters and memory usage, solving model deployment problems: This application can significantly reduce the number of model parameters and GPU memory usage while maintaining high performance. Compared with the deformer-based method, the method proposed in this application has only one-third of the number of parameters and lower GPU memory usage. This advantage solves the contradiction of deploying high-performance target re-identification models on devices with limited hardware resources.

[0137] In addition, since the multi-branch visual state space model provided by the present application has powerful feature extraction and representation capabilities, and fine-grained image classification and target detection tasks require the multi-branch visual state space model to capture the subtle feature differences of the target. Based on this, the target re-identification method provided by the present application can also be extended to fine-grained image classification and target detection and recognition tasks. Through multi-granularity feature extraction and visual state space models, these subtle features can be effectively extracted and distinguished. Among them, the MGFE module provided by the present application extracts features of different granularities through a multi-branch architecture, which is suitable for capturing features of targets at different scales and spatial positions, and can be extended to target detection tasks. The RATR module provided by the present application can significantly improve the performance of these multi-branch architectures by promoting the diversity and robustness of multi-branch features, and can also be extended to the deep model using a multi-branch structure in the field of computer vision to extract features to improve the expressiveness and robustness of the model.

[0138] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store target re-identification data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a target re-identification method is implemented.

[0139] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0140] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0141] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0143] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0144] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0145] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0146] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A target re-identification method, characterized in that: The target re-identification method comprises: Obtain the query image and the target image; Constructing a multi-branch visual state space model; the multi-branch visual state space model includes: a strong baseline module, a multi-granularity feature extractor module, a ranking-aware triplet regularization module and a training and reasoning module; the strong baseline module includes a linear layer and a plurality of bidirectional visual state space blocks; the multi-granularity feature extractor module includes a plurality of branches and a bidirectional visual state space block; The query image and the target image are respectively input into the multi-branch visual state space model to obtain the target image ranking result; wherein the strong baseline module is used to extract the global features of the target image; the multi-granularity feature extractor module is used to extract the multi-granularity target features of the query image based on the global features; the ranking-aware triplet regularization module is used to determine the similarity between the multi-granularity target features, and optimize the correlation between the multi-granularity target features based on the similarity; the training and inference module is used to train and optimize the parameters of the multi-branch visual state space model, and is used to obtain the target image ranking result based on the correlation between the optimized multi-granularity target features; Obtaining a target re-identification result based on the target image sorting result; The process of extracting the global features of the target image by the strong baseline module includes: In the strong baseline module, the target image is segmented into a plurality of patches according to a set step size; Converting the plurality of patches into multi-dimensional image tokens by linear projection, uniformly inserting a plurality of category tokens between the multi-dimensional image tokens, and adding token sequence position information and image scene information to obtain initial features; Inputting the initial features into the bidirectional visual state space block to obtain output features; Using the linear layer to perform dimension reduction processing on the output features, and splicing the output features after the dimension reduction processing into the global features; The process of the multi-granularity feature extractor module extracting multi-granularity target features of the query image based on the global features includes: In the multi-granularity feature extractor module, the global features are segmented into class tokens and image tokens; Based on the fusion sampling rate, adjacent category tokens are fused to obtain fused category tokens; The image token and the fused category token are fused according to the principle of uniform distribution to obtain an intermediate feature; The bidirectional visual state space block is used to process the intermediate features to obtain the multi-granularity target features.

2. The target re-identification method according to claim 1, characterized in that: Build a multi-branch visual state space model, including: Acquire a training data set; the training data set includes image data and target identification and camera ID data corresponding to the image data; An initial strong baseline module is constructed based on the visual state space model, and an initial multi-granularity feature extractor module, an initial ranking-aware triplet regularization module, and a training and reasoning module are constructed to obtain an initial model. The initial model is trained using the training data set until the total loss function value of the initial model reaches a minimum, and the trained initial model is used as the multi-branch visual state space model.

3. The target re-identification method according to claim 1, characterized in that: The ranking-aware triplet regularization module determines the similarity between multi-granularity target features and optimizes the correlation between the multi-granularity target features based on the similarity, including: In the rank-aware triplet regularization module, determining a similarity matrix between multi-granularity target features in each branch of the multi-granularity feature extractor module; A rank-aware triplet regularization loss function is constructed based on the similarity matrix, and the rank-aware triplet regularization loss function is used to optimize the correlation between multi-granularity target features.

4. The target re-identification method according to claim 3, characterized in that: A ranking-aware triplet regularization loss function is constructed based on the similarity matrix, including: Minimize the similarity index coefficient between the similarity matrices corresponding to each pair of branches, and construct the intra-class diversity constraint loss function and the inter-class diversity constraint loss function based on the minimized similarity index coefficient; The ranking-aware triplet regularization loss function is constructed based on the intra-class diversity constraint loss function and the inter-class diversity constraint loss function; the ranking-aware triplet regularization loss function is expressed as: ; In the formula, represents the value of the rank-aware triplet regularization loss function, represents the value of the intra-class diversity constraint loss function, Represents the value of the inter-class diversity constraint loss function.

5. The target re-identification method according to claim 1, characterized in that: The loss function implanted in the training reasoning module is expressed as: ; In the formula, represents the loss function value, represents the number of branches in the multi-granularity feature extractor module, represents the triplet loss, represents the category loss, Represents the first The target features obtained by the branches are represents the hyperparameter, Represents the value of the rank-aware triplet regularization loss function.

6. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the target re-identification method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the target re-identification method described in any one of claims 1 to 5 is implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the target re-identification method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Global feature and stepped local feature fused pedestrian re-identification method and device

    CN115171165A

  • Pedestrian re-identification method and system, terminal and computer readable storage medium

    CN119169523A