A re-identification model training method and system based on noise robust cue learning framework
Through the noise robust cue learning framework, the CLIP model is used to extract image features and generate text embeddings. Combined with the cross-attention module and loss function optimization, the recognition accuracy and robustness of the pedestrian re-identification model in noisy environments are improved, solving the problem of performance degradation under noisy labels.
Patent Information
- Application Number
- CN202510541991.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-04-28
AI Technical Summary
Existing person re-identification models suffer from performance degradation under noisy labels and fail to fully utilize the semantic information in the training data, resulting in insufficient noise robustness in complex scenarios. In particular, it is difficult to effectively handle fine-grained image re-identification in the absence of specific descriptive text labels.
A noise-robust cue learning framework is adopted to extract image features through a pre-trained CLIP model. Global and contextual visual features are combined to map pseudo-language cues, generating global and contextual text embeddings. A language-guided cross-attention module and a generalized cross-entropy loss function are introduced to optimize model parameters. The model is trained with identity classification loss and semantic knowledge distillation loss to improve the noise robustness of the model.
It effectively captures semantic nuances in the data, improves the accuracy and robustness of the model, enhances recognition accuracy under noisy conditions, and addresses the negative impact of noisy labels on model performance.
Smart Images

Figure CN120148072B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of re-identification model processing, and in particular to a re-identification model training method and system based on a noise robust cue learning framework. Background Art
[0002] Person re-identification (PRED) is a critical task in video surveillance systems, aiming to match the same object across different non-overlapping camera views. Deep learning-based PRED methods have made significant progress in recent years, but these methods typically rely on large amounts of accurately annotated data. However, obtaining high-quality manually annotated data is expensive and time-consuming, and is prone to introducing noisy labels, which can severely impact the model's recognition performance. Existing noise-robust learning methods mostly follow the paradigm of reliable sample selection and noisy label correction. While this approach can alleviate the noise problem to a certain extent, it fails to fully exploit the semantic information in the training data, resulting in insufficient robustness to noise in complex scenarios. Furthermore, many existing methods ignore the inherent semantic nuances in the data and are unable to effectively address the challenges of fine-grained image re-identification, especially in the absence of specific descriptive text labels. Summary of the Invention
[0003] The present invention provides a re-identification model training method and system based on a noise robust prompt learning framework to solve the problem that the performance of existing pedestrian re-identification models degrades under noisy labels, and improves the recognition accuracy and robustness in noisy environments.
[0004] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0005] In a first aspect, the present invention provides a method for training a re-identification model based on a noise-robust cue learning framework, comprising:
[0006] The visual encoder of the pre-trained CLIP model is used to extract the global visual features of the input pedestrian image, and the k nearest neighbor global visual features of the global visual features of the target sample are retrieved in the feature space. The contextual visual features are generated based on the weighted aggregation of cosine similarity.
[0007] Mapping global visual features and contextual visual features into global pseudo-language cues and contextual pseudo-language cues through a learnable mapping network;
[0008] Combine the predefined basic prompt template with the global pseudo-language prompt words and the contextual pseudo-language prompt words to construct global text prompts and contextual text prompts, and generate global text embeddings and contextual text embeddings based on the text encoder of the pre-trained CLIP model;
[0009] The global text embedding and the contextual text embedding are fused based on the maximum pooling strategy to form a comprehensive text embedding;
[0010] A language-guided cross-attention module is introduced, which uses the comprehensive text embedding as the query vector and the tile embedding output by the visual encoder as the key vector and value vector to optimize the multimodal feature representation. The generalized cross-entropy loss function and the symmetric contrast loss function are jointly optimized to improve the robustness to noisy labels.
[0011] The comprehensive text embedding is used as the category semantic vector, and the visual feature distribution of the student re-ID model is aligned with the text feature distribution of the teacher model through a hint imitation strategy; the student model is jointly trained based on the identity classification loss, triple boundary loss and semantic knowledge distillation loss;
[0012] The visual encoder of the trained re-ID model is used to extract the visual features of the query image and the gallery image in the test set, and the cross-modal similarity is calculated by combining the text features generated by the teacher model. The gallery samples are sorted according to the similarity score, and the target identity that matches the query image is output to complete the pedestrian re-ID task.
[0013] Optionally, use the pre-trained CLIP model’s visual encoder to extract global visual features of the input pedestrian image, including:
[0014] All training sets Pedestrian images Input to the visual encoder to generate a series of global visual features ;
[0015] in, Indicates identity labels, pedestrian images in the training sets of Market1501 and DukeMTMC-ReID datasets;
[0016] Retrieve the k nearest neighbor global visual features of the target sample in the feature space, and generate contextual visual features based on cosine similarity weighted aggregation, including:
[0017] For the target sample Global visual features , find its k nearest neighbor global visual features in the feature space, recorded as , the contextual visual features are obtained by the formula, and the process satisfies the following relationship:
[0018] ;
[0019] Where, , is the cosine similarity measure between two samples, Represents contextual visual features.
[0020] Optionally, mapping the global visual features and the contextual visual features into global pseudo-language prompts and contextual pseudo-language prompts through a learnable mapping network, including:
[0021] Using a learnable mapping network The global visual features and contextual visual features are mapped into pseudo-language prompt words and contextual pseudo-language prompt words. This process satisfies the following relationship:
[0022] ;
[0023] ;
[0024] Where, is the global visual feature, is the generated global pseudo-language prompt word, is the contextual visual feature, It is a contextual pseudo-linguistic cue word.
[0025] Optionally, a predefined basic prompt template is combined with global pseudo-language prompt words and contextual pseudo-language prompt words to construct global text prompts and contextual text prompts, including:
[0026] Constructing global text prompts and contextual text prompts based on predefined basic prompt templates, global pseudo-language prompt words, and contextual pseudo-language prompt words;
[0027] The basic prompt template meets the following requirements:
[0028] A photo of a person;
[0029] A photo of a person;
[0030] in, Represents the global pseudo-language prompt word, Represents contextual pseudo-linguistic cue words;
[0031] Based on the obtained global text prompts and contextual text prompts, they are input into the text encoder of the pre-trained CLIP model to generate global text embedding and contextual text embedding. The generation process satisfies the following relationship:
[0032] ;
[0033] ;
[0034] Where, For global text prompt, is the global text embedding, is a contextual text prompt, is contextual text embedding, Pre-trained CLIP text encoder.
[0035] Optionally, the global text embedding and the contextual text embedding are fused based on a maximum pooling strategy to form a comprehensive text embedding, including:
[0036] According to the global text embedding and contextual text embeddings , using the maximum pooling strategy to fuse the two into a comprehensive text embedding , where the integrated text embedding process satisfies the following relationship:
[0037] ;
[0038] Where, is the global text embedding, is contextual text embedding, For comprehensive text embedding, It is the maximum pooling operation.
[0039] Optionally, a language-guided cross-attention module is introduced, using the comprehensive text embedding as the query vector and the tile embedding output by the visual encoder as the key vector and value vector to optimize the multimodal feature representation. The generalized cross-entropy loss function and the symmetric contrast loss function are jointly optimized to improve the robustness to noisy labels, including:
[0040] Embed by tiles and comprehensive text embeddings , using language-guided cross-attention modules, comprehensive text embedding Acts as query vector, full tile embedding As key vectors and value vectors, the text semantic fusion process satisfies the following relationship:
[0041] ;
[0042] ;
[0043] Where, is the dimension of text features, Corresponding to three fully connected layers, Represents the fused text semantic information;
[0044] In the prompt optimization, the generalized cross entropy loss is used to optimize the prompt, and the optimization process satisfies the following formula:
[0045] ;
[0046] Where, It is a sample Classified into categories based on their final feature representation The probability of =0.7 balances robustness and performance;
[0047] During this training phase, we freeze both the image encoder and the text encoder. To ensure that the learned text semantic information can effectively capture the image context, we use a symmetric contrast loss to optimize the hint, as follows:
[0048] ;
[0049] ;
[0050] In the formula, the parameters It plays a role in adjusting the softening degree of the similarity score in the contrast loss function;
[0051] According to the generalized cross entropy loss function and the symmetric contrast loss function, the optimized total loss formula is constructed to satisfy the following relationship:
[0052] ;
[0053] Where, represents the generalized cross entropy loss, and represents the symmetric contrast loss function.
[0054] Optionally, the comprehensive text embedding is aggregated into a category semantic vector, and a visual feature distribution of the student re-ID model is aligned with the text feature distribution of the teacher model through a hint imitation strategy; the student model is jointly trained based on identity classification loss, triple boundary loss, and semantic knowledge distillation loss, including:
[0055] Text embedding provides semantic supervision signals as category vectors. For each identity, the prompts of the same identity are aggregated to form a unified text embedding. The aggregation process satisfies the following relationship:
[0056] ;
[0057] Where, represents the unified text embedding of a specific identity after aggregation, represents comprehensive text embedding, Indicates the identity category, Indicates identity tag;
[0058] The student model calculates the probability that a given image belongs to an identity category, and the calculation process satisfies the following relationship:
[0059] ;
[0060] Where, Image representing the student model's predictions Belonging to identity The probability of is the output visual feature of the re-identification model;
[0061] According to the probability distribution , the knowledge distillation loss is:
[0062] ;
[0063] in, Represents the teacher model's response to the input image Assign to category The probability of = 2;
[0064] The re-ID model is trained to obtain refined visual representations, and the total training loss is:
[0065] ;
[0066] Among them, identity loss , triplet loss .
[0067] Optionally, the method further includes:
[0068] The visual encoder of the trained re-ID model is used to extract the visual features of the query image and the gallery image in the test set, and the cross-modal similarity is calculated by combining the text features generated by the teacher model. The gallery samples are sorted according to the similarity score, and the target identity that matches the query image is output to complete the pedestrian re-ID task.
[0069] In a second aspect, an embodiment of the present application provides a re-identification model training system based on a noise-robust cue learning framework, including a processor and a memory;
[0070] Memory for storing computer programs;
[0071] The processor is configured to implement any one of the method steps described in the first aspect when executing a program stored in the memory.
[0072] Beneficial effects:
[0073] This paper designs visually guided global text hints and neighborhood-aware contextual text hint mechanisms, which can effectively capture semantic nuances in data. Visually guided global text hints generate specific text hints based on image features, solving the problem of lacking specific text labels. Neighborhood-aware contextual hints reduce the risk of confirmation bias by capturing neighboring relationship information, improving the accuracy and robustness of the model. Furthermore, this paper proposes a hint-driven knowledge distillation strategy, which uses learned comprehensive text hints as category vectors to guide model optimization, enhancing the model's performance under noisy conditions. A maximum pooling strategy is used to convert image-specific hints into category-specific semantic hints, further improving the model's noise resistance. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 This is a flowchart of a re-identification model training based on a noise-robust cue learning framework according to an embodiment of the present invention;
[0075] Figure 2 A logical diagram of re-identification model training based on a noise-robust cue learning framework according to an embodiment of the present invention;
[0076] Figure 3 This is a supplementary diagram of the logic diagram of the re-identification model training based on the noise robust prompt learning framework in an embodiment of the present invention. In the figure, Figure 3 (a) is part a of the logic diagram of the re-identification model training based on the noise robust hint learning framework. Figure 3 (b) Part b of the logic diagram for re-ID model training based on the noise-robust cue learning framework; DETAILED DESCRIPTION
[0077] The following is a clear and complete description of the technical solutions of the present invention. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0078] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.
[0079] like Figure 1 As shown, the embodiment of the present application provides a re-identification model training method based on a noise robust cue learning framework, including:
[0080] The visual encoder of the pre-trained CLIP model is used to extract the global visual features of the input pedestrian image, and the k nearest neighbor global visual features of the global visual features of the target sample are retrieved in the feature space. The contextual visual features are generated based on the weighted aggregation of cosine similarity.
[0081] Mapping global visual features and contextual visual features into global pseudo-language cues and contextual pseudo-language cues through a learnable mapping network;
[0082] Combine the predefined basic prompt template with the global pseudo-language prompt words and the contextual pseudo-language prompt words to construct global text prompts and contextual text prompts, and generate global text embeddings and contextual text embeddings based on the text encoder of the pre-trained CLIP model;
[0083] The global text embedding and the contextual text embedding are fused based on the maximum pooling strategy to form a comprehensive text embedding;
[0084] A language-guided cross-attention module is introduced, which uses the comprehensive text embedding as the query vector and the tile embedding output by the visual encoder as the key vector and value vector to optimize the multimodal feature representation. The generalized cross-entropy loss function and the symmetric contrast loss function are jointly optimized to improve the robustness to noisy labels.
[0085] The comprehensive text embedding is used as the category semantic vector, and the visual feature distribution of the student re-ID model is aligned with the text feature distribution of the teacher model through a hint imitation strategy; the student model is jointly trained based on the identity classification loss, triple boundary loss and semantic knowledge distillation loss;
[0086] The visual encoder of the trained re-ID model is used to extract the visual features of the query image and the gallery image in the test set, and the cross-modal similarity is calculated by combining the text features generated by the teacher model. The gallery samples are sorted according to the similarity score, and the target identity that matches the query image is output to complete the pedestrian re-ID task.
[0087] In the above embodiment, the re-identification model training method based on the noise robust cue learning framework can be mainly divided into a training phase and an application phase. Figure 2-Figure 3 As shown, the specific steps of each stage are as follows:
[0088] S1: Use the visual encoder of the pre-trained CLIP model to extract the global visual features of the input pedestrian image, retrieve the k nearest neighbor global visual features of the global visual features of the target sample in the feature space, and generate contextual visual features based on cosine similarity weighted aggregation;
[0089] The pedestrian images mentioned are in the training sets of the Market1501 and DukeMTMC-ReID datasets; the Market1501 dataset contains 32,668 images of 1,501 identities captured by six cameras. The dataset is divided into a training set and a test set, where the training set contains 12,936 images of 751 identities; the test set contains a gallery set of 19,732 images and a query set of 3,368 images, both of which contain 750 identities. The DukeMTMC-ReID dataset is adapted from DukeMTMC and contains 36,411 images of 1,812 identities recorded from eight cameras. The training set contains 16,522 images of 702 identities, while the test set includes a query set of 2,228 images of 702 identities and a gallery set of 17,661 images of 1,110 identities.
[0090] S1.1: Use the visual encoder of the pre-trained CLIP model to extract global visual features of the input pedestrian image;
[0091] All training sets Pedestrian images Input to the visual encoder to generate a series of global visual features ;
[0092] S1.2: Retrieve the k nearest neighbor global visual features of the target sample in the feature space, and generate contextual visual features based on cosine similarity weighted aggregation;
[0093] For the target sample Global visual features , find its k nearest neighbor global visual features in the feature space, recorded as , the contextual visual features are obtained by the formula, and the process satisfies the following relationship:
[0094] ;
[0095] Where, , is the cosine similarity measure between two samples, Represents contextual visual features.
[0096] S2: Using a learnable mapping network The global visual features and contextual visual features are mapped into pseudo-language prompt words and contextual pseudo-language prompt words. This process satisfies the following relationship:
[0097] ;
[0098] ;
[0099] Where, is the global visual feature, is the generated global pseudo-language prompt word, is the contextual visual feature, It is a contextual pseudo-linguistic cue word.
[0100] S3: Combine the predefined basic prompt template with the global pseudo-language prompt words and the contextual pseudo-language prompt words to construct global text prompts and contextual text prompts, and generate global text embeddings and contextual text embeddings based on the text encoder of the pre-trained CLIP model;
[0101] S3.1 constructs global text prompts and contextual text prompts based on the predefined basic prompt template and the global pseudo-language prompt words and contextual pseudo-language prompt words obtained in S2;
[0102] The basic prompt template meets the following requirements:
[0103] A photo of a person;
[0104] A photo of a person;
[0105] in, Represents the global pseudo-language prompt word, represents contextual pseudo-linguistic cue words;
[0106] S3.2: Based on the global text prompts and contextual text prompts obtained in S3.1, they are input into the text encoder of the pre-trained CLIP model to generate global text embeddings and contextual text embeddings. The generation process satisfies the following relationship:
[0107] ;
[0108] ;
[0109] Where, For global text prompt, is the global text embedding, is a contextual text prompt, is contextual text embedding, Pre-trained CLIP text encoder.
[0110] S4: Based on the maximum pooling strategy, the global text embedding and the contextual text embedding are fused to form a comprehensive text embedding;
[0111] According to the global text embedding and contextual text embeddings , using the maximum pooling strategy to fuse the two into a comprehensive text embedding , where the integrated text embedding process satisfies the following relationship:
[0112] ;
[0113] Where, is the global text embedding, is contextual text embedding, For comprehensive text embedding, It is the maximum pooling operation.
[0114] S5: Introduces a language-guided cross-attention module, uses comprehensive text embeddings as query vectors, and the tile embeddings output by the visual encoder as key and value vectors to optimize multimodal feature representation; uses a generalized cross-entropy loss function and a symmetric contrast loss function to jointly optimize model parameters to improve robustness to noisy labels;
[0115] S5.1: Embedding by tiles and comprehensive text embeddings , using language-guided cross-attention modules, comprehensive text embedding Acts as query vector, full tile embedding As key vectors and value vectors, the text semantic fusion process satisfies the following relationship:
[0116] ;
[0117] ;
[0118] Where, is the dimension of text features, Corresponding to three fully connected layers, Represents the fused text semantic information;
[0119] S5.2: In the prompt optimization, the generalized cross entropy loss is used to optimize the prompt. The optimization process satisfies the following formula:
[0120] ;
[0121] Where, It is a sample Classified into categories based on their final feature representation The probability of =0.7 balances robustness and performance;
[0122] S5.3: In this training phase, both the image encoder and the text encoder are frozen. To ensure that the learned text semantic information can effectively capture the image context, we use a symmetric contrast loss, as follows:
[0123] ;
[0124] ;
[0125] Among them, the parameters It plays a role in adjusting the softening degree of the similarity score in the contrast loss function;
[0126] S5.4: Based on the generalized cross entropy loss function and symmetric contrast loss function described in S5.2 and S5.3, the optimized total loss formula is constructed to satisfy the following relationship:
[0127] ;
[0128] Where, represents the generalized cross entropy loss, and represents the symmetric contrast loss function.
[0129] S6: Aggregate the comprehensive text embeddings into category semantic vectors, align the visual feature distribution of the student re-ID model with the text feature distribution of the teacher model through a hint imitation strategy; jointly train the student model based on identity classification loss, triple boundary loss, and semantic knowledge distillation loss;
[0130] S6.1: Text embeddings provide semantic supervision signals as category vectors. For each identity, the cues of the same identity are aggregated to form a unified text embedding. The aggregation process satisfies the following relationship:
[0131] ;
[0132] Where, represents the unified text embedding of a specific identity after aggregation, represents comprehensive text embedding, Indicates the identity category, Indicates identity tag;
[0133] S6.2: The student model calculates the probability that a given image belongs to an identity category, and the calculation process satisfies the following relationship:
[0134] ;
[0135] Where, Image representing the student model's predictions Belonging to identity The probability of is the output visual feature of the re-identification model;
[0136] S6.3: Probability distribution obtained from S6.2 , the knowledge distillation loss is:
[0137] ;
[0138] in, Represents the teacher model's response to the input image Assign to category The probability of = 2;
[0139] S6.4: Train a re-ID model to obtain refined visual representations, in addition to using identity loss and triplet loss , and also introduces knowledge distillation loss As an additional supervisory signal, the total training loss is:
[0140] ;
[0141] Among them, identity loss , triplet loss .
[0142] This paper uses the ViT-B / 16 model pre-trained on CLIP as the visual encoder and the CLIP text transformer as the text encoder; a randomly initialized mapping network is integrated into the framework. and a multimodal interaction module consisting of parameters Definition: The mapping network is a lightweight three-layer MLP with a 512-dimensional hidden state, and a batch normalization layer is added after its last layer to improve training stability; in the text prompt generation stage, the adam optimizer is used, the initial learning rate is 3.5e-4, and it is adjusted by cosine decay scheduling. The training is performed for 30 epochs with a batch size of 64. No data enhancement is applied. During this stage, only the mapping network and multimodal interaction module are updated; in the semantic-driven ReID model optimization stage, the adam optimizer is used to train the image encoder. The learning rate starts from 5e-7 and increases linearly to 5e-6 in the first 10 epochs. The learning rate is then reduced by 0.1 times at the 30th and 50th epochs. The entire model is trained for 60 epochs with a batch size of 64, including 16 identities with 4 images per identity; in order to enhance robustness and diversity, image enhancement techniques such as random horizontal flipping, padding, cropping and erasing are applied;
[0143] Application stage
[0144] S7: Use the visual encoder of the trained re-ID model to extract visual features of the query image and gallery images in the test set, and calculate cross-modal similarity based on the text features generated by the teacher model; sort the gallery samples according to the similarity score, and output the target identity that matches the query image to complete the pedestrian re-ID task.
[0145] The disclosed embodiment also provides a re-identification model training system based on a noise robust cue learning framework, including a processor and a memory;
[0146] Memory for storing computer programs;
[0147] The processor is configured to implement any one of the method steps described in the method for re-identification model training based on a noise robust cue learning framework when executing a program stored in the memory.
[0148] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. A method for re-identification model training based on a noise-robust cue learning framework, characterized in that: include: The visual encoder of the pre-trained CLIP model is used to extract the global visual features of the input pedestrian image, and the k nearest neighbor global visual features of the global visual features of the target sample are retrieved in the feature space. The contextual visual features are generated based on the weighted aggregation of cosine similarity. Mapping global visual features and contextual visual features into global pseudo-language cues and contextual pseudo-language cues through a learnable mapping network; Combine the predefined basic prompt template with the global pseudo-language prompt words and the contextual pseudo-language prompt words to construct global text prompts and contextual text prompts, and generate global text embeddings and contextual text embeddings based on the text encoder of the pre-trained CLIP model; The global text embedding and the contextual text embedding are fused based on the maximum pooling strategy to form a comprehensive text embedding; A language-guided cross-attention module is introduced, which uses the comprehensive text embedding as the query vector and the tile embedding output by the visual encoder as the key vector and value vector to optimize the multimodal feature representation. The generalized cross-entropy loss function and the symmetric contrast loss function are jointly optimized to improve the robustness to noisy labels. Using the comprehensive text embedding as the category semantic vector, the visual feature distribution of the student re-ID model is aligned with the text feature distribution of the teacher model through a prompt imitation strategy; The student model is trained jointly based on identity classification loss, triple boundary loss, and semantic knowledge distillation loss; The visual encoder of the trained re-ID model is used to extract the visual features of the query image and the gallery image in the test set, and the cross-modal similarity is calculated by combining the text features generated by the teacher model. The gallery samples are sorted according to the similarity score, and the target identity that matches the query image is output to complete the pedestrian re-ID task.
2. A method for re-identification model training based on a noise robust cue learning framework according to claim 1, characterized in that: The visual encoder of the pre-trained CLIP model is used to extract global visual features of the input pedestrian image, including: All training sets Pedestrian image x i Input to the visual encoder to generate a series of global visual features; Among them, y i Indicates identity labels, pedestrian images in the training sets of Market1501 and DukeMTMC-ReID datasets; Retrieve the k nearest neighbor global visual features of the target sample in the feature space, and generate contextual visual features based on cosine similarity weighted aggregation, including: For the target sample x i Global visual features Find its k nearest neighbor global visual features in the feature space, denoted as The contextual visual features are obtained by the formula, and the process satisfies the following relationship: Where, is the cosine similarity measure between two samples, Represents contextual visual features.
3. The method for re-identification model training based on a noise robust cue learning framework according to claim 2, characterized in that: Global visual features and contextual visual features are mapped into global pseudo-language cues and contextual pseudo-language cues through a learnable mapping network, including: Use a learnable mapping network f M The global visual features and contextual visual features are mapped into global pseudo-language prompt words and contextual pseudo-language prompt words. This process satisfies the following relationship: Where, is the global visual feature, s is the generated global pseudo language prompt word, is the contextual visual feature, and s' is the contextual pseudo-linguistic cue word.
4. The method for re-identification model training based on a noise robust cue learning framework according to claim 1, characterized in that: Combine the predefined basic prompt template with the global pseudo-language prompt words and the contextual pseudo-language prompt words to construct global text prompts and contextual text prompts, including: Constructing global text prompts and contextual text prompts based on predefined basic prompt templates, global pseudo-language prompt words, and contextual pseudo-language prompt words; The text encoder based on the pre-trained CLIP model generates global text embeddings and contextual text embeddings, including: According to the obtained global text prompts and contextual text prompts, they are input into the text encoder of the pre-trained CLIP model to generate global text embedding and contextual text embedding. The generation process satisfies the following relationship: Where p g For global text prompt, t g is the global text embedding, p c is the contextual text prompt, t c is contextual text embedding, Pre-trained CLIP text encoder.
5. The method for re-identification model training based on a noise robust cue learning framework according to claim 4, characterized in that: The global text embedding and the contextual text embedding are fused based on the maximum pooling strategy to form a comprehensive text embedding, including: According to the obtained global text embedding t g and contextual text embedding t c , using the maximum pooling strategy to fuse the two into a comprehensive text embedding t x , where the integrated text embedding process satisfies the following relationship: t x =max(t g ,t c ) Where, t g is the global text embedding, t c is the contextual text embedding, t x is a comprehensive text embedding, and max(·) is the maximum pooling operation.
6. The method for re-identification model training based on a noise robust cue learning framework according to claim 1, characterized in that: A language-guided cross-attention module is introduced, which uses the comprehensive text embedding as the query vector and the tile embedding output by the visual encoder as the key vector and value vector to optimize the multimodal feature representation. The generalized cross entropy loss function and the symmetric contrast loss function are used to jointly optimize the model parameters to improve the robustness to noisy labels, including: Based on the tile embedding v and the comprehensive text embedding t x , using language-guided cross-attention modules, comprehensive text embedding t x Acting as the query vector, the tile embedding v serves as the key vector and value vector, and the text semantic fusion process satisfies the following relationship: Q=w q ·t x ,K=w k ·v,V=w w ·v; Where d is the dimension of text features, w q , w k , w v Corresponding to the three fully connected layers, A represents the fused text semantic information; In the prompt optimization, the generalized cross entropy loss is used to optimize the prompt, and the optimization process satisfies the following formula: Where Pr(y=c|x) is the probability that sample x is classified into category c based on its final feature representation, and q=0.7 balances robustness and performance; During this training phase, we freeze both the image encoder and the text encoder. To ensure that the learned text semantic information can effectively capture the image context, we use a symmetric contrast loss to optimize the hint, as follows: In the formula, the parameter τ plays the role of adjusting the softening degree of the similarity score in the contrast loss function; According to the generalized cross entropy loss function and the symmetric contrast loss function, the optimized total loss formula is constructed to satisfy the following relationship: L=L gce +L i2t +L t2i ; Where, L gce represents the generalized cross entropy loss, L i2t and L t2i represents the symmetric contrast loss function.
7. The method for re-identification model training based on a noise robust cue learning framework according to claim 1, characterized in that: The visual encoder of the trained re-ID model is used to extract the visual features of the query image and the gallery image in the test set, and the cross-modal similarity is calculated by combining the text features generated by the teacher model. The gallery samples are sorted according to the similarity score, and the target identity that matches the query image is output to complete the pedestrian re-ID task.
8. A re-identification model training system based on a noise-robust cue learning framework, characterized in that: Including processor and memory; Memory for storing computer programs; The processor is configured to implement the re-identification model training method based on a noise robust prompt learning framework as described in any one of claims 1 to 7 when executing a program stored in the memory.
Citation Information
Patent Citations
Multi-granularity clothes changing pedestrian re-identification method based on clothes desensitization network
CN112784728A
Partial prompt learning-based lifelong target re-identification method
CN118864825A